%PDF- %PDF-
Mini Shell

Mini Shell

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

{"version":3,"file":"./build/components/index.min.js","mappings":"0BAAA,OAOC,WACA,aAEA,IAAIA,EAAS,CAAC,EAAEC,eAEhB,SAASC,IAGR,IAFA,IAAIC,EAAU,GAELC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAC1C,IAAIG,EAAMF,UAAUD,GACpB,GAAKG,EAAL,CAEA,IAAIC,SAAiBD,EAErB,GAAgB,WAAZC,GAAoC,WAAZA,EAC3BL,EAAQM,KAAKF,QACP,GAAIG,MAAMC,QAAQJ,IACxB,GAAIA,EAAID,OAAQ,CACf,IAAIM,EAAQV,EAAWW,MAAM,KAAMN,GAC/BK,GACHT,EAAQM,KAAKG,EAEf,OACM,GAAgB,WAAZJ,EACV,GAAID,EAAIO,WAAaC,OAAOC,UAAUF,SACrC,IAAK,IAAIG,KAAOV,EACXP,EAAOkB,KAAKX,EAAKU,IAAQV,EAAIU,IAChCd,EAAQM,KAAKQ,QAIfd,EAAQM,KAAKF,EAAIO,WArBD,CAwBnB,CAEA,OAAOX,EAAQgB,KAAK,IACrB,CAEqCC,EAAOC,SAC3CnB,EAAWoB,QAAUpB,EACrBkB,EAAOC,QAAUnB,QAKhB,KAFwB,EAAF,WACtB,OAAOA,CACP,UAFoB,OAEpB,YAIH,CAlDA,E,8BCLA,IAAIqB,EAAO,EAAQ,MAmInBH,EAAOC,QAjIP,SAAwBG,EAAMC,EAAWC,GACvCA,EAASA,GAAU,CAAC,EAEO,IAAvBD,EAAUE,WACZF,EAAYF,EAAKK,UAAUH,IAG7B,IAAII,EAAwBH,EAAOG,sBAC/BC,EAAqBJ,EAAOI,mBAC5BC,EAAeL,EAAOK,aACtBC,EAAgBN,EAAOM,cACvBC,EAAYP,EAAOO,WAAa,EAChCC,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AK,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,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,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,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AAoB,IAAlB,SAAEzuC,GAAgB,EAM3C,OALAiiE,KAAY,8CAA+C,CAC1DC,MAAO,MACP82C,KAAM,iFAGAh5G,CAAP,ECvCD,IAAeksJ,EAAAA,EAAAA,6BAA8BsiD,IAC5C,SAAS5hK,EAAWxhD,EAAOiX,GAC1B,MAAQgtM,EAAYC,IAAkBpyM,EAAAA,EAAAA,UAAU,IAE1CqyM,GAAmBxqM,EAAAA,EAAAA,UAAS,KAMjC,MAAMyqM,EAAiBxb,IACtB,MAAMyb,EAAczb,EAAO9tL,GACxB8tL,EACA,IAAKA,EAAQ9tL,GAAIolE,MACpBgkI,GAAiB3hN,GAAa,IAAKA,EAAS8hN,IAA5C,EAGD,MAAO,CACND,eAOAE,kBAAqB7/M,IACpB2/M,EAAc,CACbn8C,OAAQ,QACRh/E,QAASxkF,GAFV,EAWDkkM,aAAgB7tL,IACfopM,GAAiB3hN,GAChBA,EAAQ2G,QAAU0/L,GAAYA,EAAO9tL,KAAOA,KAD7C,EAQDypM,iBAAkB,KACjBL,EAAe,GAAf,EA9BF,GAiCE,IAEGM,EAAW,IACbxkN,EACHikN,aACAE,mBACAM,SAAUR,EAAW3rN,OAAS,IAC7B,mBAAC,GAAD,CACCusE,UAAU,6BACV6jI,QAAUub,EACV3mD,SAAW6mD,EAAiBxb,gBAK/B,OAAO33L,GACN,mBAACoyM,EAAD,KAAwBoB,EAAxB,CAAmCvtM,IAAMA,MAEzC,mBAACmsM,EAAuBoB,EAEzB,CAED,IAAIxzM,EACJ,MAAM,OAAE5F,GAAWg4M,EAEnB,MAAuB,mBAAXh4M,GACX4F,GAAe,GACR8G,EAAAA,EAAAA,YAAY0pC,IAEbA,CAAP,G","sources":["webpack://wp/./node_modules/classnames/index.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/index.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/util.js","webpack://wp/./node_modules/downshift/node_modules/react-is/cjs/react-is.production.min.js","webpack://wp/./node_modules/downshift/node_modules/react-is/index.js","webpack://wp/./node_modules/fast-memoize/src/index.js","webpack://wp/./node_modules/gradient-parser/build/node.js","webpack://wp/../../../../../webpack/bootstrap 2a95070affdf3c0054f1","webpack://wp/../../../../../src/index.js","webpack://wp/../../../../../src/utils.js","webpack://wp/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://wp/./node_modules/memize/index.js","webpack://wp/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://wp/./node_modules/prop-types/index.js","webpack://wp/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://wp/./node_modules/react-is/cjs/react-is.production.min.js","webpack://wp/./node_modules/react-is/index.js","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/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\",\"primitives\"]","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/./node_modules/reakit/es/_rollupPluginBabelHelpers-1f0bf8c2.js","webpack://wp/./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js","webpack://wp/./node_modules/reakit-system/es/SystemContext.js","webpack://wp/./node_modules/reakit-utils/es/getWindow.js","webpack://wp/./node_modules/reakit-system/es/useCreateElement.js","webpack://wp/./node_modules/reakit-utils/es/_rollupPluginBabelHelpers-1f0bf8c2.js","webpack://wp/./node_modules/reakit-utils/es/isPlainObject.js","webpack://wp/./node_modules/reakit-utils/es/isObject.js","webpack://wp/./node_modules/reakit-utils/es/splitProps.js","webpack://wp/./node_modules/reakit-utils/es/shallowEqual.js","webpack://wp/./node_modules/reakit-utils/es/normalizePropsAreEqual.js","webpack://wp/./node_modules/reakit-system/es/createComponent.js","webpack://wp/./node_modules/reakit-system/es/useToken.js","webpack://wp/./node_modules/reakit-system/es/createHook.js","webpack://wp/./node_modules/reakit-utils/es/toArray.js","webpack://wp/./node_modules/reakit-system/es/useOptions.js","webpack://wp/./node_modules/reakit-system/es/useProps.js","webpack://wp/./node_modules/reakit-utils/es/useForkRef.js","webpack://wp/./node_modules/reakit-utils/es/getDocument.js","webpack://wp/./node_modules/reakit-utils/es/canUseDOM.js","webpack://wp/./node_modules/reakit-utils/es/useIsomorphicEffect.js","webpack://wp/./node_modules/reakit-utils/es/useLiveRef.js","webpack://wp/./node_modules/reakit-utils/es/isSelfTarget.js","webpack://wp/./node_modules/reakit-utils/es/getActiveElement.js","webpack://wp/./node_modules/reakit-utils/es/contains.js","webpack://wp/./node_modules/reakit-utils/es/hasFocusWithin.js","webpack://wp/./node_modules/reakit-utils/es/isPortalEvent.js","webpack://wp/./node_modules/reakit-utils/es/isButton.js","webpack://wp/./node_modules/reakit-utils/es/dom.js","webpack://wp/./node_modules/reakit/es/Role/Role.js","webpack://wp/./node_modules/reakit/es/Tabbable/Tabbable.js","webpack://wp/./node_modules/reakit-utils/es/tabbable.js","webpack://wp/./node_modules/reakit-utils/es/matches.js","webpack://wp/./node_modules/reakit/es/Clickable/Clickable.js","webpack://wp/./node_modules/reakit/es/getCurrentId-5aa9849e.js","webpack://wp/./node_modules/reakit/es/__keys-6742f591.js","webpack://wp/./node_modules/reakit/es/userFocus-e16425e3.js","webpack://wp/./node_modules/reakit-utils/es/isTextField.js","webpack://wp/./node_modules/reakit-utils/es/hasFocus.js","webpack://wp/./node_modules/reakit/es/Id/IdProvider.js","webpack://wp/./node_modules/reakit/es/Id/Id.js","webpack://wp/./node_modules/reakit-utils/es/createEvent.js","webpack://wp/./node_modules/reakit/es/setTextFieldValue-0a221f4e.js","webpack://wp/./node_modules/reakit-utils/es/fireEvent.js","webpack://wp/./node_modules/reakit/es/Composite/CompositeItem.js","webpack://wp/./node_modules/reakit-utils/es/ensureFocus.js","webpack://wp/./node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs","webpack://wp/./node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs","webpack://wp/external window \"ReactDOM\"","webpack://wp/./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js","webpack://wp/./node_modules/tslib/tslib.es6.js","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/use-features.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/PresenceContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-browser.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/variants.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-constant.mjs","webpack://wp/./node_modules/framesync/dist/es/on-next-frame.mjs","webpack://wp/./node_modules/framesync/dist/es/index.mjs","webpack://wp/./node_modules/framesync/dist/es/create-render-step.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/mix.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/array.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/clamp.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/generators/spring.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/progress.mjs","webpack://wp/./node_modules/style-value-types/dist/es/utils.mjs","webpack://wp/./node_modules/style-value-types/dist/es/numbers/index.mjs","webpack://wp/./node_modules/style-value-types/dist/es/color/utils.mjs","webpack://wp/./node_modules/style-value-types/dist/es/color/rgba.mjs","webpack://wp/./node_modules/style-value-types/dist/es/color/hex.mjs","webpack://wp/./node_modules/style-value-types/dist/es/numbers/units.mjs","webpack://wp/./node_modules/style-value-types/dist/es/color/hsla.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/mix-color.mjs","webpack://wp/./node_modules/style-value-types/dist/es/color/index.mjs","webpack://wp/./node_modules/style-value-types/dist/es/complex/index.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/inc.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/pipe.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/mix-complex.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/interpolate.mjs","webpack://wp/./node_modules/popmotion/dist/es/easing/utils.mjs","webpack://wp/./node_modules/popmotion/dist/es/easing/index.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/generators/decay.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://wp/./node_modules/popmotion/dist/es/easing/cubic-bezier.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/easing.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://wp/./node_modules/style-value-types/dist/es/complex/filter.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://wp/./node_modules/popmotion/dist/es/animations/inertia.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/is-point.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/is-point-3d.mjs","webpack://wp/./node_modules/popmotion/dist/es/utils/distance.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://wp/./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/animate.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/id.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/types.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/use-dom-event.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","webpack://wp/./node_modules/framer-motion/dist/es/events/utils.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-id.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/animation.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/PanSession.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","webpack://wp/./node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/html/visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://wp/./node_modules/framer-motion/dist/es/motion/features/layout/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://wp/./node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://wp/./node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close.js","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/./packages/components/build-module/dashicon/@wordpress/components/src/dashicon/index.js","webpack://wp/./packages/components/build-module/icon/@wordpress/components/src/icon/index.tsx","webpack://wp/external window \"lodash\"","webpack://wp/external window [\"wp\",\"warning\"]","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/context-system-provider.js","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/constants.js","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/get-styled-class-name-from-key.ts","webpack://wp/./node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Utility.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Tokenizer.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Enum.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Serializer.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Prefixer.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Parser.js","webpack://wp/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://wp/./node_modules/@emotion/cache/node_modules/stylis/src/Middleware.js","webpack://wp/./node_modules/@emotion/hash/dist/hash.browser.esm.js","webpack://wp/./node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack://wp/./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack://wp/./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","webpack://wp/./node_modules/@emotion/react/dist/emotion-element-699e6908.browser.esm.js","webpack://wp/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://wp/./node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js","webpack://wp/./node_modules/@emotion/css/dist/emotion-css.esm.js","webpack://wp/./packages/components/build-module/utils/hooks/@wordpress/components/src/utils/hooks/use-cx.ts","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/use-context-system.js","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/utils.js","webpack://wp/./packages/components/build-module/ui/context/@wordpress/components/src/ui/context/context-connect.ts","webpack://wp/./packages/components/build-module/visually-hidden/@wordpress/components/src/visually-hidden/styles.ts","webpack://wp/./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.browser.esm.js","webpack://wp/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack://wp/./packages/components/build-module/view/@wordpress/components/src/view/component.tsx","webpack://wp/./packages/components/build-module/visually-hidden/@wordpress/components/src/visually-hidden/component.tsx","webpack://wp/./packages/components/build-module/button/@wordpress/components/src/button/index.js","webpack://wp/./packages/components/build-module/scroll-lock/@wordpress/components/src/scroll-lock/index.tsx","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/context.js","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/fill.js","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/use-slot.js","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/slot.js","webpack://wp/./node_modules/proxy-compare/src/index.ts","webpack://wp/./node_modules/valtio/esm/vanilla.js","webpack://wp/./node_modules/valtio/esm/index.js","webpack://wp/./node_modules/valtio/esm/utils.js","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/slot-fill-context.js","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/use-slot.js","webpack://wp/./node_modules/uuid/dist/esm-browser/rng.js","webpack://wp/./node_modules/uuid/dist/esm-browser/regex.js","webpack://wp/./node_modules/uuid/dist/esm-browser/validate.js","webpack://wp/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://wp/./node_modules/uuid/dist/esm-browser/v4.js","webpack://wp/./packages/components/build-module/style-provider/@wordpress/components/src/style-provider/index.tsx","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/fill.js","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/slot.js","webpack://wp/external window [\"wp\",\"isShallowEqual\"]","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/slot-fill-provider.js","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/provider.js","webpack://wp/./packages/components/build-module/slot-fill/@wordpress/components/src/slot-fill/index.js","webpack://wp/./packages/components/build-module/popover/@wordpress/components/src/popover/utils.ts","webpack://wp/./packages/components/build-module/popover/@wordpress/components/src/popover/limit-shift.ts","webpack://wp/./packages/components/build-module/popover/@wordpress/components/src/popover/index.tsx","webpack://wp/./packages/components/build-module/shortcut/@wordpress/components/src/shortcut/index.tsx","webpack://wp/./packages/components/build-module/tooltip/@wordpress/components/src/tooltip/index.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/@wordpress/components/src/alignment-matrix-control/utils.js","webpack://wp/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://wp/./node_modules/colord/index.mjs","webpack://wp/./node_modules/colord/plugins/names.mjs","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/colors.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/colors-values.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/reduce-motion.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/styles/@wordpress/components/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/@wordpress/components/src/alignment-matrix-control/cell.js","webpack://wp/./node_modules/reakit-utils/es/useSealedState.js","webpack://wp/./node_modules/reakit/es/reverse-30eaa122.js","webpack://wp/./node_modules/reakit/es/findEnabledItemById-8ddca752.js","webpack://wp/./node_modules/reakit-utils/es/applyState.js","webpack://wp/./node_modules/reakit/es/Id/IdState.js","webpack://wp/./node_modules/reakit/es/Composite/CompositeState.js","webpack://wp/./node_modules/reakit-utils/es/fireBlurEvent.js","webpack://wp/./node_modules/reakit-utils/es/getNextActiveElementOnBlur.js","webpack://wp/./node_modules/reakit/es/Composite/Composite.js","webpack://wp/./node_modules/reakit-utils/es/fireKeyboardEvent.js","webpack://wp/./node_modules/reakit/es/Group/Group.js","webpack://wp/./node_modules/reakit/es/Composite/CompositeGroup.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/styles/@wordpress/components/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/@wordpress/components/src/alignment-matrix-control/icon.js","webpack://wp/./packages/components/build-module/alignment-matrix-control/@wordpress/components/src/alignment-matrix-control/index.js","webpack://wp/./packages/components/build-module/animate/@wordpress/components/src/animate/index.js","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","webpack://wp/./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","webpack://wp/./node_modules/framer-motion/dist/es/utils/use-force-update.mjs","webpack://wp/./packages/components/build-module/flex/@wordpress/components/src/flex/context.ts","webpack://wp/./packages/components/build-module/flex/@wordpress/components/src/flex/styles.ts","webpack://wp/./packages/components/build-module/flex/flex-item/@wordpress/components/src/flex/flex-item/hook.ts","webpack://wp/./packages/components/build-module/flex/flex-block/@wordpress/components/src/flex/flex-block/component.tsx","webpack://wp/./packages/components/build-module/flex/flex-block/@wordpress/components/src/flex/flex-block/hook.ts","webpack://wp/./packages/components/build-module/flex/flex-item/@wordpress/components/src/flex/flex-item/component.tsx","webpack://wp/./packages/components/build-module/ui/utils/@wordpress/components/src/ui/utils/use-responsive-value.ts","webpack://wp/./packages/components/build-module/ui/utils/@wordpress/components/src/ui/utils/space.ts","webpack://wp/./packages/components/build-module/flex/flex/@wordpress/components/src/flex/flex/hook.ts","webpack://wp/./packages/components/build-module/flex/flex/@wordpress/components/src/flex/flex/component.tsx","webpack://wp/./packages/components/build-module/truncate/@wordpress/components/src/truncate/styles.ts","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/values.js","webpack://wp/./packages/components/build-module/truncate/@wordpress/components/src/truncate/utils.ts","webpack://wp/./packages/components/build-module/truncate/@wordpress/components/src/truncate/hook.ts","webpack://wp/./packages/components/build-module/ui/utils/@wordpress/components/src/ui/utils/colors.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/config-values.js","webpack://wp/./packages/components/build-module/text/@wordpress/components/src/text/styles.js","webpack://wp/./packages/components/build-module/text/@wordpress/components/src/text/utils.js","webpack://wp/./packages/components/build-module/ui/utils/@wordpress/components/src/ui/utils/font-size.ts","webpack://wp/./packages/components/build-module/text/@wordpress/components/src/text/hook.js","webpack://wp/./packages/components/build-module/text/@wordpress/components/src/text/get-line-height.ts","webpack://wp/./packages/components/build-module/text/@wordpress/components/src/text/component.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/base-label.ts","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/rtl.js","webpack://wp/./packages/components/build-module/input-control/styles/@wordpress/components/src/input-control/styles/input-control-styles.tsx","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/backdrop.tsx","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/label.tsx","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/input-base.tsx","webpack://wp/./node_modules/@use-gesture/core/dist/maths-b2a210f4.esm.js","webpack://wp/./node_modules/@use-gesture/core/dist/actions-5ad85d2f.esm.js","webpack://wp/./node_modules/@use-gesture/core/dist/use-gesture-core.esm.js","webpack://wp/./node_modules/@use-gesture/react/dist/use-gesture-react.esm.js","webpack://wp/./packages/components/build-module/input-control/reducer/@wordpress/components/src/input-control/reducer/state.ts","webpack://wp/./packages/components/build-module/input-control/reducer/@wordpress/components/src/input-control/reducer/actions.ts","webpack://wp/./packages/components/build-module/input-control/reducer/@wordpress/components/src/input-control/reducer/reducer.ts","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/input-field.tsx","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/utils.ts","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/index.tsx","webpack://wp/./packages/components/build-module/number-control/styles/@wordpress/components/src/number-control/styles/number-control-styles.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/math.js","webpack://wp/./packages/components/build-module/number-control/@wordpress/components/src/number-control/index.tsx","webpack://wp/./packages/components/build-module/angle-picker-control/styles/@wordpress/components/src/angle-picker-control/styles/angle-picker-control-styles.js","webpack://wp/./packages/components/build-module/angle-picker-control/@wordpress/components/src/angle-picker-control/angle-circle.js","webpack://wp/./packages/components/build-module/spacer/@wordpress/components/src/spacer/hook.ts","webpack://wp/./packages/components/build-module/spacer/@wordpress/components/src/spacer/component.tsx","webpack://wp/./packages/components/build-module/angle-picker-control/@wordpress/components/src/angle-picker-control/index.js","webpack://wp/external window [\"wp\",\"richText\"]","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/strings.ts","webpack://wp/./packages/components/build-module/autocomplete/@wordpress/components/src/autocomplete/index.js","webpack://wp/./packages/components/build-module/autocomplete/@wordpress/components/src/autocomplete/autocompleter-ui.js","webpack://wp/./packages/components/build-module/autocomplete/@wordpress/components/src/autocomplete/get-default-use-items.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/font-values.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/font.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/box-sizing.ts","webpack://wp/./packages/components/build-module/base-control/styles/@wordpress/components/src/base-control/styles/base-control-styles.ts","webpack://wp/./packages/components/build-module/base-control/@wordpress/components/src/base-control/index.tsx","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/link.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/link-off.js","webpack://wp/./packages/components/build-module/border-box-control/@wordpress/components/src/border-box-control/styles.ts","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-linked-button/@wordpress/components/src/border-box-control/border-box-control-linked-button/component.tsx","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-linked-button/@wordpress/components/src/border-box-control/border-box-control-linked-button/hook.ts","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-visualizer/@wordpress/components/src/border-box-control/border-box-control-visualizer/component.tsx","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-visualizer/@wordpress/components/src/border-box-control/border-box-control-visualizer/hook.ts","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close-small.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/line-solid.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/line-dashed.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/line-dotted.js","webpack://wp/./packages/components/build-module/unit-control/styles/@wordpress/components/src/unit-control/styles/unit-control-styles.ts","webpack://wp/./packages/components/build-module/border-control/@wordpress/components/src/border-control/styles.ts","webpack://wp/./packages/components/build-module/border-control/border-control-style-picker/@wordpress/components/src/border-control/border-control-style-picker/component.tsx","webpack://wp/./packages/components/build-module/border-control/border-control-style-picker/@wordpress/components/src/border-control/border-control-style-picker/hook.ts","webpack://wp/./packages/components/build-module/color-indicator/@wordpress/components/src/color-indicator/index.tsx","webpack://wp/./node_modules/colord/plugins/a11y.mjs","webpack://wp/./packages/components/build-module/dropdown/@wordpress/components/src/dropdown/index.js","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/input-suffix-wrapper.tsx","webpack://wp/./packages/components/build-module/select-control/styles/@wordpress/components/src/select-control/styles/select-control-styles.ts","webpack://wp/./packages/icons/build-module/icon/@wordpress/icons/src/icon/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-down.js","webpack://wp/./packages/components/build-module/select-control/@wordpress/components/src/select-control/chevron-down.tsx","webpack://wp/./packages/components/build-module/select-control/@wordpress/components/src/select-control/index.tsx","webpack://wp/./packages/components/build-module/utils/hooks/@wordpress/components/src/utils/hooks/use-controlled-state.js","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/utils.ts","webpack://wp/./packages/components/build-module/range-control/styles/@wordpress/components/src/range-control/styles/range-control-styles.ts","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/input-range.tsx","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/mark.tsx","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/rail.tsx","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/tooltip.tsx","webpack://wp/./packages/components/build-module/range-control/@wordpress/components/src/range-control/index.tsx","webpack://wp/./packages/components/build-module/h-stack/@wordpress/components/src/h-stack/utils.ts","webpack://wp/./packages/components/build-module/ui/utils/@wordpress/components/src/ui/utils/get-valid-children.ts","webpack://wp/./packages/components/build-module/h-stack/@wordpress/components/src/h-stack/hook.tsx","webpack://wp/./packages/components/build-module/h-stack/@wordpress/components/src/h-stack/component.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/styles.ts","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/copy.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://wp/./node_modules/@popperjs/core/lib/enums.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://wp/./node_modules/@popperjs/core/lib/createPopper.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/debounce.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://wp/./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/within.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://wp/./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://wp/./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://wp/./node_modules/@popperjs/core/lib/popper.js","webpack://wp/./node_modules/reakit/es/Popover/PopoverState.js","webpack://wp/./node_modules/reakit/es/Dialog/DialogState.js","webpack://wp/./node_modules/reakit/es/Disclosure/DisclosureState.js","webpack://wp/./node_modules/reakit/es/__globalState-300469f0.js","webpack://wp/./node_modules/reakit/es/__keys-d101cb3b.js","webpack://wp/./node_modules/reakit/es/Tooltip/TooltipReference.js","webpack://wp/./packages/components/build-module/ui/tooltip/@wordpress/components/src/ui/tooltip/context.js","webpack://wp/./node_modules/reakit/es/__keys-e6a5cfbe.js","webpack://wp/./node_modules/reakit/es/Disclosure/DisclosureContent.js","webpack://wp/./node_modules/reakit/es/Portal/Portal.js","webpack://wp/./node_modules/reakit/es/Tooltip/Tooltip.js","webpack://wp/./packages/components/build-module/ui/shortcut/@wordpress/components/src/ui/shortcut/component.tsx","webpack://wp/./packages/components/build-module/ui/tooltip/@wordpress/components/src/ui/tooltip/styles.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/z-index.js","webpack://wp/./packages/components/build-module/ui/tooltip/@wordpress/components/src/ui/tooltip/content.js","webpack://wp/./packages/components/build-module/ui/tooltip/@wordpress/components/src/ui/tooltip/component.js","webpack://wp/./node_modules/reakit/es/Tooltip/TooltipState.js","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/color-copy-button.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/input-with-slider.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/rgb-input.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/hsl-input.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/hex-input.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/color-input.tsx","webpack://wp/./node_modules/react-colorful/src/hooks/useEventCallback.ts","webpack://wp/./node_modules/react-colorful/src/utils/clamp.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Interactive.tsx","webpack://wp/./node_modules/react-colorful/src/utils/format.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Pointer.tsx","webpack://wp/./node_modules/react-colorful/src/utils/round.ts","webpack://wp/./node_modules/react-colorful/src/utils/convert.ts","webpack://wp/./node_modules/react-colorful/src/components/common/Hue.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/Saturation.tsx","webpack://wp/./node_modules/react-colorful/src/utils/compare.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useColorManipulation.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useStyleSheet.ts","webpack://wp/./node_modules/react-colorful/src/hooks/useIsomorphicLayoutEffect.ts","webpack://wp/./node_modules/react-colorful/src/utils/nonce.ts","webpack://wp/./node_modules/react-colorful/src/components/common/ColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/Alpha.tsx","webpack://wp/./node_modules/react-colorful/src/components/common/AlphaColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/RgbaStringColorPicker.tsx","webpack://wp/./node_modules/react-colorful/src/components/RgbStringColorPicker.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/picker.tsx","webpack://wp/./packages/components/build-module/utils/hooks/@wordpress/components/src/utils/hooks/use-controlled-value.ts","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/component.tsx","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/use-deprecated-props.ts","webpack://wp/./packages/components/build-module/color-picker/@wordpress/components/src/color-picker/legacy-adapter.tsx","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/check.js","webpack://wp/./packages/components/build-module/circular-option-picker/@wordpress/components/src/circular-option-picker/index.js","webpack://wp/./packages/components/build-module/v-stack/@wordpress/components/src/v-stack/component.tsx","webpack://wp/./packages/components/build-module/v-stack/@wordpress/components/src/v-stack/hook.ts","webpack://wp/./packages/components/build-module/truncate/@wordpress/components/src/truncate/component.tsx","webpack://wp/./packages/components/build-module/heading/@wordpress/components/src/heading/component.tsx","webpack://wp/./packages/components/build-module/heading/@wordpress/components/src/heading/hook.ts","webpack://wp/./packages/components/build-module/color-palette/@wordpress/components/src/color-palette/styles.js","webpack://wp/./packages/components/build-module/dropdown/@wordpress/components/src/dropdown/styles.ts","webpack://wp/./packages/components/build-module/dropdown/@wordpress/components/src/dropdown/dropdown-content-wrapper.tsx","webpack://wp/./packages/components/build-module/color-palette/@wordpress/components/src/color-palette/index.js","webpack://wp/./packages/components/build-module/unit-control/@wordpress/components/src/unit-control/utils.ts","webpack://wp/./packages/components/build-module/border-control/border-control-dropdown/@wordpress/components/src/border-control/border-control-dropdown/hook.ts","webpack://wp/./packages/components/build-module/border-control/border-control-dropdown/@wordpress/components/src/border-control/border-control-dropdown/component.tsx","webpack://wp/./packages/components/build-module/unit-control/@wordpress/components/src/unit-control/unit-select-control.tsx","webpack://wp/./packages/components/build-module/unit-control/@wordpress/components/src/unit-control/index.tsx","webpack://wp/./packages/components/build-module/border-control/border-control/@wordpress/components/src/border-control/border-control/component.tsx","webpack://wp/./packages/components/build-module/border-control/border-control/@wordpress/components/src/border-control/border-control/hook.ts","webpack://wp/./packages/components/build-module/grid/@wordpress/components/src/grid/utils.ts","webpack://wp/./packages/components/build-module/grid/@wordpress/components/src/grid/component.tsx","webpack://wp/./packages/components/build-module/grid/@wordpress/components/src/grid/hook.ts","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-split-controls/@wordpress/components/src/border-box-control/border-box-control-split-controls/component.tsx","webpack://wp/./packages/components/build-module/border-box-control/border-box-control-split-controls/@wordpress/components/src/border-box-control/border-box-control-split-controls/hook.ts","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/unit-values.ts","webpack://wp/./packages/components/build-module/border-box-control/@wordpress/components/src/border-box-control/utils.ts","webpack://wp/./packages/components/build-module/border-box-control/border-box-control/@wordpress/components/src/border-box-control/border-box-control/hook.ts","webpack://wp/./packages/components/build-module/border-box-control/border-box-control/@wordpress/components/src/border-box-control/border-box-control/component.tsx","webpack://wp/./packages/components/build-module/box-control/styles/@wordpress/components/src/box-control/styles/box-control-styles.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/unit-control.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/utils.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/all-input-control.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/input-controls.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/axial-input-controls.js","webpack://wp/./packages/components/build-module/box-control/styles/@wordpress/components/src/box-control/styles/box-control-icon-styles.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/icon.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/linked-button.js","webpack://wp/./packages/components/build-module/box-control/@wordpress/components/src/box-control/index.js","webpack://wp/./packages/components/build-module/button-group/@wordpress/components/src/button-group/index.tsx","webpack://wp/./packages/components/build-module/elevation/@wordpress/components/src/elevation/styles.ts","webpack://wp/./packages/components/build-module/elevation/@wordpress/components/src/elevation/hook.ts","webpack://wp/./packages/components/build-module/elevation/@wordpress/components/src/elevation/component.tsx","webpack://wp/./packages/components/build-module/card/@wordpress/components/src/card/styles.ts","webpack://wp/./packages/components/build-module/surface/@wordpress/components/src/surface/styles.ts","webpack://wp/./packages/components/build-module/surface/@wordpress/components/src/surface/hook.ts","webpack://wp/./packages/components/build-module/card/card/@wordpress/components/src/card/card/component.tsx","webpack://wp/./packages/components/build-module/card/card/@wordpress/components/src/card/card/hook.ts","webpack://wp/./packages/components/build-module/scrollable/@wordpress/components/src/scrollable/styles.ts","webpack://wp/./packages/components/build-module/scrollable/@wordpress/components/src/scrollable/component.tsx","webpack://wp/./packages/components/build-module/scrollable/@wordpress/components/src/scrollable/hook.ts","webpack://wp/./packages/components/build-module/card/card-body/@wordpress/components/src/card/card-body/component.tsx","webpack://wp/./packages/components/build-module/card/card-body/@wordpress/components/src/card/card-body/hook.ts","webpack://wp/./node_modules/reakit/es/Separator/Separator.js","webpack://wp/./packages/components/build-module/divider/@wordpress/components/src/divider/styles.ts","webpack://wp/./packages/components/build-module/divider/@wordpress/components/src/divider/component.tsx","webpack://wp/./packages/components/build-module/card/card-divider/@wordpress/components/src/card/card-divider/component.tsx","webpack://wp/./packages/components/build-module/card/card-divider/@wordpress/components/src/card/card-divider/hook.ts","webpack://wp/./packages/components/build-module/card/card-footer/@wordpress/components/src/card/card-footer/component.tsx","webpack://wp/./packages/components/build-module/card/card-footer/@wordpress/components/src/card/card-footer/hook.ts","webpack://wp/./packages/components/build-module/card/card-header/@wordpress/components/src/card/card-header/component.tsx","webpack://wp/./packages/components/build-module/card/card-header/@wordpress/components/src/card/card-header/hook.ts","webpack://wp/./packages/components/build-module/card/card-media/@wordpress/components/src/card/card-media/component.tsx","webpack://wp/./packages/components/build-module/card/card-media/@wordpress/components/src/card/card-media/hook.ts","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/reset.js","webpack://wp/./packages/components/build-module/checkbox-control/@wordpress/components/src/checkbox-control/index.tsx","webpack://wp/./packages/components/build-module/clipboard-button/@wordpress/components/src/clipboard-button/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/plus.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/more-vertical.js","webpack://wp/./packages/components/build-module/item-group/@wordpress/components/src/item-group/styles.ts","webpack://wp/./packages/components/build-module/item-group/@wordpress/components/src/item-group/context.ts","webpack://wp/./packages/components/build-module/item-group/item-group/@wordpress/components/src/item-group/item-group/component.tsx","webpack://wp/./packages/components/build-module/item-group/item-group/@wordpress/components/src/item-group/item-group/hook.ts","webpack://wp/./packages/components/build-module/custom-gradient-picker/gradient-bar/@wordpress/components/src/custom-gradient-picker/gradient-bar/utils.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/gradient-bar/@wordpress/components/src/custom-gradient-picker/gradient-bar/constants.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/gradient-bar/@wordpress/components/src/custom-gradient-picker/gradient-bar/control-points.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/gradient-bar/@wordpress/components/src/custom-gradient-picker/gradient-bar/index.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/@wordpress/components/src/custom-gradient-picker/constants.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/@wordpress/components/src/custom-gradient-picker/serializer.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/@wordpress/components/src/custom-gradient-picker/utils.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/styles/@wordpress/components/src/custom-gradient-picker/styles/custom-gradient-picker-styles.js","webpack://wp/./packages/components/build-module/custom-gradient-picker/@wordpress/components/src/custom-gradient-picker/index.js","webpack://wp/./packages/components/build-module/gradient-picker/@wordpress/components/src/gradient-picker/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/menu.js","webpack://wp/external window [\"wp\",\"dom\"]","webpack://wp/./packages/components/build-module/navigable-container/@wordpress/components/src/navigable-container/container.js","webpack://wp/./packages/components/build-module/navigable-container/@wordpress/components/src/navigable-container/menu.js","webpack://wp/./packages/components/build-module/dropdown-menu/@wordpress/components/src/dropdown-menu/index.js","webpack://wp/./packages/components/build-module/palette-edit/@wordpress/components/src/palette-edit/styles.js","webpack://wp/./packages/components/build-module/palette-edit/@wordpress/components/src/palette-edit/index.js","webpack://wp/./packages/components/build-module/combobox-control/@wordpress/components/src/combobox-control/styles.ts","webpack://wp/./packages/components/build-module/form-token-field/@wordpress/components/src/form-token-field/token-input.tsx","webpack://wp/./packages/components/build-module/form-token-field/@wordpress/components/src/form-token-field/suggestions-list.tsx","webpack://wp/./packages/components/build-module/higher-order/with-focus-outside/@wordpress/components/src/higher-order/with-focus-outside/index.js","webpack://wp/./packages/components/build-module/combobox-control/@wordpress/components/src/combobox-control/index.js","webpack://wp/./packages/components/build-module/modal/@wordpress/components/src/modal/aria-helper.js","webpack://wp/./packages/components/build-module/modal/@wordpress/components/src/modal/index.js","webpack://wp/./packages/components/build-module/confirm-dialog/@wordpress/components/src/confirm-dialog/styles.ts","webpack://wp/./packages/components/build-module/confirm-dialog/@wordpress/components/src/confirm-dialog/component.tsx","webpack://wp/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wp/./node_modules/compute-scroll-into-view/src/index.ts","webpack://wp/./node_modules/downshift/dist/downshift.esm.js","webpack://wp/./packages/components/build-module/custom-select-control/@wordpress/components/src/custom-select-control/styles.ts","webpack://wp/./packages/components/build-module/custom-select-control/@wordpress/components/src/custom-select-control/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/toDate/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/addDays/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/addMonths/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/startOfWeek/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/addWeeks/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/addYears/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/endOfMonth/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/eachDayOfInterval/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/startOfMonth/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/endOfWeek/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/getDaysInMonth/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/isEqual/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/setMonth/index.js","webpack://wp/./node_modules/use-lilius/src/use-lilius.ts","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/isAfter/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/isBefore/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/set/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/startOfDay/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/startOfToday/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/subMonths/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/setYear/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/subYears/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/eachMonthOfInterval/index.js","webpack://wp/./node_modules/use-lilius/node_modules/date-fns/esm/eachWeekOfInterval/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/toDate/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/startOfDay/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/toInteger/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/addMonths/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/subMonths/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/isDate/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/isValid/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/addMilliseconds/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/subMilliseconds/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/locale/en-US/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/format/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/isSameMonth/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/isEqual/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/isSameDay/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/addDays/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/addWeeks/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-left.js","webpack://wp/external window [\"wp\",\"date\"]","webpack://wp/./packages/components/build-module/date-time/date/@wordpress/components/src/date-time/date/styles.ts","webpack://wp/./packages/components/build-module/date-time/@wordpress/components/src/date-time/utils.ts","webpack://wp/./packages/components/build-module/date-time/@wordpress/components/src/date-time/constants.ts","webpack://wp/./packages/components/build-module/date-time/date/@wordpress/components/src/date-time/date/index.tsx","webpack://wp/./packages/components/node_modules/date-fns/esm/subWeeks/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/startOfWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/endOfWeek/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/startOfMinute/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/getDaysInMonth/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/setMonth/index.js","webpack://wp/./packages/components/node_modules/date-fns/esm/set/index.js","webpack://wp/./packages/components/build-module/date-time/time/@wordpress/components/src/date-time/time/styles.ts","webpack://wp/./packages/components/build-module/date-time/time/@wordpress/components/src/date-time/time/timezone.tsx","webpack://wp/./packages/components/build-module/date-time/time/@wordpress/components/src/date-time/time/index.tsx","webpack://wp/./packages/components/node_modules/date-fns/esm/setHours/index.js","webpack://wp/./packages/components/build-module/date-time/date-time/@wordpress/components/src/date-time/date-time/styles.ts","webpack://wp/./packages/components/build-module/date-time/date-time/@wordpress/components/src/date-time/date-time/index.tsx","webpack://wp/./packages/components/build-module/date-time/@wordpress/components/src/date-time/index.ts","webpack://wp/./packages/components/build-module/dimension-control/@wordpress/components/src/dimension-control/sizes.js","webpack://wp/./packages/components/build-module/dimension-control/@wordpress/components/src/dimension-control/index.js","webpack://wp/./packages/components/build-module/disabled/styles/@wordpress/components/src/disabled/styles/disabled-styles.tsx","webpack://wp/./packages/components/build-module/disabled/@wordpress/components/src/disabled/index.tsx","webpack://wp/./packages/components/build-module/draggable/@wordpress/components/src/draggable/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/upload.js","webpack://wp/./packages/components/build-module/drop-zone/@wordpress/components/src/drop-zone/index.tsx","webpack://wp/./packages/components/build-module/drop-zone/@wordpress/components/src/drop-zone/provider.ts","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/swatch.js","webpack://wp/./packages/components/build-module/duotone-picker/@wordpress/components/src/duotone-picker/utils.js","webpack://wp/./packages/components/build-module/duotone-picker/@wordpress/components/src/duotone-picker/duotone-swatch.js","webpack://wp/./packages/components/build-module/color-list-picker/@wordpress/components/src/color-list-picker/index.js","webpack://wp/./packages/components/build-module/duotone-picker/@wordpress/components/src/duotone-picker/custom-duotone-bar.js","webpack://wp/./packages/components/build-module/duotone-picker/@wordpress/components/src/duotone-picker/duotone-picker.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/external.js","webpack://wp/./packages/components/build-module/external-link/styles/@wordpress/components/src/external-link/styles/external-link-styles.ts","webpack://wp/./packages/components/build-module/external-link/@wordpress/components/src/external-link/index.tsx","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/utils.ts","webpack://wp/./packages/components/build-module/focal-point-picker/styles/@wordpress/components/src/focal-point-picker/styles/focal-point-picker-style.ts","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/controls.tsx","webpack://wp/./packages/components/build-module/focal-point-picker/styles/@wordpress/components/src/focal-point-picker/styles/focal-point-style.ts","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/focal-point.tsx","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/grid.tsx","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/media.tsx","webpack://wp/./packages/components/build-module/utils/hooks/@wordpress/components/src/utils/hooks/use-update-effect.js","webpack://wp/./packages/components/build-module/focal-point-picker/@wordpress/components/src/focal-point-picker/index.tsx","webpack://wp/./packages/components/build-module/focusable-iframe/@wordpress/components/src/focusable-iframe/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/settings.js","webpack://wp/./node_modules/reakit/es/Radio/RadioState.js","webpack://wp/./node_modules/reakit/es/__keys-d251e56b.js","webpack://wp/./node_modules/reakit/es/Radio/RadioGroup.js","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control/@wordpress/components/src/toggle-group-control/toggle-group-control/styles.ts","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control/@wordpress/components/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx","webpack://wp/./packages/components/build-module/toggle-group-control/@wordpress/components/src/toggle-group-control/context.ts","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control/@wordpress/components/src/toggle-group-control/toggle-group-control/component.tsx","webpack://wp/./node_modules/reakit/es/Radio/Radio.js","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control-option-base/@wordpress/components/src/toggle-group-control/toggle-group-control-option-base/styles.ts","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control-option-base/@wordpress/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control-option/@wordpress/components/src/toggle-group-control/toggle-group-control-option/component.tsx","webpack://wp/./packages/components/build-module/font-size-picker/@wordpress/components/src/font-size-picker/utils.ts","webpack://wp/./packages/components/build-module/font-size-picker/@wordpress/components/src/font-size-picker/styles.ts","webpack://wp/./packages/components/build-module/font-size-picker/@wordpress/components/src/font-size-picker/index.tsx","webpack://wp/./packages/components/build-module/form-file-upload/@wordpress/components/src/form-file-upload/index.tsx","webpack://wp/./packages/components/build-module/form-toggle/@wordpress/components/src/form-toggle/index.tsx","webpack://wp/./packages/components/build-module/form-token-field/@wordpress/components/src/form-token-field/token.tsx","webpack://wp/./packages/components/build-module/form-token-field/@wordpress/components/src/form-token-field/styles.ts","webpack://wp/./packages/components/build-module/form-token-field/@wordpress/components/src/form-token-field/index.tsx","webpack://wp/./packages/components/build-module/guide/@wordpress/components/src/guide/icons.js","webpack://wp/./packages/components/build-module/guide/@wordpress/components/src/guide/page-control.js","webpack://wp/./packages/components/build-module/guide/@wordpress/components/src/guide/index.js","webpack://wp/./packages/components/build-module/guide/@wordpress/components/src/guide/page.js","webpack://wp/./packages/components/build-module/button/@wordpress/components/src/button/deprecated.js","webpack://wp/./packages/components/build-module/item-group/item/@wordpress/components/src/item-group/item/component.tsx","webpack://wp/./packages/components/build-module/item-group/item/@wordpress/components/src/item-group/item/hook.ts","webpack://wp/./packages/components/build-module/input-control/@wordpress/components/src/input-control/input-prefix-wrapper.tsx","webpack://wp/./packages/components/build-module/keyboard-shortcuts/@wordpress/components/src/keyboard-shortcuts/index.js","webpack://wp/./packages/components/build-module/menu-group/@wordpress/components/src/menu-group/index.js","webpack://wp/./packages/components/build-module/menu-item/@wordpress/components/src/menu-item/index.js","webpack://wp/./packages/components/build-module/menu-items-choice/@wordpress/components/src/menu-items-choice/index.js","webpack://wp/./packages/components/build-module/navigable-container/@wordpress/components/src/navigable-container/tabbable.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/constants.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/context.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/search.js","webpack://wp/./packages/components/build-module/search-control/@wordpress/components/src/search-control/index.tsx","webpack://wp/./packages/components/build-module/navigation/styles/@wordpress/components/src/navigation/styles/navigation-styles.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/use-navigation-tree-nodes.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/index.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/use-create-navigation-tree.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-left.js","webpack://wp/./packages/components/build-module/navigation/back-button/@wordpress/components/src/navigation/back-button/index.js","webpack://wp/./packages/components/build-module/navigation/group/@wordpress/components/src/navigation/group/context.js","webpack://wp/./packages/components/build-module/navigation/group/@wordpress/components/src/navigation/group/index.js","webpack://wp/./packages/components/build-module/navigation/item/@wordpress/components/src/navigation/item/base-content.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/context.js","webpack://wp/./packages/components/build-module/navigation/@wordpress/components/src/navigation/utils.js","webpack://wp/./packages/components/build-module/navigation/item/@wordpress/components/src/navigation/item/base.js","webpack://wp/./packages/components/build-module/navigation/item/@wordpress/components/src/navigation/item/use-navigation-tree-item.js","webpack://wp/./packages/components/build-module/navigation/item/@wordpress/components/src/navigation/item/index.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/use-navigation-tree-menu.js","webpack://wp/./packages/components/build-module/higher-order/with-spoken-messages/@wordpress/components/src/higher-order/with-spoken-messages/index.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/menu-title-search.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/menu-title.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/search-no-results-found.js","webpack://wp/./packages/components/build-module/navigation/menu/@wordpress/components/src/navigation/menu/index.js","webpack://wp/./packages/components/build-module/navigator/@wordpress/components/src/navigator/context.ts","webpack://wp/./packages/components/build-module/navigator/navigator-provider/@wordpress/components/src/navigator/navigator-provider/component.tsx","webpack://wp/external window [\"wp\",\"escapeHtml\"]","webpack://wp/./packages/components/build-module/navigator/navigator-screen/@wordpress/components/src/navigator/navigator-screen/component.tsx","webpack://wp/./packages/components/build-module/navigator/@wordpress/components/src/navigator/use-navigator.ts","webpack://wp/./packages/components/build-module/navigator/navigator-button/@wordpress/components/src/navigator/navigator-button/component.tsx","webpack://wp/./packages/components/build-module/navigator/navigator-button/@wordpress/components/src/navigator/navigator-button/hook.ts","webpack://wp/./packages/components/build-module/navigator/navigator-back-button/@wordpress/components/src/navigator/navigator-back-button/component.tsx","webpack://wp/./packages/components/build-module/navigator/navigator-back-button/@wordpress/components/src/navigator/navigator-back-button/hook.ts","webpack://wp/./packages/components/build-module/notice/@wordpress/components/src/notice/index.js","webpack://wp/./packages/components/build-module/notice/@wordpress/components/src/notice/list.js","webpack://wp/./packages/components/build-module/panel/@wordpress/components/src/panel/header.js","webpack://wp/./packages/components/build-module/panel/@wordpress/components/src/panel/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-up.js","webpack://wp/./packages/components/build-module/panel/@wordpress/components/src/panel/body.js","webpack://wp/./packages/components/build-module/panel/@wordpress/components/src/panel/row.js","webpack://wp/./packages/components/build-module/placeholder/@wordpress/components/src/placeholder/index.tsx","webpack://wp/./packages/components/build-module/query-controls/@wordpress/components/src/query-controls/terms.js","webpack://wp/./packages/components/build-module/tree-select/@wordpress/components/src/tree-select/index.tsx","webpack://wp/./packages/components/build-module/query-controls/@wordpress/components/src/query-controls/category-select.js","webpack://wp/./packages/components/build-module/query-controls/@wordpress/components/src/query-controls/author-select.js","webpack://wp/./packages/components/build-module/query-controls/@wordpress/components/src/query-controls/index.js","webpack://wp/./packages/components/build-module/radio-context/@wordpress/components/src/radio-context/index.js","webpack://wp/./packages/components/build-module/radio/@wordpress/components/src/radio/index.js","webpack://wp/./packages/components/build-module/radio-group/@wordpress/components/src/radio-group/index.js","webpack://wp/./packages/components/build-module/radio-control/@wordpress/components/src/radio-control/index.tsx","webpack://wp/./node_modules/re-resizable/lib/resizer.js","webpack://wp/./node_modules/re-resizable/lib/index.js","webpack://wp/./packages/components/build-module/resizable-box/resize-tooltip/@wordpress/components/src/resizable-box/resize-tooltip/utils.ts","webpack://wp/./packages/components/build-module/resizable-box/resize-tooltip/styles/@wordpress/components/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js","webpack://wp/./packages/components/build-module/resizable-box/resize-tooltip/@wordpress/components/src/resizable-box/resize-tooltip/label.tsx","webpack://wp/./packages/components/build-module/resizable-box/resize-tooltip/@wordpress/components/src/resizable-box/resize-tooltip/index.tsx","webpack://wp/./packages/components/build-module/resizable-box/@wordpress/components/src/resizable-box/index.tsx","webpack://wp/./packages/components/build-module/responsive-wrapper/@wordpress/components/src/responsive-wrapper/index.js","webpack://wp/./packages/components/build-module/sandbox/@wordpress/components/src/sandbox/index.js","webpack://wp/./packages/components/build-module/snackbar/@wordpress/components/src/snackbar/index.js","webpack://wp/./packages/components/build-module/snackbar/@wordpress/components/src/snackbar/list.js","webpack://wp/./packages/components/build-module/spinner/@wordpress/components/src/spinner/styles.ts","webpack://wp/./packages/components/build-module/spinner/@wordpress/components/src/spinner/index.tsx","webpack://wp/./packages/components/build-module/surface/@wordpress/components/src/surface/component.tsx","webpack://wp/./packages/components/build-module/tab-panel/@wordpress/components/src/tab-panel/index.tsx","webpack://wp/./packages/components/build-module/text-control/@wordpress/components/src/text-control/index.tsx","webpack://wp/./packages/components/build-module/utils/input/@wordpress/components/src/utils/input/base.js","webpack://wp/./packages/components/build-module/utils/input/@wordpress/components/src/utils/input/input-control.js","webpack://wp/./packages/components/build-module/utils/@wordpress/components/src/utils/breakpoint.js","webpack://wp/./packages/components/build-module/textarea-control/styles/@wordpress/components/src/textarea-control/styles/textarea-control-styles.ts","webpack://wp/./packages/components/build-module/textarea-control/@wordpress/components/src/textarea-control/index.tsx","webpack://wp/./packages/components/build-module/text-highlight/@wordpress/components/src/text-highlight/index.tsx","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/tip.js","webpack://wp/./packages/components/build-module/tip/@wordpress/components/src/tip/index.tsx","webpack://wp/./packages/components/build-module/toggle-control/@wordpress/components/src/toggle-control/index.tsx","webpack://wp/./packages/components/build-module/toggle-group-control/toggle-group-control-option-icon/@wordpress/components/src/toggle-group-control/toggle-group-control-option-icon/component.tsx","webpack://wp/./node_modules/reakit/es/__keys-ae468c11.js","webpack://wp/./node_modules/reakit/es/Toolbar/ToolbarItem.js","webpack://wp/./packages/components/build-module/toolbar-context/@wordpress/components/src/toolbar-context/index.js","webpack://wp/./packages/components/build-module/toolbar-item/@wordpress/components/src/toolbar-item/index.js","webpack://wp/./packages/components/build-module/toolbar-button/@wordpress/components/src/toolbar-button/toolbar-button-container.js","webpack://wp/./packages/components/build-module/toolbar-button/@wordpress/components/src/toolbar-button/index.js","webpack://wp/./packages/components/build-module/toolbar-group/@wordpress/components/src/toolbar-group/toolbar-group-container.js","webpack://wp/./packages/components/build-module/toolbar-group/@wordpress/components/src/toolbar-group/toolbar-group-collapsed.js","webpack://wp/./packages/components/build-module/toolbar-group/@wordpress/components/src/toolbar-group/index.js","webpack://wp/./node_modules/reakit/es/Toolbar/Toolbar.js","webpack://wp/./packages/components/build-module/toolbar/@wordpress/components/src/toolbar/toolbar-container.js","webpack://wp/./node_modules/reakit/es/Toolbar/ToolbarState.js","webpack://wp/./packages/components/build-module/toolbar/@wordpress/components/src/toolbar/index.js","webpack://wp/./packages/components/build-module/toolbar-dropdown-menu/@wordpress/components/src/toolbar-dropdown-menu/index.js","webpack://wp/./packages/components/build-module/tools-panel/@wordpress/components/src/tools-panel/styles.ts","webpack://wp/./packages/components/build-module/tools-panel/@wordpress/components/src/tools-panel/context.ts","webpack://wp/./packages/components/build-module/tools-panel/tools-panel-header/@wordpress/components/src/tools-panel/tools-panel-header/component.tsx","webpack://wp/./packages/components/build-module/tools-panel/tools-panel-header/@wordpress/components/src/tools-panel/tools-panel-header/hook.ts","webpack://wp/./packages/components/build-module/tools-panel/tools-panel/@wordpress/components/src/tools-panel/tools-panel/hook.ts","webpack://wp/./packages/components/build-module/tools-panel/tools-panel/@wordpress/components/src/tools-panel/tools-panel/component.tsx","webpack://wp/./packages/components/build-module/tools-panel/tools-panel-item/@wordpress/components/src/tools-panel/tools-panel-item/component.tsx","webpack://wp/./packages/components/build-module/tools-panel/tools-panel-item/@wordpress/components/src/tools-panel/tools-panel-item/hook.ts","webpack://wp/external window [\"wp\",\"keycodes\"]","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/roving-tab-index-context.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/roving-tab-index.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/index.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/row.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/roving-tab-index-item.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/item.js","webpack://wp/./packages/components/build-module/tree-grid/@wordpress/components/src/tree-grid/cell.js","webpack://wp/./packages/components/build-module/isolated-event-container/@wordpress/components/src/isolated-event-container/index.js","webpack://wp/./packages/components/build-module/slot-fill/bubbles-virtually/@wordpress/components/src/slot-fill/bubbles-virtually/use-slot-fills.js","webpack://wp/./packages/components/build-module/z-stack/@wordpress/components/src/z-stack/styles.ts","webpack://wp/./packages/components/build-module/z-stack/@wordpress/components/src/z-stack/component.tsx","webpack://wp/./packages/components/build-module/higher-order/navigate-regions/@wordpress/components/src/higher-order/navigate-regions/index.js","webpack://wp/./packages/components/build-module/higher-order/with-constrained-tabbing/@wordpress/components/src/higher-order/with-constrained-tabbing/index.js","webpack://wp/./packages/components/build-module/higher-order/with-fallback-styles/@wordpress/components/src/higher-order/with-fallback-styles/index.js","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/./packages/components/build-module/higher-order/with-filters/@wordpress/components/src/higher-order/with-filters/index.js","webpack://wp/./packages/components/build-module/higher-order/with-focus-return/@wordpress/components/src/higher-order/with-focus-return/index.js","webpack://wp/./packages/components/build-module/higher-order/with-notices/@wordpress/components/src/higher-order/with-notices/index.js"],"sourcesContent":["/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","'use strict';\n\nvar util = require('./util');\n\nfunction scrollIntoView(elem, container, config) {\n  config = config || {};\n  // document 归一化到 window\n  if (container.nodeType === 9) {\n    container = util.getWindow(container);\n  }\n\n  var allowHorizontalScroll = config.allowHorizontalScroll;\n  var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n  var alignWithTop = config.alignWithTop;\n  var alignWithLeft = config.alignWithLeft;\n  var offsetTop = config.offsetTop || 0;\n  var offsetLeft = config.offsetLeft || 0;\n  var offsetBottom = config.offsetBottom || 0;\n  var offsetRight = config.offsetRight || 0;\n\n  allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n  var isWin = util.isWindow(container);\n  var isFramed = !!(isWin && container.frameElement);\n  var elemOffset = util.offset(elem);\n  var eh = util.outerHeight(elem);\n  var ew = util.outerWidth(elem);\n  var containerOffset = undefined;\n  var ch = undefined;\n  var cw = undefined;\n  var containerScroll = undefined;\n  var diffTop = undefined;\n  var diffBottom = undefined;\n  var win = undefined;\n  var winScroll = undefined;\n  var ww = undefined;\n  var wh = undefined;\n\n  if (isFramed) {\n    container = container.document.scrollingElement || container.document.body;\n  }\n\n  if (isWin || isFramed) {\n    win = container;\n    wh = util.height(win);\n    ww = util.width(win);\n    winScroll = {\n      left: util.scrollLeft(win),\n      top: util.scrollTop(win)\n    };\n    // elem 相对 container 可视视窗的距离\n    diffTop = {\n      left: elemOffset.left - winScroll.left - offsetLeft,\n      top: elemOffset.top - winScroll.top - offsetTop\n    };\n    diffBottom = {\n      left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n      top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom\n    };\n    containerScroll = winScroll;\n  } else {\n    containerOffset = util.offset(container);\n    ch = container.clientHeight;\n    cw = container.clientWidth;\n    containerScroll = {\n      left: container.scrollLeft,\n      top: container.scrollTop\n    };\n    // elem 相对 container 可视视窗的距离\n    // 注意边框, offset 是边框到根节点\n    diffTop = {\n      left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,\n      top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop\n    };\n    diffBottom = {\n      left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,\n      top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom\n    };\n  }\n\n  if (diffTop.top < 0 || diffBottom.top > 0) {\n    // 强制向上\n    if (alignWithTop === true) {\n      util.scrollTop(container, containerScroll.top + diffTop.top);\n    } else if (alignWithTop === false) {\n      util.scrollTop(container, containerScroll.top + diffBottom.top);\n    } else {\n      // 自动调整\n      if (diffTop.top < 0) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  } else {\n    if (!onlyScrollIfNeeded) {\n      alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n      if (alignWithTop) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  }\n\n  if (allowHorizontalScroll) {\n    if (diffTop.left < 0 || diffBottom.left > 0) {\n      // 强制向上\n      if (alignWithLeft === true) {\n        util.scrollLeft(container, containerScroll.left + diffTop.left);\n      } else if (alignWithLeft === false) {\n        util.scrollLeft(container, containerScroll.left + diffBottom.left);\n      } else {\n        // 自动调整\n        if (diffTop.left < 0) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    } else {\n      if (!onlyScrollIfNeeded) {\n        alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n        if (alignWithLeft) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = scrollIntoView;","'use strict';\n\nmodule.exports = require('./dom-scroll-into-view');","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n  var box = undefined;\n  var x = undefined;\n  var y = undefined;\n  var doc = elem.ownerDocument;\n  var body = doc.body;\n  var docElem = doc && doc.documentElement;\n  // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n  box = elem.getBoundingClientRect();\n\n  // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n  // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n  // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n  x = box.left;\n  y = box.top;\n\n  // In IE, most of the time, 2 extra pixels are added to the top and left\n  // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and\n  // IE6 standards mode, this border can be overridden by setting the\n  // document element's border to zero -- thus, we cannot rely on the\n  // offset always being 2 pixels.\n\n  // In quirks mode, the offset can be determined by querying the body's\n  // clientLeft/clientTop, but in standards mode, it is found by querying\n  // the document element's clientLeft/clientTop.  Since we already called\n  // getClientBoundingRect we have already forced a reflow, so it is not\n  // too expensive just to query them all.\n\n  // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n  // 窗口边框标准是设 documentElement ,quirks 时设置 body\n  // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n  // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n  // 标准 ie 下 docElem.clientTop 就是 border-top\n  // ie7 html 即窗口边框改变不了。永远为 2\n  // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n  x -= docElem.clientLeft || body.clientLeft || 0;\n  y -= docElem.clientTop || body.clientTop || 0;\n\n  return {\n    left: x,\n    top: y\n  };\n}\n\nfunction getScroll(w, top) {\n  var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n  var method = 'scroll' + (top ? 'Top' : 'Left');\n  if (typeof ret !== 'number') {\n    var d = w.document;\n    // ie6,7,8 standard mode\n    ret = d.documentElement[method];\n    if (typeof ret !== 'number') {\n      // quirks mode\n      ret = d.body[method];\n    }\n  }\n  return ret;\n}\n\nfunction getScrollLeft(w) {\n  return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n  return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n  var pos = getClientPosition(el);\n  var doc = el.ownerDocument;\n  var w = doc.defaultView || doc.parentWindow;\n  pos.left += getScrollLeft(w);\n  pos.top += getScrollTop(w);\n  return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n  var val = '';\n  var d = elem.ownerDocument;\n  var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n  // https://github.com/kissyteam/kissy/issues/61\n  if (computedStyle) {\n    val = computedStyle.getPropertyValue(name) || computedStyle[name];\n  }\n\n  return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n  // currentStyle maybe null\n  // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n  var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n  // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n  // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n  // 在 ie 下不对,需要直接用 offset 方式\n  // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n  // From the awesome hack by Dean Edwards\n  // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n  // If we're not dealing with a regular pixel number\n  // but a number that has a weird ending, we need to convert it to pixels\n  // exclude left right for relativity\n  if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n    // Remember the original values\n    var style = elem.style;\n    var left = style[LEFT];\n    var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n    // prevent flashing of content\n    elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n    // Put in the new values to get a computed value out\n    style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n    ret = style.pixelLeft + PX;\n\n    // Revert the changed values\n    style[LEFT] = left;\n\n    elem[RUNTIME_STYLE][LEFT] = rsLeft;\n  }\n  return ret === '' ? 'auto' : ret;\n}\n\nvar getComputedStyleX = undefined;\nif (typeof window !== 'undefined') {\n  getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n  for (var i = 0; i < arr.length; i++) {\n    fn(arr[i]);\n  }\n}\n\nfunction isBorderBoxFn(elem) {\n  return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n  var old = {};\n  var style = elem.style;\n  var name = undefined;\n\n  // Remember the old values, and insert the new ones\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      old[name] = style[name];\n      style[name] = options[name];\n    }\n  }\n\n  callback.call(elem);\n\n  // Revert the old values\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      style[name] = old[name];\n    }\n  }\n}\n\nfunction getPBMWidth(elem, props, which) {\n  var value = 0;\n  var prop = undefined;\n  var j = undefined;\n  var i = undefined;\n  for (j = 0; j < props.length; j++) {\n    prop = props[j];\n    if (prop) {\n      for (i = 0; i < which.length; i++) {\n        var cssProp = undefined;\n        if (prop === 'border') {\n          cssProp = prop + which[i] + 'Width';\n        } else {\n          cssProp = prop + which[i];\n        }\n        value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n      }\n    }\n  }\n  return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n  // must use == for ie8\n  /* eslint eqeqeq:0 */\n  return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n  domUtils['doc' + name] = function (refWin) {\n    var d = refWin.document;\n    return Math.max(\n    // firefox chrome documentElement.scrollHeight< body.scrollHeight\n    // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n    d.documentElement['scroll' + name],\n    // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n    d.body['scroll' + name], domUtils['viewport' + name](d));\n  };\n\n  domUtils['viewport' + name] = function (win) {\n    // pc browser includes scrollbar in window.innerWidth\n    var prop = 'client' + name;\n    var doc = win.document;\n    var body = doc.body;\n    var documentElement = doc.documentElement;\n    var documentElementProp = documentElement[prop];\n    // 标准模式取 documentElement\n    // backcompat 取 body\n    return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n  };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra]  'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n  if (isWindow(elem)) {\n    return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n  } else if (elem.nodeType === 9) {\n    return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n  }\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n  var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n  var computedStyle = getComputedStyleX(elem);\n  var isBorderBox = isBorderBoxFn(elem, computedStyle);\n  var cssBoxValue = 0;\n  if (borderBoxValue == null || borderBoxValue <= 0) {\n    borderBoxValue = undefined;\n    // Fall back to computed then un computed css if necessary\n    cssBoxValue = getComputedStyleX(elem, name);\n    if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n      cssBoxValue = elem.style[name] || 0;\n    }\n    // Normalize '', auto, and prepare for extra\n    cssBoxValue = parseFloat(cssBoxValue) || 0;\n  }\n  if (extra === undefined) {\n    extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n  }\n  var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n  var val = borderBoxValue || cssBoxValue;\n  if (extra === CONTENT_INDEX) {\n    if (borderBoxValueOrIsBorderBox) {\n      return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n    }\n    return cssBoxValue;\n  }\n  if (borderBoxValueOrIsBorderBox) {\n    var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);\n    return val + (extra === BORDER_INDEX ? 0 : padding);\n  }\n  return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n  position: 'absolute',\n  visibility: 'hidden',\n  display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n  var val = undefined;\n  var args = arguments;\n  // in case elem is window\n  // elem.offsetWidth === undefined\n  if (elem.offsetWidth !== 0) {\n    val = getWH.apply(undefined, args);\n  } else {\n    swap(elem, cssShow, function () {\n      val = getWH.apply(undefined, args);\n    });\n  }\n  return val;\n}\n\nfunction css(el, name, v) {\n  var value = v;\n  if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n    for (var i in name) {\n      if (name.hasOwnProperty(i)) {\n        css(el, i, name[i]);\n      }\n    }\n    return undefined;\n  }\n  if (typeof value !== 'undefined') {\n    if (typeof value === 'number') {\n      value += 'px';\n    }\n    el.style[name] = value;\n    return undefined;\n  }\n  return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], function (name) {\n  var first = name.charAt(0).toUpperCase() + name.slice(1);\n  domUtils['outer' + first] = function (el, includeMargin) {\n    return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n  };\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n  domUtils[name] = function (elem, val) {\n    if (val !== undefined) {\n      if (elem) {\n        var computedStyle = getComputedStyleX(elem);\n        var isBorderBox = isBorderBoxFn(elem);\n        if (isBorderBox) {\n          val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n        }\n        return css(elem, name, val);\n      }\n      return undefined;\n    }\n    return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n  };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n  // set position first, in-case top/left are set even on static elem\n  if (css(elem, 'position') === 'static') {\n    elem.style.position = 'relative';\n  }\n\n  var old = getOffset(elem);\n  var ret = {};\n  var current = undefined;\n  var key = undefined;\n\n  for (key in offset) {\n    if (offset.hasOwnProperty(key)) {\n      current = parseFloat(css(elem, key)) || 0;\n      ret[key] = current + offset[key] - old[key];\n    }\n  }\n  css(elem, ret);\n}\n\nmodule.exports = _extends({\n  getWindow: function getWindow(node) {\n    var doc = node.ownerDocument || node;\n    return doc.defaultView || doc.parentWindow;\n  },\n  offset: function offset(el, value) {\n    if (typeof value !== 'undefined') {\n      setOffset(el, value);\n    } else {\n      return getOffset(el);\n    }\n  },\n\n  isWindow: isWindow,\n  each: each,\n  css: css,\n  clone: function clone(obj) {\n    var ret = {};\n    for (var i in obj) {\n      if (obj.hasOwnProperty(i)) {\n        ret[i] = obj[i];\n      }\n    }\n    var overflow = obj.overflow;\n    if (overflow) {\n      for (var i in obj) {\n        if (obj.hasOwnProperty(i)) {\n          ret.overflow[i] = obj.overflow[i];\n        }\n      }\n    }\n    return ret;\n  },\n  scrollLeft: function scrollLeft(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollLeft(w);\n      }\n      window.scrollTo(v, getScrollTop(w));\n    } else {\n      if (v === undefined) {\n        return w.scrollLeft;\n      }\n      w.scrollLeft = v;\n    }\n  },\n  scrollTop: function scrollTop(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollTop(w);\n      }\n      window.scrollTo(getScrollLeft(w), v);\n    } else {\n      if (v === undefined) {\n        return w.scrollTop;\n      }\n      w.scrollTop = v;\n    }\n  },\n\n  viewportWidth: 0,\n  viewportHeight: 0\n}, domUtils);","/** @license React v17.0.1\n * react-is.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 b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","//\n// Main\n//\n\nfunction memoize (fn, options) {\n  var cache = options && options.cache\n    ? options.cache\n    : cacheDefault\n\n  var serializer = options && options.serializer\n    ? options.serializer\n    : serializerDefault\n\n  var strategy = options && options.strategy\n    ? options.strategy\n    : strategyDefault\n\n  return strategy(fn, {\n    cache: cache,\n    serializer: serializer\n  })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive (value) {\n  return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nfunction monadic (fn, cache, serializer, arg) {\n  var cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.call(this, arg)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction variadic (fn, cache, serializer) {\n  var args = Array.prototype.slice.call(arguments, 3)\n  var cacheKey = serializer(args)\n\n  var computedValue = cache.get(cacheKey)\n  if (typeof computedValue === 'undefined') {\n    computedValue = fn.apply(this, args)\n    cache.set(cacheKey, computedValue)\n  }\n\n  return computedValue\n}\n\nfunction assemble (fn, context, strategy, cache, serialize) {\n  return strategy.bind(\n    context,\n    fn,\n    cache,\n    serialize\n  )\n}\n\nfunction strategyDefault (fn, options) {\n  var strategy = fn.length === 1 ? monadic : variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyVariadic (fn, options) {\n  var strategy = variadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\nfunction strategyMonadic (fn, options) {\n  var strategy = monadic\n\n  return assemble(\n    fn,\n    this,\n    strategy,\n    options.cache.create(),\n    options.serializer\n  )\n}\n\n//\n// Serializer\n//\n\nfunction serializerDefault () {\n  return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nfunction ObjectWithoutPrototypeCache () {\n  this.cache = Object.create(null)\n}\n\nObjectWithoutPrototypeCache.prototype.has = function (key) {\n  return (key in this.cache)\n}\n\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n  return this.cache[key]\n}\n\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n  this.cache[key] = value\n}\n\nvar cacheDefault = {\n  create: function create () {\n    return new ObjectWithoutPrototypeCache()\n  }\n}\n\n//\n// API\n//\n\nmodule.exports = memoize\nmodule.exports.strategies = {\n  variadic: strategyVariadic,\n  monadic: strategyMonadic\n}\n","// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = {};\n\nGradientParser.parse = (function() {\n\n  var tokens = {\n    linearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,\n    repeatingLinearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,\n    radialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,\n    repeatingRadialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,\n    sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,\n    extentKeywords: /^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,\n    positionKeywords: /^(left|center|right|top|bottom)/i,\n    pixelValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,\n    percentageValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,\n    emValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,\n    angleValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,\n    startCall: /^\\(/,\n    endCall: /^\\)/,\n    comma: /^,/,\n    hexColor: /^\\#([0-9a-fA-F]+)/,\n    literalColor: /^([a-zA-Z]+)/,\n    rgbColor: /^rgb/i,\n    rgbaColor: /^rgba/i,\n    number: /^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/\n  };\n\n  var input = '';\n\n  function error(msg) {\n    var err = new Error(input + ': ' + msg);\n    err.source = input;\n    throw err;\n  }\n\n  function getAST() {\n    var ast = matchListDefinitions();\n\n    if (input.length > 0) {\n      error('Invalid input not EOF');\n    }\n\n    return ast;\n  }\n\n  function matchListDefinitions() {\n    return matchListing(matchDefinition);\n  }\n\n  function matchDefinition() {\n    return matchGradient(\n            'linear-gradient',\n            tokens.linearGradient,\n            matchLinearOrientation) ||\n\n          matchGradient(\n            'repeating-linear-gradient',\n            tokens.repeatingLinearGradient,\n            matchLinearOrientation) ||\n\n          matchGradient(\n            'radial-gradient',\n            tokens.radialGradient,\n            matchListRadialOrientations) ||\n\n          matchGradient(\n            'repeating-radial-gradient',\n            tokens.repeatingRadialGradient,\n            matchListRadialOrientations);\n  }\n\n  function matchGradient(gradientType, pattern, orientationMatcher) {\n    return matchCall(pattern, function(captures) {\n\n      var orientation = orientationMatcher();\n      if (orientation) {\n        if (!scan(tokens.comma)) {\n          error('Missing comma before color stops');\n        }\n      }\n\n      return {\n        type: gradientType,\n        orientation: orientation,\n        colorStops: matchListing(matchColorStop)\n      };\n    });\n  }\n\n  function matchCall(pattern, callback) {\n    var captures = scan(pattern);\n\n    if (captures) {\n      if (!scan(tokens.startCall)) {\n        error('Missing (');\n      }\n\n      result = callback(captures);\n\n      if (!scan(tokens.endCall)) {\n        error('Missing )');\n      }\n\n      return result;\n    }\n  }\n\n  function matchLinearOrientation() {\n    return matchSideOrCorner() ||\n      matchAngle();\n  }\n\n  function matchSideOrCorner() {\n    return match('directional', tokens.sideOrCorner, 1);\n  }\n\n  function matchAngle() {\n    return match('angular', tokens.angleValue, 1);\n  }\n\n  function matchListRadialOrientations() {\n    var radialOrientations,\n        radialOrientation = matchRadialOrientation(),\n        lookaheadCache;\n\n    if (radialOrientation) {\n      radialOrientations = [];\n      radialOrientations.push(radialOrientation);\n\n      lookaheadCache = input;\n      if (scan(tokens.comma)) {\n        radialOrientation = matchRadialOrientation();\n        if (radialOrientation) {\n          radialOrientations.push(radialOrientation);\n        } else {\n          input = lookaheadCache;\n        }\n      }\n    }\n\n    return radialOrientations;\n  }\n\n  function matchRadialOrientation() {\n    var radialType = matchCircle() ||\n      matchEllipse();\n\n    if (radialType) {\n      radialType.at = matchAtPosition();\n    } else {\n      var defaultPosition = matchPositioning();\n      if (defaultPosition) {\n        radialType = {\n          type: 'default-radial',\n          at: defaultPosition\n        };\n      }\n    }\n\n    return radialType;\n  }\n\n  function matchCircle() {\n    var circle = match('shape', /^(circle)/i, 0);\n\n    if (circle) {\n      circle.style = matchLength() || matchExtentKeyword();\n    }\n\n    return circle;\n  }\n\n  function matchEllipse() {\n    var ellipse = match('shape', /^(ellipse)/i, 0);\n\n    if (ellipse) {\n      ellipse.style =  matchDistance() || matchExtentKeyword();\n    }\n\n    return ellipse;\n  }\n\n  function matchExtentKeyword() {\n    return match('extent-keyword', tokens.extentKeywords, 1);\n  }\n\n  function matchAtPosition() {\n    if (match('position', /^at/, 0)) {\n      var positioning = matchPositioning();\n\n      if (!positioning) {\n        error('Missing positioning value');\n      }\n\n      return positioning;\n    }\n  }\n\n  function matchPositioning() {\n    var location = matchCoordinates();\n\n    if (location.x || location.y) {\n      return {\n        type: 'position',\n        value: location\n      };\n    }\n  }\n\n  function matchCoordinates() {\n    return {\n      x: matchDistance(),\n      y: matchDistance()\n    };\n  }\n\n  function matchListing(matcher) {\n    var captures = matcher(),\n      result = [];\n\n    if (captures) {\n      result.push(captures);\n      while (scan(tokens.comma)) {\n        captures = matcher();\n        if (captures) {\n          result.push(captures);\n        } else {\n          error('One extra comma');\n        }\n      }\n    }\n\n    return result;\n  }\n\n  function matchColorStop() {\n    var color = matchColor();\n\n    if (!color) {\n      error('Expected color definition');\n    }\n\n    color.length = matchDistance();\n    return color;\n  }\n\n  function matchColor() {\n    return matchHexColor() ||\n      matchRGBAColor() ||\n      matchRGBColor() ||\n      matchLiteralColor();\n  }\n\n  function matchLiteralColor() {\n    return match('literal', tokens.literalColor, 0);\n  }\n\n  function matchHexColor() {\n    return match('hex', tokens.hexColor, 1);\n  }\n\n  function matchRGBColor() {\n    return matchCall(tokens.rgbColor, function() {\n      return  {\n        type: 'rgb',\n        value: matchListing(matchNumber)\n      };\n    });\n  }\n\n  function matchRGBAColor() {\n    return matchCall(tokens.rgbaColor, function() {\n      return  {\n        type: 'rgba',\n        value: matchListing(matchNumber)\n      };\n    });\n  }\n\n  function matchNumber() {\n    return scan(tokens.number)[1];\n  }\n\n  function matchDistance() {\n    return match('%', tokens.percentageValue, 1) ||\n      matchPositionKeyword() ||\n      matchLength();\n  }\n\n  function matchPositionKeyword() {\n    return match('position-keyword', tokens.positionKeywords, 1);\n  }\n\n  function matchLength() {\n    return match('px', tokens.pixelValue, 1) ||\n      match('em', tokens.emValue, 1);\n  }\n\n  function match(type, pattern, captureIndex) {\n    var captures = scan(pattern);\n    if (captures) {\n      return {\n        type: type,\n        value: captures[captureIndex]\n      };\n    }\n  }\n\n  function scan(regexp) {\n    var captures,\n        blankCaptures;\n\n    blankCaptures = /^[\\n\\r\\t\\s]+/.exec(input);\n    if (blankCaptures) {\n        consume(blankCaptures[0].length);\n    }\n\n    captures = regexp.exec(input);\n    if (captures) {\n        consume(captures[0].length);\n    }\n\n    return captures;\n  }\n\n  function consume(size) {\n    input = input.substr(size);\n  }\n\n  return function(code) {\n    input = code.toString();\n    return getAST();\n  };\n})();\n\nexports.parse = (GradientParser || {}).parse;\n"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2a95070affdf3c0054f1","// @flow\n\nexport { combineChunks, fillInChunks, findAll, findChunks } from './utils'\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","// @flow\n\nexport type Chunk = {|\n  highlight: boolean,\n  start: number,\n  end: number,\n|};\n\n/**\n * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word.\n * @return Array of \"chunks\" (where a Chunk is { start:number, end:number, highlight:boolean })\n */\nexport const findAll = ({\n  autoEscape,\n  caseSensitive = false,\n  findChunks = defaultFindChunks,\n  sanitize,\n  searchWords,\n  textToHighlight\n}: {\n  autoEscape?: boolean,\n  caseSensitive?: boolean,\n  findChunks?: typeof defaultFindChunks,\n  sanitize?: typeof defaultSanitize,\n  searchWords: Array<string>,\n  textToHighlight: string,\n}): Array<Chunk> => (\n  fillInChunks({\n    chunksToHighlight: combineChunks({\n      chunks: findChunks({\n        autoEscape,\n        caseSensitive,\n        sanitize,\n        searchWords,\n        textToHighlight\n      })\n    }),\n    totalLength: textToHighlight ? textToHighlight.length : 0\n  })\n)\n\n/**\n * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks.\n * @return {start:number, end:number}[]\n */\nexport const combineChunks = ({\n  chunks\n}: {\n  chunks: Array<Chunk>,\n}): Array<Chunk> => {\n  chunks = chunks\n    .sort((first, second) => first.start - second.start)\n    .reduce((processedChunks, nextChunk) => {\n      // First chunk just goes straight in the array...\n      if (processedChunks.length === 0) {\n        return [nextChunk]\n      } else {\n        // ... subsequent chunks get checked to see if they overlap...\n        const prevChunk = processedChunks.pop()\n        if (nextChunk.start <= prevChunk.end) {\n          // It may be the case that prevChunk completely surrounds nextChunk, so take the\n          // largest of the end indeces.\n          const endIndex = Math.max(prevChunk.end, nextChunk.end)\n          processedChunks.push({highlight: false, start: prevChunk.start, end: endIndex})\n        } else {\n          processedChunks.push(prevChunk, nextChunk)\n        }\n        return processedChunks\n      }\n    }, [])\n\n  return chunks\n}\n\n/**\n * Examine text for any matches.\n * If we find matches, add them to the returned array as a \"chunk\" object ({start:number, end:number}).\n * @return {start:number, end:number}[]\n */\nconst defaultFindChunks = ({\n  autoEscape,\n  caseSensitive,\n  sanitize = defaultSanitize,\n  searchWords,\n  textToHighlight\n}: {\n  autoEscape?: boolean,\n  caseSensitive?: boolean,\n  sanitize?: typeof defaultSanitize,\n  searchWords: Array<string>,\n  textToHighlight: string,\n}): Array<Chunk> => {\n  textToHighlight = sanitize(textToHighlight)\n\n  return searchWords\n    .filter(searchWord => searchWord) // Remove empty words\n    .reduce((chunks, searchWord) => {\n      searchWord = sanitize(searchWord)\n\n      if (autoEscape) {\n        searchWord = escapeRegExpFn(searchWord)\n      }\n\n      const regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi')\n\n      let match\n      while ((match = regex.exec(textToHighlight))) {\n        let start = match.index\n        let end = regex.lastIndex\n        // We do not return zero-length matches\n        if (end > start) {\n          chunks.push({highlight: false, start, end})\n        }\n\n        // Prevent browsers like Firefox from getting stuck in an infinite loop\n        // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/\n        if (match.index === regex.lastIndex) {\n          regex.lastIndex++\n        }\n      }\n\n      return chunks\n    }, [])\n}\n// Allow the findChunks to be overridden in findAll,\n// but for backwards compatibility we export as the old name\nexport {defaultFindChunks as findChunks}\n\n/**\n * Given a set of chunks to highlight, create an additional set of chunks\n * to represent the bits of text between the highlighted text.\n * @param chunksToHighlight {start:number, end:number}[]\n * @param totalLength number\n * @return {start:number, end:number, highlight:boolean}[]\n */\nexport const fillInChunks = ({\n  chunksToHighlight,\n  totalLength\n}: {\n  chunksToHighlight: Array<Chunk>,\n  totalLength: number,\n}): Array<Chunk> => {\n  const allChunks = []\n  const append = (start, end, highlight) => {\n    if (end - start > 0) {\n      allChunks.push({\n        start,\n        end,\n        highlight\n      })\n    }\n  }\n\n  if (chunksToHighlight.length === 0) {\n    append(0, totalLength, false)\n  } else {\n    let lastIndex = 0\n    chunksToHighlight.forEach((chunk) => {\n      append(lastIndex, chunk.start, false)\n      append(chunk.start, chunk.end, true)\n      lastIndex = chunk.end\n    })\n    append(lastIndex, totalLength, false)\n  }\n  return allChunks\n}\n\nfunction defaultSanitize (string: string): string {\n  return string\n}\n\nfunction escapeRegExpFn (string: string): string {\n  return string.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&')\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n  childContextTypes: true,\n  contextType: true,\n  contextTypes: true,\n  defaultProps: true,\n  displayName: true,\n  getDefaultProps: true,\n  getDerivedStateFromError: true,\n  getDerivedStateFromProps: true,\n  mixins: true,\n  propTypes: true,\n  type: true\n};\nvar KNOWN_STATICS = {\n  name: true,\n  length: true,\n  prototype: true,\n  caller: true,\n  callee: true,\n  arguments: true,\n  arity: true\n};\nvar FORWARD_REF_STATICS = {\n  '$$typeof': true,\n  render: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true\n};\nvar MEMO_STATICS = {\n  '$$typeof': true,\n  compare: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true,\n  type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n  // React v16.11 and below\n  if (reactIs.isMemo(component)) {\n    return MEMO_STATICS;\n  } // React v16.12 and above\n\n\n  return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n  if (typeof sourceComponent !== 'string') {\n    // don't hoist over string (html) components\n    if (objectPrototype) {\n      var inheritedComponent = getPrototypeOf(sourceComponent);\n\n      if (inheritedComponent && inheritedComponent !== objectPrototype) {\n        hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n      }\n    }\n\n    var keys = getOwnPropertyNames(sourceComponent);\n\n    if (getOwnPropertySymbols) {\n      keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n    }\n\n    var targetStatics = getStatics(targetComponent);\n    var sourceStatics = getStatics(sourceComponent);\n\n    for (var i = 0; i < keys.length; ++i) {\n      var key = keys[i];\n\n      if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n        var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n        try {\n          // Avoid failures from read-only properties\n          defineProperty(targetComponent, key, descriptor);\n        } catch (e) {}\n      }\n    }\n  }\n\n  return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>}                   args   Function arguments for cache\n *                                               entry.\n * @property {*}                          val    Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {Function} F\n *\n * @param {F}             fn        Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {F & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize( fn, options ) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized( /* ...args */ ) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs, i;\n\n\t\tsearchCache: while ( node ) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif ( node.args.length !== arguments.length ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( node.args[ i ] !== arguments[ i ] ) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== head ) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif ( node === tail ) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ ( head ).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply( null, args ),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( head ) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ ( tail ).prev;\n\t\t\t/** @type {MemizeCacheNode} */ ( tail ).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\tif ( process.env.NODE_ENV === 'test' ) {\n\t\t// Cache is not exposed in the public API, but used in tests to ensure\n\t\t// expected list progression\n\t\tmemoized.getCache = function() {\n\t\t\treturn [ head, tail, size ];\n\t\t};\n\t}\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nmodule.exports = memize;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/** @license React v16.8.4\n * react-is.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\n'use strict';Object.defineProperty(exports,\"__esModule\",{value:!0});\nvar b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?Symbol.for(\"react.memo\"):\n60115,r=b?Symbol.for(\"react.lazy\"):60116;function t(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;\nexports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||\"object\"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};\nexports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};\nexports.isSuspense=function(a){return t(a)===p};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","var characterMap = {\r\n\t\"À\": \"A\",\r\n\t\"Á\": \"A\",\r\n\t\"Â\": \"A\",\r\n\t\"Ã\": \"A\",\r\n\t\"Ä\": \"A\",\r\n\t\"Å\": \"A\",\r\n\t\"Ấ\": \"A\",\r\n\t\"Ắ\": \"A\",\r\n\t\"Ẳ\": \"A\",\r\n\t\"Ẵ\": \"A\",\r\n\t\"Ặ\": \"A\",\r\n\t\"Æ\": \"AE\",\r\n\t\"Ầ\": \"A\",\r\n\t\"Ằ\": \"A\",\r\n\t\"Ȃ\": \"A\",\r\n\t\"Ç\": \"C\",\r\n\t\"Ḉ\": \"C\",\r\n\t\"È\": \"E\",\r\n\t\"É\": \"E\",\r\n\t\"Ê\": \"E\",\r\n\t\"Ë\": \"E\",\r\n\t\"Ế\": \"E\",\r\n\t\"Ḗ\": \"E\",\r\n\t\"Ề\": \"E\",\r\n\t\"Ḕ\": \"E\",\r\n\t\"Ḝ\": \"E\",\r\n\t\"Ȇ\": \"E\",\r\n\t\"Ì\": \"I\",\r\n\t\"Í\": \"I\",\r\n\t\"Î\": \"I\",\r\n\t\"Ï\": \"I\",\r\n\t\"Ḯ\": \"I\",\r\n\t\"Ȋ\": \"I\",\r\n\t\"Ð\": \"D\",\r\n\t\"Ñ\": \"N\",\r\n\t\"Ò\": \"O\",\r\n\t\"Ó\": \"O\",\r\n\t\"Ô\": \"O\",\r\n\t\"Õ\": \"O\",\r\n\t\"Ö\": \"O\",\r\n\t\"Ø\": \"O\",\r\n\t\"Ố\": \"O\",\r\n\t\"Ṍ\": \"O\",\r\n\t\"Ṓ\": \"O\",\r\n\t\"Ȏ\": \"O\",\r\n\t\"Ù\": \"U\",\r\n\t\"Ú\": \"U\",\r\n\t\"Û\": \"U\",\r\n\t\"Ü\": \"U\",\r\n\t\"Ý\": \"Y\",\r\n\t\"à\": \"a\",\r\n\t\"á\": \"a\",\r\n\t\"â\": \"a\",\r\n\t\"ã\": \"a\",\r\n\t\"ä\": \"a\",\r\n\t\"å\": \"a\",\r\n\t\"ấ\": \"a\",\r\n\t\"ắ\": \"a\",\r\n\t\"ẳ\": \"a\",\r\n\t\"ẵ\": \"a\",\r\n\t\"ặ\": \"a\",\r\n\t\"æ\": \"ae\",\r\n\t\"ầ\": \"a\",\r\n\t\"ằ\": \"a\",\r\n\t\"ȃ\": \"a\",\r\n\t\"ç\": \"c\",\r\n\t\"ḉ\": \"c\",\r\n\t\"è\": \"e\",\r\n\t\"é\": \"e\",\r\n\t\"ê\": \"e\",\r\n\t\"ë\": \"e\",\r\n\t\"ế\": \"e\",\r\n\t\"ḗ\": \"e\",\r\n\t\"ề\": \"e\",\r\n\t\"ḕ\": \"e\",\r\n\t\"ḝ\": \"e\",\r\n\t\"ȇ\": \"e\",\r\n\t\"ì\": \"i\",\r\n\t\"í\": \"i\",\r\n\t\"î\": \"i\",\r\n\t\"ï\": \"i\",\r\n\t\"ḯ\": \"i\",\r\n\t\"ȋ\": \"i\",\r\n\t\"ð\": \"d\",\r\n\t\"ñ\": \"n\",\r\n\t\"ò\": \"o\",\r\n\t\"ó\": \"o\",\r\n\t\"ô\": \"o\",\r\n\t\"õ\": \"o\",\r\n\t\"ö\": \"o\",\r\n\t\"ø\": \"o\",\r\n\t\"ố\": \"o\",\r\n\t\"ṍ\": \"o\",\r\n\t\"ṓ\": \"o\",\r\n\t\"ȏ\": \"o\",\r\n\t\"ù\": \"u\",\r\n\t\"ú\": \"u\",\r\n\t\"û\": \"u\",\r\n\t\"ü\": \"u\",\r\n\t\"ý\": \"y\",\r\n\t\"ÿ\": \"y\",\r\n\t\"Ā\": \"A\",\r\n\t\"ā\": \"a\",\r\n\t\"Ă\": \"A\",\r\n\t\"ă\": \"a\",\r\n\t\"Ą\": \"A\",\r\n\t\"ą\": \"a\",\r\n\t\"Ć\": \"C\",\r\n\t\"ć\": \"c\",\r\n\t\"Ĉ\": \"C\",\r\n\t\"ĉ\": \"c\",\r\n\t\"Ċ\": \"C\",\r\n\t\"ċ\": \"c\",\r\n\t\"Č\": \"C\",\r\n\t\"č\": \"c\",\r\n\t\"C̆\": \"C\",\r\n\t\"c̆\": \"c\",\r\n\t\"Ď\": \"D\",\r\n\t\"ď\": \"d\",\r\n\t\"Đ\": \"D\",\r\n\t\"đ\": \"d\",\r\n\t\"Ē\": \"E\",\r\n\t\"ē\": \"e\",\r\n\t\"Ĕ\": \"E\",\r\n\t\"ĕ\": \"e\",\r\n\t\"Ė\": \"E\",\r\n\t\"ė\": \"e\",\r\n\t\"Ę\": \"E\",\r\n\t\"ę\": \"e\",\r\n\t\"Ě\": \"E\",\r\n\t\"ě\": \"e\",\r\n\t\"Ĝ\": \"G\",\r\n\t\"Ǵ\": \"G\",\r\n\t\"ĝ\": \"g\",\r\n\t\"ǵ\": \"g\",\r\n\t\"Ğ\": \"G\",\r\n\t\"ğ\": \"g\",\r\n\t\"Ġ\": \"G\",\r\n\t\"ġ\": \"g\",\r\n\t\"Ģ\": \"G\",\r\n\t\"ģ\": \"g\",\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Œ\": \"OE\",\r\n\t\"œ\": \"oe\",\r\n\t\"P̆\": \"P\",\r\n\t\"p̆\": \"p\",\r\n\t\"Ŕ\": \"R\",\r\n\t\"ŕ\": \"r\",\r\n\t\"Ŗ\": \"R\",\r\n\t\"ŗ\": \"r\",\r\n\t\"Ř\": \"R\",\r\n\t\"ř\": \"r\",\r\n\t\"R̆\": \"R\",\r\n\t\"r̆\": \"r\",\r\n\t\"Ȓ\": \"R\",\r\n\t\"ȓ\": \"r\",\r\n\t\"Ś\": \"S\",\r\n\t\"ś\": \"s\",\r\n\t\"Ŝ\": \"S\",\r\n\t\"ŝ\": \"s\",\r\n\t\"Ş\": \"S\",\r\n\t\"Ș\": \"S\",\r\n\t\"ș\": \"s\",\r\n\t\"ş\": \"s\",\r\n\t\"Š\": \"S\",\r\n\t\"š\": \"s\",\r\n\t\"Ţ\": \"T\",\r\n\t\"ţ\": \"t\",\r\n\t\"ț\": \"t\",\r\n\t\"Ț\": \"T\",\r\n\t\"Ť\": \"T\",\r\n\t\"ť\": \"t\",\r\n\t\"Ŧ\": \"T\",\r\n\t\"ŧ\": \"t\",\r\n\t\"T̆\": \"T\",\r\n\t\"t̆\": \"t\",\r\n\t\"Ũ\": \"U\",\r\n\t\"ũ\": \"u\",\r\n\t\"Ū\": \"U\",\r\n\t\"ū\": \"u\",\r\n\t\"Ŭ\": \"U\",\r\n\t\"ŭ\": \"u\",\r\n\t\"Ů\": \"U\",\r\n\t\"ů\": \"u\",\r\n\t\"Ű\": \"U\",\r\n\t\"ű\": \"u\",\r\n\t\"Ų\": \"U\",\r\n\t\"ų\": \"u\",\r\n\t\"Ȗ\": \"U\",\r\n\t\"ȗ\": \"u\",\r\n\t\"V̆\": \"V\",\r\n\t\"v̆\": \"v\",\r\n\t\"Ŵ\": \"W\",\r\n\t\"ŵ\": \"w\",\r\n\t\"Ẃ\": \"W\",\r\n\t\"ẃ\": \"w\",\r\n\t\"X̆\": \"X\",\r\n\t\"x̆\": \"x\",\r\n\t\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\n\t\"ř̩\": \"r\",\r\n\t\"Ṧ\": \"S\",\r\n\t\"ṧ\": \"s\",\r\n\t\"V̌\": \"V\",\r\n\t\"v̌\": \"v\",\r\n\t\"W̌\": \"W\",\r\n\t\"w̌\": \"w\",\r\n\t\"X̌\": \"X\",\r\n\t\"x̌\": \"x\",\r\n\t\"Y̌\": \"Y\",\r\n\t\"y̌\": \"y\",\r\n\t\"A̧\": \"A\",\r\n\t\"a̧\": \"a\",\r\n\t\"B̧\": \"B\",\r\n\t\"b̧\": \"b\",\r\n\t\"Ḑ\": \"D\",\r\n\t\"ḑ\": \"d\",\r\n\t\"Ȩ\": \"E\",\r\n\t\"ȩ\": \"e\",\r\n\t\"Ɛ̧\": \"E\",\r\n\t\"ɛ̧\": \"e\",\r\n\t\"Ḩ\": \"H\",\r\n\t\"ḩ\": \"h\",\r\n\t\"I̧\": \"I\",\r\n\t\"i̧\": \"i\",\r\n\t\"Ɨ̧\": \"I\",\r\n\t\"ɨ̧\": \"i\",\r\n\t\"M̧\": \"M\",\r\n\t\"m̧\": \"m\",\r\n\t\"O̧\": \"O\",\r\n\t\"o̧\": \"o\",\r\n\t\"Q̧\": \"Q\",\r\n\t\"q̧\": \"q\",\r\n\t\"U̧\": \"U\",\r\n\t\"u̧\": \"u\",\r\n\t\"X̧\": \"X\",\r\n\t\"x̧\": \"x\",\r\n\t\"Z̧\": \"Z\",\r\n\t\"z̧\": \"z\",\r\n};\r\n\r\nvar chars = Object.keys(characterMap).join('|');\r\nvar allAccents = new RegExp(chars, 'g');\r\nvar firstAccent = new RegExp(chars, '');\r\n\r\nvar removeAccents = function(string) {\t\r\n\treturn string.replace(allAccents, function(match) {\r\n\t\treturn characterMap[match];\r\n\t});\r\n};\r\n\r\nvar hasAccents = function(string) {\r\n\treturn !!string.match(firstAccent);\r\n};\r\n\r\nmodule.exports = removeAccents;\r\nmodule.exports.has = hasAccents;\r\nmodule.exports.remove = removeAccents;\r\n","/**\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","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\"][\"primitives\"];","export default function _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\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\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\nexport { _objectWithoutPropertiesLoose as _, _objectSpread2 as a, _createForOfIteratorHelperLoose as b };\n","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\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\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\nexport { _objectSpread2 as _, _objectWithoutPropertiesLoose as a, _createForOfIteratorHelperLoose as b };\n","import { createContext } from 'react';\n\nvar SystemContext = /*#__PURE__*/createContext({});\n\nexport { SystemContext };\n","import { getDocument } from './getDocument.js';\n\n// Thanks to Fluent UI for doing the [research on IE11 memery leak](https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427)\n\nvar _window; // Note: Accessing \"window\" in IE11 is somewhat expensive, and calling \"typeof window\"\n// hits a memory leak, whereas aliasing it and calling \"typeof _window\" does not.\n// Caching the window value at the file scope lets us minimize the impact.\n\n\ntry {\n  _window = window;\n} catch (e) {\n  /* no-op */\n}\n/**\n * Returns `element.ownerDocument.defaultView || window`.\n */\n\n\nfunction getWindow(element) {\n  if (!element) {\n    return _window;\n  }\n\n  return getDocument(element).defaultView || _window;\n}\n\nexport { getWindow };\n","import { useContext, createElement } from 'react';\nimport { SystemContext } from './SystemContext.js';\nimport { a as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-0c84a174.js';\n\nfunction isRenderProp(children) {\n  return typeof children === \"function\";\n}\n\n/**\n * Custom hook that will call `children` if it's a function. If\n * `useCreateElement` has been passed to the context, it'll be used instead.\n *\n * @example\n * import React from \"react\";\n * import { SystemProvider, useCreateElement } from \"reakit-system\";\n *\n * const system = {\n *   useCreateElement(type, props, children = props.children) {\n *     // very similar to what `useCreateElement` does already\n *     if (typeof children === \"function\") {\n *       const { children: _, ...rest } = props;\n *       return children(rest);\n *     }\n *     return React.createElement(type, props, children);\n *   },\n * };\n *\n * function Component(props) {\n *   return useCreateElement(\"div\", props);\n * }\n *\n * function App() {\n *   return (\n *     <SystemProvider unstable_system={system}>\n *       <Component url=\"url\">{({ url }) => <a href={url}>link</a>}</Component>\n *     </SystemProvider>\n *   );\n * }\n */\n\nvar useCreateElement = function useCreateElement(type, props, children) {\n  if (children === void 0) {\n    children = props.children;\n  }\n\n  var context = useContext(SystemContext);\n\n  if (context.useCreateElement) {\n    return context.useCreateElement(type, props, children);\n  }\n\n  if (typeof type === \"string\" && isRenderProp(children)) {\n    var _ = props.children,\n        rest = _objectWithoutPropertiesLoose(props, [\"children\"]);\n\n    return children(rest);\n  }\n\n  return /*#__PURE__*/createElement(type, props, children);\n};\n\nexport { useCreateElement };\n","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\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\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\nexport { _objectWithoutPropertiesLoose as _, _objectSpread2 as a, _createForOfIteratorHelperLoose as b };\n","import { isObject } from './isObject.js';\n\n/**\n * Checks whether `arg` is a plain object or not.\n *\n * @returns {boolean}\n */\n\nfunction isPlainObject(arg) {\n  var _proto$constructor;\n\n  if (!isObject(arg)) return false;\n  var proto = Object.getPrototypeOf(arg);\n  if (proto == null) return true;\n  return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString();\n}\n\nexport { isPlainObject };\n","/**\n * Checks whether `arg` is an object or not.\n *\n * @returns {boolean}\n */\nfunction isObject(arg) {\n  return typeof arg === \"object\" && arg != null;\n}\n\nexport { isObject };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from './_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport './isObject.js';\nimport { isPlainObject } from './isPlainObject.js';\n\n/**\n * Splits an object (`props`) into a tuple where the first item is an object\n * with the passed `keys`, and the second item is an object with these keys\n * omitted.\n *\n * @deprecated will be removed in version 2\n *\n * @example\n * import { splitProps } from \"reakit-utils\";\n *\n * splitProps({ a: \"a\", b: \"b\" }, [\"a\"]); // [{ a: \"a\" }, { b: \"b\" }]\n */\n\nfunction __deprecatedSplitProps(props, keys) {\n  var propsKeys = Object.keys(props);\n  var picked = {};\n  var omitted = {};\n\n  for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {\n    var key = _propsKeys[_i];\n\n    if (keys.indexOf(key) >= 0) {\n      picked[key] = props[key];\n    } else {\n      omitted[key] = props[key];\n    }\n  }\n\n  return [picked, omitted];\n}\n/**\n * Splits an object (`props`) into a tuple where the first item\n * is the `state` property, and the second item is the rest of the properties.\n *\n * It is also backward compatible with version 1. If `keys` are passed then\n * splits an object (`props`) into a tuple where the first item is an object\n * with the passed `keys`, and the second item is an object with these keys\n * omitted.\n *\n * @example\n * import { splitProps } from \"reakit-utils\";\n *\n * splitProps({ a: \"a\", b: \"b\" }, [\"a\"]); // [{ a: \"a\" }, { b: \"b\" }]\n *\n * @example\n * import { splitProps } from \"reakit-utils\";\n *\n * splitProps({ state: { a: \"a\" }, b: \"b\" }); // [{ a: \"a\" }, { b: \"b\" }]\n */\n\n\nfunction splitProps(props, keys) {\n  if (keys === void 0) {\n    keys = [];\n  }\n\n  if (!isPlainObject(props.state)) {\n    return __deprecatedSplitProps(props, keys);\n  }\n\n  var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, [\"state\"])),\n      picked = _deprecatedSplitProp[0],\n      omitted = _deprecatedSplitProp[1];\n\n  var state = picked.state,\n      restPicked = _objectWithoutPropertiesLoose(picked, [\"state\"]);\n\n  return [_objectSpread2(_objectSpread2({}, state), restPicked), omitted];\n}\n\nexport { splitProps };\n","/**\n * Compares two objects.\n *\n * @example\n * import { shallowEqual } from \"reakit-utils\";\n *\n * shallowEqual({ a: \"a\" }, {}); // false\n * shallowEqual({ a: \"a\" }, { b: \"b\" }); // false\n * shallowEqual({ a: \"a\" }, { a: \"a\" }); // true\n * shallowEqual({ a: \"a\" }, { a: \"a\", b: \"b\" }); // false\n */\nfunction shallowEqual(objA, objB) {\n  if (objA === objB) return true;\n  if (!objA) return false;\n  if (!objB) return false;\n  if (typeof objA !== \"object\") return false;\n  if (typeof objB !== \"object\") return false;\n  var aKeys = Object.keys(objA);\n  var bKeys = Object.keys(objB);\n  var length = aKeys.length;\n  if (bKeys.length !== length) return false;\n\n  for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {\n    var key = _aKeys[_i];\n\n    if (objA[key] !== objB[key]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nexport { shallowEqual };\n","import { a as _objectSpread2 } from './_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport './isObject.js';\nimport { isPlainObject } from './isPlainObject.js';\n\n/**\n * This higher order functions take `propsAreEqual` function and\n * returns a new function which normalizes the props.\n *\n * Normalizing in our case is making sure the `propsAreEqual` works with\n * both version 1 (object spreading) and version 2 (state object) state passing.\n *\n * To achieve this, the returned function in case of a state object\n * will spread the state object in both `prev` and `next props.\n *\n * Other case it just returns the function as is which makes sure\n * that we are still backward compatible\n */\nfunction normalizePropsAreEqual(propsAreEqual) {\n  if (propsAreEqual.name === \"normalizePropsAreEqualInner\") {\n    return propsAreEqual;\n  }\n\n  return function normalizePropsAreEqualInner(prev, next) {\n    if (!isPlainObject(prev.state) || !isPlainObject(next.state)) {\n      return propsAreEqual(prev, next);\n    }\n\n    return propsAreEqual(_objectSpread2(_objectSpread2({}, prev.state), prev), _objectSpread2(_objectSpread2({}, next.state), next));\n  };\n}\n\nexport { normalizePropsAreEqual };\n","import { forwardRef as forwardRef$1, memo as memo$1 } from 'react';\nimport './SystemContext.js';\nimport { a as _objectWithoutPropertiesLoose, _ as _objectSpread2 } from './_rollupPluginBabelHelpers-0c84a174.js';\nimport { useCreateElement } from './useCreateElement.js';\nimport { splitProps } from 'reakit-utils/splitProps';\nimport { shallowEqual } from 'reakit-utils/shallowEqual';\nimport { normalizePropsAreEqual } from 'reakit-utils/normalizePropsAreEqual';\n\nfunction forwardRef(component) {\n  return /*#__PURE__*/forwardRef$1(component);\n}\n\nfunction memo(component, propsAreEqual) {\n  return /*#__PURE__*/memo$1(component, propsAreEqual);\n}\n\n/**\n * Creates a React component.\n *\n * @example\n * import { createComponent } from \"reakit-system\";\n *\n * const A = createComponent({ as: \"a\" });\n *\n * @param options\n */\nfunction createComponent(_ref) {\n  var type = _ref.as,\n      useHook = _ref.useHook,\n      shouldMemo = _ref.memo,\n      _ref$propsAreEqual = _ref.propsAreEqual,\n      propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,\n      _ref$keys = _ref.keys,\n      keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,\n      _ref$useCreateElement = _ref.useCreateElement,\n      useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement : _ref$useCreateElement;\n\n  var Comp = function Comp(_ref2, ref) {\n    var _ref2$as = _ref2.as,\n        as = _ref2$as === void 0 ? type : _ref2$as,\n        props = _objectWithoutPropertiesLoose(_ref2, [\"as\"]);\n\n    if (useHook) {\n      var _as$render;\n\n      var _splitProps = splitProps(props, keys),\n          _options = _splitProps[0],\n          htmlProps = _splitProps[1];\n\n      var _useHook = useHook(_options, _objectSpread2({\n        ref: ref\n      }, htmlProps)),\n          wrapElement = _useHook.wrapElement,\n          elementProps = _objectWithoutPropertiesLoose(_useHook, [\"wrapElement\"]); // @ts-ignore\n\n\n      var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;\n      var asOptions = asKeys && splitProps(props, asKeys)[0];\n      var allProps = asOptions ? _objectSpread2(_objectSpread2({}, elementProps), asOptions) : elementProps;\n\n      var _element = useCreateElement$1(as, allProps);\n\n      if (wrapElement) {\n        return wrapElement(_element);\n      }\n\n      return _element;\n    }\n\n    return useCreateElement$1(as, _objectSpread2({\n      ref: ref\n    }, props));\n  };\n\n  if (process.env.NODE_ENV !== \"production\" && useHook) {\n    Comp.displayName = useHook.name.replace(/^(unstable_)?use/, \"\");\n  }\n\n  Comp = forwardRef(Comp);\n\n  if (shouldMemo) {\n    Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual));\n  }\n\n  Comp.__keys = keys;\n  Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual);\n  return Comp;\n}\n\nexport { createComponent };\n","import { useDebugValue, useContext } from 'react';\nimport { SystemContext } from './SystemContext.js';\n\n/**\n * React custom hook that returns the value of any token defined in the\n * SystemContext. It's mainly used internally in [`useOptions`](#useoptions)\n * and [`useProps`](#useprops).\n *\n * @example\n * import { SystemProvider, useToken } from \"reakit-system\";\n *\n * const system = {\n *   token: \"value\",\n * };\n *\n * function Component(props) {\n *   const token = useToken(\"token\", \"default value\");\n *   return <div {...props}>{token}</div>;\n * }\n *\n * function App() {\n *   return (\n *     <SystemProvider unstable_system={system}>\n *       <Component />\n *     </SystemProvider>\n *   );\n * }\n */\n\nfunction useToken(token, defaultValue) {\n  useDebugValue(token);\n  var context = useContext(SystemContext);\n  return context[token] != null ? context[token] : defaultValue;\n}\n\nexport { useToken };\n","import 'react';\nimport './SystemContext.js';\nimport './useToken.js';\nimport { useProps } from './useProps.js';\nimport { b as _createForOfIteratorHelperLoose } from './_rollupPluginBabelHelpers-0c84a174.js';\nimport { useOptions } from './useOptions.js';\nimport { shallowEqual } from 'reakit-utils/shallowEqual';\nimport { toArray } from 'reakit-utils/toArray';\n\n/**\n * Creates a React custom hook that will return component props.\n *\n * @example\n * import { createHook } from \"reakit-system\";\n *\n * const useA = createHook({\n *   name: \"A\",\n *   keys: [\"url\"], // custom props/options keys\n *   useProps(options, htmlProps) {\n *     return {\n *       ...htmlProps,\n *       href: options.url,\n *     };\n *   },\n * });\n *\n * function A({ url, ...htmlProps }) {\n *   const props = useA({ url }, htmlProps);\n *   return <a {...props} />;\n * }\n *\n * @param options\n */\nfunction createHook(options) {\n  var _options$useState, _composedHooks$;\n\n  var composedHooks = toArray(options.compose);\n\n  var __useOptions = function __useOptions(hookOptions, htmlProps) {\n    // Call the current hook's useOptions first\n    if (options.useOptions) {\n      hookOptions = options.useOptions(hookOptions, htmlProps);\n    } // If there's name, call useOptions from the system context\n\n\n    if (options.name) {\n      hookOptions = useOptions(options.name, hookOptions, htmlProps);\n    } // Run composed hooks useOptions\n\n\n    if (options.compose) {\n      for (var _iterator = _createForOfIteratorHelperLoose(composedHooks), _step; !(_step = _iterator()).done;) {\n        var hook = _step.value;\n        hookOptions = hook.__useOptions(hookOptions, htmlProps);\n      }\n    }\n\n    return hookOptions;\n  };\n\n  var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) {\n    if (hookOptions === void 0) {\n      hookOptions = {};\n    }\n\n    if (htmlProps === void 0) {\n      htmlProps = {};\n    }\n\n    if (unstable_ignoreUseOptions === void 0) {\n      unstable_ignoreUseOptions = false;\n    }\n\n    // This won't execute when useHook was called from within another useHook\n    if (!unstable_ignoreUseOptions) {\n      hookOptions = __useOptions(hookOptions, htmlProps);\n    } // Call the current hook's useProps\n\n\n    if (options.useProps) {\n      htmlProps = options.useProps(hookOptions, htmlProps);\n    } // If there's name, call useProps from the system context\n\n\n    if (options.name) {\n      htmlProps = useProps(options.name, hookOptions, htmlProps);\n    }\n\n    if (options.compose) {\n      if (options.useComposeOptions) {\n        hookOptions = options.useComposeOptions(hookOptions, htmlProps);\n      }\n\n      if (options.useComposeProps) {\n        htmlProps = options.useComposeProps(hookOptions, htmlProps);\n      } else {\n        for (var _iterator2 = _createForOfIteratorHelperLoose(composedHooks), _step2; !(_step2 = _iterator2()).done;) {\n          var hook = _step2.value;\n          htmlProps = hook(hookOptions, htmlProps, true);\n        }\n      }\n    } // Remove undefined values from htmlProps\n\n\n    var finalHTMLProps = {};\n    var definedHTMLProps = htmlProps || {};\n\n    for (var prop in definedHTMLProps) {\n      if (definedHTMLProps[prop] !== undefined) {\n        finalHTMLProps[prop] = definedHTMLProps[prop];\n      }\n    }\n\n    return finalHTMLProps;\n  };\n\n  useHook.__useOptions = __useOptions;\n  var composedKeys = composedHooks.reduce(function (keys, hook) {\n    keys.push.apply(keys, hook.__keys || []);\n    return keys;\n  }, []); // It's used by createComponent to split option props (keys) and html props\n\n  useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []);\n  useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual;\n\n  if (process.env.NODE_ENV !== \"production\" && options.name) {\n    Object.defineProperty(useHook, \"name\", {\n      value: \"use\" + options.name\n    });\n  }\n\n  return useHook;\n}\n\nexport { createHook };\n","/**\n * Transforms `arg` into an array if it's not already.\n *\n * @example\n * import { toArray } from \"reakit-utils\";\n *\n * toArray(\"a\"); // [\"a\"]\n * toArray([\"a\"]); // [\"a\"]\n */\nfunction toArray(arg) {\n  if (Array.isArray(arg)) {\n    return arg;\n  }\n\n  return typeof arg !== \"undefined\" ? [arg] : [];\n}\n\nexport { toArray };\n","import { useDebugValue } from 'react';\nimport './SystemContext.js';\nimport { useToken } from './useToken.js';\nimport { _ as _objectSpread2 } from './_rollupPluginBabelHelpers-0c84a174.js';\n\n/**\n * React custom hook that returns the options returned by a given\n * `use${name}Options` in the SystemContext.\n *\n * @example\n * import React from \"react\";\n * import { SystemProvider, useOptions } from \"reakit-system\";\n *\n * const system = {\n *   useAOptions(options, htmlProps) {\n *     return {\n *       ...options,\n *       url: htmlProps.href,\n *     };\n *   },\n * };\n *\n * function A({ url, ...htmlProps }) {\n *   const options = useOptions(\"A\", { url }, htmlProps);\n *   return <a href={options.url} {...htmlProps} />;\n * }\n *\n * function App() {\n *   return (\n *     <SystemProvider unstable_system={system}>\n *       <A href=\"url\">\n *         It will convert href into url in useAOptions and then url into href in A\n *       </A>\n *     </SystemProvider>\n *   );\n * }\n */\n\nfunction useOptions(name, options, htmlProps) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  if (htmlProps === void 0) {\n    htmlProps = {};\n  }\n\n  var hookName = \"use\" + name + \"Options\";\n  useDebugValue(hookName);\n  var useHook = useToken(hookName);\n\n  if (useHook) {\n    return _objectSpread2(_objectSpread2({}, options), useHook(options, htmlProps));\n  }\n\n  return options;\n}\n\nexport { useOptions };\n","import { useDebugValue } from 'react';\nimport './SystemContext.js';\nimport { useToken } from './useToken.js';\n\n/**\n * React custom hook that returns the props returned by a given\n * `use${name}Props` in the SystemContext.\n *\n * @example\n * import { SystemProvider, useProps } from \"reakit-system\";\n *\n * const system = {\n *   useAProps(options, htmlProps) {\n *     return {\n *       ...htmlProps,\n *       href: options.url,\n *     };\n *   },\n * };\n *\n * function A({ url, ...htmlProps }) {\n *   const props = useProps(\"A\", { url }, htmlProps);\n *   return <a {...props} />;\n * }\n *\n * function App() {\n *   return (\n *     <SystemProvider unstable_system={system}>\n *       <A url=\"url\">It will convert url into href in useAProps</A>\n *     </SystemProvider>\n *   );\n * }\n */\n\nfunction useProps(name, options, htmlProps) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  if (htmlProps === void 0) {\n    htmlProps = {};\n  }\n\n  var hookName = \"use\" + name + \"Props\";\n  useDebugValue(hookName);\n  var useHook = useToken(hookName);\n\n  if (useHook) {\n    return useHook(options, htmlProps);\n  }\n\n  return htmlProps;\n}\n\nexport { useProps };\n","import { useMemo } from 'react';\n\n// https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js\n\nfunction setRef(ref, value) {\n  if (value === void 0) {\n    value = null;\n  }\n\n  if (!ref) return;\n\n  if (typeof ref === \"function\") {\n    ref(value);\n  } else {\n    ref.current = value;\n  }\n}\n/**\n * Merges up to two React Refs into a single memoized function React Ref so you\n * can pass it to an element.\n *\n * @example\n * import React from \"react\";\n * import { useForkRef } from \"reakit-utils\";\n *\n * const Component = React.forwardRef((props, ref) => {\n *   const internalRef = React.useRef();\n *   return <div {...props} ref={useForkRef(internalRef, ref)} />;\n * });\n */\n\n\nfunction useForkRef(refA, refB) {\n  return useMemo(function () {\n    if (refA == null && refB == null) {\n      return null;\n    }\n\n    return function (value) {\n      setRef(refA, value);\n      setRef(refB, value);\n    };\n  }, [refA, refB]);\n}\n\nexport { useForkRef };\n","/**\n * Returns `element.ownerDocument || document`.\n */\nfunction getDocument(element) {\n  return element ? element.ownerDocument || element : document;\n}\n\nexport { getDocument };\n","import './getDocument.js';\nimport { getWindow } from './getWindow.js';\n\nfunction checkIsBrowser() {\n  var _window = getWindow();\n\n  return Boolean(typeof _window !== \"undefined\" && _window.document && _window.document.createElement);\n}\n/**\n * It's `true` if it is running in a browser environment or `false` if it is not (SSR).\n *\n * @example\n * import { canUseDOM } from \"reakit-utils\";\n *\n * const title = canUseDOM ? document.title : \"\";\n */\n\n\nvar canUseDOM = checkIsBrowser();\n\nexport { canUseDOM };\n","import { useEffect, useLayoutEffect } from 'react';\nimport './getDocument.js';\nimport './getWindow.js';\nimport { canUseDOM } from './canUseDOM.js';\n\n/**\n * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side\n * rendering.\n */\n\nvar useIsomorphicEffect = !canUseDOM ? useEffect : useLayoutEffect;\n\nexport { useIsomorphicEffect };\n","import { useRef } from 'react';\nimport './getDocument.js';\nimport './getWindow.js';\nimport './canUseDOM.js';\nimport { useIsomorphicEffect } from './useIsomorphicEffect.js';\n\n/**\n * A `React.Ref` that keeps track of the passed `value`.\n */\n\nfunction useLiveRef(value) {\n  var ref = useRef(value);\n  useIsomorphicEffect(function () {\n    ref.current = value;\n  });\n  return ref;\n}\n\nexport { useLiveRef };\n","/**\n * Returns `true` if `event.target` and `event.currentTarget` are the same.\n */\nfunction isSelfTarget(event) {\n  return event.target === event.currentTarget;\n}\n\nexport { isSelfTarget };\n","import { getDocument } from './getDocument.js';\n\n/**\n * Returns `element.ownerDocument.activeElement`.\n */\n\nfunction getActiveElement(element) {\n  var _getDocument = getDocument(element),\n      activeElement = _getDocument.activeElement;\n\n  if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) {\n    // In IE11, activeElement might be an empty object if we're interacting\n    // with elements inside of an iframe.\n    return null;\n  }\n\n  return activeElement;\n}\n\nexport { getActiveElement };\n","/**\n * Similar to `Element.prototype.contains`, but a little bit faster when\n * `element` is the same as `child`.\n *\n * @example\n * import { contains } from \"reakit-utils\";\n *\n * contains(document.getElementById(\"parent\"), document.getElementById(\"child\"));\n */\nfunction contains(parent, child) {\n  return parent === child || parent.contains(child);\n}\n\nexport { contains };\n","import './getDocument.js';\nimport { getActiveElement } from './getActiveElement.js';\nimport { contains } from './contains.js';\n\n/**\n * Checks if `element` has focus within. Elements that are referenced by\n * `aria-activedescendant` are also considered.\n *\n * @example\n * import { hasFocusWithin } from \"reakit-utils\";\n *\n * hasFocusWithin(document.getElementById(\"id\"));\n */\n\nfunction hasFocusWithin(element) {\n  var activeElement = getActiveElement(element);\n  if (!activeElement) return false;\n  if (contains(element, activeElement)) return true;\n  var activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n  if (!activeDescendant) return false;\n  if (activeDescendant === element.id) return true;\n  return !!element.querySelector(\"#\" + activeDescendant);\n}\n\nexport { hasFocusWithin };\n","import { contains } from './contains.js';\n\n/**\n * Returns `true` if `event` has been fired within a React Portal element.\n */\n\nfunction isPortalEvent(event) {\n  return !contains(event.currentTarget, event.target);\n}\n\nexport { isPortalEvent };\n","var buttonInputTypes = [\"button\", \"color\", \"file\", \"image\", \"reset\", \"submit\"];\n/**\n * Checks whether `element` is a native HTML button element.\n *\n * @example\n * import { isButton } from \"reakit-utils\";\n *\n * isButton(document.querySelector(\"button\")); // true\n * isButton(document.querySelector(\"input[type='button']\")); // true\n * isButton(document.querySelector(\"div\")); // false\n * isButton(document.querySelector(\"input[type='text']\")); // false\n * isButton(document.querySelector(\"div[role='button']\")); // false\n *\n * @returns {boolean}\n */\n\nfunction isButton(element) {\n  if (element.tagName === \"BUTTON\") return true;\n\n  if (element.tagName === \"INPUT\") {\n    var input = element;\n    return buttonInputTypes.indexOf(input.type) !== -1;\n  }\n\n  return false;\n}\n\nexport { isButton };\n","import './getDocument.js';\nimport './getWindow.js';\nimport { canUseDOM } from './canUseDOM.js';\n\n/**\n * Checks if a given string exists in the user agent string.\n */\n\nfunction isUA(string) {\n  if (!canUseDOM) return false;\n  return window.navigator.userAgent.indexOf(string) !== -1;\n}\n\nexport { isUA };\n","import { _ as _objectWithoutPropertiesLoose } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport { shallowEqual } from 'reakit-utils/shallowEqual';\n\n// Automatically generated\nvar ROLE_KEYS = [\"unstable_system\"];\n\nvar useRole = createHook({\n  name: \"Role\",\n  keys: ROLE_KEYS,\n  propsAreEqual: function propsAreEqual(prev, next) {\n    var prevSystem = prev.unstable_system,\n        prevProps = _objectWithoutPropertiesLoose(prev, [\"unstable_system\"]);\n\n    var nextSystem = next.unstable_system,\n        nextProps = _objectWithoutPropertiesLoose(next, [\"unstable_system\"]);\n\n    if (prevSystem !== nextSystem && !shallowEqual(prevSystem, nextSystem)) {\n      return false;\n    }\n\n    return shallowEqual(prevProps, nextProps);\n  }\n});\nvar Role = createComponent({\n  as: \"div\",\n  useHook: useRole\n});\n\nexport { Role, useRole };\n","import { a as _objectSpread2, _ as _objectWithoutPropertiesLoose } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRef, useState, useCallback } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport { isButton } from 'reakit-utils/isButton';\nimport { warning } from 'reakit-warning';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport { hasFocusWithin } from 'reakit-utils/hasFocusWithin';\nimport { isPortalEvent } from 'reakit-utils/isPortalEvent';\nimport { isUA } from 'reakit-utils/dom';\nimport { isFocusable } from 'reakit-utils/tabbable';\nimport { useRole } from '../Role/Role.js';\n\n// Automatically generated\nvar TABBABLE_KEYS = [\"disabled\", \"focusable\"];\n\nvar isSafariOrFirefoxOnMac = isUA(\"Mac\") && !isUA(\"Chrome\") && (isUA(\"Safari\") || isUA(\"Firefox\"));\n\nfunction focusIfNeeded(element) {\n  if (!hasFocusWithin(element) && isFocusable(element)) {\n    element.focus();\n  }\n}\n\nfunction isNativeTabbable(element) {\n  return element.tagName === \"BUTTON\" || element.tagName === \"INPUT\" || element.tagName === \"SELECT\" || element.tagName === \"TEXTAREA\" || element.tagName === \"A\";\n}\n\nfunction supportsDisabledAttribute(element) {\n  return element.tagName === \"BUTTON\" || element.tagName === \"INPUT\" || element.tagName === \"SELECT\" || element.tagName === \"TEXTAREA\";\n}\n\nfunction getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex) {\n  if (trulyDisabled) {\n    if (nativeTabbable && !supportsDisabled) {\n      // Anchor, audio and video tags don't support the `disabled` attribute.\n      // We must pass tabIndex={-1} so they don't receive focus on tab.\n      return -1;\n    } // Elements that support the `disabled` attribute don't need tabIndex.\n\n\n    return undefined;\n  }\n\n  if (nativeTabbable) {\n    // If the element is enabled and it's natively tabbable, we don't need to\n    // specify a tabIndex attribute unless it's explicitly set by the user.\n    return htmlTabIndex;\n  } // If the element is enabled and is not natively tabbable, we have to\n  // fallback tabIndex={0}.\n\n\n  return htmlTabIndex || 0;\n}\n\nfunction useDisableEvent(htmlEventRef, disabled) {\n  return useCallback(function (event) {\n    var _htmlEventRef$current;\n\n    (_htmlEventRef$current = htmlEventRef.current) === null || _htmlEventRef$current === void 0 ? void 0 : _htmlEventRef$current.call(htmlEventRef, event);\n    if (event.defaultPrevented) return;\n\n    if (disabled) {\n      event.stopPropagation();\n      event.preventDefault();\n    }\n  }, [htmlEventRef, disabled]);\n}\n\nvar useTabbable = createHook({\n  name: \"Tabbable\",\n  compose: useRole,\n  keys: TABBABLE_KEYS,\n  useOptions: function useOptions(options, _ref) {\n    var disabled = _ref.disabled;\n    return _objectSpread2({\n      disabled: disabled\n    }, options);\n  },\n  useProps: function useProps(options, _ref2) {\n    var htmlRef = _ref2.ref,\n        htmlTabIndex = _ref2.tabIndex,\n        htmlOnClickCapture = _ref2.onClickCapture,\n        htmlOnMouseDownCapture = _ref2.onMouseDownCapture,\n        htmlOnMouseDown = _ref2.onMouseDown,\n        htmlOnKeyPressCapture = _ref2.onKeyPressCapture,\n        htmlStyle = _ref2.style,\n        htmlProps = _objectWithoutPropertiesLoose(_ref2, [\"ref\", \"tabIndex\", \"onClickCapture\", \"onMouseDownCapture\", \"onMouseDown\", \"onKeyPressCapture\", \"style\"]);\n\n    var ref = useRef(null);\n    var onClickCaptureRef = useLiveRef(htmlOnClickCapture);\n    var onMouseDownCaptureRef = useLiveRef(htmlOnMouseDownCapture);\n    var onMouseDownRef = useLiveRef(htmlOnMouseDown);\n    var onKeyPressCaptureRef = useLiveRef(htmlOnKeyPressCapture);\n    var trulyDisabled = !!options.disabled && !options.focusable;\n\n    var _React$useState = useState(true),\n        nativeTabbable = _React$useState[0],\n        setNativeTabbable = _React$useState[1];\n\n    var _React$useState2 = useState(true),\n        supportsDisabled = _React$useState2[0],\n        setSupportsDisabled = _React$useState2[1];\n\n    var style = options.disabled ? _objectSpread2({\n      pointerEvents: \"none\"\n    }, htmlStyle) : htmlStyle;\n    useIsomorphicEffect(function () {\n      var tabbable = ref.current;\n\n      if (!tabbable) {\n        process.env.NODE_ENV !== \"production\" ? warning(true, \"Can't determine if the element is a native tabbable element because `ref` wasn't passed to the component.\", \"See https://reakit.io/docs/tabbable\") : void 0;\n        return;\n      }\n\n      if (!isNativeTabbable(tabbable)) {\n        setNativeTabbable(false);\n      }\n\n      if (!supportsDisabledAttribute(tabbable)) {\n        setSupportsDisabled(false);\n      }\n    }, []);\n    var onClickCapture = useDisableEvent(onClickCaptureRef, options.disabled);\n    var onMouseDownCapture = useDisableEvent(onMouseDownCaptureRef, options.disabled);\n    var onKeyPressCapture = useDisableEvent(onKeyPressCaptureRef, options.disabled);\n    var onMouseDown = useCallback(function (event) {\n      var _onMouseDownRef$curre;\n\n      (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);\n      var element = event.currentTarget;\n      if (event.defaultPrevented) return; // Safari and Firefox on MacOS don't focus on buttons on mouse down\n      // like other browsers/platforms. Instead, they focus on the closest\n      // focusable ancestor element, which is ultimately the body element. So\n      // we make sure to give focus to the tabbable element on mouse down so\n      // it works consistently across browsers.\n\n      if (!isSafariOrFirefoxOnMac) return;\n      if (isPortalEvent(event)) return;\n      if (!isButton(element)) return; // We can't focus right away after on mouse down, otherwise it would\n      // prevent drag events from happening. So we schedule the focus to the\n      // next animation frame.\n\n      var raf = requestAnimationFrame(function () {\n        element.removeEventListener(\"mouseup\", focusImmediately, true);\n        focusIfNeeded(element);\n      }); // If mouseUp happens before the next animation frame (which is common\n      // on touch screens or by just tapping the trackpad on MacBook's), we\n      // cancel the animation frame and immediately focus on the element.\n\n      var focusImmediately = function focusImmediately() {\n        cancelAnimationFrame(raf);\n        focusIfNeeded(element);\n      }; // By listening to the event in the capture phase, we make sure the\n      // focus event is fired before the onMouseUp and onMouseUpCapture React\n      // events, which is aligned with the default browser behavior.\n\n\n      element.addEventListener(\"mouseup\", focusImmediately, {\n        once: true,\n        capture: true\n      });\n    }, []);\n    return _objectSpread2({\n      ref: useForkRef(ref, htmlRef),\n      style: style,\n      tabIndex: getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex),\n      disabled: trulyDisabled && supportsDisabled ? true : undefined,\n      \"aria-disabled\": options.disabled ? true : undefined,\n      onClickCapture: onClickCapture,\n      onMouseDownCapture: onMouseDownCapture,\n      onMouseDown: onMouseDown,\n      onKeyPressCapture: onKeyPressCapture\n    }, htmlProps);\n  }\n});\nvar Tabbable = createComponent({\n  as: \"div\",\n  useHook: useTabbable\n});\n\nexport { Tabbable, useTabbable };\n","import './getDocument.js';\nimport { matches } from './matches.js';\nimport { closest } from './closest.js';\nimport { getActiveElement } from './getActiveElement.js';\n\n/** @module tabbable */\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'])\";\n\nfunction isVisible(element) {\n  var htmlElement = element;\n  return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nfunction hasNegativeTabIndex(element) {\n  var tabIndex = parseInt(element.getAttribute(\"tabindex\") || \"0\", 10);\n  return tabIndex < 0;\n}\n/**\n * Checks whether `element` is focusable or not.\n *\n * @memberof tabbable\n *\n * @example\n * import { isFocusable } from \"reakit-utils\";\n *\n * isFocusable(document.querySelector(\"input\")); // true\n * isFocusable(document.querySelector(\"input[tabindex='-1']\")); // true\n * isFocusable(document.querySelector(\"input[hidden]\")); // false\n * isFocusable(document.querySelector(\"input:disabled\")); // false\n */\n\n\nfunction isFocusable(element) {\n  return matches(element, selector) && isVisible(element);\n}\n/**\n * Checks whether `element` is tabbable or not.\n *\n * @memberof tabbable\n *\n * @example\n * import { isTabbable } from \"reakit-utils\";\n *\n * isTabbable(document.querySelector(\"input\")); // true\n * isTabbable(document.querySelector(\"input[tabindex='-1']\")); // false\n * isTabbable(document.querySelector(\"input[hidden]\")); // false\n * isTabbable(document.querySelector(\"input:disabled\")); // false\n */\n\nfunction isTabbable(element) {\n  return isFocusable(element) && !hasNegativeTabIndex(element);\n}\n/**\n * Returns all the focusable elements in `container`.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n *\n * @returns {Element[]}\n */\n\nfunction getAllFocusableIn(container) {\n  var allFocusable = Array.from(container.querySelectorAll(selector));\n  allFocusable.unshift(container);\n  return allFocusable.filter(isFocusable);\n}\n/**\n * Returns the first focusable element in `container`.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n *\n * @returns {Element|null}\n */\n\nfunction getFirstFocusableIn(container) {\n  var _getAllFocusableIn = getAllFocusableIn(container),\n      first = _getAllFocusableIn[0];\n\n  return first || null;\n}\n/**\n * Returns all the tabbable elements in `container`, including the container\n * itself.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.\n *\n * @returns {Element[]}\n */\n\nfunction getAllTabbableIn(container, fallbackToFocusable) {\n  var allFocusable = Array.from(container.querySelectorAll(selector));\n  var allTabbable = allFocusable.filter(isTabbable);\n\n  if (isTabbable(container)) {\n    allTabbable.unshift(container);\n  }\n\n  if (!allTabbable.length && fallbackToFocusable) {\n    return allFocusable;\n  }\n\n  return allTabbable;\n}\n/**\n * Returns the first tabbable element in `container`, including the container\n * itself if it's tabbable.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.\n *\n * @returns {Element|null}\n */\n\nfunction getFirstTabbableIn(container, fallbackToFocusable) {\n  var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),\n      first = _getAllTabbableIn[0];\n\n  return first || null;\n}\n/**\n * Returns the last tabbable element in `container`, including the container\n * itself if it's tabbable.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.\n *\n * @returns {Element|null}\n */\n\nfunction getLastTabbableIn(container, fallbackToFocusable) {\n  var allTabbable = getAllTabbableIn(container, fallbackToFocusable);\n  return allTabbable[allTabbable.length - 1] || null;\n}\n/**\n * Returns the next tabbable element in `container`.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.\n *\n * @returns {Element|null}\n */\n\nfunction getNextTabbableIn(container, fallbackToFocusable) {\n  var activeElement = getActiveElement(container);\n  var allFocusable = getAllFocusableIn(container);\n  var index = allFocusable.indexOf(activeElement);\n  var slice = allFocusable.slice(index + 1);\n  return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);\n}\n/**\n * Returns the previous tabbable element in `container`.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.\n *\n * @returns {Element|null}\n */\n\nfunction getPreviousTabbableIn(container, fallbackToFocusable) {\n  var activeElement = getActiveElement(container);\n  var allFocusable = getAllFocusableIn(container).reverse();\n  var index = allFocusable.indexOf(activeElement);\n  var slice = allFocusable.slice(index + 1);\n  return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);\n}\n/**\n * Returns the closest focusable element.\n *\n * @memberof tabbable\n *\n * @param {Element} container\n *\n * @returns {Element|null}\n */\n\nfunction getClosestFocusable(element) {\n  while (element && !isFocusable(element)) {\n    element = closest(element, selector);\n  }\n\n  return element;\n}\n\nexport { getAllFocusableIn, getAllTabbableIn, getClosestFocusable, getFirstFocusableIn, getFirstTabbableIn, getLastTabbableIn, getNextTabbableIn, getPreviousTabbableIn, isFocusable, isTabbable };\n","/**\n * Ponyfill for `Element.prototype.matches`\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches\n */\nfunction matches(element, selectors) {\n  if (\"matches\" in element) {\n    return element.matches(selectors);\n  }\n\n  if (\"msMatchesSelector\" in element) {\n    return element.msMatchesSelector(selectors);\n  }\n\n  return element.webkitMatchesSelector(selectors);\n}\n\nexport { matches };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useState, useCallback } from 'react';\nimport 'reakit-utils/useForkRef';\nimport { isButton } from 'reakit-utils/isButton';\nimport 'reakit-warning';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { isSelfTarget } from 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport { useTabbable } from '../Tabbable/Tabbable.js';\n\n// Automatically generated\nvar CLICKABLE_KEYS = [\"unstable_clickOnEnter\", \"unstable_clickOnSpace\"];\n\nfunction isNativeClick(event) {\n  var element = event.currentTarget;\n  if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet\n\n  return isButton(element) || element.tagName === \"INPUT\" || element.tagName === \"TEXTAREA\" || element.tagName === \"A\" || element.tagName === \"SELECT\";\n}\n\nvar useClickable = createHook({\n  name: \"Clickable\",\n  compose: useTabbable,\n  keys: CLICKABLE_KEYS,\n  useOptions: function useOptions(_ref) {\n    var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,\n        unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn,\n        _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace,\n        unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2,\n        options = _objectWithoutPropertiesLoose(_ref, [\"unstable_clickOnEnter\", \"unstable_clickOnSpace\"]);\n\n    return _objectSpread2({\n      unstable_clickOnEnter: unstable_clickOnEnter,\n      unstable_clickOnSpace: unstable_clickOnSpace\n    }, options);\n  },\n  useProps: function useProps(options, _ref2) {\n    var htmlOnKeyDown = _ref2.onKeyDown,\n        htmlOnKeyUp = _ref2.onKeyUp,\n        htmlProps = _objectWithoutPropertiesLoose(_ref2, [\"onKeyDown\", \"onKeyUp\"]);\n\n    var _React$useState = useState(false),\n        active = _React$useState[0],\n        setActive = _React$useState[1];\n\n    var onKeyDownRef = useLiveRef(htmlOnKeyDown);\n    var onKeyUpRef = useLiveRef(htmlOnKeyUp);\n    var onKeyDown = useCallback(function (event) {\n      var _onKeyDownRef$current;\n\n      (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);\n      if (event.defaultPrevented) return;\n      if (options.disabled) return;\n      if (event.metaKey) return;\n      if (!isSelfTarget(event)) return;\n      var isEnter = options.unstable_clickOnEnter && event.key === \"Enter\";\n      var isSpace = options.unstable_clickOnSpace && event.key === \" \";\n\n      if (isEnter || isSpace) {\n        if (isNativeClick(event)) return;\n        event.preventDefault();\n\n        if (isEnter) {\n          event.currentTarget.click();\n        } else if (isSpace) {\n          setActive(true);\n        }\n      }\n    }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]);\n    var onKeyUp = useCallback(function (event) {\n      var _onKeyUpRef$current;\n\n      (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event);\n      if (event.defaultPrevented) return;\n      if (options.disabled) return;\n      if (event.metaKey) return;\n      var isSpace = options.unstable_clickOnSpace && event.key === \" \";\n\n      if (active && isSpace) {\n        setActive(false);\n        event.currentTarget.click();\n      }\n    }, [options.disabled, options.unstable_clickOnSpace, active]);\n    return _objectSpread2({\n      \"data-active\": active || undefined,\n      onKeyDown: onKeyDown,\n      onKeyUp: onKeyUp\n    }, htmlProps);\n  }\n});\nvar Clickable = createComponent({\n  as: \"button\",\n  memo: true,\n  useHook: useClickable\n});\n\nexport { Clickable, useClickable };\n","function findFirstEnabledItem(items, excludeId) {\n  if (excludeId) {\n    return items.find(function (item) {\n      return !item.disabled && item.id !== excludeId;\n    });\n  }\n\n  return items.find(function (item) {\n    return !item.disabled;\n  });\n}\n\nfunction getCurrentId(options, passedId) {\n  var _findFirstEnabledItem;\n\n  if (passedId || passedId === null) {\n    return passedId;\n  }\n\n  if (options.currentId || options.currentId === null) {\n    return options.currentId;\n  }\n\n  return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id;\n}\n\nexport { findFirstEnabledItem as f, getCurrentId as g };\n","// Automatically generated\nvar COMPOSITE_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"setBaseId\", \"unstable_virtual\", \"rtl\", \"orientation\", \"items\", \"groups\", \"currentId\", \"loop\", \"wrap\", \"shift\", \"unstable_moves\", \"unstable_hasActiveWidget\", \"unstable_includesBaseElement\", \"registerItem\", \"unregisterItem\", \"registerGroup\", \"unregisterGroup\", \"move\", \"next\", \"previous\", \"up\", \"down\", \"first\", \"last\", \"sort\", \"unstable_setVirtual\", \"setRTL\", \"setOrientation\", \"setCurrentId\", \"setLoop\", \"setWrap\", \"setShift\", \"reset\", \"unstable_setIncludesBaseElement\", \"unstable_setHasActiveWidget\"];\nvar COMPOSITE_KEYS = COMPOSITE_STATE_KEYS;\nvar COMPOSITE_GROUP_KEYS = COMPOSITE_KEYS;\nvar COMPOSITE_ITEM_KEYS = COMPOSITE_GROUP_KEYS;\nvar COMPOSITE_ITEM_WIDGET_KEYS = COMPOSITE_ITEM_KEYS;\n\nexport { COMPOSITE_KEYS as C, COMPOSITE_GROUP_KEYS as a, COMPOSITE_ITEM_KEYS as b, COMPOSITE_ITEM_WIDGET_KEYS as c };\n","function userFocus(element) {\n  element.userFocus = true;\n  element.focus();\n  element.userFocus = false;\n}\nfunction hasUserFocus(element) {\n  return !!element.userFocus;\n}\nfunction setUserFocus(element, value) {\n  element.userFocus = value;\n}\n\nexport { hasUserFocus as h, setUserFocus as s, userFocus as u };\n","/**\n * Check whether the given element is a text field, where text field is defined\n * by the ability to select within the input, or that it is contenteditable.\n *\n * @example\n * import { isTextField } from \"reakit-utils\";\n *\n * isTextField(document.querySelector(\"div\")); // false\n * isTextField(document.querySelector(\"input\")); // true\n * isTextField(document.querySelector(\"input[type='button']\")); // false\n * isTextField(document.querySelector(\"textarea\")); // true\n * isTextField(document.querySelector(\"div[contenteditable='true']\")); // true\n */\nfunction isTextField(element) {\n  try {\n    var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;\n    var isTextArea = element.tagName === \"TEXTAREA\";\n    var isContentEditable = element.contentEditable === \"true\";\n    return isTextInput || isTextArea || isContentEditable || false;\n  } catch (error) {\n    // Safari throws an exception when trying to get `selectionStart`\n    // on non-text <input> elements (which, understandably, don't\n    // have the text selection API). We catch this via a try/catch\n    // block, as opposed to a more explicit check of the element's\n    // input types, because of Safari's non-standard behavior. This\n    // also means we don't have to worry about the list of input\n    // types that support `selectionStart` changing as the HTML spec\n    // evolves over time.\n    return false;\n  }\n}\n\nexport { isTextField };\n","import './getDocument.js';\nimport { getActiveElement } from './getActiveElement.js';\n\n/**\n * Checks if `element` has focus. Elements that are referenced by\n * `aria-activedescendant` are also considered.\n *\n * @example\n * import { hasFocus } from \"reakit-utils\";\n *\n * hasFocus(document.getElementById(\"id\"));\n */\n\nfunction hasFocus(element) {\n  var activeElement = getActiveElement(element);\n  if (!activeElement) return false;\n  if (activeElement === element) return true;\n  var activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n  if (!activeDescendant) return false;\n  return activeDescendant === element.id;\n}\n\nexport { hasFocus };\n","import { createContext, useRef, useCallback, createElement } from 'react';\n\nvar defaultPrefix = \"id\";\nfunction generateRandomString(prefix) {\n  if (prefix === void 0) {\n    prefix = defaultPrefix;\n  }\n\n  return \"\" + (prefix ? prefix + \"-\" : \"\") + Math.random().toString(32).substr(2, 6);\n}\n\nvar unstable_IdContext = /*#__PURE__*/createContext(generateRandomString);\nfunction unstable_IdProvider(_ref) {\n  var children = _ref.children,\n      _ref$prefix = _ref.prefix,\n      prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix;\n  var count = useRef(0);\n  var generateId = useCallback(function (localPrefix) {\n    if (localPrefix === void 0) {\n      localPrefix = prefix;\n    }\n\n    return \"\" + (localPrefix ? localPrefix + \"-\" : \"\") + ++count.current;\n  }, [prefix]);\n  return /*#__PURE__*/createElement(unstable_IdContext.Provider, {\n    value: generateId\n  }, children);\n}\n\nexport { unstable_IdContext, unstable_IdProvider };\n","import { a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport { useContext, useState, useMemo } from 'react';\nimport { unstable_IdContext } from './IdProvider.js';\n\n// Automatically generated\nvar ID_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"setBaseId\"];\nvar ID_KEYS = [].concat(ID_STATE_KEYS, [\"id\"]);\n\nvar unstable_useId = createHook({\n  keys: ID_KEYS,\n  useOptions: function useOptions(options, htmlProps) {\n    var generateId = useContext(unstable_IdContext);\n\n    var _React$useState = useState(function () {\n      // This comes from useIdState\n      if (options.unstable_idCountRef) {\n        options.unstable_idCountRef.current += 1;\n        return \"-\" + options.unstable_idCountRef.current;\n      } // If there's no useIdState, we check if `baseId` was passed (as a prop,\n      // not from useIdState).\n\n\n      if (options.baseId) {\n        return \"-\" + generateId(\"\");\n      }\n\n      return \"\";\n    }),\n        suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState.\n    // If there's neither, then it'll fallback to Context's generateId.\n    // This generateId can result in a sequential ID (if there's a Provider)\n    // or a random string (without Provider).\n\n\n    var baseId = useMemo(function () {\n      return options.baseId || generateId();\n    }, [options.baseId, generateId]);\n    var id = htmlProps.id || options.id || \"\" + baseId + suffix;\n    return _objectSpread2(_objectSpread2({}, options), {}, {\n      id: id\n    });\n  },\n  useProps: function useProps(options, htmlProps) {\n    return _objectSpread2({\n      id: options.id\n    }, htmlProps);\n  }\n});\nvar unstable_Id = createComponent({\n  as: \"div\",\n  useHook: unstable_useId\n});\n\nexport { unstable_Id, unstable_useId };\n","import { getDocument } from './getDocument.js';\n\n/**\n * Creates an `Event` in a way that also works on IE 11.\n *\n * @example\n * import { createEvent } from \"reakit-utils\";\n *\n * const el = document.getElementById(\"id\");\n * el.dispatchEvent(createEvent(el, \"blur\", { bubbles: false }));\n */\n\nfunction createEvent(element, type, eventInit) {\n  if (typeof Event === \"function\") {\n    return new Event(type, eventInit);\n  } // IE 11 doesn't support Event constructors\n\n\n  var event = getDocument(element).createEvent(\"Event\");\n  event.initEvent(type, eventInit === null || eventInit === void 0 ? void 0 : eventInit.bubbles, eventInit === null || eventInit === void 0 ? void 0 : eventInit.cancelable);\n  return event;\n}\n\nexport { createEvent };\n","import { fireEvent } from 'reakit-utils/fireEvent';\n\nfunction setTextFieldValue(element, value) {\n  if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {\n    var _Object$getOwnPropert;\n\n    var proto = Object.getPrototypeOf(element);\n    var setValue = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(proto, \"value\")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.set;\n\n    if (setValue) {\n      setValue.call(element, value);\n      fireEvent(element, \"input\", {\n        bubbles: true\n      });\n    }\n  }\n}\n\nexport { setTextFieldValue as s };\n","import './getDocument.js';\nimport { createEvent } from './createEvent.js';\n\n/**\n * Creates and dispatches `Event` in a way that also works on IE 11.\n *\n * @example\n * import { fireEvent } from \"reakit-utils\";\n *\n * fireEvent(document.getElementById(\"id\"), \"blur\", {\n *   bubbles: true,\n *   cancelable: true,\n * });\n */\n\nfunction fireEvent(element, type, eventInit) {\n  return element.dispatchEvent(createEvent(element, type, eventInit));\n}\n\nexport { fireEvent };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2, b as _createForOfIteratorHelperLoose } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRef, useMemo, useEffect, useCallback } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport { warning } from 'reakit-warning';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { isSelfTarget } from 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport { hasFocusWithin } from 'reakit-utils/hasFocusWithin';\nimport { isPortalEvent } from 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport '../Tabbable/Tabbable.js';\nimport { useClickable } from '../Clickable/Clickable.js';\nimport { getDocument } from 'reakit-utils/getDocument';\nimport { g as getCurrentId } from '../getCurrentId-5aa9849e.js';\nimport { b as COMPOSITE_ITEM_KEYS } from '../__keys-6742f591.js';\nimport { u as userFocus, s as setUserFocus, h as hasUserFocus } from '../userFocus-e16425e3.js';\nimport { isTextField } from 'reakit-utils/isTextField';\nimport { ensureFocus } from 'reakit-utils/ensureFocus';\nimport '../Id/IdProvider.js';\nimport { unstable_useId } from '../Id/Id.js';\nimport 'reakit-utils/fireEvent';\nimport { s as setTextFieldValue } from '../setTextFieldValue-0a221f4e.js';\n\nfunction getWidget(itemElement) {\n  return itemElement.querySelector(\"[data-composite-item-widget]\");\n}\n\nfunction useItem(options) {\n  return useMemo(function () {\n    var _options$items;\n\n    return (_options$items = options.items) === null || _options$items === void 0 ? void 0 : _options$items.find(function (item) {\n      return options.id && item.id === options.id;\n    });\n  }, [options.items, options.id]);\n}\n\nfunction targetIsAnotherItem(event, items) {\n  if (isSelfTarget(event)) return false;\n\n  for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {\n    var item = _step.value;\n\n    if (item.ref.current === event.target) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nvar useCompositeItem = createHook({\n  name: \"CompositeItem\",\n  compose: [useClickable, unstable_useId],\n  keys: COMPOSITE_ITEM_KEYS,\n  propsAreEqual: function propsAreEqual(prev, next) {\n    if (!next.id || prev.id !== next.id) {\n      return useClickable.unstable_propsAreEqual(prev, next);\n    }\n\n    var prevCurrentId = prev.currentId,\n        prevMoves = prev.unstable_moves,\n        prevProps = _objectWithoutPropertiesLoose(prev, [\"currentId\", \"unstable_moves\"]);\n\n    var nextCurrentId = next.currentId,\n        nextMoves = next.unstable_moves,\n        nextProps = _objectWithoutPropertiesLoose(next, [\"currentId\", \"unstable_moves\"]);\n\n    if (nextCurrentId !== prevCurrentId) {\n      if (next.id === nextCurrentId || next.id === prevCurrentId) {\n        return false;\n      }\n    } else if (prevMoves !== nextMoves) {\n      return false;\n    }\n\n    return useClickable.unstable_propsAreEqual(prevProps, nextProps);\n  },\n  useOptions: function useOptions(options) {\n    return _objectSpread2(_objectSpread2({}, options), {}, {\n      id: options.id,\n      currentId: getCurrentId(options),\n      unstable_clickOnSpace: options.unstable_hasActiveWidget ? false : options.unstable_clickOnSpace\n    });\n  },\n  useProps: function useProps(options, _ref) {\n    var _options$items2;\n\n    var htmlRef = _ref.ref,\n        _ref$tabIndex = _ref.tabIndex,\n        htmlTabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,\n        htmlOnMouseDown = _ref.onMouseDown,\n        htmlOnFocus = _ref.onFocus,\n        htmlOnBlurCapture = _ref.onBlurCapture,\n        htmlOnKeyDown = _ref.onKeyDown,\n        htmlOnClick = _ref.onClick,\n        htmlProps = _objectWithoutPropertiesLoose(_ref, [\"ref\", \"tabIndex\", \"onMouseDown\", \"onFocus\", \"onBlurCapture\", \"onKeyDown\", \"onClick\"]);\n\n    var ref = useRef(null);\n    var id = options.id;\n    var trulyDisabled = options.disabled && !options.focusable;\n    var isCurrentItem = options.currentId === id;\n    var isCurrentItemRef = useLiveRef(isCurrentItem);\n    var hasFocusedComposite = useRef(false);\n    var item = useItem(options);\n    var onMouseDownRef = useLiveRef(htmlOnMouseDown);\n    var onFocusRef = useLiveRef(htmlOnFocus);\n    var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture);\n    var onKeyDownRef = useLiveRef(htmlOnKeyDown);\n    var onClickRef = useLiveRef(htmlOnClick);\n    var shouldTabIndex = !options.unstable_virtual && !options.unstable_hasActiveWidget && isCurrentItem || // We don't want to set tabIndex=\"-1\" when using CompositeItem as a\n    // standalone component, without state props.\n    !((_options$items2 = options.items) !== null && _options$items2 !== void 0 && _options$items2.length);\n    useEffect(function () {\n      var _options$registerItem;\n\n      if (!id) return undefined;\n      (_options$registerItem = options.registerItem) === null || _options$registerItem === void 0 ? void 0 : _options$registerItem.call(options, {\n        id: id,\n        ref: ref,\n        disabled: !!trulyDisabled\n      });\n      return function () {\n        var _options$unregisterIt;\n\n        (_options$unregisterIt = options.unregisterItem) === null || _options$unregisterIt === void 0 ? void 0 : _options$unregisterIt.call(options, id);\n      };\n    }, [id, trulyDisabled, options.registerItem, options.unregisterItem]);\n    useEffect(function () {\n      var element = ref.current;\n\n      if (!element) {\n        process.env.NODE_ENV !== \"production\" ? warning(true, \"Can't focus composite item component because `ref` wasn't passed to component.\", \"See https://reakit.io/docs/composite\") : void 0;\n        return;\n      } // `moves` will be incremented whenever next, previous, up, down, first,\n      // last or move have been called. This means that the composite item will\n      // be focused whenever some of these functions are called. We're using\n      // isCurrentItemRef instead of isCurrentItem because we don't want to\n      // focus the item if isCurrentItem changes (and options.moves doesn't).\n\n\n      if (options.unstable_moves && isCurrentItemRef.current) {\n        userFocus(element);\n      }\n    }, [options.unstable_moves]);\n    var onMouseDown = useCallback(function (event) {\n      var _onMouseDownRef$curre;\n\n      (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);\n      setUserFocus(event.currentTarget, true);\n    }, []);\n    var onFocus = useCallback(function (event) {\n      var _onFocusRef$current, _options$setCurrentId;\n\n      var shouldFocusComposite = hasUserFocus(event.currentTarget);\n      setUserFocus(event.currentTarget, false);\n      (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);\n      if (event.defaultPrevented) return;\n      if (isPortalEvent(event)) return;\n      if (!id) return;\n      if (targetIsAnotherItem(event, options.items)) return;\n      (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, id); // When using aria-activedescendant, we want to make sure that the\n      // composite container receives focus, not the composite item.\n      // But we don't want to do this if the target is another focusable\n      // element inside the composite item, such as CompositeItemWidget.\n\n      if (shouldFocusComposite && options.unstable_virtual && options.baseId && isSelfTarget(event)) {\n        var target = event.target;\n        var composite = getDocument(target).getElementById(options.baseId);\n\n        if (composite) {\n          hasFocusedComposite.current = true;\n          ensureFocus(composite);\n        }\n      }\n    }, [id, options.items, options.setCurrentId, options.unstable_virtual, options.baseId]);\n    var onBlurCapture = useCallback(function (event) {\n      var _onBlurCaptureRef$cur;\n\n      (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event);\n      if (event.defaultPrevented) return;\n\n      if (options.unstable_virtual && hasFocusedComposite.current) {\n        // When hasFocusedComposite is true, composite has been focused right\n        // after focusing this item. This is an intermediate blur event, so\n        // we ignore it.\n        hasFocusedComposite.current = false;\n        event.preventDefault();\n        event.stopPropagation();\n      }\n    }, [options.unstable_virtual]);\n    var onKeyDown = useCallback(function (event) {\n      var _onKeyDownRef$current;\n\n      if (!isSelfTarget(event)) return;\n      var isVertical = options.orientation !== \"horizontal\";\n      var isHorizontal = options.orientation !== \"vertical\";\n      var isGrid = !!(item !== null && item !== void 0 && item.groupId);\n      var keyMap = {\n        ArrowUp: (isGrid || isVertical) && options.up,\n        ArrowRight: (isGrid || isHorizontal) && options.next,\n        ArrowDown: (isGrid || isVertical) && options.down,\n        ArrowLeft: (isGrid || isHorizontal) && options.previous,\n        Home: function Home() {\n          if (!isGrid || event.ctrlKey) {\n            var _options$first;\n\n            (_options$first = options.first) === null || _options$first === void 0 ? void 0 : _options$first.call(options);\n          } else {\n            var _options$previous;\n\n            (_options$previous = options.previous) === null || _options$previous === void 0 ? void 0 : _options$previous.call(options, true);\n          }\n        },\n        End: function End() {\n          if (!isGrid || event.ctrlKey) {\n            var _options$last;\n\n            (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options);\n          } else {\n            var _options$next;\n\n            (_options$next = options.next) === null || _options$next === void 0 ? void 0 : _options$next.call(options, true);\n          }\n        },\n        PageUp: function PageUp() {\n          if (isGrid) {\n            var _options$up;\n\n            (_options$up = options.up) === null || _options$up === void 0 ? void 0 : _options$up.call(options, true);\n          } else {\n            var _options$first2;\n\n            (_options$first2 = options.first) === null || _options$first2 === void 0 ? void 0 : _options$first2.call(options);\n          }\n        },\n        PageDown: function PageDown() {\n          if (isGrid) {\n            var _options$down;\n\n            (_options$down = options.down) === null || _options$down === void 0 ? void 0 : _options$down.call(options, true);\n          } else {\n            var _options$last2;\n\n            (_options$last2 = options.last) === null || _options$last2 === void 0 ? void 0 : _options$last2.call(options);\n          }\n        }\n      };\n      var action = keyMap[event.key];\n\n      if (action) {\n        event.preventDefault();\n        action();\n        return;\n      }\n\n      (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);\n      if (event.defaultPrevented) return;\n\n      if (event.key.length === 1 && event.key !== \" \") {\n        var widget = getWidget(event.currentTarget);\n\n        if (widget && isTextField(widget)) {\n          widget.focus();\n          setTextFieldValue(widget, \"\");\n        }\n      } else if (event.key === \"Delete\" || event.key === \"Backspace\") {\n        var _widget = getWidget(event.currentTarget);\n\n        if (_widget && isTextField(_widget)) {\n          event.preventDefault();\n          setTextFieldValue(_widget, \"\");\n        }\n      }\n    }, [options.orientation, item, options.up, options.next, options.down, options.previous, options.first, options.last]);\n    var onClick = useCallback(function (event) {\n      var _onClickRef$current;\n\n      (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);\n      if (event.defaultPrevented) return;\n      var element = event.currentTarget;\n      var widget = getWidget(element);\n\n      if (widget && !hasFocusWithin(widget)) {\n        // If there's a widget inside the composite item, we make sure it's\n        // focused when pressing enter, space or clicking on the composite item.\n        widget.focus();\n      }\n    }, []);\n    return _objectSpread2({\n      ref: useForkRef(ref, htmlRef),\n      id: id,\n      tabIndex: shouldTabIndex ? htmlTabIndex : -1,\n      \"aria-selected\": options.unstable_virtual && isCurrentItem ? true : undefined,\n      onMouseDown: onMouseDown,\n      onFocus: onFocus,\n      onBlurCapture: onBlurCapture,\n      onKeyDown: onKeyDown,\n      onClick: onClick\n    }, htmlProps);\n  }\n});\nvar CompositeItem = createComponent({\n  as: \"button\",\n  memo: true,\n  useHook: useCompositeItem\n});\n\nexport { CompositeItem, useCompositeItem };\n","import './getDocument.js';\nimport './getActiveElement.js';\nimport { hasFocus } from './hasFocus.js';\n\n/**\n * Ensures `element` will receive focus if it's not already.\n *\n * @example\n * import { ensureFocus } from \"reakit-utils\";\n *\n * ensureFocus(document.activeElement); // does nothing\n *\n * const element = document.querySelector(\"input\");\n *\n * ensureFocus(element); // focuses element\n * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump\n *\n * function isActive(el) {\n *   return el.dataset.active === \"true\";\n * }\n *\n * ensureFocus(document.querySelector(\"[data-active='true']\"), { isActive }); // does nothing\n *\n * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed.\n */\nfunction ensureFocus(element, _temp) {\n  var _ref = _temp === void 0 ? {} : _temp,\n      preventScroll = _ref.preventScroll,\n      _ref$isActive = _ref.isActive,\n      isActive = _ref$isActive === void 0 ? hasFocus : _ref$isActive;\n\n  if (isActive(element)) return -1;\n  element.focus({\n    preventScroll: preventScroll\n  });\n  if (isActive(element)) return -1;\n  return requestAnimationFrame(function () {\n    element.focus({\n      preventScroll: preventScroll\n    });\n  });\n}\n\nexport { ensureFocus };\n","function t(t){return t.split(\"-\")[0]}function e(t){return t.split(\"-\")[1]}function n(e){return[\"top\",\"bottom\"].includes(t(e))?\"x\":\"y\"}function r(t){return\"y\"===t?\"height\":\"width\"}function i(i,o,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=n(o),m=r(u),g=l[m]/2-s[m]/2,d=\"x\"===u;let p;switch(t(o)){case\"top\":p={x:c,y:l.y-s.height};break;case\"bottom\":p={x:c,y:l.y+l.height};break;case\"right\":p={x:l.x+l.width,y:f};break;case\"left\":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y}}switch(e(o)){case\"start\":p[u]-=g*(a&&d?-1:1);break;case\"end\":p[u]+=g*(a&&d?-1:1)}return p}const o=async(t,e,n)=>{const{placement:r=\"bottom\",strategy:o=\"absolute\",middleware:a=[],platform:l}=n,s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=i(c,r,s),m=r,g={},d=0;for(let n=0;n<a.length;n++){const{name:p,fn:h}=a[n],{x:y,y:x,data:w,reset:v}=await h({x:f,y:u,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:c,platform:l,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=x?x:u,g={...g,[p]:{...g[p],...w}},v&&d<=50&&(d++,\"object\"==typeof v&&(v.placement&&(m=v.placement),v.rects&&(c=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:o}):v.rects),({x:f,y:u}=i(c,m,s))),n=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:g}};function a(t){return\"number\"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function l(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function s(t,e){var n;void 0===e&&(e={});const{x:r,y:i,platform:o,rects:s,elements:c,strategy:f}=t,{boundary:u=\"clippingAncestors\",rootBoundary:m=\"viewport\",elementContext:g=\"floating\",altBoundary:d=!1,padding:p=0}=e,h=a(p),y=c[d?\"floating\"===g?\"reference\":\"floating\":g],x=l(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(y)))||n?y:y.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:m,strategy:f})),w=l(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:\"floating\"===g?{...s.floating,x:r,y:i}:s.reference,offsetParent:await(null==o.getOffsetParent?void 0:o.getOffsetParent(c.floating)),strategy:f}):s[g]);return{top:x.top-w.top+h.top,bottom:w.bottom-x.bottom+h.bottom,left:x.left-w.left+h.left,right:w.right-x.right+h.right}}const c=Math.min,f=Math.max;function u(t,e,n){return f(t,c(e,n))}const m=t=>({name:\"arrow\",options:t,async fn(i){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==o)return{};const d=a(l),p={x:s,y:c},h=n(f),y=e(f),x=r(h),w=await g.getDimensions(o),v=\"y\"===h?\"top\":\"left\",b=\"y\"===h?\"bottom\":\"right\",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?\"y\"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,L=d[v],D=T-w[x]-d[b],k=T/2-w[x]/2+O,E=u(L,k,D),C=(\"start\"===y?d[v]:d[b])>0&&k!==E&&m.reference[x]<=m.floating[x];return{[h]:p[h]-(C?k<L?L-k:D-k:0),data:{[h]:E,centerOffset:k-E}}}}),g={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function d(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function p(t,i,o){void 0===o&&(o=!1);const a=e(t),l=n(t),s=r(l);let c=\"x\"===l?a===(o?\"end\":\"start\")?\"right\":\"left\":\"start\"===a?\"bottom\":\"top\";return i.reference[s]>i.floating[s]&&(c=d(c)),{main:c,cross:d(c)}}const h={start:\"end\",end:\"start\"};function y(t){return t.replace(/start|end/g,(t=>h[t]))}const x=[\"top\",\"right\",\"bottom\",\"left\"],w=x.reduce(((t,e)=>t.concat(e,e+\"-start\",e+\"-end\")),[]);const v=function(n){return void 0===n&&(n={}),{name:\"autoPlacement\",options:n,async fn(r){var i,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=r,{alignment:v=null,allowedPlacements:b=w,autoAlignment:R=!0,...A}=n,P=function(n,r,i){return(n?[...i.filter((t=>e(t)===n)),...i.filter((t=>e(t)!==n))]:i.filter((e=>t(e)===e))).filter((t=>!n||e(t)===n||!!r&&y(t)!==t))}(v,R,b),T=await s(r,A),O=null!=(i=null==(o=g.autoPlacement)?void 0:o.index)?i:0,L=P[O];if(null==L)return{};const{main:D,cross:k}=p(L,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==L)return{x:f,y:u,reset:{placement:P[0]}};const E=[T[t(L)],T[D],T[k]],C=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:L,overflows:E}],H=P[O+1];if(H)return{data:{index:O+1,overflows:C},reset:{placement:H}};const B=C.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=B.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,F=null!=V?V:B[0].placement;return F!==d?{data:{index:O+1,overflows:C},reset:{placement:F}}:{}}}};const b=function(e){return void 0===e&&(e={}),{name:\"flip\",options:e,async fn(n){var r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:f}=n,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h=\"bestFit\",flipAlignment:x=!0,...w}=e,v=t(i),b=g||(v===l||!x?[d(l)]:function(t){const e=d(t);return[y(t),e,y(e)]}(l)),R=[l,...b],A=await s(n,w),P=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),m){const{main:t,cross:e}=p(i,a,await(null==c.isRTL?void 0:c.isRTL(f.floating)));P.push(A[t],A[e])}if(T=[...T,{placement:i,overflows:P}],!P.every((t=>t<=0))){var O,L;const t=(null!=(O=null==(L=o.flip)?void 0:L.index)?O:0)+1,e=R[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let n=\"bottom\";switch(h){case\"bestFit\":{var D;const t=null==(D=T.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:D[0].placement;t&&(n=t);break}case\"initialPlacement\":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}};function R(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return x.some((e=>t[e]>=0))}const P=function(t){let{strategy:e=\"referenceHidden\",...n}=void 0===t?{}:t;return{name:\"hide\",async fn(t){const{rects:r}=t;switch(e){case\"referenceHidden\":{const e=R(await s(t,{...n,elementContext:\"reference\"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case\"escaped\":{const e=R(await s(t,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}};const T=function(r){return void 0===r&&(r=0),{name:\"offset\",options:r,async fn(i){const{x:o,y:a}=i,l=await async function(r,i){const{placement:o,platform:a,elements:l}=r,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t(o),f=e(o),u=\"x\"===n(o),m=[\"left\",\"top\"].includes(c)?-1:1,g=s&&u?-1:1,d=\"function\"==typeof i?i(r):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}=\"number\"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&\"number\"==typeof y&&(h=\"end\"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,r);return{x:o+l.x,y:a+l.y,data:l}}}};function O(t){return\"x\"===t?\"y\":\"x\"}const L=function(e){return void 0===e&&(e={}),{name:\"shift\",options:e,async fn(r){const{x:i,y:o,placement:a}=r,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...m}=e,g={x:i,y:o},d=await s(r,m),p=n(t(a)),h=O(p);let y=g[p],x=g[h];if(l){const t=\"y\"===p?\"bottom\":\"right\";y=u(y+d[\"y\"===p?\"top\":\"left\"],y,y-d[t])}if(c){const t=\"y\"===h?\"bottom\":\"right\";x=u(x+d[\"y\"===h?\"top\":\"left\"],x,x-d[t])}const w=f.fn({...r,[p]:y,[h]:x});return{...w,data:{x:w.x-i,y:w.y-o}}}}},D=function(e){return void 0===e&&(e={}),{options:e,fn(r){const{x:i,y:o,placement:a,rects:l,middlewareData:s}=r,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=e,m={x:i,y:o},g=n(a),d=O(g);let p=m[g],h=m[d];const y=\"function\"==typeof c?c(r):c,x=\"number\"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const t=\"y\"===g?\"height\":\"width\",e=l.reference[g]-l.floating[t]+x.mainAxis,n=l.reference[g]+l.reference[t]-x.mainAxis;p<e?p=e:p>n&&(p=n)}if(u){var w,v,b,R;const e=\"y\"===g?\"width\":\"height\",n=[\"top\",\"left\"].includes(t(a)),r=l.reference[d]-l.floating[e]+(n&&null!=(w=null==(v=s.offset)?void 0:v[d])?w:0)+(n?0:x.crossAxis),i=l.reference[d]+l.reference[e]+(n?0:null!=(b=null==(R=s.offset)?void 0:R[d])?b:0)-(n?x.crossAxis:0);h<r?h=r:h>i&&(h=i)}return{[g]:p,[d]:h}}}},k=function(n){return void 0===n&&(n={}),{name:\"size\",options:n,async fn(r){const{placement:i,rects:o,platform:a,elements:l}=r,{apply:c=(()=>{}),...u}=n,m=await s(r,u),g=t(i),d=e(i);let p,h;\"top\"===g||\"bottom\"===g?(p=g,h=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?\"start\":\"end\")?\"left\":\"right\"):(h=g,p=\"end\"===d?\"top\":\"bottom\");const y=f(m.left,0),x=f(m.right,0),w=f(m.top,0),v=f(m.bottom,0),b={availableHeight:o.floating.height-([\"left\",\"right\"].includes(i)?2*(0!==w||0!==v?w+v:f(m.top,m.bottom)):m[p]),availableWidth:o.floating.width-([\"top\",\"bottom\"].includes(i)?2*(0!==y||0!==x?y+x:f(m.left,m.right)):m[h])};await c({...r,...b});const R=await a.getDimensions(l.floating);return o.floating.width!==R.width||o.floating.height!==R.height?{reset:{rects:!0}}:{}}}},E=function(e){return void 0===e&&(e={}),{name:\"inline\",options:e,async fn(r){var i;const{placement:o,elements:s,rects:u,platform:m,strategy:g}=r,{padding:d=2,x:p,y:h}=e,y=l(m.convertOffsetParentRelativeRectToViewportRelativeRect?await m.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u.reference,offsetParent:await(null==m.getOffsetParent?void 0:m.getOffsetParent(s.floating)),strategy:g}):u.reference),x=null!=(i=await(null==m.getClientRects?void 0:m.getClientRects(s.reference)))?i:[],w=a(d);const v=await m.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===x.length&&x[0].left>x[1].right&&null!=p&&null!=h)return null!=(e=x.find((t=>p>t.left-w.left&&p<t.right+w.right&&h>t.top-w.top&&h<t.bottom+w.bottom)))?e:y;if(x.length>=2){if(\"x\"===n(o)){const e=x[0],n=x[x.length-1],r=\"top\"===t(o),i=e.top,a=n.bottom,l=r?e.left:n.left,s=r?e.right:n.right;return{top:i,bottom:a,left:l,right:s,width:s-l,height:a-i,x:l,y:i}}const e=\"left\"===t(o),r=f(...x.map((t=>t.right))),i=c(...x.map((t=>t.left))),a=x.filter((t=>e?t.left===i:t.right===r)),l=a[0].top,s=a[a.length-1].bottom;return{top:l,bottom:s,left:i,right:r,width:r-i,height:s-l,x:i,y:l}}return y}},floating:s.floating,strategy:g});return u.reference.x!==v.reference.x||u.reference.y!==v.reference.y||u.reference.width!==v.reference.width||u.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}};export{m as arrow,v as autoPlacement,o as computePosition,s as detectOverflow,b as flip,P as hide,E as inline,D as limitShift,T as offset,l as rectToClientRect,L as shift,k as size};\n","import{rectToClientRect as t,computePosition as e}from\"@floating-ui/core\";export{arrow,autoPlacement,detectOverflow,flip,hide,inline,limitShift,offset,shift,size}from\"@floating-ui/core\";function n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function o(t){if(null==t)return window;if(!n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function i(t){return o(t).getComputedStyle(t)}function r(t){return n(t)?\"\":t?(t.nodeName||\"\").toLowerCase():\"\"}function l(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+\"/\"+t.version)).join(\" \"):navigator.userAgent}function c(t){return t instanceof o(t).HTMLElement}function s(t){return t instanceof o(t).Element}function f(t){if(\"undefined\"==typeof ShadowRoot)return!1;return t instanceof o(t).ShadowRoot||t instanceof ShadowRoot}function u(t){const{overflow:e,overflowX:n,overflowY:o}=i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function d(t){return[\"table\",\"td\",\"th\"].includes(r(t))}function a(t){const e=/firefox/i.test(l()),n=i(t);return\"none\"!==n.transform||\"none\"!==n.perspective||\"paint\"===n.contain||[\"transform\",\"perspective\"].includes(n.willChange)||e&&\"filter\"===n.willChange||e&&!!n.filter&&\"none\"!==n.filter}function h(){return!/^((?!chrome|android).)*safari/i.test(l())}const g=Math.min,p=Math.max,m=Math.round;function w(t,e,n){var i,r,l,f;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let d=1,a=1;e&&c(t)&&(d=t.offsetWidth>0&&m(u.width)/t.offsetWidth||1,a=t.offsetHeight>0&&m(u.height)/t.offsetHeight||1);const g=s(t)?o(t):window,p=!h()&&n,w=(u.left+(p&&null!=(i=null==(r=g.visualViewport)?void 0:r.offsetLeft)?i:0))/d,y=(u.top+(p&&null!=(l=null==(f=g.visualViewport)?void 0:f.offsetTop)?l:0))/a,v=u.width/d,x=u.height/a;return{width:v,height:x,top:y,right:w+v,bottom:y+x,left:w,x:w,y:y}}function y(t){return(e=t,(e instanceof o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function v(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(t){return w(y(t)).left+v(t).scrollLeft}function b(t,e,n){const o=c(e),i=y(e),l=w(t,o&&function(t){const e=w(t);return m(e.width)!==t.offsetWidth||m(e.height)!==t.offsetHeight}(e),\"fixed\"===n);let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if(o||!o&&\"fixed\"!==n)if((\"body\"!==r(e)||u(i))&&(s=v(e)),c(e)){const t=w(e,!0);f.x=t.x+e.clientLeft,f.y=t.y+e.clientTop}else i&&(f.x=x(i));return{x:l.left+s.scrollLeft-f.x,y:l.top+s.scrollTop-f.y,width:l.width,height:l.height}}function L(t){return\"html\"===r(t)?t:t.assignedSlot||t.parentNode||(f(t)?t.host:null)||y(t)}function R(t){return c(t)&&\"fixed\"!==i(t).position?function(t){let{offsetParent:e}=t,n=t,o=!1;for(;n&&n!==e;){const{assignedSlot:t}=n;if(t){let r=t.offsetParent;if(\"contents\"===i(t).display){const e=t.hasAttribute(\"style\"),o=t.style.display;t.style.display=i(n).display,r=t.offsetParent,t.style.display=o,e||t.removeAttribute(\"style\")}n=t,e!==r&&(e=r,o=!0)}else if(f(n)&&n.host&&o)break;n=f(n)&&n.host||n.parentNode}return e}(t):null}function T(t){const e=o(t);let n=R(t);for(;n&&d(n)&&\"static\"===i(n).position;)n=R(n);return n&&(\"html\"===r(n)||\"body\"===r(n)&&\"static\"===i(n).position&&!a(n))?e:n||function(t){let e=L(t);for(f(e)&&(e=e.host);c(e)&&![\"html\",\"body\"].includes(r(e));){if(a(e))return e;{const t=e.parentNode;e=f(t)?t.host:t}}return null}(t)||e}function W(t){if(c(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=w(t);return{width:e.width,height:e.height}}function E(t){const e=L(t);return[\"html\",\"body\",\"#document\"].includes(r(e))?t.ownerDocument.body:c(e)&&u(e)?e:E(e)}function H(t,e){var n;void 0===e&&(e=[]);const i=E(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=o(i),c=r?[l].concat(l.visualViewport||[],u(i)?i:[]):i,s=e.concat(c);return r?s:s.concat(H(c))}function A(e,n,r){return\"viewport\"===n?t(function(t,e){const n=o(t),i=y(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=h();(t||!t&&\"fixed\"===e)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:l,height:c,x:s,y:f}}(e,r)):s(n)?function(t,e){const n=w(t,!1,\"fixed\"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):t(function(t){var e;const n=y(t),o=v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=p(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=p(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-o.scrollLeft+x(t);const f=-o.scrollTop;return\"rtl\"===i(r||n).direction&&(s+=p(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:s,y:f}}(y(e)))}function C(t){const e=H(t),n=[\"absolute\",\"fixed\"].includes(i(t).position)&&c(t)?T(t):t;return s(n)?e.filter((t=>s(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&f(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&\"body\"!==r(t))):[]}const D={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...\"clippingAncestors\"===n?C(e):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=A(e,n,i);return t.top=p(o.top,t.top),t.right=g(o.right,t.right),t.bottom=g(o.bottom,t.bottom),t.left=p(o.left,t.left),t}),A(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=c(n),l=y(n);if(n===l)return e;let s={scrollLeft:0,scrollTop:0};const f={x:0,y:0};if((i||!i&&\"fixed\"!==o)&&((\"body\"!==r(n)||u(l))&&(s=v(n)),c(n))){const t=w(n,!0);f.x=t.x+n.clientLeft,f.y=t.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+f.x,y:e.y-s.scrollTop+f.y}},isElement:s,getDimensions:W,getOffsetParent:T,getDocumentElement:y,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:b(e,T(n),o),floating:{...W(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>\"rtl\"===i(t).direction};function N(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,f=i&&!c,u=r&&!c,d=f||u?[...s(t)?H(t):[],...H(e)]:[];d.forEach((t=>{f&&t.addEventListener(\"scroll\",n,{passive:!0}),u&&t.addEventListener(\"resize\",n)}));let a,h=null;if(l){let o=!0;h=new ResizeObserver((()=>{o||n(),o=!1})),s(t)&&!c&&h.observe(t),h.observe(e)}let g=c?w(t):null;return c&&function e(){const o=w(t);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,a=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{f&&t.removeEventListener(\"scroll\",n),u&&t.removeEventListener(\"resize\",n)})),null==(t=h)||t.disconnect(),h=null,c&&cancelAnimationFrame(a)}}const P=(t,n,o)=>e(t,n,{platform:D,...o});export{N as autoUpdate,P as computePosition,H as getOverflowAncestors};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactDOM\"];","import { computePosition, arrow as arrow$1 } from '@floating-ui/dom';\nexport * from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n  if (a === b) {\n    return true;\n  }\n\n  if (typeof a !== typeof b) {\n    return false;\n  }\n\n  if (typeof a === 'function' && a.toString() === b.toString()) {\n    return true;\n  }\n\n  let length, i, keys;\n\n  if (a && b && typeof a == 'object') {\n    if (Array.isArray(a)) {\n      length = a.length;\n      if (length != b.length) return false;\n\n      for (i = length; i-- !== 0;) {\n        if (!deepEqual(a[i], b[i])) {\n          return false;\n        }\n      }\n\n      return true;\n    }\n\n    keys = Object.keys(a);\n    length = keys.length;\n\n    if (length !== Object.keys(b).length) {\n      return false;\n    }\n\n    for (i = length; i-- !== 0;) {\n      if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {\n        return false;\n      }\n    }\n\n    for (i = length; i-- !== 0;) {\n      const key = keys[i];\n\n      if (key === '_owner' && a.$$typeof) {\n        continue;\n      }\n\n      if (!deepEqual(a[key], b[key])) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  return a !== a && b !== b;\n}\n\nfunction useLatestRef(value) {\n  const ref = React.useRef(value);\n  index(() => {\n    ref.current = value;\n  });\n  return ref;\n}\n\nfunction useFloating(_temp) {\n  let {\n    middleware,\n    placement = 'bottom',\n    strategy = 'absolute',\n    whileElementsMounted\n  } = _temp === void 0 ? {} : _temp;\n  const [data, setData] = React.useState({\n    // Setting these to `null` will allow the consumer to determine if\n    // `computePosition()` has run yet\n    x: null,\n    y: null,\n    strategy,\n    placement,\n    middlewareData: {}\n  });\n  const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n\n  if (!deepEqual(latestMiddleware == null ? void 0 : latestMiddleware.map(_ref => {\n    let {\n      name,\n      options\n    } = _ref;\n    return {\n      name,\n      options\n    };\n  }), middleware == null ? void 0 : middleware.map(_ref2 => {\n    let {\n      name,\n      options\n    } = _ref2;\n    return {\n      name,\n      options\n    };\n  }))) {\n    setLatestMiddleware(middleware);\n  }\n\n  const reference = React.useRef(null);\n  const floating = React.useRef(null);\n  const cleanupRef = React.useRef(null);\n  const dataRef = React.useRef(data);\n  const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n  const update = React.useCallback(() => {\n    if (!reference.current || !floating.current) {\n      return;\n    }\n\n    computePosition(reference.current, floating.current, {\n      middleware: latestMiddleware,\n      placement,\n      strategy\n    }).then(data => {\n      if (isMountedRef.current && !deepEqual(dataRef.current, data)) {\n        dataRef.current = data;\n        ReactDOM.flushSync(() => {\n          setData(data);\n        });\n      }\n    });\n  }, [latestMiddleware, placement, strategy]);\n  index(() => {\n    // Skip first update\n    if (isMountedRef.current) {\n      update();\n    }\n  }, [update]);\n  const isMountedRef = React.useRef(false);\n  index(() => {\n    isMountedRef.current = true;\n    return () => {\n      isMountedRef.current = false;\n    };\n  }, []);\n  const runElementMountCallback = React.useCallback(() => {\n    if (typeof cleanupRef.current === 'function') {\n      cleanupRef.current();\n      cleanupRef.current = null;\n    }\n\n    if (reference.current && floating.current) {\n      if (whileElementsMountedRef.current) {\n        const cleanupFn = whileElementsMountedRef.current(reference.current, floating.current, update);\n        cleanupRef.current = cleanupFn;\n      } else {\n        update();\n      }\n    }\n  }, [update, whileElementsMountedRef]);\n  const setReference = React.useCallback(node => {\n    reference.current = node;\n    runElementMountCallback();\n  }, [runElementMountCallback]);\n  const setFloating = React.useCallback(node => {\n    floating.current = node;\n    runElementMountCallback();\n  }, [runElementMountCallback]);\n  const refs = React.useMemo(() => ({\n    reference,\n    floating\n  }), []);\n  return React.useMemo(() => ({ ...data,\n    update,\n    refs,\n    reference: setReference,\n    floating: setFloating\n  }), [data, update, refs, setReference, setFloating]);\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered\n * to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\n\nconst arrow = options => {\n  const {\n    element,\n    padding\n  } = options;\n\n  function isRef(value) {\n    return Object.prototype.hasOwnProperty.call(value, 'current');\n  }\n\n  return {\n    name: 'arrow',\n    options,\n\n    fn(args) {\n      if (isRef(element)) {\n        if (element.current != null) {\n          return arrow$1({\n            element: element.current,\n            padding\n          }).fn(args);\n        }\n\n        return {};\n      } else if (element) {\n        return arrow$1({\n          element,\n          padding\n        }).fn(args);\n      }\n\n      return {};\n    }\n\n  };\n};\n\nexport { arrow, useFloating };\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    if (typeof b !== \"function\" && b !== null)\r\n        throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n        if (ar || !(i in from)) {\r\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n            ar[i] = from[i];\r\n        }\r\n    }\r\n    return to.concat(ar || from);\r\n}\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n    return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n    if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n    if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n    return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n    transformPagePoint: function (p) { return p; },\n    isStatic: false,\n    reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n    hasDetected = true;\n    if (typeof window === \"undefined\")\n        return;\n    if (window.matchMedia) {\n        var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n        var setReducedMotionPreferences = function () {\n            return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n        };\n        motionMediaQuery_1.addListener(setReducedMotionPreferences);\n        setReducedMotionPreferences();\n    }\n    else {\n        prefersReducedMotion.current = false;\n    }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n *   const shouldReduceMotion = useReducedMotion()\n *   const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n *   return (\n *     <motion.div animate={{\n *       opacity: isOpen ? 1 : 0,\n *       x: isOpen ? 0 : closedX\n *     }} />\n *   )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n    /**\n     * Lazy initialisation of prefersReducedMotion\n     */\n    !hasDetected && initPrefersReducedMotion();\n    var _a = __read(useState(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0];\n    /**\n     * TODO See if people miss automatically updating shouldReduceMotion setting\n     */\n    return shouldReduceMotion;\n}\nfunction useReducedMotionConfig() {\n    var reducedMotionPreference = useReducedMotion();\n    var reducedMotion = useContext(MotionConfigContext).reducedMotion;\n    if (reducedMotion === \"never\") {\n        return false;\n    }\n    else if (reducedMotion === \"always\") {\n        return true;\n    }\n    else {\n        return reducedMotionPreference;\n    }\n}\n\nexport { useReducedMotion, useReducedMotionConfig };\n","var createDefinition = function (propNames) { return ({\n    isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); },\n}); };\nvar featureDefinitions = {\n    measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\"]),\n    animation: createDefinition([\n        \"animate\",\n        \"exit\",\n        \"variants\",\n        \"whileHover\",\n        \"whileTap\",\n        \"whileFocus\",\n        \"whileDrag\",\n        \"whileInView\",\n    ]),\n    exit: createDefinition([\"exit\"]),\n    drag: createDefinition([\"drag\", \"dragControls\"]),\n    focus: createDefinition([\"whileFocus\"]),\n    hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n    tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n    pan: createDefinition([\n        \"onPan\",\n        \"onPanStart\",\n        \"onPanSessionStart\",\n        \"onPanEnd\",\n    ]),\n    inView: createDefinition([\n        \"whileInView\",\n        \"onViewportEnter\",\n        \"onViewportLeave\",\n    ]),\n};\nfunction loadFeatures(features) {\n    for (var key in features) {\n        if (features[key] === null)\n            continue;\n        if (key === \"projectionNodeConstructor\") {\n            featureDefinitions.projectionNodeConstructor = features[key];\n        }\n        else {\n            featureDefinitions[key].Component = features[key];\n        }\n    }\n}\n\nexport { featureDefinitions, loadFeatures };\n","import { createContext } from 'react';\n\nvar LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n    var features = [];\n    var lazyContext = useContext(LazyContext);\n    if (!visualElement)\n        return null;\n    /**\n     * If we're in development mode, check to make sure we're not rendering a motion component\n     * as a child of LazyMotion, as this will break the file-size benefits of using it.\n     */\n    if (process.env.NODE_ENV !== \"production\" &&\n        preloadedFeatures &&\n        lazyContext.strict) {\n        invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n    }\n    for (var i = 0; i < numFeatures; i++) {\n        var name_1 = featureNames[i];\n        var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n        /**\n         * It might be possible in the future to use this moment to\n         * dynamically request functionality. In initial tests this\n         * was producing a lot of duplication amongst bundles.\n         */\n        if (isEnabled(props) && Component) {\n            features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n        }\n    }\n    return features;\n}\n\nexport { useFeatures };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n    return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","var isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","function isRefObject(ref) {\n    return (typeof ref === \"object\" &&\n        Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","/**\n * Decides if the supplied variable is an array of variant labels\n */\nfunction isVariantLabels(v) {\n    return Array.isArray(v);\n}\n/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n    return typeof v === \"string\" || isVariantLabels(v);\n}\n/**\n * Creates an object containing the latest state of every MotionValue on a VisualElement\n */\nfunction getCurrent(visualElement) {\n    var current = {};\n    visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); });\n    return current;\n}\n/**\n * Creates an object containing the latest velocity of every MotionValue on a VisualElement\n */\nfunction getVelocity(visualElement) {\n    var velocity = {};\n    visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); });\n    return velocity;\n}\nfunction resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {\n    var _a;\n    if (currentValues === void 0) { currentValues = {}; }\n    if (currentVelocity === void 0) { currentVelocity = {}; }\n    /**\n     * If the variant definition is a function, resolve.\n     */\n    if (typeof definition === \"function\") {\n        definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n    }\n    /**\n     * If the variant definition is a variant label, or\n     * the function returned a variant label, resolve.\n     */\n    if (typeof definition === \"string\") {\n        definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];\n    }\n    /**\n     * At this point we've resolved both functions and variant labels,\n     * but the resolved variant label might itself have been a function.\n     * If so, resolve. This can only have returned a valid target object.\n     */\n    if (typeof definition === \"function\") {\n        definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity);\n    }\n    return definition;\n}\nfunction resolveVariant(visualElement, definition, custom) {\n    var props = visualElement.getProps();\n    return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));\n}\nfunction checkIfControllingVariants(props) {\n    var _a;\n    return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === \"function\" ||\n        isVariantLabel(props.initial) ||\n        isVariantLabel(props.animate) ||\n        isVariantLabel(props.whileHover) ||\n        isVariantLabel(props.whileDrag) ||\n        isVariantLabel(props.whileTap) ||\n        isVariantLabel(props.whileFocus) ||\n        isVariantLabel(props.exit));\n}\nfunction checkIfVariantNode(props) {\n    return Boolean(checkIfControllingVariants(props) || props.variants);\n}\n\nexport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel, isVariantLabels, resolveVariant, resolveVariantFromProps };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n    var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n    return useMemo(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n    return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n    var ref = useRef(null);\n    if (ref.current === null) {\n        ref.current = init();\n    }\n    return ref.current;\n}\n\nexport { useConstant };\n","const defaultTimestep = (1 / 60) * 1000;\nconst getCurrentTime = typeof performance !== \"undefined\"\n    ? () => performance.now()\n    : () => Date.now();\nconst onNextFrame = typeof window !== \"undefined\"\n    ? (callback) => window.requestAnimationFrame(callback)\n    : (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep);\n\nexport { defaultTimestep, onNextFrame };\n","import { onNextFrame, defaultTimestep } from './on-next-frame.mjs';\nimport { createRenderStep } from './create-render-step.mjs';\n\nconst maxElapsed = 40;\nlet useDefaultElapsed = true;\nlet runNextFrame = false;\nlet isProcessing = false;\nconst frame = {\n    delta: 0,\n    timestamp: 0,\n};\nconst stepsOrder = [\n    \"read\",\n    \"update\",\n    \"preRender\",\n    \"render\",\n    \"postRender\",\n];\nconst steps = stepsOrder.reduce((acc, key) => {\n    acc[key] = createRenderStep(() => (runNextFrame = true));\n    return acc;\n}, {});\nconst sync = stepsOrder.reduce((acc, key) => {\n    const step = steps[key];\n    acc[key] = (process, keepAlive = false, immediate = false) => {\n        if (!runNextFrame)\n            startLoop();\n        return step.schedule(process, keepAlive, immediate);\n    };\n    return acc;\n}, {});\nconst cancelSync = stepsOrder.reduce((acc, key) => {\n    acc[key] = steps[key].cancel;\n    return acc;\n}, {});\nconst flushSync = stepsOrder.reduce((acc, key) => {\n    acc[key] = () => steps[key].process(frame);\n    return acc;\n}, {});\nconst processStep = (stepId) => steps[stepId].process(frame);\nconst processFrame = (timestamp) => {\n    runNextFrame = false;\n    frame.delta = useDefaultElapsed\n        ? defaultTimestep\n        : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);\n    frame.timestamp = timestamp;\n    isProcessing = true;\n    stepsOrder.forEach(processStep);\n    isProcessing = false;\n    if (runNextFrame) {\n        useDefaultElapsed = false;\n        onNextFrame(processFrame);\n    }\n};\nconst startLoop = () => {\n    runNextFrame = true;\n    useDefaultElapsed = true;\n    if (!isProcessing)\n        onNextFrame(processFrame);\n};\nconst getFrameData = () => frame;\n\nexport default sync;\nexport { cancelSync, flushSync, getFrameData };\n","function createRenderStep(runNextFrame) {\n    let toRun = [];\n    let toRunNextFrame = [];\n    let numToRun = 0;\n    let isProcessing = false;\n    let flushNextFrame = false;\n    const toKeepAlive = new WeakSet();\n    const step = {\n        schedule: (callback, keepAlive = false, immediate = false) => {\n            const addToCurrentFrame = immediate && isProcessing;\n            const buffer = addToCurrentFrame ? toRun : toRunNextFrame;\n            if (keepAlive)\n                toKeepAlive.add(callback);\n            if (buffer.indexOf(callback) === -1) {\n                buffer.push(callback);\n                if (addToCurrentFrame && isProcessing)\n                    numToRun = toRun.length;\n            }\n            return callback;\n        },\n        cancel: (callback) => {\n            const index = toRunNextFrame.indexOf(callback);\n            if (index !== -1)\n                toRunNextFrame.splice(index, 1);\n            toKeepAlive.delete(callback);\n        },\n        process: (frameData) => {\n            if (isProcessing) {\n                flushNextFrame = true;\n                return;\n            }\n            isProcessing = true;\n            [toRun, toRunNextFrame] = [toRunNextFrame, toRun];\n            toRunNextFrame.length = 0;\n            numToRun = toRun.length;\n            if (numToRun) {\n                for (let i = 0; i < numToRun; i++) {\n                    const callback = toRun[i];\n                    callback(frameData);\n                    if (toKeepAlive.has(callback)) {\n                        step.schedule(callback);\n                        runNextFrame();\n                    }\n                }\n            }\n            isProcessing = false;\n            if (flushNextFrame) {\n                flushNextFrame = false;\n                step.process(frameData);\n            }\n        },\n    };\n    return step;\n}\n\nexport { createRenderStep };\n","const mix = (from, to, progress) => -progress * from + progress * to + from;\n\nexport { mix };\n","function velocityPerSecond(velocity, frameDuration) {\n    return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { __read } from 'tslib';\n\nfunction addUniqueItem(arr, item) {\n    arr.indexOf(item) === -1 && arr.push(item);\n}\nfunction removeItem(arr, item) {\n    var index = arr.indexOf(item);\n    index > -1 && arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem(_a, fromIndex, toIndex) {\n    var _b = __read(_a), arr = _b.slice(0);\n    var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n    if (startIndex >= 0 && startIndex < arr.length) {\n        var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n        var _c = __read(arr.splice(fromIndex, 1), 1), item = _c[0];\n        arr.splice(endIndex, 0, item);\n    }\n    return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nvar SubscriptionManager = /** @class */ (function () {\n    function SubscriptionManager() {\n        this.subscriptions = [];\n    }\n    SubscriptionManager.prototype.add = function (handler) {\n        var _this = this;\n        addUniqueItem(this.subscriptions, handler);\n        return function () { return removeItem(_this.subscriptions, handler); };\n    };\n    SubscriptionManager.prototype.notify = function (a, b, c) {\n        var numSubscriptions = this.subscriptions.length;\n        if (!numSubscriptions)\n            return;\n        if (numSubscriptions === 1) {\n            /**\n             * If there's only a single handler we can just call it without invoking a loop.\n             */\n            this.subscriptions[0](a, b, c);\n        }\n        else {\n            for (var i = 0; i < numSubscriptions; i++) {\n                /**\n                 * Check whether the handler exists before firing as it's possible\n                 * the subscriptions were modified during this loop running.\n                 */\n                var handler = this.subscriptions[i];\n                handler && handler(a, b, c);\n            }\n        }\n    };\n    SubscriptionManager.prototype.getSize = function () {\n        return this.subscriptions.length;\n    };\n    SubscriptionManager.prototype.clear = function () {\n        this.subscriptions.length = 0;\n    };\n    return SubscriptionManager;\n}());\n\nexport { SubscriptionManager };\n","import sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond } from 'popmotion';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\n\nvar isFloat = function (value) {\n    return !isNaN(parseFloat(value));\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nvar MotionValue = /** @class */ (function () {\n    /**\n     * @param init - The initiating value\n     * @param config - Optional configuration options\n     *\n     * -  `transformer`: A function to transform incoming values with.\n     *\n     * @internal\n     */\n    function MotionValue(init) {\n        var _this = this;\n        /**\n         * Duration, in milliseconds, since last updating frame.\n         *\n         * @internal\n         */\n        this.timeDelta = 0;\n        /**\n         * Timestamp of the last time this `MotionValue` was updated.\n         *\n         * @internal\n         */\n        this.lastUpdated = 0;\n        /**\n         * Functions to notify when the `MotionValue` updates.\n         *\n         * @internal\n         */\n        this.updateSubscribers = new SubscriptionManager();\n        /**\n         * Functions to notify when the velocity updates.\n         *\n         * @internal\n         */\n        this.velocityUpdateSubscribers = new SubscriptionManager();\n        /**\n         * Functions to notify when the `MotionValue` updates and `render` is set to `true`.\n         *\n         * @internal\n         */\n        this.renderSubscribers = new SubscriptionManager();\n        /**\n         * Tracks whether this value can output a velocity. Currently this is only true\n         * if the value is numerical, but we might be able to widen the scope here and support\n         * other value types.\n         *\n         * @internal\n         */\n        this.canTrackVelocity = false;\n        this.updateAndNotify = function (v, render) {\n            if (render === void 0) { render = true; }\n            _this.prev = _this.current;\n            _this.current = v;\n            // Update timestamp\n            var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp;\n            if (_this.lastUpdated !== timestamp) {\n                _this.timeDelta = delta;\n                _this.lastUpdated = timestamp;\n                sync.postRender(_this.scheduleVelocityCheck);\n            }\n            // Update update subscribers\n            if (_this.prev !== _this.current) {\n                _this.updateSubscribers.notify(_this.current);\n            }\n            // Update velocity subscribers\n            if (_this.velocityUpdateSubscribers.getSize()) {\n                _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n            }\n            // Update render subscribers\n            if (render) {\n                _this.renderSubscribers.notify(_this.current);\n            }\n        };\n        /**\n         * Schedule a velocity check for the next frame.\n         *\n         * This is an instanced and bound function to prevent generating a new\n         * function once per frame.\n         *\n         * @internal\n         */\n        this.scheduleVelocityCheck = function () { return sync.postRender(_this.velocityCheck); };\n        /**\n         * Updates `prev` with `current` if the value hasn't been updated this frame.\n         * This ensures velocity calculations return `0`.\n         *\n         * This is an instanced and bound function to prevent generating a new\n         * function once per frame.\n         *\n         * @internal\n         */\n        this.velocityCheck = function (_a) {\n            var timestamp = _a.timestamp;\n            if (timestamp !== _this.lastUpdated) {\n                _this.prev = _this.current;\n                _this.velocityUpdateSubscribers.notify(_this.getVelocity());\n            }\n        };\n        this.hasAnimated = false;\n        this.prev = this.current = init;\n        this.canTrackVelocity = isFloat(this.current);\n    }\n    /**\n     * Adds a function that will be notified when the `MotionValue` is updated.\n     *\n     * It returns a function that, when called, will cancel the subscription.\n     *\n     * When calling `onChange` inside a React component, it should be wrapped with the\n     * `useEffect` hook. As it returns an unsubscribe function, this should be returned\n     * from the `useEffect` function to ensure you don't add duplicate subscribers..\n     *\n     * ```jsx\n     * export const MyComponent = () => {\n     *   const x = useMotionValue(0)\n     *   const y = useMotionValue(0)\n     *   const opacity = useMotionValue(1)\n     *\n     *   useEffect(() => {\n     *     function updateOpacity() {\n     *       const maxXY = Math.max(x.get(), y.get())\n     *       const newOpacity = transform(maxXY, [0, 100], [1, 0])\n     *       opacity.set(newOpacity)\n     *     }\n     *\n     *     const unsubscribeX = x.onChange(updateOpacity)\n     *     const unsubscribeY = y.onChange(updateOpacity)\n     *\n     *     return () => {\n     *       unsubscribeX()\n     *       unsubscribeY()\n     *     }\n     *   }, [])\n     *\n     *   return <motion.div style={{ x }} />\n     * }\n     * ```\n     *\n     * @internalremarks\n     *\n     * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.\n     *\n     * ```jsx\n     * useOnChange(x, () => {})\n     * ```\n     *\n     * @param subscriber - A function that receives the latest value.\n     * @returns A function that, when called, will cancel this subscription.\n     *\n     * @public\n     */\n    MotionValue.prototype.onChange = function (subscription) {\n        return this.updateSubscribers.add(subscription);\n    };\n    MotionValue.prototype.clearListeners = function () {\n        this.updateSubscribers.clear();\n    };\n    /**\n     * Adds a function that will be notified when the `MotionValue` requests a render.\n     *\n     * @param subscriber - A function that's provided the latest value.\n     * @returns A function that, when called, will cancel this subscription.\n     *\n     * @internal\n     */\n    MotionValue.prototype.onRenderRequest = function (subscription) {\n        // Render immediately\n        subscription(this.get());\n        return this.renderSubscribers.add(subscription);\n    };\n    /**\n     * Attaches a passive effect to the `MotionValue`.\n     *\n     * @internal\n     */\n    MotionValue.prototype.attach = function (passiveEffect) {\n        this.passiveEffect = passiveEffect;\n    };\n    /**\n     * Sets the state of the `MotionValue`.\n     *\n     * @remarks\n     *\n     * ```jsx\n     * const x = useMotionValue(0)\n     * x.set(10)\n     * ```\n     *\n     * @param latest - Latest value to set.\n     * @param render - Whether to notify render subscribers. Defaults to `true`\n     *\n     * @public\n     */\n    MotionValue.prototype.set = function (v, render) {\n        if (render === void 0) { render = true; }\n        if (!render || !this.passiveEffect) {\n            this.updateAndNotify(v, render);\n        }\n        else {\n            this.passiveEffect(v, this.updateAndNotify);\n        }\n    };\n    /**\n     * Returns the latest state of `MotionValue`\n     *\n     * @returns - The latest state of `MotionValue`\n     *\n     * @public\n     */\n    MotionValue.prototype.get = function () {\n        return this.current;\n    };\n    /**\n     * @public\n     */\n    MotionValue.prototype.getPrevious = function () {\n        return this.prev;\n    };\n    /**\n     * Returns the latest velocity of `MotionValue`\n     *\n     * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n     *\n     * @public\n     */\n    MotionValue.prototype.getVelocity = function () {\n        // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful\n        return this.canTrackVelocity\n            ? // These casts could be avoided if parseFloat would be typed better\n                velocityPerSecond(parseFloat(this.current) -\n                    parseFloat(this.prev), this.timeDelta)\n            : 0;\n    };\n    /**\n     * Registers a new animation to control this `MotionValue`. Only one\n     * animation can drive a `MotionValue` at one time.\n     *\n     * ```jsx\n     * value.start()\n     * ```\n     *\n     * @param animation - A function that starts the provided animation\n     *\n     * @internal\n     */\n    MotionValue.prototype.start = function (animation) {\n        var _this = this;\n        this.stop();\n        return new Promise(function (resolve) {\n            _this.hasAnimated = true;\n            _this.stopAnimation = animation(resolve);\n        }).then(function () { return _this.clearAnimation(); });\n    };\n    /**\n     * Stop the currently active animation.\n     *\n     * @public\n     */\n    MotionValue.prototype.stop = function () {\n        if (this.stopAnimation)\n            this.stopAnimation();\n        this.clearAnimation();\n    };\n    /**\n     * Returns `true` if this value is currently animating.\n     *\n     * @public\n     */\n    MotionValue.prototype.isAnimating = function () {\n        return !!this.stopAnimation;\n    };\n    MotionValue.prototype.clearAnimation = function () {\n        this.stopAnimation = null;\n    };\n    /**\n     * Destroy and clean up subscribers to this `MotionValue`.\n     *\n     * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically\n     * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually\n     * created a `MotionValue` via the `motionValue` function.\n     *\n     * @public\n     */\n    MotionValue.prototype.destroy = function () {\n        this.updateSubscribers.clear();\n        this.renderSubscribers.clear();\n        this.stop();\n    };\n    return MotionValue;\n}());\n/**\n * @internal\n */\nfunction motionValue(init) {\n    return new MotionValue(init);\n}\n\nexport { MotionValue, motionValue };\n","var isMotionValue = function (value) {\n    return Boolean(value !== null && typeof value === \"object\" && value.getVelocity);\n};\n\nexport { isMotionValue };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { warning } from 'hey-listen';\nimport { clamp } from '../../utils/clamp.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n    let envelope;\n    let derivative;\n    warning(duration <= maxDuration * 1000, \"Spring duration must be 10 seconds or less\");\n    let dampingRatio = 1 - bounce;\n    dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n    duration = clamp(minDuration, maxDuration, duration / 1000);\n    if (dampingRatio < 1) {\n        envelope = (undampedFreq) => {\n            const exponentialDecay = undampedFreq * dampingRatio;\n            const delta = exponentialDecay * duration;\n            const a = exponentialDecay - velocity;\n            const b = calcAngularFreq(undampedFreq, dampingRatio);\n            const c = Math.exp(-delta);\n            return safeMin - (a / b) * c;\n        };\n        derivative = (undampedFreq) => {\n            const exponentialDecay = undampedFreq * dampingRatio;\n            const delta = exponentialDecay * duration;\n            const d = delta * velocity + velocity;\n            const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n            const f = Math.exp(-delta);\n            const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n            const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n            return (factor * ((d - e) * f)) / g;\n        };\n    }\n    else {\n        envelope = (undampedFreq) => {\n            const a = Math.exp(-undampedFreq * duration);\n            const b = (undampedFreq - velocity) * duration + 1;\n            return -safeMin + a * b;\n        };\n        derivative = (undampedFreq) => {\n            const a = Math.exp(-undampedFreq * duration);\n            const b = (velocity - undampedFreq) * (duration * duration);\n            return a * b;\n        };\n    }\n    const initialGuess = 5 / duration;\n    const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n    duration = duration * 1000;\n    if (isNaN(undampedFreq)) {\n        return {\n            stiffness: 100,\n            damping: 10,\n            duration,\n        };\n    }\n    else {\n        const stiffness = Math.pow(undampedFreq, 2) * mass;\n        return {\n            stiffness,\n            damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n            duration,\n        };\n    }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n    let result = initialGuess;\n    for (let i = 1; i < rootIterations; i++) {\n        result = result - envelope(result) / derivative(result);\n    }\n    return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n    return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { __rest } from 'tslib';\nimport { findSpring, calcAngularFreq } from '../utils/find-spring.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n    return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n    let springOptions = Object.assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options);\n    if (!isSpringType(options, physicsKeys) &&\n        isSpringType(options, durationKeys)) {\n        const derived = findSpring(options);\n        springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 });\n        springOptions.isResolvedFromDuration = true;\n    }\n    return springOptions;\n}\nfunction spring(_a) {\n    var { from = 0.0, to = 1.0, restSpeed = 2, restDelta } = _a, options = __rest(_a, [\"from\", \"to\", \"restSpeed\", \"restDelta\"]);\n    const state = { done: false, value: from };\n    let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options);\n    let resolveSpring = zero;\n    let resolveVelocity = zero;\n    function createSpring() {\n        const initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n        const initialDelta = to - from;\n        const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n        const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;\n        if (restDelta === undefined) {\n            restDelta = Math.min(Math.abs(to - from) / 100, 0.4);\n        }\n        if (dampingRatio < 1) {\n            const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n            resolveSpring = (t) => {\n                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n                return (to -\n                    envelope *\n                        (((initialVelocity +\n                            dampingRatio * undampedAngularFreq * initialDelta) /\n                            angularFreq) *\n                            Math.sin(angularFreq * t) +\n                            initialDelta * Math.cos(angularFreq * t)));\n            };\n            resolveVelocity = (t) => {\n                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n                return (dampingRatio *\n                    undampedAngularFreq *\n                    envelope *\n                    ((Math.sin(angularFreq * t) *\n                        (initialVelocity +\n                            dampingRatio *\n                                undampedAngularFreq *\n                                initialDelta)) /\n                        angularFreq +\n                        initialDelta * Math.cos(angularFreq * t)) -\n                    envelope *\n                        (Math.cos(angularFreq * t) *\n                            (initialVelocity +\n                                dampingRatio *\n                                    undampedAngularFreq *\n                                    initialDelta) -\n                            angularFreq *\n                                initialDelta *\n                                Math.sin(angularFreq * t)));\n            };\n        }\n        else if (dampingRatio === 1) {\n            resolveSpring = (t) => to -\n                Math.exp(-undampedAngularFreq * t) *\n                    (initialDelta +\n                        (initialVelocity + undampedAngularFreq * initialDelta) *\n                            t);\n        }\n        else {\n            const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n            resolveSpring = (t) => {\n                const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n                const freqForT = Math.min(dampedAngularFreq * t, 300);\n                return (to -\n                    (envelope *\n                        ((initialVelocity +\n                            dampingRatio * undampedAngularFreq * initialDelta) *\n                            Math.sinh(freqForT) +\n                            dampedAngularFreq *\n                                initialDelta *\n                                Math.cosh(freqForT))) /\n                        dampedAngularFreq);\n            };\n        }\n    }\n    createSpring();\n    return {\n        next: (t) => {\n            const current = resolveSpring(t);\n            if (!isResolvedFromDuration) {\n                const currentVelocity = resolveVelocity(t) * 1000;\n                const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n                const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;\n                state.done =\n                    isBelowVelocityThreshold && isBelowDisplacementThreshold;\n            }\n            else {\n                state.done = t >= duration;\n            }\n            state.value = state.done ? to : current;\n            return state;\n        },\n        flipTarget: () => {\n            velocity = -velocity;\n            [from, to] = [to, from];\n            createSpring();\n        },\n    };\n}\nspring.needsInterpolation = (a, b) => typeof a === \"string\" || typeof b === \"string\";\nconst zero = (_t) => 0;\n\nexport { spring };\n","const progress = (from, to, value) => {\n    const toFromDifference = to - from;\n    return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n","const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);\nconst sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);\nconst floatRegex = /(-)?([\\d]*\\.?[\\d])+/g;\nconst colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nconst singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\nfunction isString(v) {\n    return typeof v === 'string';\n}\n\nexport { clamp, colorRegex, floatRegex, isString, sanitize, singleColorRegex };\n","import { clamp } from '../utils.mjs';\n\nconst number = {\n    test: (v) => typeof v === 'number',\n    parse: parseFloat,\n    transform: (v) => v,\n};\nconst alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) });\nconst scale = Object.assign(Object.assign({}, number), { default: 1 });\n\nexport { alpha, number, scale };\n","import { isString, singleColorRegex, floatRegex } from '../utils.mjs';\n\nconst isColorString = (type, testProp) => (v) => {\n    return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n        (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n    if (!isString(v))\n        return v;\n    const [a, b, c, alpha] = v.match(floatRegex);\n    return {\n        [aName]: parseFloat(a),\n        [bName]: parseFloat(b),\n        [cName]: parseFloat(c),\n        alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n    };\n};\n\nexport { isColorString, splitColor };\n","import { number, alpha } from '../numbers/index.mjs';\nimport { sanitize, clamp } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = clamp(0, 255);\nconst rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) });\nconst rgba = {\n    test: isColorString('rgb', 'red'),\n    parse: splitColor('red', 'green', 'blue'),\n    transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' +\n        rgbUnit.transform(red) +\n        ', ' +\n        rgbUnit.transform(green) +\n        ', ' +\n        rgbUnit.transform(blue) +\n        ', ' +\n        sanitize(alpha.transform(alpha$1)) +\n        ')',\n};\n\nexport { rgbUnit, rgba };\n","import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n    let r = '';\n    let g = '';\n    let b = '';\n    let a = '';\n    if (v.length > 5) {\n        r = v.substr(1, 2);\n        g = v.substr(3, 2);\n        b = v.substr(5, 2);\n        a = v.substr(7, 2);\n    }\n    else {\n        r = v.substr(1, 1);\n        g = v.substr(2, 1);\n        b = v.substr(3, 1);\n        a = v.substr(4, 1);\n        r += r;\n        g += g;\n        b += b;\n        a += a;\n    }\n    return {\n        red: parseInt(r, 16),\n        green: parseInt(g, 16),\n        blue: parseInt(b, 16),\n        alpha: a ? parseInt(a, 16) / 255 : 1,\n    };\n}\nconst hex = {\n    test: isColorString('#'),\n    parse: parseHex,\n    transform: rgba.transform,\n};\n\nexport { hex };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n    test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1,\n    parse: parseFloat,\n    transform: (v) => `${v}${unit}`,\n});\nconst degrees = createUnitType('deg');\nconst percent = createUnitType('%');\nconst px = createUnitType('px');\nconst vh = createUnitType('vh');\nconst vw = createUnitType('vw');\nconst progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) });\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n    test: isColorString('hsl', 'hue'),\n    parse: splitColor('hue', 'saturation', 'lightness'),\n    transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n        return ('hsla(' +\n            Math.round(hue) +\n            ', ' +\n            percent.transform(sanitize(saturation)) +\n            ', ' +\n            percent.transform(sanitize(lightness)) +\n            ', ' +\n            sanitize(alpha.transform(alpha$1)) +\n            ')');\n    },\n};\n\nexport { hsla };\n","function hueToRgb(p, q, t) {\n    if (t < 0)\n        t += 1;\n    if (t > 1)\n        t -= 1;\n    if (t < 1 / 6)\n        return p + (q - p) * 6 * t;\n    if (t < 1 / 2)\n        return q;\n    if (t < 2 / 3)\n        return p + (q - p) * (2 / 3 - t) * 6;\n    return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n    hue /= 360;\n    saturation /= 100;\n    lightness /= 100;\n    let red = 0;\n    let green = 0;\n    let blue = 0;\n    if (!saturation) {\n        red = green = blue = lightness;\n    }\n    else {\n        const q = lightness < 0.5\n            ? lightness * (1 + saturation)\n            : lightness + saturation - lightness * saturation;\n        const p = 2 * lightness - q;\n        red = hueToRgb(p, q, hue + 1 / 3);\n        green = hueToRgb(p, q, hue);\n        blue = hueToRgb(p, q, hue - 1 / 3);\n    }\n    return {\n        red: Math.round(red * 255),\n        green: Math.round(green * 255),\n        blue: Math.round(blue * 255),\n        alpha,\n    };\n}\n\nexport { hslaToRgba };\n","import { mix } from './mix.mjs';\nimport { hsla, rgba, hex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { hslaToRgba } from './hsla-to-rgba.mjs';\n\nconst mixLinearColor = (from, to, v) => {\n    const fromExpo = from * from;\n    const toExpo = to * to;\n    return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nconst notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`;\nconst mixColor = (from, to) => {\n    let fromColorType = getColorType(from);\n    let toColorType = getColorType(to);\n    invariant(!!fromColorType, notAnimatable(from));\n    invariant(!!toColorType, notAnimatable(to));\n    let fromColor = fromColorType.parse(from);\n    let toColor = toColorType.parse(to);\n    if (fromColorType === hsla) {\n        fromColor = hslaToRgba(fromColor);\n        fromColorType = rgba;\n    }\n    if (toColorType === hsla) {\n        toColor = hslaToRgba(toColor);\n        toColorType = rgba;\n    }\n    const blended = Object.assign({}, fromColor);\n    return (v) => {\n        for (const key in blended) {\n            if (key !== \"alpha\") {\n                blended[key] = mixLinearColor(fromColor[key], toColor[key], v);\n            }\n        }\n        blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n        return fromColorType.transform(blended);\n    };\n};\n\nexport { mixColor, mixLinearColor };\n","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n    test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n    parse: (v) => {\n        if (rgba.test(v)) {\n            return rgba.parse(v);\n        }\n        else if (hsla.test(v)) {\n            return hsla.parse(v);\n        }\n        else {\n            return hex.parse(v);\n        }\n    },\n    transform: (v) => {\n        return isString(v)\n            ? v\n            : v.hasOwnProperty('red')\n                ? rgba.transform(v)\n                : hsla.transform(v);\n    },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { number } from '../numbers/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nconst colorToken = '${c}';\nconst numberToken = '${n}';\nfunction test(v) {\n    var _a, _b, _c, _d;\n    return (isNaN(v) &&\n        isString(v) &&\n        ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);\n}\nfunction analyse(v) {\n    if (typeof v === 'number')\n        v = `${v}`;\n    const values = [];\n    let numColors = 0;\n    const colors = v.match(colorRegex);\n    if (colors) {\n        numColors = colors.length;\n        v = v.replace(colorRegex, colorToken);\n        values.push(...colors.map(color.parse));\n    }\n    const numbers = v.match(floatRegex);\n    if (numbers) {\n        v = v.replace(floatRegex, numberToken);\n        values.push(...numbers.map(number.parse));\n    }\n    return { values, numColors, tokenised: v };\n}\nfunction parse(v) {\n    return analyse(v).values;\n}\nfunction createTransformer(v) {\n    const { values, numColors, tokenised } = analyse(v);\n    const numValues = values.length;\n    return (v) => {\n        let output = tokenised;\n        for (let i = 0; i < numValues; i++) {\n            output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n        }\n        return output;\n    };\n}\nconst convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v;\nfunction getAnimatableNone(v) {\n    const parsed = parse(v);\n    const transformer = createTransformer(v);\n    return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = { test, parse, createTransformer, getAnimatableNone };\n\nexport { complex };\n","const zeroPoint = {\n    x: 0,\n    y: 0,\n    z: 0\n};\nconst isNum = (v) => typeof v === 'number';\n\nexport { isNum, zeroPoint };\n","const combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n","import { complex, color } from 'style-value-types';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { isNum } from './inc.mjs';\nimport { pipe } from './pipe.mjs';\nimport { warning } from 'hey-listen';\n\nfunction getMixer(origin, target) {\n    if (isNum(origin)) {\n        return (v) => mix(origin, target, v);\n    }\n    else if (color.test(origin)) {\n        return mixColor(origin, target);\n    }\n    else {\n        return mixComplex(origin, target);\n    }\n}\nconst mixArray = (from, to) => {\n    const output = [...from];\n    const numValues = output.length;\n    const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i]));\n    return (v) => {\n        for (let i = 0; i < numValues; i++) {\n            output[i] = blendValue[i](v);\n        }\n        return output;\n    };\n};\nconst mixObject = (origin, target) => {\n    const output = Object.assign(Object.assign({}, origin), target);\n    const blendValue = {};\n    for (const key in output) {\n        if (origin[key] !== undefined && target[key] !== undefined) {\n            blendValue[key] = getMixer(origin[key], target[key]);\n        }\n    }\n    return (v) => {\n        for (const key in blendValue) {\n            output[key] = blendValue[key](v);\n        }\n        return output;\n    };\n};\nfunction analyse(value) {\n    const parsed = complex.parse(value);\n    const numValues = parsed.length;\n    let numNumbers = 0;\n    let numRGB = 0;\n    let numHSL = 0;\n    for (let i = 0; i < numValues; i++) {\n        if (numNumbers || typeof parsed[i] === \"number\") {\n            numNumbers++;\n        }\n        else {\n            if (parsed[i].hue !== undefined) {\n                numHSL++;\n            }\n            else {\n                numRGB++;\n            }\n        }\n    }\n    return { parsed, numNumbers, numRGB, numHSL };\n}\nconst mixComplex = (origin, target) => {\n    const template = complex.createTransformer(target);\n    const originStats = analyse(origin);\n    const targetStats = analyse(target);\n    const canInterpolate = originStats.numHSL === targetStats.numHSL &&\n        originStats.numRGB === targetStats.numRGB &&\n        originStats.numNumbers >= targetStats.numNumbers;\n    if (canInterpolate) {\n        return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n    }\n    else {\n        warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`);\n        return (p) => `${p > 0 ? target : origin}`;\n    }\n};\n\nexport { mixArray, mixComplex, mixObject };\n","import { progress } from './progress.mjs';\nimport { mix } from './mix.mjs';\nimport { mixColor } from './mix-color.mjs';\nimport { mixComplex, mixArray, mixObject } from './mix-complex.mjs';\nimport { color } from 'style-value-types';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { invariant } from 'hey-listen';\n\nconst mixNumber = (from, to) => (p) => mix(from, to, p);\nfunction detectMixerFactory(v) {\n    if (typeof v === 'number') {\n        return mixNumber;\n    }\n    else if (typeof v === 'string') {\n        if (color.test(v)) {\n            return mixColor;\n        }\n        else {\n            return mixComplex;\n        }\n    }\n    else if (Array.isArray(v)) {\n        return mixArray;\n    }\n    else if (typeof v === 'object') {\n        return mixObject;\n    }\n}\nfunction createMixers(output, ease, customMixer) {\n    const mixers = [];\n    const mixerFactory = customMixer || detectMixerFactory(output[0]);\n    const numMixers = output.length - 1;\n    for (let i = 0; i < numMixers; i++) {\n        let mixer = mixerFactory(output[i], output[i + 1]);\n        if (ease) {\n            const easingFunction = Array.isArray(ease) ? ease[i] : ease;\n            mixer = pipe(easingFunction, mixer);\n        }\n        mixers.push(mixer);\n    }\n    return mixers;\n}\nfunction fastInterpolate([from, to], [mixer]) {\n    return (v) => mixer(progress(from, to, v));\n}\nfunction slowInterpolate(input, mixers) {\n    const inputLength = input.length;\n    const lastInputIndex = inputLength - 1;\n    return (v) => {\n        let mixerIndex = 0;\n        let foundMixerIndex = false;\n        if (v <= input[0]) {\n            foundMixerIndex = true;\n        }\n        else if (v >= input[lastInputIndex]) {\n            mixerIndex = lastInputIndex - 1;\n            foundMixerIndex = true;\n        }\n        if (!foundMixerIndex) {\n            let i = 1;\n            for (; i < inputLength; i++) {\n                if (input[i] > v || i === lastInputIndex) {\n                    break;\n                }\n            }\n            mixerIndex = i - 1;\n        }\n        const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n        return mixers[mixerIndex](progressInRange);\n    };\n}\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n    const inputLength = input.length;\n    invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n    invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n    if (input[0] > input[inputLength - 1]) {\n        input = [].concat(input);\n        output = [].concat(output);\n        input.reverse();\n        output.reverse();\n    }\n    const mixers = createMixers(output, ease, mixer);\n    const interpolator = inputLength === 2\n        ? fastInterpolate(input, mixers)\n        : slowInterpolate(input, mixers);\n    return isClamp\n        ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n        : interpolator;\n}\n\nexport { interpolate };\n","const reverseEasing = easing => p => 1 - easing(1 - p);\nconst mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\nconst createExpoIn = (power) => p => Math.pow(p, power);\nconst createBackIn = (power) => p => p * p * ((power + 1) * p - power);\nconst createAnticipate = (power) => {\n    const backEasing = createBackIn(power);\n    return p => (p *= 2) < 1\n        ? 0.5 * backEasing(p)\n        : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n};\n\nexport { createAnticipate, createBackIn, createExpoIn, mirrorEasing, reverseEasing };\n","import { createExpoIn, reverseEasing, mirrorEasing, createBackIn, createAnticipate } from './utils.mjs';\n\nconst DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nconst BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nconst BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nconst BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\nconst linear = p => p;\nconst easeIn = createExpoIn(2);\nconst easeOut = reverseEasing(easeIn);\nconst easeInOut = mirrorEasing(easeIn);\nconst circIn = p => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circOut);\nconst backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nconst backOut = reverseEasing(backIn);\nconst backInOut = mirrorEasing(backIn);\nconst anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH);\nconst ca = 4356.0 / 361.0;\nconst cb = 35442.0 / 1805.0;\nconst cc = 16061.0 / 1805.0;\nconst bounceOut = (p) => {\n    if (p === 1 || p === 0)\n        return p;\n    const p2 = p * p;\n    return p < BOUNCE_FIRST_THRESHOLD\n        ? 7.5625 * p2\n        : p < BOUNCE_SECOND_THRESHOLD\n            ? 9.075 * p2 - 9.9 * p + 3.4\n            : p < BOUNCE_THIRD_THRESHOLD\n                ? ca * p2 - cb * p + cc\n                : 10.8 * p * p - 20.52 * p + 10.72;\n};\nconst bounceIn = reverseEasing(bounceOut);\nconst bounceInOut = (p) => p < 0.5\n    ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0))\n    : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n\nexport { anticipate, backIn, backInOut, backOut, bounceIn, bounceInOut, bounceOut, circIn, circInOut, circOut, easeIn, easeInOut, easeOut, linear };\n","import { interpolate } from '../../utils/interpolate.mjs';\nimport { easeInOut } from '../../easing/index.mjs';\n\nfunction defaultEasing(values, easing) {\n    return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction defaultOffset(values) {\n    const numValues = values.length;\n    return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0);\n}\nfunction convertOffsetToTimes(offset, duration) {\n    return offset.map((o) => o * duration);\n}\nfunction keyframes({ from = 0, to = 1, ease, offset, duration = 300, }) {\n    const state = { done: false, value: from };\n    const values = Array.isArray(to) ? to : [from, to];\n    const times = convertOffsetToTimes(offset && offset.length === values.length\n        ? offset\n        : defaultOffset(values), duration);\n    function createInterpolator() {\n        return interpolate(times, values, {\n            ease: Array.isArray(ease) ? ease : defaultEasing(values, ease),\n        });\n    }\n    let interpolator = createInterpolator();\n    return {\n        next: (t) => {\n            state.value = interpolator(t);\n            state.done = t >= duration;\n            return state;\n        },\n        flipTarget: () => {\n            values.reverse();\n            interpolator = createInterpolator();\n        },\n    };\n}\n\nexport { convertOffsetToTimes, defaultEasing, defaultOffset, keyframes };\n","import { spring } from '../generators/spring.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { decay } from '../generators/decay.mjs';\n\nconst types = { keyframes, spring, decay };\nfunction detectAnimationFromOptions(config) {\n    if (Array.isArray(config.to)) {\n        return keyframes;\n    }\n    else if (types[config.type]) {\n        return types[config.type];\n    }\n    const keys = new Set(Object.keys(config));\n    if (keys.has(\"ease\") ||\n        (keys.has(\"duration\") && !keys.has(\"dampingRatio\"))) {\n        return keyframes;\n    }\n    else if (keys.has(\"dampingRatio\") ||\n        keys.has(\"stiffness\") ||\n        keys.has(\"mass\") ||\n        keys.has(\"damping\") ||\n        keys.has(\"restSpeed\") ||\n        keys.has(\"restDelta\")) {\n        return spring;\n    }\n    return keyframes;\n}\n\nexport { detectAnimationFromOptions };\n","function decay({ velocity = 0, from = 0, power = 0.8, timeConstant = 350, restDelta = 0.5, modifyTarget, }) {\n    const state = { done: false, value: from };\n    let amplitude = power * velocity;\n    const ideal = from + amplitude;\n    const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n    if (target !== ideal)\n        amplitude = target - from;\n    return {\n        next: (t) => {\n            const delta = -amplitude * Math.exp(-t / timeConstant);\n            state.done = !(delta > restDelta || delta < -restDelta);\n            state.value = state.done ? target : target + delta;\n            return state;\n        },\n        flipTarget: () => { },\n    };\n}\n\nexport { decay };\n","function loopElapsed(elapsed, duration, delay = 0) {\n    return elapsed - duration - delay;\n}\nfunction reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) {\n    return isForwardPlayback\n        ? loopElapsed(duration + -elapsed, duration, delay)\n        : duration - (elapsed - duration) + delay;\n}\nfunction hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {\n    return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;\n}\n\nexport { hasRepeatDelayElapsed, loopElapsed, reverseElapsed };\n","import { __rest } from 'tslib';\nimport { detectAnimationFromOptions } from './utils/detect-animation-from-options.mjs';\nimport sync, { cancelSync } from 'framesync';\nimport { interpolate } from '../utils/interpolate.mjs';\nimport { hasRepeatDelayElapsed, reverseElapsed, loopElapsed } from './utils/elapsed.mjs';\n\nconst framesync = (update) => {\n    const passTimestamp = ({ delta }) => update(delta);\n    return {\n        start: () => sync.update(passTimestamp, true),\n        stop: () => cancelSync.update(passTimestamp),\n    };\n};\nfunction animate(_a) {\n    var _b, _c;\n    var { from, autoplay = true, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = \"loop\", repeatDelay = 0, onPlay, onStop, onComplete, onRepeat, onUpdate } = _a, options = __rest(_a, [\"from\", \"autoplay\", \"driver\", \"elapsed\", \"repeat\", \"repeatType\", \"repeatDelay\", \"onPlay\", \"onStop\", \"onComplete\", \"onRepeat\", \"onUpdate\"]);\n    let { to } = options;\n    let driverControls;\n    let repeatCount = 0;\n    let computedDuration = options.duration;\n    let latest;\n    let isComplete = false;\n    let isForwardPlayback = true;\n    let interpolateFromNumber;\n    const animator = detectAnimationFromOptions(options);\n    if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {\n        interpolateFromNumber = interpolate([0, 100], [from, to], {\n            clamp: false,\n        });\n        from = 0;\n        to = 100;\n    }\n    const animation = animator(Object.assign(Object.assign({}, options), { from, to }));\n    function repeat() {\n        repeatCount++;\n        if (repeatType === \"reverse\") {\n            isForwardPlayback = repeatCount % 2 === 0;\n            elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback);\n        }\n        else {\n            elapsed = loopElapsed(elapsed, computedDuration, repeatDelay);\n            if (repeatType === \"mirror\")\n                animation.flipTarget();\n        }\n        isComplete = false;\n        onRepeat && onRepeat();\n    }\n    function complete() {\n        driverControls.stop();\n        onComplete && onComplete();\n    }\n    function update(delta) {\n        if (!isForwardPlayback)\n            delta = -delta;\n        elapsed += delta;\n        if (!isComplete) {\n            const state = animation.next(Math.max(0, elapsed));\n            latest = state.value;\n            if (interpolateFromNumber)\n                latest = interpolateFromNumber(latest);\n            isComplete = isForwardPlayback ? state.done : elapsed <= 0;\n        }\n        onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);\n        if (isComplete) {\n            if (repeatCount === 0)\n                computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);\n            if (repeatCount < repeatMax) {\n                hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();\n            }\n            else {\n                complete();\n            }\n        }\n    }\n    function play() {\n        onPlay === null || onPlay === void 0 ? void 0 : onPlay();\n        driverControls = driver(update);\n        driverControls.start();\n    }\n    autoplay && play();\n    return {\n        stop: () => {\n            onStop === null || onStop === void 0 ? void 0 : onStop();\n            driverControls.stop();\n        },\n    };\n}\n\nexport { animate };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nvar secondsToMilliseconds = function (seconds) { return seconds * 1000; };\n\nexport { secondsToMilliseconds };\n","import { linear } from './index.mjs';\n\nconst a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1;\nconst b = (a1, a2) => 3.0 * a2 - 6.0 * a1;\nconst c = (a1) => 3.0 * a1;\nconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\nconst getSlope = (t, a1, a2) => 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 10;\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n    let currentX;\n    let currentT;\n    let i = 0;\n    do {\n        currentT = aA + (aB - aA) / 2.0;\n        currentX = calcBezier(currentT, mX1, mX2) - aX;\n        if (currentX > 0.0) {\n            aB = currentT;\n        }\n        else {\n            aA = currentT;\n        }\n    } while (Math.abs(currentX) > subdivisionPrecision &&\n        ++i < subdivisionMaxIterations);\n    return currentT;\n}\nconst newtonIterations = 8;\nconst newtonMinSlope = 0.001;\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n    for (let i = 0; i < newtonIterations; ++i) {\n        const currentSlope = getSlope(aGuessT, mX1, mX2);\n        if (currentSlope === 0.0) {\n            return aGuessT;\n        }\n        const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n        aGuessT -= currentX / currentSlope;\n    }\n    return aGuessT;\n}\nconst kSplineTableSize = 11;\nconst kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n    if (mX1 === mY1 && mX2 === mY2)\n        return linear;\n    const sampleValues = new Float32Array(kSplineTableSize);\n    for (let i = 0; i < kSplineTableSize; ++i) {\n        sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n    }\n    function getTForX(aX) {\n        let intervalStart = 0.0;\n        let currentSample = 1;\n        const lastSample = kSplineTableSize - 1;\n        for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n            intervalStart += kSampleStepSize;\n        }\n        --currentSample;\n        const dist = (aX - sampleValues[currentSample]) /\n            (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n        const guessForT = intervalStart + dist * kSampleStepSize;\n        const initialSlope = getSlope(guessForT, mX1, mX2);\n        if (initialSlope >= newtonMinSlope) {\n            return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n        }\n        else if (initialSlope === 0.0) {\n            return guessForT;\n        }\n        else {\n            return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n        }\n    }\n    return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { __read } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\n\nvar easingLookup = {\n    linear: linear,\n    easeIn: easeIn,\n    easeInOut: easeInOut,\n    easeOut: easeOut,\n    circIn: circIn,\n    circInOut: circInOut,\n    circOut: circOut,\n    backIn: backIn,\n    backInOut: backInOut,\n    backOut: backOut,\n    anticipate: anticipate,\n    bounceIn: bounceIn,\n    bounceInOut: bounceInOut,\n    bounceOut: bounceOut,\n};\nvar easingDefinitionToFunction = function (definition) {\n    if (Array.isArray(definition)) {\n        // If cubic bezier definition, create bezier curve\n        invariant(definition.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n        var _a = __read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];\n        return cubicBezier(x1, y1, x2, y2);\n    }\n    else if (typeof definition === \"string\") {\n        // Else lookup from table\n        invariant(easingLookup[definition] !== undefined, \"Invalid easing type '\".concat(definition, \"'\"));\n        return easingLookup[definition];\n    }\n    return definition;\n};\nvar isEasingArray = function (ease) {\n    return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { easingDefinitionToFunction, isEasingArray };\n","import { complex } from 'style-value-types';\n\n/**\n * Check if a value is animatable. Examples:\n *\n * ✅: 100, \"100px\", \"#fff\"\n * ❌: \"block\", \"url(2.jpg)\"\n * @param value\n *\n * @internal\n */\nvar isAnimatable = function (key, value) {\n    // If the list of keys tat might be non-animatable grows, replace with Set\n    if (key === \"zIndex\")\n        return false;\n    // If it's a number or a keyframes array, we can animate it. We might at some point\n    // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,\n    // but for now lets leave it like this for performance reasons\n    if (typeof value === \"number\" || Array.isArray(value))\n        return true;\n    if (typeof value === \"string\" && // It's animatable if we have a string\n        complex.test(value) && // And it contains numbers and/or colors\n        !value.startsWith(\"url(\") // Unless it starts with \"url(\"\n    ) {\n        return true;\n    }\n    return false;\n};\n\nexport { isAnimatable };\n","var isKeyframesTarget = function (v) {\n    return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","import { __assign } from 'tslib';\nimport { isKeyframesTarget } from './is-keyframes-target.mjs';\n\nvar underDampedSpring = function () { return ({\n    type: \"spring\",\n    stiffness: 500,\n    damping: 25,\n    restSpeed: 10,\n}); };\nvar criticallyDampedSpring = function (to) { return ({\n    type: \"spring\",\n    stiffness: 550,\n    damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n    restSpeed: 10,\n}); };\nvar linearTween = function () { return ({\n    type: \"keyframes\",\n    ease: \"linear\",\n    duration: 0.3,\n}); };\nvar keyframes = function (values) { return ({\n    type: \"keyframes\",\n    duration: 0.8,\n    values: values,\n}); };\nvar defaultTransitions = {\n    x: underDampedSpring,\n    y: underDampedSpring,\n    z: underDampedSpring,\n    rotate: underDampedSpring,\n    rotateX: underDampedSpring,\n    rotateY: underDampedSpring,\n    rotateZ: underDampedSpring,\n    scaleX: criticallyDampedSpring,\n    scaleY: criticallyDampedSpring,\n    scale: criticallyDampedSpring,\n    opacity: linearTween,\n    backgroundColor: linearTween,\n    color: linearTween,\n    default: criticallyDampedSpring,\n};\nvar getDefaultTransition = function (valueKey, to) {\n    var transitionFactory;\n    if (isKeyframesTarget(to)) {\n        transitionFactory = keyframes;\n    }\n    else {\n        transitionFactory =\n            defaultTransitions[valueKey] || defaultTransitions.default;\n    }\n    return __assign({ to: to }, transitionFactory(to));\n};\n\nexport { criticallyDampedSpring, getDefaultTransition, linearTween, underDampedSpring };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.mjs';\n\nconst maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);\nfunction applyDefaultFilter(v) {\n    let [name, value] = v.slice(0, -1).split('(');\n    if (name === 'drop-shadow')\n        return v;\n    const [number] = value.match(floatRegex) || [];\n    if (!number)\n        return v;\n    const unit = value.replace(number, '');\n    let defaultValue = maxDefaults.has(name) ? 1 : 0;\n    if (number !== value)\n        defaultValue *= 100;\n    return name + '(' + defaultValue + unit + ')';\n}\nconst functionRegex = /([a-z-]*)\\(.*?\\)/g;\nconst filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v) => {\n        const functions = v.match(functionRegex);\n        return functions ? functions.map(applyDefaultFilter).join(' ') : v;\n    } });\n\nexport { filter };\n","import { __assign } from 'tslib';\nimport { number } from 'style-value-types';\n\nvar int = __assign(__assign({}, number), { transform: Math.round });\n\nexport { int };\n","import { px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { int } from './type-int.mjs';\n\nvar numberValueTypes = {\n    // Border props\n    borderWidth: px,\n    borderTopWidth: px,\n    borderRightWidth: px,\n    borderBottomWidth: px,\n    borderLeftWidth: px,\n    borderRadius: px,\n    radius: px,\n    borderTopLeftRadius: px,\n    borderTopRightRadius: px,\n    borderBottomRightRadius: px,\n    borderBottomLeftRadius: px,\n    // Positioning props\n    width: px,\n    maxWidth: px,\n    height: px,\n    maxHeight: px,\n    size: px,\n    top: px,\n    right: px,\n    bottom: px,\n    left: px,\n    // Spacing props\n    padding: px,\n    paddingTop: px,\n    paddingRight: px,\n    paddingBottom: px,\n    paddingLeft: px,\n    margin: px,\n    marginTop: px,\n    marginRight: px,\n    marginBottom: px,\n    marginLeft: px,\n    // Transform props\n    rotate: degrees,\n    rotateX: degrees,\n    rotateY: degrees,\n    rotateZ: degrees,\n    scale: scale,\n    scaleX: scale,\n    scaleY: scale,\n    scaleZ: scale,\n    skew: degrees,\n    skewX: degrees,\n    skewY: degrees,\n    distance: px,\n    translateX: px,\n    translateY: px,\n    translateZ: px,\n    x: px,\n    y: px,\n    z: px,\n    perspective: px,\n    transformPerspective: px,\n    opacity: alpha,\n    originX: progressPercentage,\n    originY: progressPercentage,\n    originZ: px,\n    // Misc\n    zIndex: int,\n    // SVG\n    fillOpacity: alpha,\n    strokeOpacity: alpha,\n    numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { __assign } from 'tslib';\nimport { color, filter } from 'style-value-types';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nvar defaultValueTypes = __assign(__assign({}, numberValueTypes), { \n    // Color props\n    color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, \n    // Border props\n    borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter });\n/**\n * Gets the default ValueType for the provided value key\n */\nvar getDefaultValueType = function (key) { return defaultValueTypes[key]; };\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { filter, complex } from 'style-value-types';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n    var _a;\n    var defaultValueType = getDefaultValueType(key);\n    if (defaultValueType !== filter)\n        defaultValueType = complex;\n    // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n    return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);\n}\n\nexport { getAnimatableNone };\n","var instantAnimationState = {\n    current: false,\n};\n\nexport { instantAnimationState };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nvar isCustomValue = function (v) {\n    return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nvar resolveFinalValueInKeyframes = function (v) {\n    // TODO maybe throw if v.length - 1 is placeholder token?\n    return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","import { __assign, __rest, __spreadArray, __read } from 'tslib';\nimport { inertia, animate } from 'popmotion';\nimport { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { isEasingArray, easingDefinitionToFunction } from './easing.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\nimport { getDefaultTransition } from './default-transitions.mjs';\nimport { warning } from 'hey-listen';\nimport { getAnimatableNone } from '../../render/dom/value-types/animatable-none.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\n\n/**\n * Decide whether a transition is defined on a given Transition.\n * This filters out orchestration options and returns true\n * if any options are left.\n */\nfunction isTransitionDefined(_a) {\n    _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, [\"when\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"repeat\", \"repeatType\", \"repeatDelay\", \"from\"]);\n    return !!Object.keys(transition).length;\n}\nvar legacyRepeatWarning = false;\n/**\n * Convert Framer Motion's Transition type into Popmotion-compatible options.\n */\nfunction convertTransitionToAnimationOptions(_a) {\n    var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, [\"ease\", \"times\", \"yoyo\", \"flip\", \"loop\"]);\n    var options = __assign({}, transition);\n    if (times)\n        options[\"offset\"] = times;\n    /**\n     * Convert any existing durations from seconds to milliseconds\n     */\n    if (transition.duration)\n        options[\"duration\"] = secondsToMilliseconds(transition.duration);\n    if (transition.repeatDelay)\n        options.repeatDelay = secondsToMilliseconds(transition.repeatDelay);\n    /**\n     * Map easing names to Popmotion's easing functions\n     */\n    if (ease) {\n        options[\"ease\"] = isEasingArray(ease)\n            ? ease.map(easingDefinitionToFunction)\n            : easingDefinitionToFunction(ease);\n    }\n    /**\n     * Support legacy transition API\n     */\n    if (transition.type === \"tween\")\n        options.type = \"keyframes\";\n    /**\n     * TODO: These options are officially removed from the API.\n     */\n    if (yoyo || loop || flip) {\n        warning(!legacyRepeatWarning, \"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.\");\n        legacyRepeatWarning = true;\n        if (yoyo) {\n            options.repeatType = \"reverse\";\n        }\n        else if (loop) {\n            options.repeatType = \"loop\";\n        }\n        else if (flip) {\n            options.repeatType = \"mirror\";\n        }\n        options.repeat = loop || yoyo || flip || transition.repeat;\n    }\n    /**\n     * TODO: Popmotion 9 has the ability to automatically detect whether to use\n     * a keyframes or spring animation, but does so by detecting velocity and other spring options.\n     * It'd be good to introduce a similar thing here.\n     */\n    if (transition.type !== \"spring\")\n        options.type = \"keyframes\";\n    return options;\n}\n/**\n * Get the delay for a value by checking Transition with decreasing specificity.\n */\nfunction getDelayFromTransition(transition, key) {\n    var _a, _b;\n    var valueTransition = getValueTransition(transition, key) || {};\n    return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0;\n}\nfunction hydrateKeyframes(options) {\n    if (Array.isArray(options.to) && options.to[0] === null) {\n        options.to = __spreadArray([], __read(options.to), false);\n        options.to[0] = options.from;\n    }\n    return options;\n}\nfunction getPopmotionAnimationOptions(transition, options, key) {\n    var _a;\n    if (Array.isArray(options.to)) {\n        (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8);\n    }\n    hydrateKeyframes(options);\n    /**\n     * Get a default transition if none is determined to be defined.\n     */\n    if (!isTransitionDefined(transition)) {\n        transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to));\n    }\n    return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition));\n}\n/**\n *\n */\nfunction getAnimation(key, value, target, transition, onComplete) {\n    var _a;\n    var valueTransition = getValueTransition(transition, key);\n    var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();\n    var isTargetAnimatable = isAnimatable(key, target);\n    if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\") {\n        /**\n         * If we're trying to animate from \"none\", try and get an animatable version\n         * of the target. This could be improved to work both ways.\n         */\n        origin = getAnimatableNone(key, target);\n    }\n    else if (isZero(origin) && typeof target === \"string\") {\n        origin = getZeroUnit(target);\n    }\n    else if (!Array.isArray(target) &&\n        isZero(target) &&\n        typeof origin === \"string\") {\n        target = getZeroUnit(origin);\n    }\n    var isOriginAnimatable = isAnimatable(key, origin);\n    warning(isOriginAnimatable === isTargetAnimatable, \"You are trying to animate \".concat(key, \" from \\\"\").concat(origin, \"\\\" to \\\"\").concat(target, \"\\\". \").concat(origin, \" is not an animatable value - to enable this animation set \").concat(origin, \" to a value animatable to \").concat(target, \" via the `style` property.\"));\n    function start() {\n        var options = {\n            from: origin,\n            to: target,\n            velocity: value.getVelocity(),\n            onComplete: onComplete,\n            onUpdate: function (v) { return value.set(v); },\n        };\n        return valueTransition.type === \"inertia\" ||\n            valueTransition.type === \"decay\"\n            ? inertia(__assign(__assign({}, options), valueTransition))\n            : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) {\n                    var _a;\n                    options.onUpdate(v);\n                    (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);\n                }, onComplete: function () {\n                    var _a;\n                    options.onComplete();\n                    (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);\n                } }));\n    }\n    function set() {\n        var _a, _b;\n        var finalTarget = resolveFinalValueInKeyframes(target);\n        value.set(finalTarget);\n        onComplete();\n        (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget);\n        (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition);\n        return { stop: function () { } };\n    }\n    return !isOriginAnimatable ||\n        !isTargetAnimatable ||\n        valueTransition.type === false\n        ? set\n        : start;\n}\nfunction isZero(value) {\n    return (value === 0 ||\n        (typeof value === \"string\" &&\n            parseFloat(value) === 0 &&\n            value.indexOf(\" \") === -1));\n}\nfunction getZeroUnit(potentialUnitType) {\n    return typeof potentialUnitType === \"number\"\n        ? 0\n        : getAnimatableNone(\"\", potentialUnitType);\n}\nfunction getValueTransition(transition, key) {\n    return transition[key] || transition[\"default\"] || transition;\n}\n/**\n * Start animation on a MotionValue. This function is an interface between\n * Framer Motion and Popmotion\n *\n * @internal\n */\nfunction startAnimation(key, value, target, transition) {\n    if (transition === void 0) { transition = {}; }\n    if (instantAnimationState.current) {\n        transition = { type: false };\n    }\n    return value.start(function (onComplete) {\n        var delayTimer;\n        var controls;\n        var animation = getAnimation(key, value, target, transition, onComplete);\n        var delay = getDelayFromTransition(transition, key);\n        var start = function () { return (controls = animation()); };\n        if (delay) {\n            delayTimer = window.setTimeout(start, secondsToMilliseconds(delay));\n        }\n        else {\n            start();\n        }\n        return function () {\n            clearTimeout(delayTimer);\n            controls === null || controls === void 0 ? void 0 : controls.stop();\n        };\n    });\n}\n\nexport { convertTransitionToAnimationOptions, getDelayFromTransition, getPopmotionAnimationOptions, getValueTransition, getZeroUnit, hydrateKeyframes, isTransitionDefined, isZero, startAnimation };\n","import { animate } from './index.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { getFrameData } from 'framesync';\n\nfunction inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant = 750, bounceStiffness = 500, bounceDamping = 10, restDelta = 1, modifyTarget, driver, onUpdate, onComplete, onStop, }) {\n    let currentAnimation;\n    function isOutOfBounds(v) {\n        return (min !== undefined && v < min) || (max !== undefined && v > max);\n    }\n    function boundaryNearest(v) {\n        if (min === undefined)\n            return max;\n        if (max === undefined)\n            return min;\n        return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n    }\n    function startAnimation(options) {\n        currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();\n        currentAnimation = animate(Object.assign(Object.assign({}, options), { driver, onUpdate: (v) => {\n                var _a;\n                onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);\n                (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);\n            }, onComplete,\n            onStop }));\n    }\n    function startSpring(options) {\n        startAnimation(Object.assign({ type: \"spring\", stiffness: bounceStiffness, damping: bounceDamping, restDelta }, options));\n    }\n    if (isOutOfBounds(from)) {\n        startSpring({ from, velocity, to: boundaryNearest(from) });\n    }\n    else {\n        let target = power * velocity + from;\n        if (typeof modifyTarget !== \"undefined\")\n            target = modifyTarget(target);\n        const boundary = boundaryNearest(target);\n        const heading = boundary === min ? -1 : 1;\n        let prev;\n        let current;\n        const checkBoundary = (v) => {\n            prev = current;\n            current = v;\n            velocity = velocityPerSecond(v - prev, getFrameData().delta);\n            if ((heading === 1 && v > boundary) ||\n                (heading === -1 && v < boundary)) {\n                startSpring({ from: v, to: boundary, velocity });\n            }\n        };\n        startAnimation({\n            type: \"decay\",\n            from,\n            velocity,\n            timeConstant,\n            power,\n            restDelta,\n            modifyTarget,\n            onUpdate: isOutOfBounds(target) ? checkBoundary : undefined,\n        });\n    }\n    return {\n        stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(),\n    };\n}\n\nexport { inertia };\n","import { mix, progress, linear, circOut } from 'popmotion';\nimport { px, percent } from 'style-value-types';\n\nvar borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nvar numBorders = borders.length;\nvar asNumber = function (value) {\n    return typeof value === \"string\" ? parseFloat(value) : value;\n};\nvar isPx = function (value) {\n    return typeof value === \"number\" || px.test(value);\n};\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n    var _a, _b, _c, _d;\n    if (shouldCrossfadeOpacity) {\n        target.opacity = mix(0, \n        // (follow?.opacity as number) ?? 0,\n        // TODO Reinstate this if only child\n        (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress));\n        target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress));\n    }\n    else if (isOnlyMember) {\n        target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress);\n    }\n    /**\n     * Mix border radius\n     */\n    for (var i = 0; i < numBorders; i++) {\n        var borderLabel = \"border\".concat(borders[i], \"Radius\");\n        var followRadius = getRadius(follow, borderLabel);\n        var leadRadius = getRadius(lead, borderLabel);\n        if (followRadius === undefined && leadRadius === undefined)\n            continue;\n        followRadius || (followRadius = 0);\n        leadRadius || (leadRadius = 0);\n        var canMix = followRadius === 0 ||\n            leadRadius === 0 ||\n            isPx(followRadius) === isPx(leadRadius);\n        if (canMix) {\n            target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n            if (percent.test(leadRadius) || percent.test(followRadius)) {\n                target[borderLabel] += \"%\";\n            }\n        }\n        else {\n            target[borderLabel] = leadRadius;\n        }\n    }\n    /**\n     * Mix rotation\n     */\n    if (follow.rotate || lead.rotate) {\n        target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress);\n    }\n}\nfunction getRadius(values, radiusName) {\n    var _a;\n    return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;\n}\n// /**\n//  * We only want to mix the background color if there's a follow element\n//  * that we're not crossfading opacity between. For instance with switch\n//  * AnimateSharedLayout animations, this helps the illusion of a continuous\n//  * element being animated but also cuts down on the number of paints triggered\n//  * for elements where opacity is doing that work for us.\n//  */\n// if (\n//     !hasFollowElement &&\n//     latestLeadValues.backgroundColor &&\n//     latestFollowValues.backgroundColor\n// ) {\n//     /**\n//      * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n//      * We could probably create a mixer that runs at the start of the animation but\n//      * the idea behind the crossfader is that it runs dynamically between two potentially\n//      * changing targets (ie opacity or borderRadius may be animating independently via variants)\n//      */\n//     leadState.backgroundColor = followState.backgroundColor = mixColor(\n//         latestFollowValues.backgroundColor as string,\n//         latestLeadValues.backgroundColor as string\n//     )(p)\n// }\nvar easeCrossfadeIn = compress(0, 0.5, circOut);\nvar easeCrossfadeOut = compress(0.5, 0.95, linear);\nfunction compress(min, max, easing) {\n    return function (p) {\n        // Could replace ifs with clamp\n        if (p < min)\n            return 0;\n        if (p > max)\n            return 1;\n        return easing(progress(min, max, p));\n    };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n    axis.min = originAxis.min;\n    axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n    copyAxisInto(box.x, originBox.x);\n    copyAxisInto(box.y, originBox.y);\n}\n\nexport { copyAxisInto, copyBoxInto };\n","function isIdentityScale(scale) {\n    return scale === undefined || scale === 1;\n}\nfunction hasScale(_a) {\n    var scale = _a.scale, scaleX = _a.scaleX, scaleY = _a.scaleY;\n    return (!isIdentityScale(scale) ||\n        !isIdentityScale(scaleX) ||\n        !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n    return (hasScale(values) ||\n        hasTranslate(values.x) ||\n        hasTranslate(values.y) ||\n        values.z ||\n        values.rotate ||\n        values.rotateX ||\n        values.rotateY);\n}\nfunction hasTranslate(value) {\n    return value && value !== \"0%\";\n}\n\nexport { hasScale, hasTransform };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n    var distanceFromOrigin = point - originPoint;\n    var scaled = scale * distanceFromOrigin;\n    return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n    if (boxScale !== undefined) {\n        point = scalePoint(point, boxScale, originPoint);\n    }\n    return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate, scale, originPoint, boxScale) {\n    if (translate === void 0) { translate = 0; }\n    if (scale === void 0) { scale = 1; }\n    axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n    axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, _a) {\n    var x = _a.x, y = _a.y;\n    applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n    applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition) {\n    var _a, _b;\n    if (isSharedTransition === void 0) { isSharedTransition = false; }\n    var treeLength = treePath.length;\n    if (!treeLength)\n        return;\n    // Reset the treeScale\n    treeScale.x = treeScale.y = 1;\n    var node;\n    var delta;\n    for (var i = 0; i < treeLength; i++) {\n        node = treePath[i];\n        delta = node.projectionDelta;\n        if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === \"contents\")\n            continue;\n        if (isSharedTransition &&\n            node.options.layoutScroll &&\n            node.scroll &&\n            node !== node.root) {\n            transformBox(box, { x: -node.scroll.x, y: -node.scroll.y });\n        }\n        if (delta) {\n            // Incoporate each ancestor's scale into a culmulative treeScale for this component\n            treeScale.x *= delta.x.scale;\n            treeScale.y *= delta.y.scale;\n            // Apply each ancestor's calculated delta into this component's recorded layout box\n            applyBoxDelta(box, delta);\n        }\n        if (isSharedTransition && hasTransform(node.latestValues)) {\n            transformBox(box, node.latestValues);\n        }\n    }\n}\nfunction translateAxis(axis, distance) {\n    axis.min = axis.min + distance;\n    axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, transforms, _a) {\n    var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n    var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;\n    var originPoint = mix(axis.min, axis.max, axisOrigin);\n    // Apply the axis delta to the final axis\n    applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n    transformAxis(box.x, transform, xKeys);\n    transformAxis(box.y, transform, yKeys);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\n","const isPoint = (point) => point.hasOwnProperty('x') && point.hasOwnProperty('y');\n\nexport { isPoint };\n","import { isPoint } from './is-point.mjs';\n\nconst isPoint3D = (point) => isPoint(point) && point.hasOwnProperty('z');\n\nexport { isPoint3D };\n","import { isPoint } from './is-point.mjs';\nimport { isPoint3D } from './is-point-3d.mjs';\nimport { isNum } from './inc.mjs';\n\nconst distance1D = (a, b) => Math.abs(a - b);\nfunction distance(a, b) {\n    if (isNum(a) && isNum(b)) {\n        return distance1D(a, b);\n    }\n    else if (isPoint(a) && isPoint(b)) {\n        const xDelta = distance1D(a.x, b.x);\n        const yDelta = distance1D(a.y, b.y);\n        const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n        return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n    }\n}\n\nexport { distance };\n","import { mix, distance } from 'popmotion';\n\nfunction calcLength(axis) {\n    return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n    if (target === void 0) { target = 0; }\n    if (maxDistance === void 0) { maxDistance = 0.01; }\n    return distance(value, target) < maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin) {\n    if (origin === void 0) { origin = 0.5; }\n    delta.origin = origin;\n    delta.originPoint = mix(source.min, source.max, delta.origin);\n    delta.scale = calcLength(target) / calcLength(source);\n    if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale))\n        delta.scale = 1;\n    delta.translate =\n        mix(target.min, target.max, delta.origin) - delta.originPoint;\n    if (isNear(delta.translate) || isNaN(delta.translate))\n        delta.translate = 0;\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n    calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX);\n    calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n    target.min = parent.min + relative.min;\n    target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n    calcRelativeAxis(target.x, relative.x, parent.x);\n    calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n    target.min = layout.min - parent.min;\n    target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n    calcRelativeAxisPosition(target.x, layout.x, parent.x);\n    calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { __read } from 'tslib';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n    point -= translate;\n    point = scalePoint(point, 1 / scale, originPoint);\n    if (boxScale !== undefined) {\n        point = scalePoint(point, 1 / boxScale, originPoint);\n    }\n    return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) {\n    if (translate === void 0) { translate = 0; }\n    if (scale === void 0) { scale = 1; }\n    if (origin === void 0) { origin = 0.5; }\n    if (originAxis === void 0) { originAxis = axis; }\n    if (sourceAxis === void 0) { sourceAxis = axis; }\n    if (percent.test(translate)) {\n        translate = parseFloat(translate);\n        var relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);\n        translate = relativeProgress - sourceAxis.min;\n    }\n    if (typeof translate !== \"number\")\n        return;\n    var originPoint = mix(originAxis.min, originAxis.max, origin);\n    if (axis === originAxis)\n        originPoint -= translate;\n    axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n    axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) {\n    var _b = __read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];\n    removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nvar xKeys = [\"x\", \"scaleX\", \"originX\"];\nvar yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n    removeAxisTransforms(box.x, transforms, xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x);\n    removeAxisTransforms(box.y, transforms, yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","function isAxisDeltaZero(delta) {\n    return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n    return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction boxEquals(a, b) {\n    return (a.x.min === b.x.min &&\n        a.x.max === b.x.max &&\n        a.y.min === b.y.min &&\n        a.y.max === b.y.max);\n}\n\nexport { boxEquals, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nvar NodeStack = /** @class */ (function () {\n    function NodeStack() {\n        this.members = [];\n    }\n    NodeStack.prototype.add = function (node) {\n        addUniqueItem(this.members, node);\n        node.scheduleRender();\n    };\n    NodeStack.prototype.remove = function (node) {\n        removeItem(this.members, node);\n        if (node === this.prevLead) {\n            this.prevLead = undefined;\n        }\n        if (node === this.lead) {\n            var prevLead = this.members[this.members.length - 1];\n            if (prevLead) {\n                this.promote(prevLead);\n            }\n        }\n    };\n    NodeStack.prototype.relegate = function (node) {\n        var indexOfNode = this.members.findIndex(function (member) { return node === member; });\n        if (indexOfNode === 0)\n            return false;\n        /**\n         * Find the next projection node that is present\n         */\n        var prevLead;\n        for (var i = indexOfNode; i >= 0; i--) {\n            var member = this.members[i];\n            if (member.isPresent !== false) {\n                prevLead = member;\n                break;\n            }\n        }\n        if (prevLead) {\n            this.promote(prevLead);\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    NodeStack.prototype.promote = function (node, preserveFollowOpacity) {\n        var _a;\n        var prevLead = this.lead;\n        if (node === prevLead)\n            return;\n        this.prevLead = prevLead;\n        this.lead = node;\n        node.show();\n        if (prevLead) {\n            prevLead.instance && prevLead.scheduleRender();\n            node.scheduleRender();\n            node.resumeFrom = prevLead;\n            if (preserveFollowOpacity) {\n                node.resumeFrom.preserveOpacity = true;\n            }\n            if (prevLead.snapshot) {\n                node.snapshot = prevLead.snapshot;\n                node.snapshot.latestValues =\n                    prevLead.animationValues || prevLead.latestValues;\n                node.snapshot.isShared = true;\n            }\n            if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) {\n                node.isLayoutDirty = true;\n            }\n            var crossfade = node.options.crossfade;\n            if (crossfade === false) {\n                prevLead.hide();\n            }\n            /**\n             * TODO:\n             *   - Test border radius when previous node was deleted\n             *   - boxShadow mixing\n             *   - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n             *   - Shared between element A in transformed container and element B (transform stays the same or changes)\n             *   - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n             * ---\n             *   - Crossfade opacity of root nodes\n             *   - layoutId changes after animation\n             *   - layoutId changes mid animation\n             */\n        }\n    };\n    NodeStack.prototype.exitAnimationComplete = function () {\n        this.members.forEach(function (node) {\n            var _a, _b, _c, _d, _e;\n            (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n            (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d);\n        });\n    };\n    NodeStack.prototype.scheduleRender = function () {\n        this.members.forEach(function (node) {\n            node.instance && node.scheduleRender(false);\n        });\n    };\n    /**\n     * Clear any leads that have been removed this render to prevent them from being\n     * used in future animations and to prevent memory leaks\n     */\n    NodeStack.prototype.removeLeadSnapshot = function () {\n        if (this.lead && this.lead.snapshot) {\n            this.lead.snapshot = undefined;\n        }\n    };\n    return NodeStack;\n}());\n\nexport { NodeStack };\n","var scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n    Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","var identityProjection = \"translate3d(0px, 0px, 0) scale(1, 1)\";\nfunction buildProjectionTransform(delta, treeScale, latestTransform) {\n    /**\n     * The translations we use to calculate are always relative to the viewport coordinate space.\n     * But when we apply scales, we also scale the coordinate space of an element and its children.\n     * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n     * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n     */\n    var xTranslate = delta.x.translate / treeScale.x;\n    var yTranslate = delta.y.translate / treeScale.y;\n    var transform = \"translate3d(\".concat(xTranslate, \"px, \").concat(yTranslate, \"px, 0) \");\n    if (latestTransform) {\n        var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;\n        if (rotate)\n            transform += \"rotate(\".concat(rotate, \"deg) \");\n        if (rotateX)\n            transform += \"rotateX(\".concat(rotateX, \"deg) \");\n        if (rotateY)\n            transform += \"rotateY(\".concat(rotateY, \"deg) \");\n    }\n    transform += \"scale(\".concat(delta.x.scale, \", \").concat(delta.y.scale, \")\");\n    return transform === identityProjection ? \"none\" : transform;\n}\n\nexport { buildProjectionTransform, identityProjection };\n","function eachAxis(callback) {\n    return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\n","/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nvar transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nvar order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\n/**\n * Generate a list of every possible transform key.\n */\nvar transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach(function (operationKey) {\n    return transformAxes.forEach(function (axesKey) {\n        return transformProps.push(operationKey + axesKey);\n    });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nfunction sortTransformProps(a, b) {\n    return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\n/**\n * A quick lookup for transform props.\n */\nvar transformPropSet = new Set(transformProps);\nfunction isTransformProp(key) {\n    return transformPropSet.has(key);\n}\n/**\n * A quick lookup for transform origin props\n */\nvar transformOriginProps = new Set([\"originX\", \"originY\", \"originZ\"]);\nfunction isTransformOriginProp(key) {\n    return transformOriginProps.has(key);\n}\n\nexport { isTransformOriginProp, isTransformProp, sortTransformProps, transformAxes, transformProps };\n","var compareByDepth = function (a, b) {\n    return a.depth - b.depth;\n};\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nvar FlatTree = /** @class */ (function () {\n    function FlatTree() {\n        this.children = [];\n        this.isDirty = false;\n    }\n    FlatTree.prototype.add = function (child) {\n        addUniqueItem(this.children, child);\n        this.isDirty = true;\n    };\n    FlatTree.prototype.remove = function (child) {\n        removeItem(this.children, child);\n        this.isDirty = true;\n    };\n    FlatTree.prototype.forEach = function (callback) {\n        this.isDirty && this.children.sort(compareByDepth);\n        this.isDirty = false;\n        this.children.forEach(callback);\n    };\n    return FlatTree;\n}());\n\nexport { FlatTree };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n *\n * @internal\n */\nfunction resolveMotionValue(value) {\n    var unwrappedValue = isMotionValue(value) ? value.get() : value;\n    return isCustomValue(unwrappedValue)\n        ? unwrappedValue.toValue()\n        : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { __spreadArray, __read, __assign } from 'tslib';\nimport sync, { cancelSync, flushSync } from 'framesync';\nimport { mix } from 'popmotion';\nimport { animate } from '../../animation/animate.mjs';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEquals, isDeltaZero } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale } from '../utils/has-transform.mjs';\nimport { transformAxes } from '../../render/html/utils/transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\n\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nvar animationTarget = 1000;\n/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nvar globalProjectionState = {\n    /**\n     * Global flag as to whether the tree has animated since the last time\n     * we resized the window\n     */\n    hasAnimatedSinceResize: true,\n    /**\n     * We set this to true once, on the first update. Any nodes added to the tree beyond that\n     * update will be given a `data-projection-id` attribute.\n     */\n    hasEverUpdated: false,\n};\nfunction createProjectionNode(_a) {\n    var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, resetTransform = _a.resetTransform;\n    return /** @class */ (function () {\n        function ProjectionNode(id, latestValues, parent) {\n            var _this = this;\n            if (latestValues === void 0) { latestValues = {}; }\n            if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); }\n            /**\n             * A Set containing all this component's children. This is used to iterate\n             * through the children.\n             *\n             * TODO: This could be faster to iterate as a flat array stored on the root node.\n             */\n            this.children = new Set();\n            /**\n             * Options for the node. We use this to configure what kind of layout animations\n             * we should perform (if any).\n             */\n            this.options = {};\n            /**\n             * We use this to detect when its safe to shut down part of a projection tree.\n             * We have to keep projecting children for scale correction and relative projection\n             * until all their parents stop performing layout animations.\n             */\n            this.isTreeAnimating = false;\n            this.isAnimationBlocked = false;\n            /**\n             * Flag to true if we think this layout has been changed. We can't always know this,\n             * currently we set it to true every time a component renders, or if it has a layoutDependency\n             * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n             * and if one node is dirtied, they all are.\n             */\n            this.isLayoutDirty = false;\n            /**\n             * Block layout updates for instant layout transitions throughout the tree.\n             */\n            this.updateManuallyBlocked = false;\n            this.updateBlockedByResize = false;\n            /**\n             * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n             * call.\n             */\n            this.isUpdating = false;\n            /**\n             * If this is an SVG element we currently disable projection transforms\n             */\n            this.isSVG = false;\n            /**\n             * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n             * its projection styles.\n             */\n            this.needsReset = false;\n            /**\n             * Flags whether this node should have its transform reset prior to measuring.\n             */\n            this.shouldResetTransform = false;\n            /**\n             * An object representing the calculated contextual/accumulated/tree scale.\n             * This will be used to scale calculcated projection transforms, as these are\n             * calculated in screen-space but need to be scaled for elements to actually\n             * make it to their calculated destinations.\n             *\n             * TODO: Lazy-init\n             */\n            this.treeScale = { x: 1, y: 1 };\n            /**\n             *\n             */\n            this.eventHandlers = new Map();\n            // Note: Currently only running on root node\n            this.potentialNodes = new Map();\n            this.checkUpdateFailed = function () {\n                if (_this.isUpdating) {\n                    _this.isUpdating = false;\n                    _this.clearAllSnapshots();\n                }\n            };\n            this.updateProjection = function () {\n                _this.nodes.forEach(resolveTargetDelta);\n                _this.nodes.forEach(calcProjection);\n            };\n            this.hasProjected = false;\n            this.isVisible = true;\n            this.animationProgress = 0;\n            /**\n             * Shared layout\n             */\n            // TODO Only running on root node\n            this.sharedNodes = new Map();\n            this.id = id;\n            this.latestValues = latestValues;\n            this.root = parent ? parent.root || parent : this;\n            this.path = parent ? __spreadArray(__spreadArray([], __read(parent.path), false), [parent], false) : [];\n            this.parent = parent;\n            this.depth = parent ? parent.depth + 1 : 0;\n            id && this.root.registerPotentialNode(id, this);\n            for (var i = 0; i < this.path.length; i++) {\n                this.path[i].shouldResetTransform = true;\n            }\n            if (this.root === this)\n                this.nodes = new FlatTree();\n        }\n        ProjectionNode.prototype.addEventListener = function (name, handler) {\n            if (!this.eventHandlers.has(name)) {\n                this.eventHandlers.set(name, new SubscriptionManager());\n            }\n            return this.eventHandlers.get(name).add(handler);\n        };\n        ProjectionNode.prototype.notifyListeners = function (name) {\n            var args = [];\n            for (var _i = 1; _i < arguments.length; _i++) {\n                args[_i - 1] = arguments[_i];\n            }\n            var subscriptionManager = this.eventHandlers.get(name);\n            subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, __spreadArray([], __read(args), false));\n        };\n        ProjectionNode.prototype.hasListeners = function (name) {\n            return this.eventHandlers.has(name);\n        };\n        ProjectionNode.prototype.registerPotentialNode = function (id, node) {\n            this.potentialNodes.set(id, node);\n        };\n        /**\n         * Lifecycles\n         */\n        ProjectionNode.prototype.mount = function (instance, isLayoutDirty) {\n            var _this = this;\n            var _a;\n            if (isLayoutDirty === void 0) { isLayoutDirty = false; }\n            if (this.instance)\n                return;\n            this.isSVG =\n                instance instanceof SVGElement && instance.tagName !== \"svg\";\n            this.instance = instance;\n            var _b = this.options, layoutId = _b.layoutId, layout = _b.layout, visualElement = _b.visualElement;\n            if (visualElement && !visualElement.getInstance()) {\n                visualElement.mount(instance);\n            }\n            this.root.nodes.add(this);\n            (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this);\n            this.id && this.root.potentialNodes.delete(this.id);\n            if (isLayoutDirty && (layout || layoutId)) {\n                this.isLayoutDirty = true;\n            }\n            if (attachResizeListener) {\n                var unblockTimeout_1;\n                var resizeUnblockUpdate_1 = function () {\n                    return (_this.root.updateBlockedByResize = false);\n                };\n                attachResizeListener(instance, function () {\n                    _this.root.updateBlockedByResize = true;\n                    clearTimeout(unblockTimeout_1);\n                    unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250);\n                    if (globalProjectionState.hasAnimatedSinceResize) {\n                        globalProjectionState.hasAnimatedSinceResize = false;\n                        _this.nodes.forEach(finishAnimation);\n                    }\n                });\n            }\n            if (layoutId) {\n                this.root.registerSharedNode(layoutId, this);\n            }\n            // Only register the handler if it requires layout animation\n            if (this.options.animate !== false &&\n                visualElement &&\n                (layoutId || layout)) {\n                this.addEventListener(\"didUpdate\", function (_a) {\n                    var _b, _c, _d, _e, _f;\n                    var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged, hasRelativeTargetChanged = _a.hasRelativeTargetChanged, newLayout = _a.layout;\n                    if (_this.isTreeAnimationBlocked()) {\n                        _this.target = undefined;\n                        _this.relativeTarget = undefined;\n                        return;\n                    }\n                    // TODO: Check here if an animation exists\n                    var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition;\n                    var onLayoutAnimationComplete = visualElement.getProps().onLayoutAnimationComplete;\n                    /**\n                     * The target layout of the element might stay the same,\n                     * but its position relative to its parent has changed.\n                     */\n                    var targetChanged = !_this.targetLayout ||\n                        !boxEquals(_this.targetLayout, newLayout) ||\n                        hasRelativeTargetChanged;\n                    /**\n                     * If the layout hasn't seemed to have changed, it might be that the\n                     * element is visually in the same place in the document but its position\n                     * relative to its parent has indeed changed. So here we check for that.\n                     */\n                    var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n                    if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) ||\n                        hasOnlyRelativeTargetChanged ||\n                        (hasLayoutChanged &&\n                            (targetChanged || !_this.currentAnimation))) {\n                        if (_this.resumeFrom) {\n                            _this.resumingFrom = _this.resumeFrom;\n                            _this.resumingFrom.resumingFrom = undefined;\n                        }\n                        _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n                        var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, \"layout\")), { onComplete: onLayoutAnimationComplete });\n                        if (visualElement.shouldReduceMotion) {\n                            animationOptions.delay = 0;\n                            animationOptions.type = false;\n                        }\n                        _this.startAnimation(animationOptions);\n                    }\n                    else {\n                        /**\n                         * If the layout hasn't changed and we have an animation that hasn't started yet,\n                         * finish it immediately. Otherwise it will be animating from a location\n                         * that was probably never commited to screen and look like a jumpy box.\n                         */\n                        if (!hasLayoutChanged &&\n                            _this.animationProgress === 0) {\n                            _this.finishAnimation();\n                        }\n                        _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e));\n                    }\n                    _this.targetLayout = newLayout;\n                });\n            }\n        };\n        ProjectionNode.prototype.unmount = function () {\n            var _a, _b;\n            this.options.layoutId && this.willUpdate();\n            this.root.nodes.remove(this);\n            (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this);\n            (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this);\n            this.instance = undefined;\n            cancelSync.preRender(this.updateProjection);\n        };\n        // only on the root\n        ProjectionNode.prototype.blockUpdate = function () {\n            this.updateManuallyBlocked = true;\n        };\n        ProjectionNode.prototype.unblockUpdate = function () {\n            this.updateManuallyBlocked = false;\n        };\n        ProjectionNode.prototype.isUpdateBlocked = function () {\n            return this.updateManuallyBlocked || this.updateBlockedByResize;\n        };\n        ProjectionNode.prototype.isTreeAnimationBlocked = function () {\n            var _a;\n            return (this.isAnimationBlocked ||\n                ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) ||\n                false);\n        };\n        // Note: currently only running on root node\n        ProjectionNode.prototype.startUpdate = function () {\n            var _a;\n            if (this.isUpdateBlocked())\n                return;\n            this.isUpdating = true;\n            (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation);\n        };\n        ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) {\n            var _a, _b, _c;\n            if (shouldNotifyListeners === void 0) { shouldNotifyListeners = true; }\n            if (this.root.isUpdateBlocked()) {\n                (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a);\n                return;\n            }\n            !this.root.isUpdating && this.root.startUpdate();\n            if (this.isLayoutDirty)\n                return;\n            this.isLayoutDirty = true;\n            for (var i = 0; i < this.path.length; i++) {\n                var node = this.path[i];\n                node.shouldResetTransform = true;\n                /**\n                 * TODO: Check we haven't updated the scroll\n                 * since the last didUpdate\n                 */\n                node.updateScroll();\n            }\n            var _d = this.options, layoutId = _d.layoutId, layout = _d.layout;\n            if (layoutId === undefined && !layout)\n                return;\n            var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate;\n            this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n            this.updateSnapshot();\n            shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n        };\n        // Note: Currently only running on root node\n        ProjectionNode.prototype.didUpdate = function () {\n            var updateWasBlocked = this.isUpdateBlocked();\n            // When doing an instant transition, we skip the layout update,\n            // but should still clean up the measurements so that the next\n            // snapshot could be taken correctly.\n            if (updateWasBlocked) {\n                this.unblockUpdate();\n                this.clearAllSnapshots();\n                this.nodes.forEach(clearMeasurements);\n                return;\n            }\n            if (!this.isUpdating)\n                return;\n            this.isUpdating = false;\n            /**\n             * Search for and mount newly-added projection elements.\n             *\n             * TODO: Every time a new component is rendered we could search up the tree for\n             * the closest mounted node and query from there rather than document.\n             */\n            if (this.potentialNodes.size) {\n                this.potentialNodes.forEach(mountNodeEarly);\n                this.potentialNodes.clear();\n            }\n            /**\n             * Write\n             */\n            this.nodes.forEach(resetTransformStyle);\n            /**\n             * Read ==================\n             */\n            // Update layout measurements of updated children\n            this.nodes.forEach(updateLayout);\n            /**\n             * Write\n             */\n            // Notify listeners that the layout is updated\n            this.nodes.forEach(notifyLayoutUpdate);\n            this.clearAllSnapshots();\n            // Flush any scheduled updates\n            flushSync.update();\n            flushSync.preRender();\n            flushSync.render();\n        };\n        ProjectionNode.prototype.clearAllSnapshots = function () {\n            this.nodes.forEach(clearSnapshot);\n            this.sharedNodes.forEach(removeLeadSnapshots);\n        };\n        ProjectionNode.prototype.scheduleUpdateProjection = function () {\n            sync.preRender(this.updateProjection, false, true);\n        };\n        ProjectionNode.prototype.scheduleCheckAfterUnmount = function () {\n            var _this = this;\n            /**\n             * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n             * we manually call didUpdate to give a chance to the siblings to animate.\n             * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n             */\n            sync.postRender(function () {\n                if (_this.isLayoutDirty) {\n                    _this.root.didUpdate();\n                }\n                else {\n                    _this.root.checkUpdateFailed();\n                }\n            });\n        };\n        /**\n         * Update measurements\n         */\n        ProjectionNode.prototype.updateSnapshot = function () {\n            if (this.snapshot || !this.instance)\n                return;\n            var measured = this.measure();\n            var layout = this.removeTransform(this.removeElementScroll(measured));\n            roundBox(layout);\n            this.snapshot = {\n                measured: measured,\n                layout: layout,\n                latestValues: {},\n            };\n        };\n        ProjectionNode.prototype.updateLayout = function () {\n            var _a;\n            if (!this.instance)\n                return;\n            // TODO: Incorporate into a forwarded scroll offset\n            this.updateScroll();\n            if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n                !this.isLayoutDirty) {\n                return;\n            }\n            /**\n             * When a node is mounted, it simply resumes from the prevLead's\n             * snapshot instead of taking a new one, but the ancestors scroll\n             * might have updated while the prevLead is unmounted. We need to\n             * update the scroll again to make sure the layout we measure is\n             * up to date.\n             */\n            if (this.resumeFrom && !this.resumeFrom.instance) {\n                for (var i = 0; i < this.path.length; i++) {\n                    var node = this.path[i];\n                    node.updateScroll();\n                }\n            }\n            var measured = this.measure();\n            roundBox(measured);\n            var prevLayout = this.layout;\n            this.layout = {\n                measured: measured,\n                actual: this.removeElementScroll(measured),\n            };\n            this.layoutCorrected = createBox();\n            this.isLayoutDirty = false;\n            this.projectionDelta = undefined;\n            this.notifyListeners(\"measure\", this.layout.actual);\n            (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual);\n        };\n        ProjectionNode.prototype.updateScroll = function () {\n            if (this.options.layoutScroll && this.instance) {\n                this.scroll = measureScroll(this.instance);\n            }\n        };\n        ProjectionNode.prototype.resetTransform = function () {\n            var _a;\n            if (!resetTransform)\n                return;\n            var isResetRequested = this.isLayoutDirty || this.shouldResetTransform;\n            var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n            var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n            var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, \"\");\n            var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n            if (isResetRequested &&\n                (hasProjection ||\n                    hasTransform(this.latestValues) ||\n                    transformTemplateHasChanged)) {\n                resetTransform(this.instance, transformTemplateValue);\n                this.shouldResetTransform = false;\n                this.scheduleRender();\n            }\n        };\n        ProjectionNode.prototype.measure = function () {\n            var visualElement = this.options.visualElement;\n            if (!visualElement)\n                return createBox();\n            var box = visualElement.measureViewportBox();\n            // Remove viewport scroll to give page-relative coordinates\n            var scroll = this.root.scroll;\n            if (scroll) {\n                translateAxis(box.x, scroll.x);\n                translateAxis(box.y, scroll.y);\n            }\n            return box;\n        };\n        ProjectionNode.prototype.removeElementScroll = function (box) {\n            var boxWithoutScroll = createBox();\n            copyBoxInto(boxWithoutScroll, box);\n            /**\n             * Performance TODO: Keep a cumulative scroll offset down the tree\n             * rather than loop back up the path.\n             */\n            for (var i = 0; i < this.path.length; i++) {\n                var node = this.path[i];\n                var scroll_1 = node.scroll, options = node.options;\n                if (node !== this.root && scroll_1 && options.layoutScroll) {\n                    translateAxis(boxWithoutScroll.x, scroll_1.x);\n                    translateAxis(boxWithoutScroll.y, scroll_1.y);\n                }\n            }\n            return boxWithoutScroll;\n        };\n        ProjectionNode.prototype.applyTransform = function (box, transformOnly) {\n            if (transformOnly === void 0) { transformOnly = false; }\n            var withTransforms = createBox();\n            copyBoxInto(withTransforms, box);\n            for (var i = 0; i < this.path.length; i++) {\n                var node = this.path[i];\n                if (!transformOnly &&\n                    node.options.layoutScroll &&\n                    node.scroll &&\n                    node !== node.root) {\n                    transformBox(withTransforms, {\n                        x: -node.scroll.x,\n                        y: -node.scroll.y,\n                    });\n                }\n                if (!hasTransform(node.latestValues))\n                    continue;\n                transformBox(withTransforms, node.latestValues);\n            }\n            if (hasTransform(this.latestValues)) {\n                transformBox(withTransforms, this.latestValues);\n            }\n            return withTransforms;\n        };\n        ProjectionNode.prototype.removeTransform = function (box) {\n            var _a;\n            var boxWithoutTransform = createBox();\n            copyBoxInto(boxWithoutTransform, box);\n            for (var i = 0; i < this.path.length; i++) {\n                var node = this.path[i];\n                if (!node.instance)\n                    continue;\n                if (!hasTransform(node.latestValues))\n                    continue;\n                hasScale(node.latestValues) && node.updateSnapshot();\n                var sourceBox = createBox();\n                var nodeBox = node.measure();\n                copyBoxInto(sourceBox, nodeBox);\n                removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox);\n            }\n            if (hasTransform(this.latestValues)) {\n                removeBoxTransforms(boxWithoutTransform, this.latestValues);\n            }\n            return boxWithoutTransform;\n        };\n        /**\n         *\n         */\n        ProjectionNode.prototype.setTargetDelta = function (delta) {\n            this.targetDelta = delta;\n            this.root.scheduleUpdateProjection();\n        };\n        ProjectionNode.prototype.setOptions = function (options) {\n            var _a;\n            this.options = __assign(__assign(__assign({}, this.options), options), { crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true });\n        };\n        ProjectionNode.prototype.clearMeasurements = function () {\n            this.scroll = undefined;\n            this.layout = undefined;\n            this.snapshot = undefined;\n            this.prevTransformTemplateValue = undefined;\n            this.targetDelta = undefined;\n            this.target = undefined;\n            this.isLayoutDirty = false;\n        };\n        /**\n         * Frame calculations\n         */\n        ProjectionNode.prototype.resolveTargetDelta = function () {\n            var _a;\n            var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n            /**\n             * If we have no layout, we can't perform projection, so early return\n             */\n            if (!this.layout || !(layout || layoutId))\n                return;\n            /**\n             * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n             * a relativeParent. This will allow a component to perform scale correction\n             * even if no animation has started.\n             */\n            // TODO If this is unsuccessful this currently happens every frame\n            if (!this.targetDelta && !this.relativeTarget) {\n                // TODO: This is a semi-repetition of further down this function, make DRY\n                this.relativeParent = this.getClosestProjectingParent();\n                if (this.relativeParent && this.relativeParent.layout) {\n                    this.relativeTarget = createBox();\n                    this.relativeTargetOrigin = createBox();\n                    calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual);\n                    copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n                }\n            }\n            /**\n             * If we have no relative target or no target delta our target isn't valid\n             * for this frame.\n             */\n            if (!this.relativeTarget && !this.targetDelta)\n                return;\n            /**\n             * Lazy-init target data structure\n             */\n            if (!this.target) {\n                this.target = createBox();\n                this.targetWithTransforms = createBox();\n            }\n            /**\n             * If we've got a relative box for this component, resolve it into a target relative to the parent.\n             */\n            if (this.relativeTarget &&\n                this.relativeTargetOrigin &&\n                ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) {\n                calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n                /**\n                 * If we've only got a targetDelta, resolve it into a target\n                 */\n            }\n            else if (this.targetDelta) {\n                if (Boolean(this.resumingFrom)) {\n                    // TODO: This is creating a new object every frame\n                    this.target = this.applyTransform(this.layout.actual);\n                }\n                else {\n                    copyBoxInto(this.target, this.layout.actual);\n                }\n                applyBoxDelta(this.target, this.targetDelta);\n            }\n            else {\n                /**\n                 * If no target, use own layout as target\n                 */\n                copyBoxInto(this.target, this.layout.actual);\n            }\n            /**\n             * If we've been told to attempt to resolve a relative target, do so.\n             */\n            if (this.attemptToResolveRelativeTarget) {\n                this.attemptToResolveRelativeTarget = false;\n                this.relativeParent = this.getClosestProjectingParent();\n                if (this.relativeParent &&\n                    Boolean(this.relativeParent.resumingFrom) ===\n                        Boolean(this.resumingFrom) &&\n                    !this.relativeParent.options.layoutScroll &&\n                    this.relativeParent.target) {\n                    this.relativeTarget = createBox();\n                    this.relativeTargetOrigin = createBox();\n                    calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target);\n                    copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n                }\n            }\n        };\n        ProjectionNode.prototype.getClosestProjectingParent = function () {\n            if (!this.parent || hasTransform(this.parent.latestValues))\n                return undefined;\n            if ((this.parent.relativeTarget || this.parent.targetDelta) &&\n                this.parent.layout) {\n                return this.parent;\n            }\n            else {\n                return this.parent.getClosestProjectingParent();\n            }\n        };\n        ProjectionNode.prototype.calcProjection = function () {\n            var _a;\n            var _b = this.options, layout = _b.layout, layoutId = _b.layoutId;\n            /**\n             * If this section of the tree isn't animating we can\n             * delete our target sources for the following frame.\n             */\n            this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) ||\n                this.currentAnimation ||\n                this.pendingAnimation);\n            if (!this.isTreeAnimating) {\n                this.targetDelta = this.relativeTarget = undefined;\n            }\n            if (!this.layout || !(layout || layoutId))\n                return;\n            var lead = this.getLead();\n            /**\n             * Reset the corrected box with the latest values from box, as we're then going\n             * to perform mutative operations on it.\n             */\n            copyBoxInto(this.layoutCorrected, this.layout.actual);\n            /**\n             * Apply all the parent deltas to this box to produce the corrected box. This\n             * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n             */\n            applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead);\n            var target = lead.target;\n            if (!target)\n                return;\n            if (!this.projectionDelta) {\n                this.projectionDelta = createDelta();\n                this.projectionDeltaWithTransform = createDelta();\n            }\n            var prevTreeScaleX = this.treeScale.x;\n            var prevTreeScaleY = this.treeScale.y;\n            var prevProjectionTransform = this.projectionTransform;\n            /**\n             * Update the delta between the corrected box and the target box before user-set transforms were applied.\n             * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n             * for our layout reprojection, but still allow them to be scaled correctly by the user.\n             * It might be that to simplify this we may want to accept that user-set scale is also corrected\n             * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n             * to allow people to choose whether these styles are corrected based on just the\n             * layout reprojection or the final bounding box.\n             */\n            calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n            this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale);\n            if (this.projectionTransform !== prevProjectionTransform ||\n                this.treeScale.x !== prevTreeScaleX ||\n                this.treeScale.y !== prevTreeScaleY) {\n                this.hasProjected = true;\n                this.scheduleRender();\n                this.notifyListeners(\"projectionUpdate\", target);\n            }\n        };\n        ProjectionNode.prototype.hide = function () {\n            this.isVisible = false;\n            // TODO: Schedule render\n        };\n        ProjectionNode.prototype.show = function () {\n            this.isVisible = true;\n            // TODO: Schedule render\n        };\n        ProjectionNode.prototype.scheduleRender = function (notifyAll) {\n            var _a, _b, _c;\n            if (notifyAll === void 0) { notifyAll = true; }\n            (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a);\n            notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender());\n            if (this.resumingFrom && !this.resumingFrom.instance) {\n                this.resumingFrom = undefined;\n            }\n        };\n        ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) {\n            var _this = this;\n            var _a;\n            if (hasOnlyRelativeTargetChanged === void 0) { hasOnlyRelativeTargetChanged = false; }\n            var snapshot = this.snapshot;\n            var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};\n            var mixedValues = __assign({}, this.latestValues);\n            var targetDelta = createDelta();\n            this.relativeTarget = this.relativeTargetOrigin = undefined;\n            this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n            var relativeLayout = createBox();\n            var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared;\n            var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1;\n            var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n                !isOnlyMember &&\n                this.options.crossfade === true &&\n                !this.path.some(hasOpacityCrossfade));\n            this.animationProgress = 0;\n            this.mixTargetDelta = function (latest) {\n                var _a;\n                var progress = latest / 1000;\n                mixAxisDelta(targetDelta.x, delta.x, progress);\n                mixAxisDelta(targetDelta.y, delta.y, progress);\n                _this.setTargetDelta(targetDelta);\n                if (_this.relativeTarget &&\n                    _this.relativeTargetOrigin &&\n                    _this.layout &&\n                    ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) {\n                    calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual);\n                    mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress);\n                }\n                if (isSharedLayoutAnimation) {\n                    _this.animationValues = mixedValues;\n                    mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n                }\n                _this.root.scheduleUpdateProjection();\n                _this.scheduleRender();\n                _this.animationProgress = progress;\n            };\n            this.mixTargetDelta(0);\n        };\n        ProjectionNode.prototype.startAnimation = function (options) {\n            var _this = this;\n            var _a, _b;\n            (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop();\n            if (this.resumingFrom) {\n                (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop();\n            }\n            if (this.pendingAnimation) {\n                cancelSync.update(this.pendingAnimation);\n                this.pendingAnimation = undefined;\n            }\n            /**\n             * Start the animation in the next frame to have a frame with progress 0,\n             * where the target is the same as when the animation started, so we can\n             * calculate the relative positions correctly for instant transitions.\n             */\n            this.pendingAnimation = sync.update(function () {\n                globalProjectionState.hasAnimatedSinceResize = true;\n                _this.currentAnimation = animate(0, animationTarget, __assign(__assign({}, options), { onUpdate: function (latest) {\n                        var _a;\n                        _this.mixTargetDelta(latest);\n                        (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest);\n                    }, onComplete: function () {\n                        var _a;\n                        (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options);\n                        _this.completeAnimation();\n                    } }));\n                if (_this.resumingFrom) {\n                    _this.resumingFrom.currentAnimation = _this.currentAnimation;\n                }\n                _this.pendingAnimation = undefined;\n            });\n        };\n        ProjectionNode.prototype.completeAnimation = function () {\n            var _a;\n            if (this.resumingFrom) {\n                this.resumingFrom.currentAnimation = undefined;\n                this.resumingFrom.preserveOpacity = undefined;\n            }\n            (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete();\n            this.resumingFrom =\n                this.currentAnimation =\n                    this.animationValues =\n                        undefined;\n            this.notifyListeners(\"animationComplete\");\n        };\n        ProjectionNode.prototype.finishAnimation = function () {\n            var _a;\n            if (this.currentAnimation) {\n                (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget);\n                this.currentAnimation.stop();\n            }\n            this.completeAnimation();\n        };\n        ProjectionNode.prototype.applyTransformsToTarget = function () {\n            var _a = this.getLead(), targetWithTransforms = _a.targetWithTransforms, target = _a.target, layout = _a.layout, latestValues = _a.latestValues;\n            if (!targetWithTransforms || !target || !layout)\n                return;\n            copyBoxInto(targetWithTransforms, target);\n            /**\n             * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n             * This is the final box that we will then project into by calculating a transform delta and\n             * applying it to the corrected box.\n             */\n            transformBox(targetWithTransforms, latestValues);\n            /**\n             * Update the delta between the corrected box and the final target box, after\n             * user-set transforms are applied to it. This will be used by the renderer to\n             * create a transform style that will reproject the element from its actual layout\n             * into the desired bounding box.\n             */\n            calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n        };\n        ProjectionNode.prototype.registerSharedNode = function (layoutId, node) {\n            var _a, _b, _c;\n            if (!this.sharedNodes.has(layoutId)) {\n                this.sharedNodes.set(layoutId, new NodeStack());\n            }\n            var stack = this.sharedNodes.get(layoutId);\n            stack.add(node);\n            node.promote({\n                transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition,\n                preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node),\n            });\n        };\n        ProjectionNode.prototype.isLead = function () {\n            var stack = this.getStack();\n            return stack ? stack.lead === this : true;\n        };\n        ProjectionNode.prototype.getLead = function () {\n            var _a;\n            var layoutId = this.options.layoutId;\n            return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n        };\n        ProjectionNode.prototype.getPrevLead = function () {\n            var _a;\n            var layoutId = this.options.layoutId;\n            return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n        };\n        ProjectionNode.prototype.getStack = function () {\n            var layoutId = this.options.layoutId;\n            if (layoutId)\n                return this.root.sharedNodes.get(layoutId);\n        };\n        ProjectionNode.prototype.promote = function (_a) {\n            var _b = _a === void 0 ? {} : _a, needsReset = _b.needsReset, transition = _b.transition, preserveFollowOpacity = _b.preserveFollowOpacity;\n            var stack = this.getStack();\n            if (stack)\n                stack.promote(this, preserveFollowOpacity);\n            if (needsReset) {\n                this.projectionDelta = undefined;\n                this.needsReset = true;\n            }\n            if (transition)\n                this.setOptions({ transition: transition });\n        };\n        ProjectionNode.prototype.relegate = function () {\n            var stack = this.getStack();\n            if (stack) {\n                return stack.relegate(this);\n            }\n            else {\n                return false;\n            }\n        };\n        ProjectionNode.prototype.resetRotation = function () {\n            var visualElement = this.options.visualElement;\n            if (!visualElement)\n                return;\n            // If there's no detected rotation values, we can early return without a forced render.\n            var hasRotate = false;\n            // Keep a record of all the values we've reset\n            var resetValues = {};\n            // Check the rotate value of all axes and reset to 0\n            for (var i = 0; i < transformAxes.length; i++) {\n                var axis = transformAxes[i];\n                var key = \"rotate\" + axis;\n                // If this rotation doesn't exist as a motion value, then we don't\n                // need to reset it\n                if (!visualElement.getStaticValue(key)) {\n                    continue;\n                }\n                hasRotate = true;\n                // Record the rotation and then temporarily set it to 0\n                resetValues[key] = visualElement.getStaticValue(key);\n                visualElement.setStaticValue(key, 0);\n            }\n            // If there's no rotation values, we don't need to do any more.\n            if (!hasRotate)\n                return;\n            // Force a render of this element to apply the transform with all rotations\n            // set to 0.\n            visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n            // Put back all the values we reset\n            for (var key in resetValues) {\n                visualElement.setStaticValue(key, resetValues[key]);\n            }\n            // Schedule a render for the next frame. This ensures we won't visually\n            // see the element with the reset rotate value applied.\n            visualElement.scheduleRender();\n        };\n        ProjectionNode.prototype.getProjectionStyles = function (styleProp) {\n            var _a, _b, _c, _d, _e, _f;\n            if (styleProp === void 0) { styleProp = {}; }\n            // TODO: Return lifecycle-persistent object\n            var styles = {};\n            if (!this.instance || this.isSVG)\n                return styles;\n            if (!this.isVisible) {\n                return { visibility: \"hidden\" };\n            }\n            else {\n                styles.visibility = \"\";\n            }\n            var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate;\n            if (this.needsReset) {\n                this.needsReset = false;\n                styles.opacity = \"\";\n                styles.pointerEvents =\n                    resolveMotionValue(styleProp.pointerEvents) || \"\";\n                styles.transform = transformTemplate\n                    ? transformTemplate(this.latestValues, \"\")\n                    : \"none\";\n                return styles;\n            }\n            var lead = this.getLead();\n            if (!this.projectionDelta || !this.layout || !lead.target) {\n                var emptyStyles = {};\n                if (this.options.layoutId) {\n                    emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1;\n                    emptyStyles.pointerEvents =\n                        resolveMotionValue(styleProp.pointerEvents) || \"\";\n                }\n                if (this.hasProjected && !hasTransform(this.latestValues)) {\n                    emptyStyles.transform = transformTemplate\n                        ? transformTemplate({}, \"\")\n                        : \"none\";\n                    this.hasProjected = false;\n                }\n                return emptyStyles;\n            }\n            var valuesToRender = lead.animationValues || lead.latestValues;\n            this.applyTransformsToTarget();\n            styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n            if (transformTemplate) {\n                styles.transform = transformTemplate(valuesToRender, styles.transform);\n            }\n            var _g = this.projectionDelta, x = _g.x, y = _g.y;\n            styles.transformOrigin = \"\".concat(x.origin * 100, \"% \").concat(y.origin * 100, \"% 0\");\n            if (lead.animationValues) {\n                /**\n                 * If the lead component is animating, assign this either the entering/leaving\n                 * opacity\n                 */\n                styles.opacity =\n                    lead === this\n                        ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1\n                        : this.preserveOpacity\n                            ? this.latestValues.opacity\n                            : valuesToRender.opacityExit;\n            }\n            else {\n                /**\n                 * Or we're not animating at all, set the lead component to its actual\n                 * opacity and other components to hidden.\n                 */\n                styles.opacity =\n                    lead === this\n                        ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : \"\"\n                        : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0;\n            }\n            /**\n             * Apply scale correction\n             */\n            for (var key in scaleCorrectors) {\n                if (valuesToRender[key] === undefined)\n                    continue;\n                var _h = scaleCorrectors[key], correct = _h.correct, applyTo = _h.applyTo;\n                var corrected = correct(valuesToRender[key], lead);\n                if (applyTo) {\n                    var num = applyTo.length;\n                    for (var i = 0; i < num; i++) {\n                        styles[applyTo[i]] = corrected;\n                    }\n                }\n                else {\n                    styles[key] = corrected;\n                }\n            }\n            /**\n             * Disable pointer events on follow components. This is to ensure\n             * that if a follow component covers a lead component it doesn't block\n             * pointer events on the lead.\n             */\n            if (this.options.layoutId) {\n                styles.pointerEvents =\n                    lead === this\n                        ? resolveMotionValue(styleProp.pointerEvents) || \"\"\n                        : \"none\";\n            }\n            return styles;\n        };\n        ProjectionNode.prototype.clearSnapshot = function () {\n            this.resumeFrom = this.snapshot = undefined;\n        };\n        // Only run on root\n        ProjectionNode.prototype.resetTree = function () {\n            this.root.nodes.forEach(function (node) { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n            this.root.nodes.forEach(clearMeasurements);\n            this.root.sharedNodes.clear();\n        };\n        return ProjectionNode;\n    }());\n}\nfunction updateLayout(node) {\n    node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n    var _a, _b, _c, _d;\n    var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot;\n    if (node.isLead() &&\n        node.layout &&\n        snapshot &&\n        node.hasListeners(\"didUpdate\")) {\n        var _e = node.layout, layout_1 = _e.actual, measuredLayout = _e.measured;\n        // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n        // animations for instance if layout=\"size\" and an element has only changed position\n        if (node.options.animationType === \"size\") {\n            eachAxis(function (axis) {\n                var axisSnapshot = snapshot.isShared\n                    ? snapshot.measured[axis]\n                    : snapshot.layout[axis];\n                var length = calcLength(axisSnapshot);\n                axisSnapshot.min = layout_1[axis].min;\n                axisSnapshot.max = axisSnapshot.min + length;\n            });\n        }\n        else if (node.options.animationType === \"position\") {\n            eachAxis(function (axis) {\n                var axisSnapshot = snapshot.isShared\n                    ? snapshot.measured[axis]\n                    : snapshot.layout[axis];\n                var length = calcLength(layout_1[axis]);\n                axisSnapshot.max = axisSnapshot.min + length;\n            });\n        }\n        var layoutDelta = createDelta();\n        calcBoxDelta(layoutDelta, layout_1, snapshot.layout);\n        var visualDelta = createDelta();\n        if (snapshot.isShared) {\n            calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured);\n        }\n        else {\n            calcBoxDelta(visualDelta, layout_1, snapshot.layout);\n        }\n        var hasLayoutChanged = !isDeltaZero(layoutDelta);\n        var hasRelativeTargetChanged = false;\n        if (!node.resumeFrom) {\n            node.relativeParent = node.getClosestProjectingParent();\n            /**\n             * If the relativeParent is itself resuming from a different element then\n             * the relative snapshot is not relavent\n             */\n            if (node.relativeParent && !node.relativeParent.resumeFrom) {\n                var _f = node.relativeParent, parentSnapshot = _f.snapshot, parentLayout = _f.layout;\n                if (parentSnapshot && parentLayout) {\n                    var relativeSnapshot = createBox();\n                    calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout);\n                    var relativeLayout = createBox();\n                    calcRelativePosition(relativeLayout, layout_1, parentLayout.actual);\n                    if (!boxEquals(relativeSnapshot, relativeLayout)) {\n                        hasRelativeTargetChanged = true;\n                    }\n                }\n            }\n        }\n        node.notifyListeners(\"didUpdate\", {\n            layout: layout_1,\n            snapshot: snapshot,\n            delta: visualDelta,\n            layoutDelta: layoutDelta,\n            hasLayoutChanged: hasLayoutChanged,\n            hasRelativeTargetChanged: hasRelativeTargetChanged,\n        });\n    }\n    else if (node.isLead()) {\n        (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c);\n    }\n    /**\n     * Clearing transition\n     * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n     * and why we need it at all\n     */\n    node.options.transition = undefined;\n}\nfunction clearSnapshot(node) {\n    node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n    node.clearMeasurements();\n}\nfunction resetTransformStyle(node) {\n    var visualElement = node.options.visualElement;\n    if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) {\n        visualElement.notifyBeforeLayoutMeasure();\n    }\n    node.resetTransform();\n}\nfunction finishAnimation(node) {\n    node.finishAnimation();\n    node.targetDelta = node.relativeTarget = node.target = undefined;\n}\nfunction resolveTargetDelta(node) {\n    node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n    node.calcProjection();\n}\nfunction resetRotation(node) {\n    node.resetRotation();\n}\nfunction removeLeadSnapshots(stack) {\n    stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n    output.translate = mix(delta.translate, 0, p);\n    output.scale = mix(delta.scale, 1, p);\n    output.origin = delta.origin;\n    output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n    output.min = mix(from.min, to.min, p);\n    output.max = mix(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n    mixAxis(output.x, from.x, to.x, p);\n    mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n    return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nvar defaultLayoutTransition = {\n    duration: 0.45,\n    ease: [0.4, 0, 0.1, 1],\n};\nfunction mountNodeEarly(node, id) {\n    /**\n     * Rather than searching the DOM from document we can search the\n     * path for the deepest mounted ancestor and search from there\n     */\n    var searchNode = node.root;\n    for (var i = node.path.length - 1; i >= 0; i--) {\n        if (Boolean(node.path[i].instance)) {\n            searchNode = node.path[i];\n            break;\n        }\n    }\n    var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;\n    var element = searchElement.querySelector(\"[data-projection-id=\\\"\".concat(id, \"\\\"]\"));\n    if (element)\n        node.mount(element, true);\n}\nfunction roundAxis(axis) {\n    axis.min = Math.round(axis.min);\n    axis.max = Math.round(axis.max);\n}\nfunction roundBox(box) {\n    roundAxis(box.x);\n    roundAxis(box.y);\n}\n\nexport { createProjectionNode, globalProjectionState, mixAxis, mixAxisDelta, mixBox };\n","var createAxisDelta = function () { return ({\n    translate: 0,\n    scale: 1,\n    origin: 0,\n    originPoint: 0,\n}); };\nvar createDelta = function () { return ({\n    x: createAxisDelta(),\n    y: createAxisDelta(),\n}); };\nvar createAxis = function () { return ({ min: 0, max: 0 }); };\nvar createBox = function () { return ({\n    x: createAxis(),\n    y: createAxis(),\n}); };\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","import { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { startAnimation } from './utils/transitions.mjs';\n\n/**\n * Animate a single value or a `MotionValue`.\n *\n * The first argument is either a `MotionValue` to animate, or an initial animation value.\n *\n * The second is either a value to animate to, or an array of keyframes to animate through.\n *\n * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.\n *\n * Returns `AnimationPlaybackControls`, currently just a `stop` method.\n *\n * ```javascript\n * const x = useMotionValue(0)\n *\n * useEffect(() => {\n *   const controls = animate(x, 100, {\n *     type: \"spring\",\n *     stiffness: 2000,\n *     onComplete: v => {}\n *   })\n *\n *   return controls.stop\n * })\n * ```\n *\n * @public\n */\nfunction animate(from, to, transition) {\n    if (transition === void 0) { transition = {}; }\n    var value = isMotionValue(from) ? from : motionValue(from);\n    startAnimation(\"\", value, to, transition);\n    return {\n        stop: function () { return value.stop(); },\n        isAnimating: function () { return value.isAnimating(); },\n    };\n}\n\nexport { animate };\n","import { useConstant } from '../../utils/use-constant.mjs';\nimport { globalProjectionState } from './create-projection-node.mjs';\n\nvar id = 1;\nfunction useProjectionId() {\n    return useConstant(function () {\n        if (globalProjectionState.hasEverUpdated) {\n            return id++;\n        }\n    });\n}\n\nexport { useProjectionId };\n","import { createContext } from 'react';\n\n/**\n * @internal\n */\nvar LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","import { createContext } from 'react';\n\n/**\n * @internal\n */\nvar SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","import { __extends } from 'tslib';\nimport React__default from 'react';\n\nvar VisualElementHandler = /** @class */ (function (_super) {\n    __extends(VisualElementHandler, _super);\n    function VisualElementHandler() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * Update visual element props as soon as we know this update is going to be commited.\n     */\n    VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {\n        this.updateProps();\n        return null;\n    };\n    VisualElementHandler.prototype.componentDidUpdate = function () { };\n    VisualElementHandler.prototype.updateProps = function () {\n        var _a = this.props, visualElement = _a.visualElement, props = _a.props;\n        if (visualElement)\n            visualElement.setProps(props);\n    };\n    VisualElementHandler.prototype.render = function () {\n        return this.props.children;\n    };\n    return VisualElementHandler;\n}(React__default.Component));\n\nexport { VisualElementHandler };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures, featureDefinitions } from './features/definitions.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { useProjectionId } from '../projection/node/id.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { useProjection } from './features/use-projection.mjs';\nimport { VisualElementHandler } from './utils/VisualElementHandler.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n *\n * @internal\n */\nfunction createMotionComponent(_a) {\n    var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n    preloadedFeatures && loadFeatures(preloadedFeatures);\n    function MotionComponent(props, externalRef) {\n        var layoutId = useLayoutId(props);\n        props = __assign(__assign({}, props), { layoutId: layoutId });\n        /**\n         * If we're rendering in a static environment, we only visually update the component\n         * as a result of a React-rerender rather than interactions or animations. This\n         * means we don't need to load additional memory structures like VisualElement,\n         * or any gesture/animation features.\n         */\n        var config = useContext(MotionConfigContext);\n        var features = null;\n        var context = useCreateMotionContext(props);\n        /**\n         * Create a unique projection ID for this component. If a new component is added\n         * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing\n         * us to measure it as soon as any layout effect flushes pending layout animations.\n         *\n         * Performance note: It'd be better not to have to search the DOM for these elements.\n         * For newly-entering components it could be enough to only correct treeScale, in which\n         * case we could mount in a scale-correction mode. This wouldn't be enough for\n         * shared element transitions however. Perhaps for those we could revert to a root node\n         * that gets forceRendered and layout animations are triggered on its layout effect.\n         */\n        var projectionId = config.isStatic ? undefined : useProjectionId();\n        /**\n         *\n         */\n        var visualState = useVisualState(props, config.isStatic);\n        if (!config.isStatic && isBrowser) {\n            /**\n             * Create a VisualElement for this component. A VisualElement provides a common\n             * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n             * providing a way of rendering to these APIs outside of the React render loop\n             * for more performant animations and interactions\n             */\n            context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement);\n            useProjection(projectionId, props, context.visualElement, projectionNodeConstructor ||\n                featureDefinitions.projectionNodeConstructor);\n            /**\n             * Load Motion gesture and animation features. These are rendered as renderless\n             * components so each feature can optionally make use of React lifecycle methods.\n             */\n            features = useFeatures(props, context.visualElement, preloadedFeatures);\n        }\n        /**\n         * The mount order and hierarchy is specific to ensure our element ref\n         * is hydrated by the time features fire their effects.\n         */\n        return (React.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) },\n            features,\n            React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))));\n    }\n    return forwardRef(MotionComponent);\n}\nfunction useLayoutId(_a) {\n    var _b;\n    var layoutId = _a.layoutId;\n    var layoutGroupId = (_b = useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;\n    return layoutGroupId && layoutId !== undefined\n        ? layoutGroupId + \"-\" + layoutId\n        : layoutId;\n}\n\nexport { createMotionComponent };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n    if (checkIfControllingVariants(props)) {\n        var initial = props.initial, animate = props.animate;\n        return {\n            initial: initial === false || isVariantLabel(initial)\n                ? initial\n                : undefined,\n            animate: isVariantLabel(animate) ? animate : undefined,\n        };\n    }\n    return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useVisualElementContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { useReducedMotionConfig } from '../../utils/use-reduced-motion.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n    var lazyContext = useContext(LazyContext);\n    var parent = useVisualElementContext();\n    var presenceContext = useContext(PresenceContext);\n    var shouldReduceMotion = useReducedMotionConfig();\n    var visualElementRef = useRef(undefined);\n    /**\n     * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n     */\n    if (!createVisualElement)\n        createVisualElement = lazyContext.renderer;\n    if (!visualElementRef.current && createVisualElement) {\n        visualElementRef.current = createVisualElement(Component, {\n            visualState: visualState,\n            parent: parent,\n            props: props,\n            presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n            blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n            shouldReduceMotion: shouldReduceMotion,\n        });\n    }\n    var visualElement = visualElementRef.current;\n    useIsomorphicLayoutEffect(function () {\n        visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n    });\n    useEffect(function () {\n        var _a;\n        (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n    });\n    useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n    return visualElement;\n}\n\nexport { useVisualElement };\n","import { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useContext } from 'react';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nfunction useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {\n    var _b;\n    var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll;\n    var initialPromotionConfig = useContext(SwitchLayoutGroupContext);\n    if (!ProjectionNodeConstructor ||\n        !visualElement ||\n        (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {\n        return;\n    }\n    visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);\n    visualElement.projection.setOptions({\n        layoutId: layoutId,\n        layout: layout,\n        alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n        visualElement: visualElement,\n        scheduleRender: function () { return visualElement.scheduleRender(); },\n        /**\n         * TODO: Update options in an effect. This could be tricky as it'll be too late\n         * to update by the time layout animations run.\n         * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n         * ensuring it gets called if there's no potential layout animations.\n         *\n         */\n        animationType: typeof layout === \"string\" ? layout : \"both\",\n        initialPromotionConfig: initialPromotionConfig,\n        layoutScroll: layoutScroll,\n    });\n}\n\nexport { useProjection };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n    return useCallback(function (instance) {\n        var _a;\n        instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n        if (visualElement) {\n            instance\n                ? visualElement.mount(instance)\n                : visualElement.unmount();\n        }\n        if (externalRef) {\n            if (typeof externalRef === \"function\") {\n                externalRef(instance);\n            }\n            else if (isRefObject(externalRef)) {\n                externalRef.current = instance;\n            }\n        }\n    }, \n    /**\n     * Only pass a new ref callback to React if we've received a visual element\n     * factory. Otherwise we'll be mounting/remounting every time externalRef\n     * or other dependencies change.\n     */\n    [visualElement]);\n}\n\nexport { useMotionRef };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n *   return <div ref={ref} />\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n    function custom(Component, customMotionComponentConfig) {\n        if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n        return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n    }\n    if (typeof Proxy === \"undefined\") {\n        return custom;\n    }\n    /**\n     * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n     * Rather than generating them anew every render.\n     */\n    var componentCache = new Map();\n    return new Proxy(custom, {\n        /**\n         * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n         * The prop name is passed through as `key` and we can use that to generate a `motion`\n         * DOM component with that name.\n         */\n        get: function (_target, key) {\n            /**\n             * If this element doesn't exist in the component cache, create it and cache.\n             */\n            if (!componentCache.has(key)) {\n                componentCache.set(key, custom(key));\n            }\n            return componentCache.get(key);\n        },\n    });\n}\n\nexport { createMotionProxy };\n","/**\n * We keep these listed seperately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nvar lowercaseSVGElements = [\n    \"animate\",\n    \"circle\",\n    \"defs\",\n    \"desc\",\n    \"ellipse\",\n    \"g\",\n    \"image\",\n    \"line\",\n    \"filter\",\n    \"marker\",\n    \"mask\",\n    \"metadata\",\n    \"path\",\n    \"pattern\",\n    \"polygon\",\n    \"polyline\",\n    \"rect\",\n    \"stop\",\n    \"svg\",\n    \"switch\",\n    \"symbol\",\n    \"text\",\n    \"tspan\",\n    \"use\",\n    \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n    if (\n    /**\n     * If it's not a string, it's a custom React component. Currently we only support\n     * HTML custom React components.\n     */\n    typeof Component !== \"string\" ||\n        /**\n         * If it contains a dash, the element is a custom HTML webcomponent.\n         */\n        Component.includes(\"-\")) {\n        return false;\n    }\n    else if (\n    /**\n     * If it's in our list of lowercase SVG tags, it's an SVG component\n     */\n    lowercaseSVGElements.indexOf(Component) > -1 ||\n        /**\n         * If it contains a capital letter, it's an SVG component\n         */\n        /[A-Z]/.test(Component)) {\n        return true;\n    }\n    return false;\n}\n\nexport { isSVGComponent };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, _a) {\n    var layout = _a.layout, layoutId = _a.layoutId;\n    return (isTransformProp(key) ||\n        isTransformOriginProp(key) ||\n        ((layout || layoutId !== undefined) &&\n            (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","import { sortTransformProps } from './transform.mjs';\n\nvar translateAlias = {\n    x: \"translateX\",\n    y: \"translateY\",\n    z: \"translateZ\",\n    transformPerspective: \"perspective\",\n};\n/**\n * Build a CSS transform style from individual x/y/scale etc properties.\n *\n * This outputs with a default order of transforms/scales/rotations, this can be customised by\n * providing a transformTemplate function.\n */\nfunction buildTransform(_a, _b, transformIsDefault, transformTemplate) {\n    var transform = _a.transform, transformKeys = _a.transformKeys;\n    var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d;\n    // The transform string we're going to build into.\n    var transformString = \"\";\n    // Transform keys into their default order - this will determine the output order.\n    transformKeys.sort(sortTransformProps);\n    // Track whether the defined transform has a defined z so we don't add a\n    // second to enable hardware acceleration\n    var transformHasZ = false;\n    // Loop over each transform and build them into transformString\n    var numTransformKeys = transformKeys.length;\n    for (var i = 0; i < numTransformKeys; i++) {\n        var key = transformKeys[i];\n        transformString += \"\".concat(translateAlias[key] || key, \"(\").concat(transform[key], \") \");\n        if (key === \"z\")\n            transformHasZ = true;\n    }\n    if (!transformHasZ && enableHardwareAcceleration) {\n        transformString += \"translateZ(0)\";\n    }\n    else {\n        transformString = transformString.trim();\n    }\n    // If we have a custom `transform` template, pass our transform values and\n    // generated transformString to that before returning\n    if (transformTemplate) {\n        transformString = transformTemplate(transform, transformIsDefault ? \"\" : transformString);\n    }\n    else if (allowTransformNone && transformIsDefault) {\n        transformString = \"none\";\n    }\n    return transformString;\n}\n/**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\nfunction buildTransformOrigin(_a) {\n    var _b = _a.originX, originX = _b === void 0 ? \"50%\" : _b, _c = _a.originY, originY = _c === void 0 ? \"50%\" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;\n    return \"\".concat(originX, \" \").concat(originY, \" \").concat(originZ);\n}\n\nexport { buildTransform, buildTransformOrigin };\n","/**\n * Returns true if the provided key is a CSS variable\n */\nfunction isCSSVariable(key) {\n    return key.startsWith(\"--\");\n}\n\nexport { isCSSVariable };\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nvar getValueAsType = function (value, type) {\n    return type && typeof value === \"number\"\n        ? type.transform(value)\n        : value;\n};\n\nexport { getValueAsType };\n","import { buildTransform, buildTransformOrigin } from './build-transform.mjs';\nimport { isCSSVariable } from '../../dom/utils/is-css-variable.mjs';\nimport { isTransformProp, isTransformOriginProp } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, options, transformTemplate) {\n    var _a;\n    var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin;\n    // Empty the transformKeys array. As we're throwing out refs to its items\n    // this might not be as cheap as suspected. Maybe using the array as a buffer\n    // with a manual incrementation would be better.\n    transformKeys.length = 0;\n    // Track whether we encounter any transform or transformOrigin values.\n    var hasTransform = false;\n    var hasTransformOrigin = false;\n    // Does the calculated transform essentially equal \"none\"?\n    var transformIsNone = true;\n    /**\n     * Loop over all our latest animated values and decide whether to handle them\n     * as a style or CSS variable.\n     *\n     * Transforms and transform origins are kept seperately for further processing.\n     */\n    for (var key in latestValues) {\n        var value = latestValues[key];\n        /**\n         * If this is a CSS variable we don't do any further processing.\n         */\n        if (isCSSVariable(key)) {\n            vars[key] = value;\n            continue;\n        }\n        // Convert the value to its default value type, ie 0 -> \"0px\"\n        var valueType = numberValueTypes[key];\n        var valueAsType = getValueAsType(value, valueType);\n        if (isTransformProp(key)) {\n            // If this is a transform, flag to enable further transform processing\n            hasTransform = true;\n            transform[key] = valueAsType;\n            transformKeys.push(key);\n            // If we already know we have a non-default transform, early return\n            if (!transformIsNone)\n                continue;\n            // Otherwise check to see if this is a default transform\n            if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0))\n                transformIsNone = false;\n        }\n        else if (isTransformOriginProp(key)) {\n            transformOrigin[key] = valueAsType;\n            // If this is a transform origin, flag and enable further transform-origin processing\n            hasTransformOrigin = true;\n        }\n        else {\n            style[key] = valueAsType;\n        }\n    }\n    if (hasTransform) {\n        style.transform = buildTransform(state, options, transformIsNone, transformTemplate);\n    }\n    else if (transformTemplate) {\n        style.transform = transformTemplate({}, \"\");\n    }\n    else if (!latestValues.transform && style.transform) {\n        style.transform = \"none\";\n    }\n    if (hasTransformOrigin) {\n        style.transformOrigin = buildTransformOrigin(transformOrigin);\n    }\n}\n\nexport { buildHTMLStyles };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n    for (var key in source) {\n        if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n            target[key] = source[key];\n        }\n    }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n    var transformTemplate = _a.transformTemplate;\n    return useMemo(function () {\n        var state = createHtmlRenderState();\n        buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n        var vars = state.vars, style = state.style;\n        return __assign(__assign({}, vars), style);\n    }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n    var styleProp = props.style || {};\n    var style = {};\n    /**\n     * Copy non-Motion Values straight into style\n     */\n    copyRawValuesOnly(style, styleProp, props);\n    Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n    if (props.transformValues) {\n        style = props.transformValues(style);\n    }\n    return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n    // The `any` isn't ideal but it is the type of createElement props argument\n    var htmlProps = {};\n    var style = useStyle(props, visualState, isStatic);\n    if (Boolean(props.drag) && props.dragListener !== false) {\n        // Disable the ghost element when a user drags\n        htmlProps.draggable = false;\n        // Disable text selection\n        style.userSelect =\n            style.WebkitUserSelect =\n                style.WebkitTouchCallout =\n                    \"none\";\n        // Disable scrolling on the draggable direction\n        style.touchAction =\n            props.drag === true\n                ? \"none\"\n                : \"pan-\".concat(props.drag === \"x\" ? \"y\" : \"x\");\n    }\n    htmlProps.style = style;\n    return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","var createHtmlRenderState = function () { return ({\n    style: {},\n    transform: {},\n    transformKeys: [],\n    transformOrigin: {},\n    vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","/**\n * A list of all valid MotionProps.\n *\n * @internalremarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n    \"initial\",\n    \"animate\",\n    \"exit\",\n    \"style\",\n    \"variants\",\n    \"transition\",\n    \"transformTemplate\",\n    \"transformValues\",\n    \"custom\",\n    \"inherit\",\n    \"layout\",\n    \"layoutId\",\n    \"layoutDependency\",\n    \"onLayoutAnimationComplete\",\n    \"onLayoutMeasure\",\n    \"onBeforeLayoutMeasure\",\n    \"onAnimationStart\",\n    \"onAnimationComplete\",\n    \"onUpdate\",\n    \"onDragStart\",\n    \"onDrag\",\n    \"onDragEnd\",\n    \"onMeasureDragConstraints\",\n    \"onDirectionLock\",\n    \"onDragTransitionEnd\",\n    \"drag\",\n    \"dragControls\",\n    \"dragListener\",\n    \"dragConstraints\",\n    \"dragDirectionLock\",\n    \"dragSnapToOrigin\",\n    \"_dragX\",\n    \"_dragY\",\n    \"dragElastic\",\n    \"dragMomentum\",\n    \"dragPropagation\",\n    \"dragTransition\",\n    \"whileDrag\",\n    \"onPan\",\n    \"onPanStart\",\n    \"onPanEnd\",\n    \"onPanSessionStart\",\n    \"onTap\",\n    \"onTapStart\",\n    \"onTapCancel\",\n    \"onHoverStart\",\n    \"onHoverEnd\",\n    \"whileFocus\",\n    \"whileTap\",\n    \"whileHover\",\n    \"whileInView\",\n    \"onViewportEnter\",\n    \"onViewportLeave\",\n    \"viewport\",\n    \"layoutScroll\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n    return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n    if (!isValidProp)\n        return;\n    // Explicitly filter our events\n    shouldForward = function (key) {\n        return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n    };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n    /**\n     * We attempt to import this package but require won't be defined in esm environments, in that case\n     * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n     * in favour of explicit injection.\n     */\n    loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n    // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n    var filteredProps = {};\n    for (var key in props) {\n        if (shouldForward(key) ||\n            (forwardMotionProps === true && isValidMotionProp(key)) ||\n            (!isDom && !isValidMotionProp(key)) ||\n            // If trying to use native HTML drag events, forward drag listeners\n            (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n            filteredProps[key] = props[key];\n        }\n    }\n    return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { px } from 'style-value-types';\n\nfunction calcOrigin(origin, offset, size) {\n    return typeof origin === \"string\"\n        ? origin\n        : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n    var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n    var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n    return \"\".concat(pxOriginX, \" \").concat(pxOriginY);\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from 'style-value-types';\n\nvar dashKeys = {\n    offset: \"stroke-dashoffset\",\n    array: \"stroke-dasharray\",\n};\nvar camelKeys = {\n    offset: \"strokeDashoffset\",\n    array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing, offset, useDashCase) {\n    if (spacing === void 0) { spacing = 1; }\n    if (offset === void 0) { offset = 0; }\n    if (useDashCase === void 0) { useDashCase = true; }\n    // Normalise path length by setting SVG attribute pathLength to 1\n    attrs.pathLength = 1;\n    // We use dash case when setting attributes directly to the DOM node and camel case\n    // when defining props on a React component.\n    var keys = useDashCase ? dashKeys : camelKeys;\n    // Build the dash offset\n    attrs[keys.offset] = px.transform(-offset);\n    // Build the dash array\n    var pathLength = px.transform(length);\n    var pathSpacing = px.transform(spacing);\n    attrs[keys.array] = \"\".concat(pathLength, \" \").concat(pathSpacing);\n}\n\nexport { buildSVGPath };\n","import { __rest } from 'tslib';\nimport { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, _a, options, transformTemplate) {\n    var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, \n    // This is object creation, which we try to avoid per-frame.\n    latest = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n    buildHTMLStyles(state, latest, options, transformTemplate);\n    state.attrs = state.style;\n    state.style = {};\n    var attrs = state.attrs, style = state.style, dimensions = state.dimensions;\n    /**\n     * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n     * and copy it into style.\n     */\n    if (attrs.transform) {\n        if (dimensions)\n            style.transform = attrs.transform;\n        delete attrs.transform;\n    }\n    // Parse transformOrigin\n    if (dimensions &&\n        (originX !== undefined || originY !== undefined || style.transform)) {\n        style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n    }\n    // Treat x/y not as shortcuts but as actual attributes\n    if (attrX !== undefined)\n        attrs.x = attrX;\n    if (attrY !== undefined)\n        attrs.y = attrY;\n    // Build SVG path if one has been defined\n    if (pathLength !== undefined) {\n        buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);\n    }\n}\n\nexport { buildSVGAttrs };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState) {\n    var visualProps = useMemo(function () {\n        var state = createSvgRenderState();\n        buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);\n        return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n    }, [visualState]);\n    if (props.style) {\n        var rawStyles = {};\n        copyRawValuesOnly(rawStyles, props.style, props);\n        visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n    }\n    return visualProps;\n}\n\nexport { useSVGProps };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\n\nfunction createUseRender(forwardMotionProps) {\n    if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n    var useRender = function (Component, props, projectionId, ref, _a, isStatic) {\n        var latestValues = _a.latestValues;\n        var useVisualProps = isSVGComponent(Component)\n            ? useSVGProps\n            : useHTMLProps;\n        var visualProps = useVisualProps(props, latestValues, isStatic);\n        var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n        var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n        if (projectionId) {\n            elementProps[\"data-projection-id\"] = projectionId;\n        }\n        return createElement(Component, elementProps);\n    };\n    return useRender;\n}\n\nexport { createUseRender };\n","var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = \"$1-$2\";\n/**\n * Convert camelCase to dash-case properties.\n */\nvar camelToDash = function (str) {\n    return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\n\nexport { camelToDash };\n","function renderHTML(element, _a, styleProp, projection) {\n    var style = _a.style, vars = _a.vars;\n    Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n    // Loop over any CSS variables and assign those.\n    for (var key in vars) {\n        element.style.setProperty(key, vars[key]);\n    }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nvar camelCaseAttributes = new Set([\n    \"baseFrequency\",\n    \"diffuseConstant\",\n    \"kernelMatrix\",\n    \"kernelUnitLength\",\n    \"keySplines\",\n    \"keyTimes\",\n    \"limitingConeAngle\",\n    \"markerHeight\",\n    \"markerWidth\",\n    \"numOctaves\",\n    \"targetX\",\n    \"targetY\",\n    \"surfaceScale\",\n    \"specularConstant\",\n    \"specularExponent\",\n    \"stdDeviation\",\n    \"tableValues\",\n    \"viewBox\",\n    \"gradientTransform\",\n    \"pathLength\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState) {\n    renderHTML(element, renderState);\n    for (var key in renderState.attrs) {\n        element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n    }\n}\n\nexport { renderSVG };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n    var style = props.style;\n    var newValues = {};\n    for (var key in style) {\n        if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) {\n            newValues[key] = style[key];\n        }\n    }\n    return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\n\nfunction scrapeMotionValuesFromProps(props) {\n    var newValues = scrapeMotionValuesFromProps$1(props);\n    for (var key in props) {\n        if (isMotionValue(props[key])) {\n            var targetKey = key === \"x\" || key === \"y\" ? \"attr\" + key.toUpperCase() : key;\n            newValues[targetKey] = props[key];\n        }\n    }\n    return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","function isAnimationControls(v) {\n    return typeof v === \"object\" && typeof v.start === \"function\";\n}\n\nexport { isAnimationControls };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\n\nfunction makeState(_a, props, context, presenceContext) {\n    var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n    var state = {\n        latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n        renderState: createRenderState(),\n    };\n    if (onMount) {\n        state.mount = function (instance) { return onMount(props, instance, state); };\n    }\n    return state;\n}\nvar makeUseVisualState = function (config) {\n    return function (props, isStatic) {\n        var context = useContext(MotionContext);\n        var presenceContext = useContext(PresenceContext);\n        return isStatic\n            ? makeState(config, props, context, presenceContext)\n            : useConstant(function () {\n                return makeState(config, props, context, presenceContext);\n            });\n    };\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n    var values = {};\n    var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n    var motionValues = scrapeMotionValues(props);\n    for (var key in motionValues) {\n        values[key] = resolveMotionValue(motionValues[key]);\n    }\n    var initial = props.initial, animate = props.animate;\n    var isControllingVariants = checkIfControllingVariants(props);\n    var isVariantNode = checkIfVariantNode(props);\n    if (context &&\n        isVariantNode &&\n        !isControllingVariants &&\n        props.inherit !== false) {\n        initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n        animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n    }\n    var initialAnimationIsBlocked = blockInitialAnimation || initial === false;\n    var variantToSet = initialAnimationIsBlocked ? animate : initial;\n    if (variantToSet &&\n        typeof variantToSet !== \"boolean\" &&\n        !isAnimationControls(variantToSet)) {\n        var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n        list.forEach(function (definition) {\n            var resolved = resolveVariantFromProps(props, definition);\n            if (!resolved)\n                return;\n            var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n            for (var key in target) {\n                var valueTarget = target[key];\n                if (Array.isArray(valueTarget)) {\n                    /**\n                     * Take final keyframe if the initial animation is blocked because\n                     * we want to initialise at the end of that blocked animation.\n                     */\n                    var index = initialAnimationIsBlocked\n                        ? valueTarget.length - 1\n                        : 0;\n                    valueTarget = valueTarget[index];\n                }\n                if (valueTarget !== null) {\n                    values[key] = valueTarget;\n                }\n            }\n            for (var key in transitionEnd)\n                values[key] = transitionEnd[key];\n        });\n    }\n    return values;\n}\n\nexport { makeUseVisualState };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\n\nvar svgMotionConfig = {\n    useVisualState: makeUseVisualState({\n        scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n        createRenderState: createSvgRenderState,\n        onMount: function (props, instance, _a) {\n            var renderState = _a.renderState, latestValues = _a.latestValues;\n            try {\n                renderState.dimensions =\n                    typeof instance.getBBox ===\n                        \"function\"\n                        ? instance.getBBox()\n                        : instance.getBoundingClientRect();\n            }\n            catch (e) {\n                // Most likely trying to measure an unrendered element under Firefox\n                renderState.dimensions = {\n                    x: 0,\n                    y: 0,\n                    width: 0,\n                    height: 0,\n                };\n            }\n            buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);\n            // TODO: Replace with direct assignment\n            renderSVG(instance, renderState);\n        },\n    }),\n};\n\nexport { svgMotionConfig };\n","var AnimationType;\n(function (AnimationType) {\n    AnimationType[\"Animate\"] = \"animate\";\n    AnimationType[\"Hover\"] = \"whileHover\";\n    AnimationType[\"Tap\"] = \"whileTap\";\n    AnimationType[\"Drag\"] = \"whileDrag\";\n    AnimationType[\"Focus\"] = \"whileFocus\";\n    AnimationType[\"InView\"] = \"whileInView\";\n    AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nvar htmlMotionConfig = {\n    useVisualState: makeUseVisualState({\n        scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n        createRenderState: createHtmlRenderState,\n    }),\n};\n\nexport { htmlMotionConfig };\n","import { useEffect } from 'react';\n\nfunction addDomEvent(target, eventName, handler, options) {\n    target.addEventListener(eventName, handler, options);\n    return function () { return target.removeEventListener(eventName, handler, options); };\n}\n/**\n * Attaches an event listener directly to the provided DOM element.\n *\n * Bypassing React's event system can be desirable, for instance when attaching non-passive\n * event handlers.\n *\n * ```jsx\n * const ref = useRef(null)\n *\n * useDomEvent(ref, 'wheel', onWheel, { passive: false })\n *\n * return <div ref={ref} />\n * ```\n *\n * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.\n * @param eventName - Name of the event you want listen for.\n * @param handler - Function to fire when receiving the event.\n * @param options - Options to pass to `Event.addEventListener`.\n *\n * @public\n */\nfunction useDomEvent(ref, eventName, handler, options) {\n    useEffect(function () {\n        var element = ref.current;\n        if (handler && element) {\n            return addDomEvent(element, eventName, handler, options);\n        }\n    }, [ref, eventName, handler, options]);\n}\n\nexport { addDomEvent, useDomEvent };\n","function isMouseEvent(event) {\n    // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.\n    if (typeof PointerEvent !== \"undefined\" && event instanceof PointerEvent) {\n        return !!(event.pointerType === \"mouse\");\n    }\n    return event instanceof MouseEvent;\n}\nfunction isTouchEvent(event) {\n    var hasTouches = !!event.touches;\n    return hasTouches;\n}\n\nexport { isMouseEvent, isTouchEvent };\n","import { isTouchEvent } from '../gestures/utils/event-type.mjs';\n\n/**\n * Filters out events not attached to the primary pointer (currently left mouse button)\n * @param eventHandler\n */\nfunction filterPrimaryPointer(eventHandler) {\n    return function (event) {\n        var isMouseEvent = event instanceof MouseEvent;\n        var isPrimaryPointer = !isMouseEvent ||\n            (isMouseEvent && event.button === 0);\n        if (isPrimaryPointer) {\n            eventHandler(event);\n        }\n    };\n}\nvar defaultPagePoint = { pageX: 0, pageY: 0 };\nfunction pointFromTouch(e, pointType) {\n    if (pointType === void 0) { pointType = \"page\"; }\n    var primaryTouch = e.touches[0] || e.changedTouches[0];\n    var point = primaryTouch || defaultPagePoint;\n    return {\n        x: point[pointType + \"X\"],\n        y: point[pointType + \"Y\"],\n    };\n}\nfunction pointFromMouse(point, pointType) {\n    if (pointType === void 0) { pointType = \"page\"; }\n    return {\n        x: point[pointType + \"X\"],\n        y: point[pointType + \"Y\"],\n    };\n}\nfunction extractEventInfo(event, pointType) {\n    if (pointType === void 0) { pointType = \"page\"; }\n    return {\n        point: isTouchEvent(event)\n            ? pointFromTouch(event, pointType)\n            : pointFromMouse(event, pointType),\n    };\n}\nvar wrapHandler = function (handler, shouldFilterPrimaryPointer) {\n    if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; }\n    var listener = function (event) {\n        return handler(event, extractEventInfo(event));\n    };\n    return shouldFilterPrimaryPointer\n        ? filterPrimaryPointer(listener)\n        : listener;\n};\n\nexport { extractEventInfo, wrapHandler };\n","import { addDomEvent, useDomEvent } from './use-dom-event.mjs';\nimport { wrapHandler } from './event-info.mjs';\nimport { supportsPointerEvents, supportsTouchEvents, supportsMouseEvents } from './utils.mjs';\n\nvar mouseEventNames = {\n    pointerdown: \"mousedown\",\n    pointermove: \"mousemove\",\n    pointerup: \"mouseup\",\n    pointercancel: \"mousecancel\",\n    pointerover: \"mouseover\",\n    pointerout: \"mouseout\",\n    pointerenter: \"mouseenter\",\n    pointerleave: \"mouseleave\",\n};\nvar touchEventNames = {\n    pointerdown: \"touchstart\",\n    pointermove: \"touchmove\",\n    pointerup: \"touchend\",\n    pointercancel: \"touchcancel\",\n};\nfunction getPointerEventName(name) {\n    if (supportsPointerEvents()) {\n        return name;\n    }\n    else if (supportsTouchEvents()) {\n        return touchEventNames[name];\n    }\n    else if (supportsMouseEvents()) {\n        return mouseEventNames[name];\n    }\n    return name;\n}\nfunction addPointerEvent(target, eventName, handler, options) {\n    return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\nfunction usePointerEvent(ref, eventName, handler, options) {\n    return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === \"pointerdown\"), options);\n}\n\nexport { addPointerEvent, usePointerEvent };\n","import { isBrowser } from '../utils/is-browser.mjs';\n\n// We check for event support via functions in case they've been mocked by a testing suite.\nvar supportsPointerEvents = function () {\n    return isBrowser && window.onpointerdown === null;\n};\nvar supportsTouchEvents = function () {\n    return isBrowser && window.ontouchstart === null;\n};\nvar supportsMouseEvents = function () {\n    return isBrowser && window.onmousedown === null;\n};\n\nexport { supportsMouseEvents, supportsPointerEvents, supportsTouchEvents };\n","function createLock(name) {\n    var lock = null;\n    return function () {\n        var openLock = function () {\n            lock = null;\n        };\n        if (lock === null) {\n            lock = name;\n            return openLock;\n        }\n        return false;\n    };\n}\nvar globalHorizontalLock = createLock(\"dragHorizontal\");\nvar globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n    var lock = false;\n    if (drag === \"y\") {\n        lock = globalVerticalLock();\n    }\n    else if (drag === \"x\") {\n        lock = globalHorizontalLock();\n    }\n    else {\n        var openHorizontal_1 = globalHorizontalLock();\n        var openVertical_1 = globalVerticalLock();\n        if (openHorizontal_1 && openVertical_1) {\n            lock = function () {\n                openHorizontal_1();\n                openVertical_1();\n            };\n        }\n        else {\n            // Release the locks because we don't use them\n            if (openHorizontal_1)\n                openHorizontal_1();\n            if (openVertical_1)\n                openVertical_1();\n        }\n    }\n    return lock;\n}\nfunction isDragActive() {\n    // Check the gesture lock - if we get it, it means no drag gesture is active\n    // and we can safely fire the tap gesture.\n    var openGestureLock = getGlobalLock(true);\n    if (!openGestureLock)\n        return true;\n    openGestureLock();\n    return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","import { isMouseEvent } from './utils/event-type.mjs';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\nfunction createHoverEvent(visualElement, isActive, callback) {\n    return function (event, info) {\n        var _a;\n        if (!isMouseEvent(event) || isDragActive())\n            return;\n        /**\n         * Ensure we trigger animations before firing event callback\n         */\n        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive);\n        callback === null || callback === void 0 ? void 0 : callback(event, info);\n    };\n}\nfunction useHoverGesture(_a) {\n    var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement;\n    usePointerEvent(visualElement, \"pointerenter\", onHoverStart || whileHover\n        ? createHoverEvent(visualElement, true, onHoverStart)\n        : undefined);\n    usePointerEvent(visualElement, \"pointerleave\", onHoverEnd || whileHover\n        ? createHoverEvent(visualElement, false, onHoverEnd)\n        : undefined);\n}\n\nexport { useHoverGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nvar isNodeOrChild = function (parent, child) {\n    if (!child) {\n        return false;\n    }\n    else if (parent === child) {\n        return true;\n    }\n    else {\n        return isNodeOrChild(parent, child.parentElement);\n    }\n};\n\nexport { isNodeOrChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n    return useEffect(function () { return function () { return callback(); }; }, []);\n}\n\nexport { useUnmountEffect };\n","import { __rest, __assign } from 'tslib';\n\n/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nvar observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nvar observers = new WeakMap();\nvar fireObserverCallback = function (entry) {\n    var _a;\n    (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n};\nvar fireAllObserverCallbacks = function (entries) {\n    entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver(_a) {\n    var root = _a.root, options = __rest(_a, [\"root\"]);\n    var lookupRoot = root || document;\n    /**\n     * If we don't have an observer lookup map for this root, create one.\n     */\n    if (!observers.has(lookupRoot)) {\n        observers.set(lookupRoot, {});\n    }\n    var rootObservers = observers.get(lookupRoot);\n    var key = JSON.stringify(options);\n    /**\n     * If we don't have an observer for this combination of root and settings,\n     * create one.\n     */\n    if (!rootObservers[key]) {\n        rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __assign({ root: root }, options));\n    }\n    return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n    var rootInteresectionObserver = initIntersectionObserver(options);\n    observerCallbacks.set(element, callback);\n    rootInteresectionObserver.observe(element);\n    return function () {\n        observerCallbacks.delete(element);\n        rootInteresectionObserver.unobserve(element);\n    };\n}\n\nexport { observeIntersection };\n","import { useRef, useEffect } from 'react';\nimport { AnimationType } from '../../../render/utils/types.mjs';\nimport { warnOnce } from '../../../utils/warn-once.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nfunction useViewport(_a) {\n    var visualElement = _a.visualElement, whileInView = _a.whileInView, onViewportEnter = _a.onViewportEnter, onViewportLeave = _a.onViewportLeave, _b = _a.viewport, viewport = _b === void 0 ? {} : _b;\n    var state = useRef({\n        hasEnteredView: false,\n        isInView: false,\n    });\n    var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave);\n    if (viewport.once && state.current.hasEnteredView)\n        shouldObserve = false;\n    var useObserver = typeof IntersectionObserver === \"undefined\"\n        ? useMissingIntersectionObserver\n        : useIntersectionObserver;\n    useObserver(shouldObserve, state.current, visualElement, viewport);\n}\nvar thresholdNames = {\n    some: 0,\n    all: 1,\n};\nfunction useIntersectionObserver(shouldObserve, state, visualElement, _a) {\n    var root = _a.root, rootMargin = _a.margin, _b = _a.amount, amount = _b === void 0 ? \"some\" : _b, once = _a.once;\n    useEffect(function () {\n        if (!shouldObserve)\n            return;\n        var options = {\n            root: root === null || root === void 0 ? void 0 : root.current,\n            rootMargin: rootMargin,\n            threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n        };\n        var intersectionCallback = function (entry) {\n            var _a;\n            var isIntersecting = entry.isIntersecting;\n            /**\n             * If there's been no change in the viewport state, early return.\n             */\n            if (state.isInView === isIntersecting)\n                return;\n            state.isInView = isIntersecting;\n            /**\n             * Handle hasEnteredView. If this is only meant to run once, and\n             * element isn't visible, early return. Otherwise set hasEnteredView to true.\n             */\n            if (once && !isIntersecting && state.hasEnteredView) {\n                return;\n            }\n            else if (isIntersecting) {\n                state.hasEnteredView = true;\n            }\n            (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, isIntersecting);\n            /**\n             * Use the latest committed props rather than the ones in scope\n             * when this observer is created\n             */\n            var props = visualElement.getProps();\n            var callback = isIntersecting\n                ? props.onViewportEnter\n                : props.onViewportLeave;\n            callback === null || callback === void 0 ? void 0 : callback(entry);\n        };\n        return observeIntersection(visualElement.getInstance(), options, intersectionCallback);\n    }, [shouldObserve, root, rootMargin, amount]);\n}\n/**\n * If IntersectionObserver is missing, we activate inView and fire onViewportEnter\n * on mount. This way, the page will be in the state the author expects users\n * to see it in for everyone.\n */\nfunction useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) {\n    var _b = _a.fallback, fallback = _b === void 0 ? true : _b;\n    useEffect(function () {\n        if (!shouldObserve || !fallback)\n            return;\n        if (process.env.NODE_ENV !== \"production\") {\n            warnOnce(false, \"IntersectionObserver not available on this device. whileInView animations will trigger on mount.\");\n        }\n        /**\n         * Fire this in an rAF because, at this point, the animation state\n         * won't have flushed for the first time and there's certain logic in\n         * there that behaves differently on the initial animation.\n         *\n         * This hook should be quite rarely called so setting this in an rAF\n         * is preferred to changing the behaviour of the animation state.\n         */\n        requestAnimationFrame(function () {\n            var _a;\n            state.hasEnteredView = true;\n            var onViewportEnter = visualElement.getProps().onViewportEnter;\n            onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null);\n            (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, true);\n        });\n    }, [shouldObserve]);\n}\n\nexport { useViewport };\n","var makeRenderlessComponent = function (hook) { return function (props) {\n    hook(props);\n    return null;\n}; };\n\nexport { makeRenderlessComponent };\n","import { useFocusGesture } from '../../gestures/use-focus-gesture.mjs';\nimport { useHoverGesture } from '../../gestures/use-hover-gesture.mjs';\nimport { useTapGesture } from '../../gestures/use-tap-gesture.mjs';\nimport { useViewport } from './viewport/use-viewport.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar gestureAnimations = {\n    inView: makeRenderlessComponent(useViewport),\n    tap: makeRenderlessComponent(useTapGesture),\n    focus: makeRenderlessComponent(useFocusGesture),\n    hover: makeRenderlessComponent(useHoverGesture),\n};\n\nexport { gestureAnimations };\n","import { useRef } from 'react';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { usePointerEvent, addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { pipe } from 'popmotion';\nimport { AnimationType } from '../render/utils/types.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\n\n/**\n * @param handlers -\n * @internal\n */\nfunction useTapGesture(_a) {\n    var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement;\n    var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;\n    var isPressing = useRef(false);\n    var cancelPointerEndListeners = useRef(null);\n    function removePointerEndListener() {\n        var _a;\n        (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);\n        cancelPointerEndListeners.current = null;\n    }\n    function checkPointerEnd() {\n        var _a;\n        removePointerEndListener();\n        isPressing.current = false;\n        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false);\n        return !isDragActive();\n    }\n    function onPointerUp(event, info) {\n        if (!checkPointerEnd())\n            return;\n        /**\n         * We only count this as a tap gesture if the event.target is the same\n         * as, or a child of, this component's element\n         */\n        !isNodeOrChild(visualElement.getInstance(), event.target)\n            ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info)\n            : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);\n    }\n    function onPointerCancel(event, info) {\n        if (!checkPointerEnd())\n            return;\n        onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);\n    }\n    function onPointerDown(event, info) {\n        var _a;\n        removePointerEndListener();\n        if (isPressing.current)\n            return;\n        isPressing.current = true;\n        cancelPointerEndListeners.current = pipe(addPointerEvent(window, \"pointerup\", onPointerUp), addPointerEvent(window, \"pointercancel\", onPointerCancel));\n        /**\n         * Ensure we trigger animations before firing event callback\n         */\n        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true);\n        onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);\n    }\n    usePointerEvent(visualElement, \"pointerdown\", hasPressListeners ? onPointerDown : undefined);\n    useUnmountEffect(removePointerEndListener);\n}\n\nexport { useTapGesture };\n","import { AnimationType } from '../render/utils/types.mjs';\nimport { useDomEvent } from '../events/use-dom-event.mjs';\n\n/**\n *\n * @param props\n * @param ref\n * @internal\n */\nfunction useFocusGesture(_a) {\n    var whileFocus = _a.whileFocus, visualElement = _a.visualElement;\n    var onFocus = function () {\n        var _a;\n        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true);\n    };\n    var onBlur = function () {\n        var _a;\n        (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false);\n    };\n    useDomEvent(visualElement, \"focus\", whileFocus ? onFocus : undefined);\n    useDomEvent(visualElement, \"blur\", whileFocus ? onBlur : undefined);\n}\n\nexport { useFocusGesture };\n","import { useConstant } from './use-constant.mjs';\n\nvar counter = 0;\nvar incrementId = function () { return counter++; };\nvar useId = function () { return useConstant(incrementId); };\n/**\n * Ideally we'd use the following code to support React 18 optionally.\n * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).\n * Need to come up with a different way of figuring this out.\n */\n// export const useId = (React as any).useId\n//     ? (React as any).useId\n//     : () => useConstant(incrementId)\n\nexport { useId };\n","import { useContext, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n *   const [isPresent, safeToRemove] = usePresence()\n *\n *   useEffect(() => {\n *     !isPresent && setTimeout(safeToRemove, 1000)\n *   }, [isPresent])\n *\n *   return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n    var context = useContext(PresenceContext);\n    if (context === null)\n        return [true, null];\n    var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;\n    // It's safe to call the following hooks conditionally (after an early return) because the context will always\n    // either be null or non-null for the lifespan of the component.\n    // Replace with useId when released in React\n    var id = useId();\n    useEffect(function () { return register(id); }, []);\n    var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); };\n    return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n *   const isPresent = useIsPresent()\n *\n *   useEffect(() => {\n *     !isPresent && console.log(\"I've been removed!\")\n *   }, [isPresent])\n *\n *   return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n    return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n    return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","function shallowCompare(next, prev) {\n    if (!Array.isArray(prev))\n        return false;\n    var prevLength = prev.length;\n    if (prevLength !== next.length)\n        return false;\n    for (var i = 0; i < prevLength; i++) {\n        if (prev[i] !== next[i])\n            return false;\n    }\n    return true;\n}\n\nexport { shallowCompare };\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nvar isNumericalString = function (v) { return /^\\-?\\d*\\.?\\d+$/.test(v); };\n\nexport { isNumericalString };\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nvar isZeroValueString = function (v) { return /^0[^.\\s]+$/.test(v); };\n\nexport { isZeroValueString };\n","/**\n * Tests a provided value against a ValueType\n */\nvar testValueType = function (v) { return function (type) { return type.test(v); }; };\n\nexport { testValueType };\n","import { number, px, percent, degrees, vw, vh } from 'style-value-types';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nvar dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nvar findDimensionValueType = function (v) {\n    return dimensionValueTypes.find(testValueType(v));\n};\n\nexport { dimensionValueTypes, findDimensionValueType };\n","/**\n * ValueType for \"auto\"\n */\nvar auto = {\n    test: function (v) { return v === \"auto\"; },\n    parse: function (v) { return v; },\n};\n\nexport { auto };\n","import { __spreadArray, __read } from 'tslib';\nimport { color, complex } from 'style-value-types';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nvar valueTypes = __spreadArray(__spreadArray([], __read(dimensionValueTypes), false), [color, complex], false);\n/**\n * Tests a value against the list of ValueTypes\n */\nvar findValueType = function (v) { return valueTypes.find(testValueType(v)); };\n\nexport { findValueType };\n","import { __rest, __assign, __spreadArray, __read } from 'tslib';\nimport { complex } from 'style-value-types';\nimport { isNumericalString } from '../../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\nimport { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { getAnimatableNone } from '../dom/value-types/animatable-none.mjs';\nimport { findValueType } from '../dom/value-types/find.mjs';\nimport { resolveVariant } from './variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n    if (visualElement.hasValue(key)) {\n        visualElement.getValue(key).set(value);\n    }\n    else {\n        visualElement.addValue(key, motionValue(value));\n    }\n}\nfunction setTarget(visualElement, definition) {\n    var resolved = resolveVariant(visualElement, definition);\n    var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, [\"transitionEnd\", \"transition\"]);\n    target = __assign(__assign({}, target), transitionEnd);\n    for (var key in target) {\n        var value = resolveFinalValueInKeyframes(target[key]);\n        setMotionValue(visualElement, key, value);\n    }\n}\nfunction setVariants(visualElement, variantLabels) {\n    var reversedLabels = __spreadArray([], __read(variantLabels), false).reverse();\n    reversedLabels.forEach(function (key) {\n        var _a;\n        var variant = visualElement.getVariant(key);\n        variant && setTarget(visualElement, variant);\n        (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n            setVariants(child, variantLabels);\n        });\n    });\n}\nfunction setValues(visualElement, definition) {\n    if (Array.isArray(definition)) {\n        return setVariants(visualElement, definition);\n    }\n    else if (typeof definition === \"string\") {\n        return setVariants(visualElement, [definition]);\n    }\n    else {\n        setTarget(visualElement, definition);\n    }\n}\nfunction checkTargetForNewValues(visualElement, target, origin) {\n    var _a, _b, _c;\n    var _d;\n    var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); });\n    var numNewValues = newValueKeys.length;\n    if (!numNewValues)\n        return;\n    for (var i = 0; i < numNewValues; i++) {\n        var key = newValueKeys[i];\n        var targetValue = target[key];\n        var value = null;\n        /**\n         * If the target is a series of keyframes, we can use the first value\n         * in the array. If this first value is null, we'll still need to read from the DOM.\n         */\n        if (Array.isArray(targetValue)) {\n            value = targetValue[0];\n        }\n        /**\n         * If the target isn't keyframes, or the first keyframe was null, we need to\n         * first check if an origin value was explicitly defined in the transition as \"from\",\n         * if not read the value from the DOM. As an absolute fallback, take the defined target value.\n         */\n        if (value === null) {\n            value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];\n        }\n        /**\n         * If value is still undefined or null, ignore it. Preferably this would throw,\n         * but this was causing issues in Framer.\n         */\n        if (value === undefined || value === null)\n            continue;\n        if (typeof value === \"string\" &&\n            (isNumericalString(value) || isZeroValueString(value))) {\n            // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n            value = parseFloat(value);\n        }\n        else if (!findValueType(value) && complex.test(targetValue)) {\n            value = getAnimatableNone(key, targetValue);\n        }\n        visualElement.addValue(key, motionValue(value));\n        (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value);\n        visualElement.setBaseTarget(key, value);\n    }\n}\nfunction getOriginFromTransition(key, transition) {\n    if (!transition)\n        return;\n    var valueTransition = transition[key] || transition[\"default\"] || transition;\n    return valueTransition.from;\n}\nfunction getOrigin(target, transition, visualElement) {\n    var _a, _b;\n    var origin = {};\n    for (var key in target) {\n        origin[key] =\n            (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();\n    }\n    return origin;\n}\n\nexport { checkTargetForNewValues, getOrigin, getOriginFromTransition, setTarget, setValues };\n","import { __read, __rest, __assign } from 'tslib';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { setTarget } from './setters.mjs';\nimport { resolveVariant } from './variants.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\n\n/**\n * @internal\n */\nfunction animateVisualElement(visualElement, definition, options) {\n    if (options === void 0) { options = {}; }\n    visualElement.notifyAnimationStart(definition);\n    var animation;\n    if (Array.isArray(definition)) {\n        var animations = definition.map(function (variant) {\n            return animateVariant(visualElement, variant, options);\n        });\n        animation = Promise.all(animations);\n    }\n    else if (typeof definition === \"string\") {\n        animation = animateVariant(visualElement, definition, options);\n    }\n    else {\n        var resolvedDefinition = typeof definition === \"function\"\n            ? resolveVariant(visualElement, definition, options.custom)\n            : definition;\n        animation = animateTarget(visualElement, resolvedDefinition, options);\n    }\n    return animation.then(function () {\n        return visualElement.notifyAnimationComplete(definition);\n    });\n}\nfunction animateVariant(visualElement, variant, options) {\n    var _a;\n    if (options === void 0) { options = {}; }\n    var resolved = resolveVariant(visualElement, variant, options.custom);\n    var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;\n    if (options.transitionOverride) {\n        transition = options.transitionOverride;\n    }\n    /**\n     * If we have a variant, create a callback that runs it as an animation.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    var getAnimation = resolved\n        ? function () { return animateTarget(visualElement, resolved, options); }\n        : function () { return Promise.resolve(); };\n    /**\n     * If we have children, create a callback that runs all their animations.\n     * Otherwise, we resolve a Promise immediately for a composable no-op.\n     */\n    var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size)\n        ? function (forwardDelay) {\n            if (forwardDelay === void 0) { forwardDelay = 0; }\n            var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection;\n            return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n        }\n        : function () { return Promise.resolve(); };\n    /**\n     * If the transition explicitly defines a \"when\" option, we need to resolve either\n     * this animation or all children animations before playing the other.\n     */\n    var when = transition.when;\n    if (when) {\n        var _c = __read(when === \"beforeChildren\"\n            ? [getAnimation, getChildAnimations]\n            : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1];\n        return first().then(last);\n    }\n    else {\n        return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n    }\n}\n/**\n * @internal\n */\nfunction animateTarget(visualElement, definition, _a) {\n    var _b;\n    var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type;\n    var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, [\"transition\", \"transitionEnd\"]);\n    if (transitionOverride)\n        transition = transitionOverride;\n    var animations = [];\n    var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);\n    for (var key in target) {\n        var value = visualElement.getValue(key);\n        var valueTarget = target[key];\n        if (!value ||\n            valueTarget === undefined ||\n            (animationTypeState &&\n                shouldBlockAnimation(animationTypeState, key))) {\n            continue;\n        }\n        var valueTransition = __assign({ delay: delay }, transition);\n        /**\n         * Make animation instant if this is a transform prop and we should reduce motion.\n         */\n        if (visualElement.shouldReduceMotion && isTransformProp(key)) {\n            valueTransition = __assign(__assign({}, valueTransition), { type: false, delay: 0 });\n        }\n        var animation = startAnimation(key, value, valueTarget, valueTransition);\n        animations.push(animation);\n    }\n    return Promise.all(animations).then(function () {\n        transitionEnd && setTarget(visualElement, transitionEnd);\n    });\n}\nfunction animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {\n    if (delayChildren === void 0) { delayChildren = 0; }\n    if (staggerChildren === void 0) { staggerChildren = 0; }\n    if (staggerDirection === void 0) { staggerDirection = 1; }\n    var animations = [];\n    var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n    var generateStaggerDuration = staggerDirection === 1\n        ? function (i) {\n            if (i === void 0) { i = 0; }\n            return i * staggerChildren;\n        }\n        : function (i) {\n            if (i === void 0) { i = 0; }\n            return maxStaggerDuration - i * staggerChildren;\n        };\n    Array.from(visualElement.variantChildren)\n        .sort(sortByTreeOrder)\n        .forEach(function (child, i) {\n        animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); }));\n    });\n    return Promise.all(animations);\n}\nfunction stopAnimation(visualElement) {\n    visualElement.forEachValue(function (value) { return value.stop(); });\n}\nfunction sortByTreeOrder(a, b) {\n    return a.sortNodePosition(b);\n}\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation(_a, key) {\n    var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating;\n    var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n    needsAnimating[key] = false;\n    return shouldBlock;\n}\n\nexport { animateVisualElement, sortByTreeOrder, stopAnimation };\n","import { __spreadArray, __read, __assign, __rest } from 'tslib';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { animateVisualElement } from './animation.mjs';\nimport { AnimationType } from './types.mjs';\nimport { isVariantLabels, resolveVariant, isVariantLabel } from './variants.mjs';\n\nvar variantPriorityOrder = [\n    AnimationType.Animate,\n    AnimationType.InView,\n    AnimationType.Focus,\n    AnimationType.Hover,\n    AnimationType.Tap,\n    AnimationType.Drag,\n    AnimationType.Exit,\n];\nvar reversePriorityOrder = __spreadArray([], __read(variantPriorityOrder), false).reverse();\nvar numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n    return function (animations) {\n        return Promise.all(animations.map(function (_a) {\n            var animation = _a.animation, options = _a.options;\n            return animateVisualElement(visualElement, animation, options);\n        }));\n    };\n}\nfunction createAnimationState(visualElement) {\n    var animate = animateList(visualElement);\n    var state = createState();\n    var allAnimatedKeys = {};\n    var isInitialRender = true;\n    /**\n     * This function will be used to reduce the animation definitions for\n     * each active animation type into an object of resolved values for it.\n     */\n    var buildResolvedTypeValues = function (acc, definition) {\n        var resolved = resolveVariant(visualElement, definition);\n        if (resolved) {\n            resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, [\"transition\", \"transitionEnd\"]);\n            acc = __assign(__assign(__assign({}, acc), target), transitionEnd);\n        }\n        return acc;\n    };\n    function isAnimated(key) {\n        return allAnimatedKeys[key] !== undefined;\n    }\n    /**\n     * This just allows us to inject mocked animation functions\n     * @internal\n     */\n    function setAnimateFunction(makeAnimator) {\n        animate = makeAnimator(visualElement);\n    }\n    /**\n     * When we receive new props, we need to:\n     * 1. Create a list of protected keys for each type. This is a directory of\n     *    value keys that are currently being \"handled\" by types of a higher priority\n     *    so that whenever an animation is played of a given type, these values are\n     *    protected from being animated.\n     * 2. Determine if an animation type needs animating.\n     * 3. Determine if any values have been removed from a type and figure out\n     *    what to animate those to.\n     */\n    function animateChanges(options, changedActiveType) {\n        var _a;\n        var props = visualElement.getProps();\n        var context = visualElement.getVariantContext(true) || {};\n        /**\n         * A list of animations that we'll build into as we iterate through the animation\n         * types. This will get executed at the end of the function.\n         */\n        var animations = [];\n        /**\n         * Keep track of which values have been removed. Then, as we hit lower priority\n         * animation types, we can check if they contain removed values and animate to that.\n         */\n        var removedKeys = new Set();\n        /**\n         * A dictionary of all encountered keys. This is an object to let us build into and\n         * copy it without iteration. Each time we hit an animation type we set its protected\n         * keys - the keys its not allowed to animate - to the latest version of this object.\n         */\n        var encounteredKeys = {};\n        /**\n         * If a variant has been removed at a given index, and this component is controlling\n         * variant animations, we want to ensure lower-priority variants are forced to animate.\n         */\n        var removedVariantIndex = Infinity;\n        var _loop_1 = function (i) {\n            var type = reversePriorityOrder[i];\n            var typeState = state[type];\n            var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];\n            var propIsVariant = isVariantLabel(prop);\n            /**\n             * If this type has *just* changed isActive status, set activeDelta\n             * to that status. Otherwise set to null.\n             */\n            var activeDelta = type === changedActiveType ? typeState.isActive : null;\n            if (activeDelta === false)\n                removedVariantIndex = i;\n            /**\n             * If this prop is an inherited variant, rather than been set directly on the\n             * component itself, we want to make sure we allow the parent to trigger animations.\n             *\n             * TODO: Can probably change this to a !isControllingVariants check\n             */\n            var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;\n            /**\n             *\n             */\n            if (isInherited &&\n                isInitialRender &&\n                visualElement.manuallyAnimateOnMount) {\n                isInherited = false;\n            }\n            /**\n             * Set all encountered keys so far as the protected keys for this type. This will\n             * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n             */\n            typeState.protectedKeys = __assign({}, encounteredKeys);\n            // Check if we can skip analysing this prop early\n            if (\n            // If it isn't active and hasn't *just* been set as inactive\n            (!typeState.isActive && activeDelta === null) ||\n                // If we didn't and don't have any defined prop for this animation type\n                (!prop && !typeState.prevProp) ||\n                // Or if the prop doesn't define an animation\n                isAnimationControls(prop) ||\n                typeof prop === \"boolean\") {\n                return \"continue\";\n            }\n            /**\n             * As we go look through the values defined on this type, if we detect\n             * a changed value or a value that was removed in a higher priority, we set\n             * this to true and add this prop to the animation list.\n             */\n            var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n            var shouldAnimateType = variantDidChange ||\n                // If we're making this variant active, we want to always make it active\n                (type === changedActiveType &&\n                    typeState.isActive &&\n                    !isInherited &&\n                    propIsVariant) ||\n                // If we removed a higher-priority variant (i is in reverse order)\n                (i > removedVariantIndex && propIsVariant);\n            /**\n             * As animations can be set as variant lists, variants or target objects, we\n             * coerce everything to an array if it isn't one already\n             */\n            var definitionList = Array.isArray(prop) ? prop : [prop];\n            /**\n             * Build an object of all the resolved values. We'll use this in the subsequent\n             * animateChanges calls to determine whether a value has changed.\n             */\n            var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});\n            if (activeDelta === false)\n                resolvedValues = {};\n            /**\n             * Now we need to loop through all the keys in the prev prop and this prop,\n             * and decide:\n             * 1. If the value has changed, and needs animating\n             * 2. If it has been removed, and needs adding to the removedKeys set\n             * 3. If it has been removed in a higher priority type and needs animating\n             * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n             *    needs adding to the type's protectedKeys list.\n             */\n            var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;\n            var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues);\n            var markToAnimate = function (key) {\n                shouldAnimateType = true;\n                removedKeys.delete(key);\n                typeState.needsAnimating[key] = true;\n            };\n            for (var key in allKeys) {\n                var next = resolvedValues[key];\n                var prev = prevResolvedValues[key];\n                // If we've already handled this we can just skip ahead\n                if (encounteredKeys.hasOwnProperty(key))\n                    continue;\n                /**\n                 * If the value has changed, we probably want to animate it.\n                 */\n                if (next !== prev) {\n                    /**\n                     * If both values are keyframes, we need to shallow compare them to\n                     * detect whether any value has changed. If it has, we animate it.\n                     */\n                    if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n                        if (!shallowCompare(next, prev) || variantDidChange) {\n                            markToAnimate(key);\n                        }\n                        else {\n                            /**\n                             * If it hasn't changed, we want to ensure it doesn't animate by\n                             * adding it to the list of protected keys.\n                             */\n                            typeState.protectedKeys[key] = true;\n                        }\n                    }\n                    else if (next !== undefined) {\n                        // If next is defined and doesn't equal prev, it needs animating\n                        markToAnimate(key);\n                    }\n                    else {\n                        // If it's undefined, it's been removed.\n                        removedKeys.add(key);\n                    }\n                }\n                else if (next !== undefined && removedKeys.has(key)) {\n                    /**\n                     * If next hasn't changed and it isn't undefined, we want to check if it's\n                     * been removed by a higher priority\n                     */\n                    markToAnimate(key);\n                }\n                else {\n                    /**\n                     * If it hasn't changed, we add it to the list of protected values\n                     * to ensure it doesn't get animated.\n                     */\n                    typeState.protectedKeys[key] = true;\n                }\n            }\n            /**\n             * Update the typeState so next time animateChanges is called we can compare the\n             * latest prop and resolvedValues to these.\n             */\n            typeState.prevProp = prop;\n            typeState.prevResolvedValues = resolvedValues;\n            /**\n             *\n             */\n            if (typeState.isActive) {\n                encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues);\n            }\n            if (isInitialRender && visualElement.blockInitialAnimation) {\n                shouldAnimateType = false;\n            }\n            /**\n             * If this is an inherited prop we want to hard-block animations\n             * TODO: Test as this should probably still handle animations triggered\n             * by removed values?\n             */\n            if (shouldAnimateType && !isInherited) {\n                animations.push.apply(animations, __spreadArray([], __read(definitionList.map(function (animation) { return ({\n                    animation: animation,\n                    options: __assign({ type: type }, options),\n                }); })), false));\n            }\n        };\n        /**\n         * Iterate through all animation types in reverse priority order. For each, we want to\n         * detect which values it's handling and whether or not they've changed (and therefore\n         * need to be animated). If any values have been removed, we want to detect those in\n         * lower priority props and flag for animation.\n         */\n        for (var i = 0; i < numAnimationTypes; i++) {\n            _loop_1(i);\n        }\n        allAnimatedKeys = __assign({}, encounteredKeys);\n        /**\n         * If there are some removed value that haven't been dealt with,\n         * we need to create a new animation that falls back either to the value\n         * defined in the style prop, or the last read value.\n         */\n        if (removedKeys.size) {\n            var fallbackAnimation_1 = {};\n            removedKeys.forEach(function (key) {\n                var fallbackTarget = visualElement.getBaseTarget(key);\n                if (fallbackTarget !== undefined) {\n                    fallbackAnimation_1[key] = fallbackTarget;\n                }\n            });\n            animations.push({ animation: fallbackAnimation_1 });\n        }\n        var shouldAnimate = Boolean(animations.length);\n        if (isInitialRender &&\n            props.initial === false &&\n            !visualElement.manuallyAnimateOnMount) {\n            shouldAnimate = false;\n        }\n        isInitialRender = false;\n        return shouldAnimate ? animate(animations) : Promise.resolve();\n    }\n    /**\n     * Change whether a certain animation type is active.\n     */\n    function setActive(type, isActive, options) {\n        var _a;\n        // If the active state hasn't changed, we can safely do nothing here\n        if (state[type].isActive === isActive)\n            return Promise.resolve();\n        // Propagate active change to children\n        (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n        state[type].isActive = isActive;\n        var animations = animateChanges(options, type);\n        for (var key in state) {\n            state[key].protectedKeys = {};\n        }\n        return animations;\n    }\n    return {\n        isAnimated: isAnimated,\n        animateChanges: animateChanges,\n        setActive: setActive,\n        setAnimateFunction: setAnimateFunction,\n        getState: function () { return state; },\n    };\n}\nfunction checkVariantsDidChange(prev, next) {\n    if (typeof next === \"string\") {\n        return next !== prev;\n    }\n    else if (isVariantLabels(next)) {\n        return !shallowCompare(next, prev);\n    }\n    return false;\n}\nfunction createTypeState(isActive) {\n    if (isActive === void 0) { isActive = false; }\n    return {\n        isActive: isActive,\n        protectedKeys: {},\n        needsAnimating: {},\n        prevResolvedValues: {},\n    };\n}\nfunction createState() {\n    var _a;\n    return _a = {},\n        _a[AnimationType.Animate] = createTypeState(true),\n        _a[AnimationType.InView] = createTypeState(),\n        _a[AnimationType.Hover] = createTypeState(),\n        _a[AnimationType.Tap] = createTypeState(),\n        _a[AnimationType.Drag] = createTypeState(),\n        _a[AnimationType.Focus] = createTypeState(),\n        _a[AnimationType.Exit] = createTypeState(),\n        _a;\n}\n\nexport { checkVariantsDidChange, createAnimationState, variantPriorityOrder };\n","import { __read } from 'tslib';\nimport { useEffect, useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { usePresence } from '../../components/AnimatePresence/use-presence.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { createAnimationState } from '../../render/utils/animation-state.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar animations = {\n    animation: makeRenderlessComponent(function (_a) {\n        var visualElement = _a.visualElement, animate = _a.animate;\n        /**\n         * We dynamically generate the AnimationState manager as it contains a reference\n         * to the underlying animation library. We only want to load that if we load this,\n         * so people can optionally code split it out using the `m` component.\n         */\n        visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement));\n        /**\n         * Subscribe any provided AnimationControls to the component's VisualElement\n         */\n        if (isAnimationControls(animate)) {\n            useEffect(function () { return animate.subscribe(visualElement); }, [animate]);\n        }\n    }),\n    exit: makeRenderlessComponent(function (props) {\n        var custom = props.custom, visualElement = props.visualElement;\n        var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n        var presenceContext = useContext(PresenceContext);\n        useEffect(function () {\n            var _a, _b;\n            visualElement.isPresent = isPresent;\n            var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom });\n            !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove));\n        }, [isPresent]);\n    }),\n};\n\nexport { animations };\n","import { __assign } from 'tslib';\nimport { isMouseEvent, isTouchEvent } from './utils/event-type.mjs';\nimport { extractEventInfo } from '../events/event-info.mjs';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { secondsToMilliseconds } from '../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../events/use-pointer-event.mjs';\nimport { distance, pipe } from 'popmotion';\n\n/**\n * @internal\n */\nvar PanSession = /** @class */ (function () {\n    function PanSession(event, handlers, _a) {\n        var _this = this;\n        var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint;\n        /**\n         * @internal\n         */\n        this.startEvent = null;\n        /**\n         * @internal\n         */\n        this.lastMoveEvent = null;\n        /**\n         * @internal\n         */\n        this.lastMoveEventInfo = null;\n        /**\n         * @internal\n         */\n        this.handlers = {};\n        this.updatePoint = function () {\n            if (!(_this.lastMoveEvent && _this.lastMoveEventInfo))\n                return;\n            var info = getPanInfo(_this.lastMoveEventInfo, _this.history);\n            var isPanStarted = _this.startEvent !== null;\n            // Only start panning if the offset is larger than 3 pixels. If we make it\n            // any larger than this we'll want to reset the pointer history\n            // on the first update to avoid visual snapping to the cursoe.\n            var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3;\n            if (!isPanStarted && !isDistancePastThreshold)\n                return;\n            var point = info.point;\n            var timestamp = getFrameData().timestamp;\n            _this.history.push(__assign(__assign({}, point), { timestamp: timestamp }));\n            var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;\n            if (!isPanStarted) {\n                onStart && onStart(_this.lastMoveEvent, info);\n                _this.startEvent = _this.lastMoveEvent;\n            }\n            onMove && onMove(_this.lastMoveEvent, info);\n        };\n        this.handlePointerMove = function (event, info) {\n            _this.lastMoveEvent = event;\n            _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);\n            // Because Safari doesn't trigger mouseup events when it's above a `<select>`\n            if (isMouseEvent(event) && event.buttons === 0) {\n                _this.handlePointerUp(event, info);\n                return;\n            }\n            // Throttle mouse move event to once per frame\n            sync.update(_this.updatePoint, true);\n        };\n        this.handlePointerUp = function (event, info) {\n            _this.end();\n            var _a = _this.handlers, onEnd = _a.onEnd, onSessionEnd = _a.onSessionEnd;\n            var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);\n            if (_this.startEvent && onEnd) {\n                onEnd(event, panInfo);\n            }\n            onSessionEnd && onSessionEnd(event, panInfo);\n        };\n        // If we have more than one touch, don't start detecting this gesture\n        if (isTouchEvent(event) && event.touches.length > 1)\n            return;\n        this.handlers = handlers;\n        this.transformPagePoint = transformPagePoint;\n        var info = extractEventInfo(event);\n        var initialInfo = transformPoint(info, this.transformPagePoint);\n        var point = initialInfo.point;\n        var timestamp = getFrameData().timestamp;\n        this.history = [__assign(__assign({}, point), { timestamp: timestamp })];\n        var onSessionStart = handlers.onSessionStart;\n        onSessionStart &&\n            onSessionStart(event, getPanInfo(initialInfo, this.history));\n        this.removeListeners = pipe(addPointerEvent(window, \"pointermove\", this.handlePointerMove), addPointerEvent(window, \"pointerup\", this.handlePointerUp), addPointerEvent(window, \"pointercancel\", this.handlePointerUp));\n    }\n    PanSession.prototype.updateHandlers = function (handlers) {\n        this.handlers = handlers;\n    };\n    PanSession.prototype.end = function () {\n        this.removeListeners && this.removeListeners();\n        cancelSync.update(this.updatePoint);\n    };\n    return PanSession;\n}());\nfunction transformPoint(info, transformPagePoint) {\n    return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n    return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo(_a, history) {\n    var point = _a.point;\n    return {\n        point: point,\n        delta: subtractPoint(point, lastDevicePoint(history)),\n        offset: subtractPoint(point, startDevicePoint(history)),\n        velocity: getVelocity(history, 0.1),\n    };\n}\nfunction startDevicePoint(history) {\n    return history[0];\n}\nfunction lastDevicePoint(history) {\n    return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n    if (history.length < 2) {\n        return { x: 0, y: 0 };\n    }\n    var i = history.length - 1;\n    var timestampedPoint = null;\n    var lastPoint = lastDevicePoint(history);\n    while (i >= 0) {\n        timestampedPoint = history[i];\n        if (lastPoint.timestamp - timestampedPoint.timestamp >\n            secondsToMilliseconds(timeDelta)) {\n            break;\n        }\n        i--;\n    }\n    if (!timestampedPoint) {\n        return { x: 0, y: 0 };\n    }\n    var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;\n    if (time === 0) {\n        return { x: 0, y: 0 };\n    }\n    var currentVelocity = {\n        x: (lastPoint.x - timestampedPoint.x) / time,\n        y: (lastPoint.y - timestampedPoint.y) / time,\n    };\n    if (currentVelocity.x === Infinity) {\n        currentVelocity.x = 0;\n    }\n    if (currentVelocity.y === Infinity) {\n        currentVelocity.y = 0;\n    }\n    return currentVelocity;\n}\n\nexport { PanSession };\n","import { __read } from 'tslib';\nimport { clamp, mix, progress } from 'popmotion';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, _a, elastic) {\n    var min = _a.min, max = _a.max;\n    if (min !== undefined && point < min) {\n        // If we have a min point defined, and this is outside of that, constrain\n        point = elastic ? mix(min, point, elastic.min) : Math.max(point, min);\n    }\n    else if (max !== undefined && point > max) {\n        // If we have a max point defined, and this is outside of that, constrain\n        point = elastic ? mix(max, point, elastic.max) : Math.min(point, max);\n    }\n    return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n    return {\n        min: min !== undefined ? axis.min + min : undefined,\n        max: max !== undefined\n            ? axis.max + max - (axis.max - axis.min)\n            : undefined,\n    };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, _a) {\n    var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;\n    return {\n        x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n        y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n    };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n    var _a;\n    var min = constraintsAxis.min - layoutAxis.min;\n    var max = constraintsAxis.max - layoutAxis.max;\n    // If the constraints axis is actually smaller than the layout axis then we can\n    // flip the constraints\n    if (constraintsAxis.max - constraintsAxis.min <\n        layoutAxis.max - layoutAxis.min) {\n        _a = __read([max, min], 2), min = _a[0], max = _a[1];\n    }\n    return { min: min, max: max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n    return {\n        x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n        y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n    };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n    var origin = 0.5;\n    var sourceLength = calcLength(source);\n    var targetLength = calcLength(target);\n    if (targetLength > sourceLength) {\n        origin = progress(target.min, target.max - sourceLength, source.min);\n    }\n    else if (sourceLength > targetLength) {\n        origin = progress(source.min, source.max - targetLength, target.min);\n    }\n    return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n    var relativeConstraints = {};\n    if (constraints.min !== undefined) {\n        relativeConstraints.min = constraints.min - layout.min;\n    }\n    if (constraints.max !== undefined) {\n        relativeConstraints.max = constraints.max - layout.min;\n    }\n    return relativeConstraints;\n}\nvar defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic) {\n    if (dragElastic === void 0) { dragElastic = defaultElastic; }\n    if (dragElastic === false) {\n        dragElastic = 0;\n    }\n    else if (dragElastic === true) {\n        dragElastic = defaultElastic;\n    }\n    return {\n        x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n        y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n    };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n    return {\n        min: resolvePointElastic(dragElastic, minLabel),\n        max: resolvePointElastic(dragElastic, maxLabel),\n    };\n}\nfunction resolvePointElastic(dragElastic, label) {\n    var _a;\n    return typeof dragElastic === \"number\"\n        ? dragElastic\n        : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","/**\n * Bounding boxes tend to be defined as top, left, right, bottom. For various operations\n * it's easier to consider each axis individually. This function returns a bounding box\n * as a map of single-axis min/max values.\n */\nfunction convertBoundingBoxToBox(_a) {\n    var top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;\n    return {\n        x: { min: left, max: right },\n        y: { min: top, max: bottom },\n    };\n}\nfunction convertBoxToBoundingBox(_a) {\n    var x = _a.x, y = _a.y;\n    return { top: y.min, right: x.max, bottom: y.max, left: x.min };\n}\n/**\n * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function\n * provided by Framer to allow measured points to be corrected for device scaling. This is used\n * when measuring DOM elements and DOM event points.\n */\nfunction transformBoxPoints(point, transformPoint) {\n    if (!transformPoint)\n        return point;\n    var topLeft = transformPoint({ x: point.left, y: point.top });\n    var bottomRight = transformPoint({ x: point.right, y: point.bottom });\n    return {\n        top: topLeft.y,\n        left: topLeft.x,\n        bottom: bottomRight.y,\n        right: bottomRight.x,\n    };\n}\n\nexport { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };\n","import { convertBoundingBoxToBox, transformBoxPoints } from '../geometry/conversion.mjs';\nimport { translateAxis } from '../geometry/delta-apply.mjs';\n\nfunction measureViewportBox(instance, transformPoint) {\n    return convertBoundingBoxToBox(transformBoxPoints(instance.getBoundingClientRect(), transformPoint));\n}\nfunction measurePageBox(element, rootProjectionNode, transformPagePoint) {\n    var viewportBox = measureViewportBox(element, transformPagePoint);\n    var scroll = rootProjectionNode.scroll;\n    if (scroll) {\n        translateAxis(viewportBox.x, scroll.x);\n        translateAxis(viewportBox.y, scroll.y);\n    }\n    return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n","import { __assign } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { PanSession } from '../PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/use-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { AnimationType } from '../../render/utils/types.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { startAnimation } from '../../animation/utils/transitions.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/use-dom-event.mjs';\nimport { mix } from 'popmotion';\nimport { percent } from 'style-value-types';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\n\nvar elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: AnyPointerEvent\nvar VisualElementDragControls = /** @class */ (function () {\n    function VisualElementDragControls(visualElement) {\n        // This is a reference to the global drag gesture lock, ensuring only one component\n        // can \"capture\" the drag of one or both axes.\n        // TODO: Look into moving this into pansession?\n        this.openGlobalLock = null;\n        this.isDragging = false;\n        this.currentDirection = null;\n        this.originPoint = { x: 0, y: 0 };\n        /**\n         * The permitted boundaries of travel, in pixels.\n         */\n        this.constraints = false;\n        this.hasMutatedConstraints = false;\n        /**\n         * The per-axis resolved elastic values.\n         */\n        this.elastic = createBox();\n        this.visualElement = visualElement;\n    }\n    VisualElementDragControls.prototype.start = function (originEvent, _a) {\n        var _this = this;\n        var _b = _a === void 0 ? {} : _a, _c = _b.snapToCursor, snapToCursor = _c === void 0 ? false : _c;\n        /**\n         * Don't start dragging if this component is exiting\n         */\n        if (this.visualElement.isPresent === false)\n            return;\n        var onSessionStart = function (event) {\n            // Stop any animations on both axis values immediately. This allows the user to throw and catch\n            // the component.\n            _this.stopAnimation();\n            if (snapToCursor) {\n                _this.snapToCursor(extractEventInfo(event, \"page\").point);\n            }\n        };\n        var onStart = function (event, info) {\n            var _a;\n            // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n            var _b = _this.getProps(), drag = _b.drag, dragPropagation = _b.dragPropagation, onDragStart = _b.onDragStart;\n            if (drag && !dragPropagation) {\n                if (_this.openGlobalLock)\n                    _this.openGlobalLock();\n                _this.openGlobalLock = getGlobalLock(drag);\n                // If we don 't have the lock, don't start dragging\n                if (!_this.openGlobalLock)\n                    return;\n            }\n            _this.isDragging = true;\n            _this.currentDirection = null;\n            _this.resolveConstraints();\n            if (_this.visualElement.projection) {\n                _this.visualElement.projection.isAnimationBlocked = true;\n                _this.visualElement.projection.target = undefined;\n            }\n            /**\n             * Record gesture origin\n             */\n            eachAxis(function (axis) {\n                var _a, _b;\n                var current = _this.getAxisMotionValue(axis).get() || 0;\n                /**\n                 * If the MotionValue is a percentage value convert to px\n                 */\n                if (percent.test(current)) {\n                    var measuredAxis = (_b = (_a = _this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.actual[axis];\n                    if (measuredAxis) {\n                        var length_1 = calcLength(measuredAxis);\n                        current = length_1 * (parseFloat(current) / 100);\n                    }\n                }\n                _this.originPoint[axis] = current;\n            });\n            // Fire onDragStart event\n            onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart(event, info);\n            (_a = _this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Drag, true);\n        };\n        var onMove = function (event, info) {\n            // latestPointerEvent = event\n            var _a = _this.getProps(), dragPropagation = _a.dragPropagation, dragDirectionLock = _a.dragDirectionLock, onDirectionLock = _a.onDirectionLock, onDrag = _a.onDrag;\n            // If we didn't successfully receive the gesture lock, early return.\n            if (!dragPropagation && !_this.openGlobalLock)\n                return;\n            var offset = info.offset;\n            // Attempt to detect drag direction if directionLock is true\n            if (dragDirectionLock && _this.currentDirection === null) {\n                _this.currentDirection = getCurrentDirection(offset);\n                // If we've successfully set a direction, notify listener\n                if (_this.currentDirection !== null) {\n                    onDirectionLock === null || onDirectionLock === void 0 ? void 0 : onDirectionLock(_this.currentDirection);\n                }\n                return;\n            }\n            // Update each point with the latest position\n            _this.updateAxis(\"x\", info.point, offset);\n            _this.updateAxis(\"y\", info.point, offset);\n            /**\n             * Ideally we would leave the renderer to fire naturally at the end of\n             * this frame but if the element is about to change layout as the result\n             * of a re-render we want to ensure the browser can read the latest\n             * bounding box to ensure the pointer and element don't fall out of sync.\n             */\n            _this.visualElement.syncRender();\n            /**\n             * This must fire after the syncRender call as it might trigger a state\n             * change which itself might trigger a layout update.\n             */\n            onDrag === null || onDrag === void 0 ? void 0 : onDrag(event, info);\n        };\n        var onSessionEnd = function (event, info) {\n            return _this.stop(event, info);\n        };\n        this.panSession = new PanSession(originEvent, {\n            onSessionStart: onSessionStart,\n            onStart: onStart,\n            onMove: onMove,\n            onSessionEnd: onSessionEnd,\n        }, { transformPagePoint: this.visualElement.getTransformPagePoint() });\n    };\n    VisualElementDragControls.prototype.stop = function (event, info) {\n        var isDragging = this.isDragging;\n        this.cancel();\n        if (!isDragging)\n            return;\n        var velocity = info.velocity;\n        this.startAnimation(velocity);\n        var onDragEnd = this.getProps().onDragEnd;\n        onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);\n    };\n    VisualElementDragControls.prototype.cancel = function () {\n        var _a, _b;\n        this.isDragging = false;\n        if (this.visualElement.projection) {\n            this.visualElement.projection.isAnimationBlocked = false;\n        }\n        (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();\n        this.panSession = undefined;\n        var dragPropagation = this.getProps().dragPropagation;\n        if (!dragPropagation && this.openGlobalLock) {\n            this.openGlobalLock();\n            this.openGlobalLock = null;\n        }\n        (_b = this.visualElement.animationState) === null || _b === void 0 ? void 0 : _b.setActive(AnimationType.Drag, false);\n    };\n    VisualElementDragControls.prototype.updateAxis = function (axis, _point, offset) {\n        var drag = this.getProps().drag;\n        // If we're not dragging this axis, do an early return.\n        if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n            return;\n        var axisValue = this.getAxisMotionValue(axis);\n        var next = this.originPoint[axis] + offset[axis];\n        // Apply constraints\n        if (this.constraints && this.constraints[axis]) {\n            next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n        }\n        axisValue.set(next);\n    };\n    VisualElementDragControls.prototype.resolveConstraints = function () {\n        var _this = this;\n        var _a = this.getProps(), dragConstraints = _a.dragConstraints, dragElastic = _a.dragElastic;\n        var layout = (this.visualElement.projection || {}).layout;\n        var prevConstraints = this.constraints;\n        if (dragConstraints && isRefObject(dragConstraints)) {\n            if (!this.constraints) {\n                this.constraints = this.resolveRefConstraints();\n            }\n        }\n        else {\n            if (dragConstraints && layout) {\n                this.constraints = calcRelativeConstraints(layout.actual, dragConstraints);\n            }\n            else {\n                this.constraints = false;\n            }\n        }\n        this.elastic = resolveDragElastic(dragElastic);\n        /**\n         * If we're outputting to external MotionValues, we want to rebase the measured constraints\n         * from viewport-relative to component-relative.\n         */\n        if (prevConstraints !== this.constraints &&\n            layout &&\n            this.constraints &&\n            !this.hasMutatedConstraints) {\n            eachAxis(function (axis) {\n                if (_this.getAxisMotionValue(axis)) {\n                    _this.constraints[axis] = rebaseAxisConstraints(layout.actual[axis], _this.constraints[axis]);\n                }\n            });\n        }\n    };\n    VisualElementDragControls.prototype.resolveRefConstraints = function () {\n        var _a = this.getProps(), constraints = _a.dragConstraints, onMeasureDragConstraints = _a.onMeasureDragConstraints;\n        if (!constraints || !isRefObject(constraints))\n            return false;\n        var constraintsElement = constraints.current;\n        invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n        var projection = this.visualElement.projection;\n        // TODO\n        if (!projection || !projection.layout)\n            return false;\n        var constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n        var measuredConstraints = calcViewportConstraints(projection.layout.actual, constraintsBox);\n        /**\n         * If there's an onMeasureDragConstraints listener we call it and\n         * if different constraints are returned, set constraints to that\n         */\n        if (onMeasureDragConstraints) {\n            var userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n            this.hasMutatedConstraints = !!userConstraints;\n            if (userConstraints) {\n                measuredConstraints = convertBoundingBoxToBox(userConstraints);\n            }\n        }\n        return measuredConstraints;\n    };\n    VisualElementDragControls.prototype.startAnimation = function (velocity) {\n        var _this = this;\n        var _a = this.getProps(), drag = _a.drag, dragMomentum = _a.dragMomentum, dragElastic = _a.dragElastic, dragTransition = _a.dragTransition, dragSnapToOrigin = _a.dragSnapToOrigin, onDragTransitionEnd = _a.onDragTransitionEnd;\n        var constraints = this.constraints || {};\n        var momentumAnimations = eachAxis(function (axis) {\n            var _a;\n            if (!shouldDrag(axis, drag, _this.currentDirection)) {\n                return;\n            }\n            var transition = (_a = constraints === null || constraints === void 0 ? void 0 : constraints[axis]) !== null && _a !== void 0 ? _a : {};\n            if (dragSnapToOrigin)\n                transition = { min: 0, max: 0 };\n            /**\n             * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n             * of spring animations so we should look into adding a disable spring option to `inertia`.\n             * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n             * using the value of `dragElastic`.\n             */\n            var bounceStiffness = dragElastic ? 200 : 1000000;\n            var bounceDamping = dragElastic ? 40 : 10000000;\n            var inertia = __assign(__assign({ type: \"inertia\", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness, bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);\n            // If we're not animating on an externally-provided `MotionValue` we can use the\n            // component's animation controls which will handle interactions with whileHover (etc),\n            // otherwise we just have to animate the `MotionValue` itself.\n            return _this.startAxisValueAnimation(axis, inertia);\n        });\n        // Run all animations and then resolve the new drag constraints.\n        return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n    };\n    VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {\n        var axisValue = this.getAxisMotionValue(axis);\n        return startAnimation(axis, axisValue, 0, transition);\n    };\n    VisualElementDragControls.prototype.stopAnimation = function () {\n        var _this = this;\n        eachAxis(function (axis) { return _this.getAxisMotionValue(axis).stop(); });\n    };\n    /**\n     * Drag works differently depending on which props are provided.\n     *\n     * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n     * - Otherwise, we apply the delta to the x/y motion values.\n     */\n    VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {\n        var _a, _b;\n        var dragKey = \"_drag\" + axis.toUpperCase();\n        var externalMotionValue = this.visualElement.getProps()[dragKey];\n        return externalMotionValue\n            ? externalMotionValue\n            : this.visualElement.getValue(axis, (_b = (_a = this.visualElement.getProps().initial) === null || _a === void 0 ? void 0 : _a[axis]) !== null && _b !== void 0 ? _b : 0);\n    };\n    VisualElementDragControls.prototype.snapToCursor = function (point) {\n        var _this = this;\n        eachAxis(function (axis) {\n            var drag = _this.getProps().drag;\n            // If we're not dragging this axis, do an early return.\n            if (!shouldDrag(axis, drag, _this.currentDirection))\n                return;\n            var projection = _this.visualElement.projection;\n            var axisValue = _this.getAxisMotionValue(axis);\n            if (projection && projection.layout) {\n                var _a = projection.layout.actual[axis], min = _a.min, max = _a.max;\n                axisValue.set(point[axis] - mix(min, max, 0.5));\n            }\n        });\n    };\n    /**\n     * When the viewport resizes we want to check if the measured constraints\n     * have changed and, if so, reposition the element within those new constraints\n     * relative to where it was before the resize.\n     */\n    VisualElementDragControls.prototype.scalePositionWithinConstraints = function () {\n        var _this = this;\n        var _a;\n        var _b = this.getProps(), drag = _b.drag, dragConstraints = _b.dragConstraints;\n        var projection = this.visualElement.projection;\n        if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n            return;\n        /**\n         * Stop current animations as there can be visual glitching if we try to do\n         * this mid-animation\n         */\n        this.stopAnimation();\n        /**\n         * Record the relative position of the dragged element relative to the\n         * constraints box and save as a progress value.\n         */\n        var boxProgress = { x: 0, y: 0 };\n        eachAxis(function (axis) {\n            var axisValue = _this.getAxisMotionValue(axis);\n            if (axisValue) {\n                var latest = axisValue.get();\n                boxProgress[axis] = calcOrigin({ min: latest, max: latest }, _this.constraints[axis]);\n            }\n        });\n        /**\n         * Update the layout of this element and resolve the latest drag constraints\n         */\n        var transformTemplate = this.visualElement.getProps().transformTemplate;\n        this.visualElement.getInstance().style.transform = transformTemplate\n            ? transformTemplate({}, \"\")\n            : \"none\";\n        (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n        projection.updateLayout();\n        this.resolveConstraints();\n        /**\n         * For each axis, calculate the current progress of the layout axis\n         * within the new constraints.\n         */\n        eachAxis(function (axis) {\n            if (!shouldDrag(axis, drag, null))\n                return;\n            /**\n             * Calculate a new transform based on the previous box progress\n             */\n            var axisValue = _this.getAxisMotionValue(axis);\n            var _a = _this.constraints[axis], min = _a.min, max = _a.max;\n            axisValue.set(mix(min, max, boxProgress[axis]));\n        });\n    };\n    VisualElementDragControls.prototype.addListeners = function () {\n        var _this = this;\n        var _a;\n        elementDragControls.set(this.visualElement, this);\n        var element = this.visualElement.getInstance();\n        /**\n         * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n         */\n        var stopPointerListener = addPointerEvent(element, \"pointerdown\", function (event) {\n            var _a = _this.getProps(), drag = _a.drag, _b = _a.dragListener, dragListener = _b === void 0 ? true : _b;\n            drag && dragListener && _this.start(event);\n        });\n        var measureDragConstraints = function () {\n            var dragConstraints = _this.getProps().dragConstraints;\n            if (isRefObject(dragConstraints)) {\n                _this.constraints = _this.resolveRefConstraints();\n            }\n        };\n        var projection = this.visualElement.projection;\n        var stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n        if (projection && !projection.layout) {\n            (_a = projection.root) === null || _a === void 0 ? void 0 : _a.updateScroll();\n            projection.updateLayout();\n        }\n        measureDragConstraints();\n        /**\n         * Attach a window resize listener to scale the draggable target within its defined\n         * constraints as the window resizes.\n         */\n        var stopResizeListener = addDomEvent(window, \"resize\", function () {\n            _this.scalePositionWithinConstraints();\n        });\n        /**\n         * If the element's layout changes, calculate the delta and apply that to\n         * the drag gesture's origin point.\n         */\n        projection.addEventListener(\"didUpdate\", (function (_a) {\n            var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged;\n            if (_this.isDragging && hasLayoutChanged) {\n                eachAxis(function (axis) {\n                    var motionValue = _this.getAxisMotionValue(axis);\n                    if (!motionValue)\n                        return;\n                    _this.originPoint[axis] += delta[axis].translate;\n                    motionValue.set(motionValue.get() + delta[axis].translate);\n                });\n                _this.visualElement.syncRender();\n            }\n        }));\n        return function () {\n            stopResizeListener();\n            stopPointerListener();\n            stopMeasureLayoutListener();\n        };\n    };\n    VisualElementDragControls.prototype.getProps = function () {\n        var props = this.visualElement.getProps();\n        var _a = props.drag, drag = _a === void 0 ? false : _a, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e = props.dragElastic, dragElastic = _e === void 0 ? defaultElastic : _e, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;\n        return __assign(__assign({}, props), { drag: drag, dragDirectionLock: dragDirectionLock, dragPropagation: dragPropagation, dragConstraints: dragConstraints, dragElastic: dragElastic, dragMomentum: dragMomentum });\n    };\n    return VisualElementDragControls;\n}());\nfunction shouldDrag(direction, drag, currentDirection) {\n    return ((drag === true || drag === direction) &&\n        (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold) {\n    if (lockThreshold === void 0) { lockThreshold = 10; }\n    var direction = null;\n    if (Math.abs(offset.y) > lockThreshold) {\n        direction = \"y\";\n    }\n    else if (Math.abs(offset.x) > lockThreshold) {\n        direction = \"x\";\n    }\n    return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { useDrag } from '../../gestures/drag/use-drag.mjs';\nimport { usePanGesture } from '../../gestures/use-pan-gesture.mjs';\nimport { makeRenderlessComponent } from '../utils/make-renderless-component.mjs';\n\nvar drag = {\n    pan: makeRenderlessComponent(usePanGesture),\n    drag: makeRenderlessComponent(useDrag),\n};\n\nexport { drag };\n","import { useRef, useContext, useEffect } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { useUnmountEffect } from '../utils/use-unmount-effect.mjs';\nimport { usePointerEvent } from '../events/use-pointer-event.mjs';\nimport { PanSession } from './PanSession.mjs';\n\n/**\n *\n * @param handlers -\n * @param ref -\n *\n * @internalremarks\n * Currently this sets new pan gesture functions every render. The memo route has been explored\n * in the past but ultimately we're still creating new functions every render. An optimisation\n * to explore is creating the pan gestures and loading them into a `ref`.\n *\n * @internal\n */\nfunction usePanGesture(_a) {\n    var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd, onPanSessionStart = _a.onPanSessionStart, visualElement = _a.visualElement;\n    var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;\n    var panSession = useRef(null);\n    var transformPagePoint = useContext(MotionConfigContext).transformPagePoint;\n    var handlers = {\n        onSessionStart: onPanSessionStart,\n        onStart: onPanStart,\n        onMove: onPan,\n        onEnd: function (event, info) {\n            panSession.current = null;\n            onPanEnd && onPanEnd(event, info);\n        },\n    };\n    useEffect(function () {\n        if (panSession.current !== null) {\n            panSession.current.updateHandlers(handlers);\n        }\n    });\n    function onPointerDown(event) {\n        panSession.current = new PanSession(event, handlers, {\n            transformPagePoint: transformPagePoint,\n        });\n    }\n    usePointerEvent(visualElement, \"pointerdown\", hasPanEvents && onPointerDown);\n    useUnmountEffect(function () { return panSession.current && panSession.current.end(); });\n}\n\nexport { usePanGesture };\n","import { useEffect } from 'react';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * A hook that allows an element to be dragged.\n *\n * @internal\n */\nfunction useDrag(props) {\n    var groupDragControls = props.dragControls, visualElement = props.visualElement;\n    var dragControls = useConstant(function () { return new VisualElementDragControls(visualElement); });\n    // If we've been provided a DragControls for manual control over the drag gesture,\n    // subscribe this component to it on mount.\n    useEffect(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls, groupDragControls]);\n    // Apply the event listeners to the element\n    useEffect(function () { return dragControls.addListeners(); }, [dragControls]);\n}\n\nexport { useDrag };\n","import { __spreadArray, __read } from 'tslib';\nimport { SubscriptionManager } from '../../utils/subscription-manager.mjs';\n\nvar names = [\n    \"LayoutMeasure\",\n    \"BeforeLayoutMeasure\",\n    \"LayoutUpdate\",\n    \"ViewportBoxUpdate\",\n    \"Update\",\n    \"Render\",\n    \"AnimationComplete\",\n    \"LayoutAnimationComplete\",\n    \"AnimationStart\",\n    \"SetAxisTarget\",\n    \"Unmount\",\n];\nfunction createLifecycles() {\n    var managers = names.map(function () { return new SubscriptionManager(); });\n    var propSubscriptions = {};\n    var lifecycles = {\n        clearAllListeners: function () { return managers.forEach(function (manager) { return manager.clear(); }); },\n        updatePropListeners: function (props) {\n            names.forEach(function (name) {\n                var _a;\n                var on = \"on\" + name;\n                var propListener = props[on];\n                // Unsubscribe existing subscription\n                (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);\n                // Add new subscription\n                if (propListener) {\n                    propSubscriptions[name] = lifecycles[on](propListener);\n                }\n            });\n        },\n    };\n    managers.forEach(function (manager, i) {\n        lifecycles[\"on\" + names[i]] = function (handler) { return manager.add(handler); };\n        lifecycles[\"notify\" + names[i]] = function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            return manager.notify.apply(manager, __spreadArray([], __read(args), false));\n        };\n    });\n    return lifecycles;\n}\n\nexport { createLifecycles };\n","import { __assign, __spreadArray, __read } from 'tslib';\nimport sync, { cancelSync } from 'framesync';\nimport { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { variantPriorityOrder } from './utils/animation-state.mjs';\nimport { createLifecycles } from './utils/lifecycles.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, isVariantLabel } from './utils/variants.mjs';\n\nvar visualElement = function (_a) {\n    var _b = _a.treeType, treeType = _b === void 0 ? \"\" : _b, build = _a.build, getBaseTarget = _a.getBaseTarget, makeTargetAnimatable = _a.makeTargetAnimatable, measureViewportBox = _a.measureViewportBox, renderInstance = _a.render, readValueFromInstance = _a.readValueFromInstance, removeValueFromRenderState = _a.removeValueFromRenderState, sortNodePosition = _a.sortNodePosition, scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;\n    return function (_a, options) {\n        var parent = _a.parent, props = _a.props, presenceId = _a.presenceId, blockInitialAnimation = _a.blockInitialAnimation, visualState = _a.visualState, shouldReduceMotion = _a.shouldReduceMotion;\n        if (options === void 0) { options = {}; }\n        var isMounted = false;\n        var latestValues = visualState.latestValues, renderState = visualState.renderState;\n        /**\n         * The instance of the render-specific node that will be hydrated by the\n         * exposed React ref. So for example, this visual element can host a\n         * HTMLElement, plain object, or Three.js object. The functions provided\n         * in VisualElementConfig allow us to interface with this instance.\n         */\n        var instance;\n        /**\n         * Manages the subscriptions for a visual element's lifecycle, for instance\n         * onRender\n         */\n        var lifecycles = createLifecycles();\n        /**\n         * A map of all motion values attached to this visual element. Motion\n         * values are source of truth for any given animated value. A motion\n         * value might be provided externally by the component via props.\n         */\n        var values = new Map();\n        /**\n         * A map of every subscription that binds the provided or generated\n         * motion values onChange listeners to this visual element.\n         */\n        var valueSubscriptions = new Map();\n        /**\n         * A reference to the previously-provided motion values as returned\n         * from scrapeMotionValuesFromProps. We use the keys in here to determine\n         * if any motion values need to be removed after props are updated.\n         */\n        var prevMotionValues = {};\n        /**\n         * When values are removed from all animation props we need to search\n         * for a fallback value to animate to. These values are tracked in baseTarget.\n         */\n        var baseTarget = __assign({}, latestValues);\n        // Internal methods ========================\n        /**\n         * On mount, this will be hydrated with a callback to disconnect\n         * this visual element from its parent on unmount.\n         */\n        var removeFromVariantTree;\n        /**\n         * Render the element with the latest styles outside of the React\n         * render lifecycle\n         */\n        function render() {\n            if (!instance || !isMounted)\n                return;\n            triggerBuild();\n            renderInstance(instance, renderState, props.style, element.projection);\n        }\n        function triggerBuild() {\n            build(element, renderState, latestValues, options, props);\n        }\n        function update() {\n            lifecycles.notifyUpdate(latestValues);\n        }\n        /**\n         *\n         */\n        function bindToMotionValue(key, value) {\n            var removeOnChange = value.onChange(function (latestValue) {\n                latestValues[key] = latestValue;\n                props.onUpdate && sync.update(update, false, true);\n            });\n            var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);\n            valueSubscriptions.set(key, function () {\n                removeOnChange();\n                removeOnRenderRequest();\n            });\n        }\n        /**\n         * Any motion values that are provided to the element when created\n         * aren't yet bound to the element, as this would technically be impure.\n         * However, we iterate through the motion values and set them to the\n         * initial values for this component.\n         *\n         * TODO: This is impure and we should look at changing this to run on mount.\n         * Doing so will break some tests but this isn't neccessarily a breaking change,\n         * more a reflection of the test.\n         */\n        var initialMotionValues = scrapeMotionValuesFromProps(props);\n        for (var key in initialMotionValues) {\n            var value = initialMotionValues[key];\n            if (latestValues[key] !== undefined && isMotionValue(value)) {\n                value.set(latestValues[key], false);\n            }\n        }\n        /**\n         * Determine what role this visual element should take in the variant tree.\n         */\n        var isControllingVariants = checkIfControllingVariants(props);\n        var isVariantNode = checkIfVariantNode(props);\n        var element = __assign(__assign({ treeType: treeType, \n            /**\n             * This is a mirror of the internal instance prop, which keeps\n             * VisualElement type-compatible with React's RefObject.\n             */\n            current: null, \n            /**\n             * The depth of this visual element within the visual element tree.\n             */\n            depth: parent ? parent.depth + 1 : 0, parent: parent, children: new Set(), \n            /**\n             *\n             */\n            presenceId: presenceId, shouldReduceMotion: shouldReduceMotion, \n            /**\n             * If this component is part of the variant tree, it should track\n             * any children that are also part of the tree. This is essentially\n             * a shadow tree to simplify logic around how to stagger over children.\n             */\n            variantChildren: isVariantNode ? new Set() : undefined, \n            /**\n             * Whether this instance is visible. This can be changed imperatively\n             * by the projection tree, is analogous to CSS's visibility in that\n             * hidden elements should take up layout, and needs enacting by the configured\n             * render function.\n             */\n            isVisible: undefined, \n            /**\n             * Normally, if a component is controlled by a parent's variants, it can\n             * rely on that ancestor to trigger animations further down the tree.\n             * However, if a component is created after its parent is mounted, the parent\n             * won't trigger that mount animation so the child needs to.\n             *\n             * TODO: This might be better replaced with a method isParentMounted\n             */\n            manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()), \n            /**\n             * This can be set by AnimatePresence to force components that mount\n             * at the same time as it to mount as if they have initial={false} set.\n             */\n            blockInitialAnimation: blockInitialAnimation, \n            /**\n             * Determine whether this component has mounted yet. This is mostly used\n             * by variant children to determine whether they need to trigger their\n             * own animations on mount.\n             */\n            isMounted: function () { return Boolean(instance); }, mount: function (newInstance) {\n                isMounted = true;\n                instance = element.current = newInstance;\n                if (element.projection) {\n                    element.projection.mount(newInstance);\n                }\n                if (isVariantNode && parent && !isControllingVariants) {\n                    removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);\n                }\n                values.forEach(function (value, key) { return bindToMotionValue(key, value); });\n                parent === null || parent === void 0 ? void 0 : parent.children.add(element);\n                element.setProps(props);\n            }, \n            /**\n             *\n             */\n            unmount: function () {\n                var _a;\n                (_a = element.projection) === null || _a === void 0 ? void 0 : _a.unmount();\n                cancelSync.update(update);\n                cancelSync.render(render);\n                valueSubscriptions.forEach(function (remove) { return remove(); });\n                removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();\n                parent === null || parent === void 0 ? void 0 : parent.children.delete(element);\n                lifecycles.clearAllListeners();\n                instance = undefined;\n                isMounted = false;\n            }, \n            /**\n             * Add a child visual element to our set of children.\n             */\n            addVariantChild: function (child) {\n                var _a;\n                var closestVariantNode = element.getClosestVariantNode();\n                if (closestVariantNode) {\n                    (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);\n                    return function () {\n                        return closestVariantNode.variantChildren.delete(child);\n                    };\n                }\n            }, sortNodePosition: function (other) {\n                /**\n                 * If these nodes aren't even of the same type we can't compare their depth.\n                 */\n                if (!sortNodePosition || treeType !== other.treeType)\n                    return 0;\n                return sortNodePosition(element.getInstance(), other.getInstance());\n            }, \n            /**\n             * Returns the closest variant node in the tree starting from\n             * this visual element.\n             */\n            getClosestVariantNode: function () {\n                return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();\n            }, \n            /**\n             * Expose the latest layoutId prop.\n             */\n            getLayoutId: function () { return props.layoutId; }, \n            /**\n             * Returns the current instance.\n             */\n            getInstance: function () { return instance; }, \n            /**\n             * Get/set the latest static values.\n             */\n            getStaticValue: function (key) { return latestValues[key]; }, setStaticValue: function (key, value) { return (latestValues[key] = value); }, \n            /**\n             * Returns the latest motion value state. Currently only used to take\n             * a snapshot of the visual element - perhaps this can return the whole\n             * visual state\n             */\n            getLatestValues: function () { return latestValues; }, \n            /**\n             * Set the visiblity of the visual element. If it's changed, schedule\n             * a render to reflect these changes.\n             */\n            setVisibility: function (visibility) {\n                if (element.isVisible === visibility)\n                    return;\n                element.isVisible = visibility;\n                element.scheduleRender();\n            }, \n            /**\n             * Make a target animatable by Popmotion. For instance, if we're\n             * trying to animate width from 100px to 100vw we need to measure 100vw\n             * in pixels to determine what we really need to animate to. This is also\n             * pluggable to support Framer's custom value types like Color,\n             * and CSS variables.\n             */\n            makeTargetAnimatable: function (target, canMutate) {\n                if (canMutate === void 0) { canMutate = true; }\n                return makeTargetAnimatable(element, target, props, canMutate);\n            }, \n            /**\n             * Measure the current viewport box with or without transforms.\n             * Only measures axis-aligned boxes, rotate and skew must be manually\n             * removed with a re-render to work.\n             */\n            measureViewportBox: function () {\n                return measureViewportBox(instance, props);\n            }, \n            // Motion values ========================\n            /**\n             * Add a motion value and bind it to this visual element.\n             */\n            addValue: function (key, value) {\n                // Remove existing value if it exists\n                if (element.hasValue(key))\n                    element.removeValue(key);\n                values.set(key, value);\n                latestValues[key] = value.get();\n                bindToMotionValue(key, value);\n            }, \n            /**\n             * Remove a motion value and unbind any active subscriptions.\n             */\n            removeValue: function (key) {\n                var _a;\n                values.delete(key);\n                (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();\n                valueSubscriptions.delete(key);\n                delete latestValues[key];\n                removeValueFromRenderState(key, renderState);\n            }, \n            /**\n             * Check whether we have a motion value for this key\n             */\n            hasValue: function (key) { return values.has(key); }, \n            /**\n             * Get a motion value for this key. If called with a default\n             * value, we'll create one if none exists.\n             */\n            getValue: function (key, defaultValue) {\n                var value = values.get(key);\n                if (value === undefined && defaultValue !== undefined) {\n                    value = motionValue(defaultValue);\n                    element.addValue(key, value);\n                }\n                return value;\n            }, \n            /**\n             * Iterate over our motion values.\n             */\n            forEachValue: function (callback) { return values.forEach(callback); }, \n            /**\n             * If we're trying to animate to a previously unencountered value,\n             * we need to check for it in our state and as a last resort read it\n             * directly from the instance (which might have performance implications).\n             */\n            readValue: function (key) {\n                var _a;\n                return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options);\n            }, \n            /**\n             * Set the base target to later animate back to. This is currently\n             * only hydrated on creation and when we first read a value.\n             */\n            setBaseTarget: function (key, value) {\n                baseTarget[key] = value;\n            }, \n            /**\n             * Find the base target for a value thats been removed from all animation\n             * props.\n             */\n            getBaseTarget: function (key) {\n                if (getBaseTarget) {\n                    var target = getBaseTarget(props, key);\n                    if (target !== undefined && !isMotionValue(target))\n                        return target;\n                }\n                return baseTarget[key];\n            } }, lifecycles), { \n            /**\n             * Build the renderer state based on the latest visual state.\n             */\n            build: function () {\n                triggerBuild();\n                return renderState;\n            }, \n            /**\n             * Schedule a render on the next animation frame.\n             */\n            scheduleRender: function () {\n                sync.render(render, false, true);\n            }, \n            /**\n             * Synchronously fire render. It's prefered that we batch renders but\n             * in many circumstances, like layout measurement, we need to run this\n             * synchronously. However in those instances other measures should be taken\n             * to batch reads/writes.\n             */\n            syncRender: render, \n            /**\n             * Update the provided props. Ensure any newly-added motion values are\n             * added to our map, old ones removed, and listeners updated.\n             */\n            setProps: function (newProps) {\n                if (newProps.transformTemplate || props.transformTemplate) {\n                    element.scheduleRender();\n                }\n                props = newProps;\n                lifecycles.updatePropListeners(newProps);\n                prevMotionValues = updateMotionValuesFromProps(element, scrapeMotionValuesFromProps(props), prevMotionValues);\n            }, getProps: function () { return props; }, \n            // Variants ==============================\n            /**\n             * Returns the variant definition with a given name.\n             */\n            getVariant: function (name) { var _a; return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; }, \n            /**\n             * Returns the defined default transition on this component.\n             */\n            getDefaultTransition: function () { return props.transition; }, getTransformPagePoint: function () {\n                return props.transformPagePoint;\n            }, \n            /**\n             * Used by child variant nodes to get the closest ancestor variant props.\n             */\n            getVariantContext: function (startAtParent) {\n                if (startAtParent === void 0) { startAtParent = false; }\n                if (startAtParent)\n                    return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();\n                if (!isControllingVariants) {\n                    var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};\n                    if (props.initial !== undefined) {\n                        context_1.initial = props.initial;\n                    }\n                    return context_1;\n                }\n                var context = {};\n                for (var i = 0; i < numVariantProps; i++) {\n                    var name_1 = variantProps[i];\n                    var prop = props[name_1];\n                    if (isVariantLabel(prop) || prop === false) {\n                        context[name_1] = prop;\n                    }\n                }\n                return context;\n            } });\n        return element;\n    };\n};\nvar variantProps = __spreadArray([\"initial\"], __read(variantPriorityOrder), false);\nvar numVariantProps = variantProps.length;\n\nexport { visualElement };\n","import { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n    var _a;\n    for (var key in next) {\n        var nextValue = next[key];\n        var prevValue = prev[key];\n        if (isMotionValue(nextValue)) {\n            /**\n             * If this is a motion value found in props or style, we want to add it\n             * to our visual element's motion value map.\n             */\n            element.addValue(key, nextValue);\n        }\n        else if (isMotionValue(prevValue)) {\n            /**\n             * If we're swapping to a new motion value, create a new motion value\n             * from that\n             */\n            element.addValue(key, motionValue(nextValue));\n        }\n        else if (prevValue !== nextValue) {\n            /**\n             * If this is a flat value that has changed, update the motion value\n             * or create one if it doesn't exist. We only want to do this if we're\n             * not handling the value with our animation state.\n             */\n            if (element.hasValue(key)) {\n                var existingValue = element.getValue(key);\n                // TODO: Only update values that aren't being animated or even looked at\n                !existingValue.hasAnimated && existingValue.set(nextValue);\n            }\n            else {\n                element.addValue(key, motionValue((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));\n            }\n        }\n    }\n    // Handle removed values\n    for (var key in prev) {\n        if (next[key] === undefined)\n            element.removeValue(key);\n    }\n    return next;\n}\n\nexport { updateMotionValuesFromProps };\n","import { __rest, __assign, __read } from 'tslib';\nimport { invariant } from 'hey-listen';\n\nfunction isCSSVariable(value) {\n    return typeof value === \"string\" && value.startsWith(\"var(--\");\n}\n/**\n * Parse Framer's special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n * @param current\n */\nvar cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\nfunction parseCSSVariable(current) {\n    var match = cssVariableRegex.exec(current);\n    if (!match)\n        return [,];\n    var _a = __read(match, 3), token = _a[1], fallback = _a[2];\n    return [token, fallback];\n}\nvar maxDepth = 4;\nfunction getVariableValue(current, element, depth) {\n    if (depth === void 0) { depth = 1; }\n    invariant(depth <= maxDepth, \"Max CSS variable fallback depth detected in property \\\"\".concat(current, \"\\\". This may indicate a circular fallback dependency.\"));\n    var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];\n    // No CSS variable detected\n    if (!token)\n        return;\n    // Attempt to read this CSS variable off the element\n    var resolved = window.getComputedStyle(element).getPropertyValue(token);\n    if (resolved) {\n        return resolved.trim();\n    }\n    else if (isCSSVariable(fallback)) {\n        // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.\n        return getVariableValue(fallback, element, depth + 1);\n    }\n    else {\n        return fallback;\n    }\n}\n/**\n * Resolve CSS variables from\n *\n * @internal\n */\nfunction resolveCSSVariables(visualElement, _a, transitionEnd) {\n    var _b;\n    var target = __rest(_a, []);\n    var element = visualElement.getInstance();\n    if (!(element instanceof Element))\n        return { target: target, transitionEnd: transitionEnd };\n    // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`\n    // only if they change but I think this reads clearer and this isn't a performance-critical path.\n    if (transitionEnd) {\n        transitionEnd = __assign({}, transitionEnd);\n    }\n    // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved\n    visualElement.forEachValue(function (value) {\n        var current = value.get();\n        if (!isCSSVariable(current))\n            return;\n        var resolved = getVariableValue(current, element);\n        if (resolved)\n            value.set(resolved);\n    });\n    // Cycle through every target property and resolve CSS variables. Currently\n    // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`\n    for (var key in target) {\n        var current = target[key];\n        if (!isCSSVariable(current))\n            continue;\n        var resolved = getVariableValue(current, element);\n        if (!resolved)\n            continue;\n        // Clone target if it hasn't already been\n        target[key] = resolved;\n        // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved\n        // CSS variable. This will ensure that after the animation the component will reflect\n        // changes in the value of the CSS variable.\n        if (transitionEnd)\n            (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : (transitionEnd[key] = current);\n    }\n    return { target: target, transitionEnd: transitionEnd };\n}\n\nexport { cssVariableRegex, parseCSSVariable, resolveCSSVariables };\n","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\n\nvar positionalKeys = new Set([\n    \"width\",\n    \"height\",\n    \"top\",\n    \"left\",\n    \"right\",\n    \"bottom\",\n    \"x\",\n    \"y\",\n]);\nvar isPositionalKey = function (key) { return positionalKeys.has(key); };\nvar hasPositionalKey = function (target) {\n    return Object.keys(target).some(isPositionalKey);\n};\nvar setAndResetVelocity = function (value, to) {\n    // Looks odd but setting it twice doesn't render, it'll just\n    // set both prev and current to the latest value\n    value.set(to, false);\n    value.set(to);\n};\nvar isNumOrPxType = function (v) {\n    return v === number || v === px;\n};\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n    BoundingBoxDimension[\"width\"] = \"width\";\n    BoundingBoxDimension[\"height\"] = \"height\";\n    BoundingBoxDimension[\"left\"] = \"left\";\n    BoundingBoxDimension[\"right\"] = \"right\";\n    BoundingBoxDimension[\"top\"] = \"top\";\n    BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar getPosFromMatrix = function (matrix, pos) {\n    return parseFloat(matrix.split(\", \")[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n    return function (_bbox, _a) {\n        var transform = _a.transform;\n        if (transform === \"none\" || !transform)\n            return 0;\n        var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n        if (matrix3d) {\n            return getPosFromMatrix(matrix3d[1], pos3);\n        }\n        else {\n            var matrix = transform.match(/^matrix\\((.+)\\)$/);\n            if (matrix) {\n                return getPosFromMatrix(matrix[1], pos2);\n            }\n            else {\n                return 0;\n            }\n        }\n    };\n};\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) { return !transformKeys.has(key); });\nfunction removeNonTranslationalTransform(visualElement) {\n    var removedTransforms = [];\n    nonTranslationalTransformKeys.forEach(function (key) {\n        var value = visualElement.getValue(key);\n        if (value !== undefined) {\n            removedTransforms.push([key, value.get()]);\n            value.set(key.startsWith(\"scale\") ? 1 : 0);\n        }\n    });\n    // Apply changes to element before measurement\n    if (removedTransforms.length)\n        visualElement.syncRender();\n    return removedTransforms;\n}\nvar positionalValues = {\n    // Dimensions\n    width: function (_a, _b) {\n        var x = _a.x;\n        var _c = _b.paddingLeft, paddingLeft = _c === void 0 ? \"0\" : _c, _d = _b.paddingRight, paddingRight = _d === void 0 ? \"0\" : _d;\n        return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);\n    },\n    height: function (_a, _b) {\n        var y = _a.y;\n        var _c = _b.paddingTop, paddingTop = _c === void 0 ? \"0\" : _c, _d = _b.paddingBottom, paddingBottom = _d === void 0 ? \"0\" : _d;\n        return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);\n    },\n    top: function (_bbox, _a) {\n        var top = _a.top;\n        return parseFloat(top);\n    },\n    left: function (_bbox, _a) {\n        var left = _a.left;\n        return parseFloat(left);\n    },\n    bottom: function (_a, _b) {\n        var y = _a.y;\n        var top = _b.top;\n        return parseFloat(top) + (y.max - y.min);\n    },\n    right: function (_a, _b) {\n        var x = _a.x;\n        var left = _b.left;\n        return parseFloat(left) + (x.max - x.min);\n    },\n    // Transform\n    x: getTranslateFromMatrix(4, 13),\n    y: getTranslateFromMatrix(5, 14),\n};\nvar convertChangedValueTypes = function (target, visualElement, changedKeys) {\n    var originBbox = visualElement.measureViewportBox();\n    var element = visualElement.getInstance();\n    var elementComputedStyle = getComputedStyle(element);\n    var display = elementComputedStyle.display;\n    var origin = {};\n    // If the element is currently set to display: \"none\", make it visible before\n    // measuring the target bounding box\n    if (display === \"none\") {\n        visualElement.setStaticValue(\"display\", target.display || \"block\");\n    }\n    /**\n     * Record origins before we render and update styles\n     */\n    changedKeys.forEach(function (key) {\n        origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n    });\n    // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n    visualElement.syncRender();\n    var targetBbox = visualElement.measureViewportBox();\n    changedKeys.forEach(function (key) {\n        // Restore styles to their **calculated computed style**, not their actual\n        // originally set style. This allows us to animate between equivalent pixel units.\n        var value = visualElement.getValue(key);\n        setAndResetVelocity(value, origin[key]);\n        target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n    });\n    return target;\n};\nvar checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {\n    if (origin === void 0) { origin = {}; }\n    if (transitionEnd === void 0) { transitionEnd = {}; }\n    target = __assign({}, target);\n    transitionEnd = __assign({}, transitionEnd);\n    var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n    // We want to remove any transform values that could affect the element's bounding box before\n    // it's measured. We'll reapply these later.\n    var removedTransformValues = [];\n    var hasAttemptedToRemoveTransformValues = false;\n    var changedValueTypeKeys = [];\n    targetPositionalKeys.forEach(function (key) {\n        var value = visualElement.getValue(key);\n        if (!visualElement.hasValue(key))\n            return;\n        var from = origin[key];\n        var fromType = findDimensionValueType(from);\n        var to = target[key];\n        var toType;\n        // TODO: The current implementation of this basically throws an error\n        // if you try and do value conversion via keyframes. There's probably\n        // a way of doing this but the performance implications would need greater scrutiny,\n        // as it'd be doing multiple resize-remeasure operations.\n        if (isKeyframesTarget(to)) {\n            var numKeyframes = to.length;\n            var fromIndex = to[0] === null ? 1 : 0;\n            from = to[fromIndex];\n            fromType = findDimensionValueType(from);\n            for (var i = fromIndex; i < numKeyframes; i++) {\n                if (!toType) {\n                    toType = findDimensionValueType(to[i]);\n                    invariant(toType === fromType ||\n                        (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n                }\n                else {\n                    invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n                }\n            }\n        }\n        else {\n            toType = findDimensionValueType(to);\n        }\n        if (fromType !== toType) {\n            // If they're both just number or px, convert them both to numbers rather than\n            // relying on resize/remeasure to convert (which is wasteful in this situation)\n            if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n                var current = value.get();\n                if (typeof current === \"string\") {\n                    value.set(parseFloat(current));\n                }\n                if (typeof to === \"string\") {\n                    target[key] = parseFloat(to);\n                }\n                else if (Array.isArray(to) && toType === px) {\n                    target[key] = to.map(parseFloat);\n                }\n            }\n            else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n                (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n                (from === 0 || to === 0)) {\n                // If one or the other value is 0, it's safe to coerce it to the\n                // type of the other without measurement\n                if (from === 0) {\n                    value.set(toType.transform(from));\n                }\n                else {\n                    target[key] = fromType.transform(to);\n                }\n            }\n            else {\n                // If we're going to do value conversion via DOM measurements, we first\n                // need to remove non-positional transform values that could affect the bbox measurements.\n                if (!hasAttemptedToRemoveTransformValues) {\n                    removedTransformValues =\n                        removeNonTranslationalTransform(visualElement);\n                    hasAttemptedToRemoveTransformValues = true;\n                }\n                changedValueTypeKeys.push(key);\n                transitionEnd[key] =\n                    transitionEnd[key] !== undefined\n                        ? transitionEnd[key]\n                        : target[key];\n                setAndResetVelocity(value, to);\n            }\n        }\n    });\n    if (changedValueTypeKeys.length) {\n        var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n        // If we removed transform values, reapply them before the next render\n        if (removedTransformValues.length) {\n            removedTransformValues.forEach(function (_a) {\n                var _b = __read(_a, 2), key = _b[0], value = _b[1];\n                visualElement.getValue(key).set(value);\n            });\n        }\n        // Reapply original values\n        visualElement.syncRender();\n        return { target: convertedTarget, transitionEnd: transitionEnd };\n    }\n    else {\n        return { target: target, transitionEnd: transitionEnd };\n    }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n    return hasPositionalKey(target)\n        ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n        : { target: target, transitionEnd: transitionEnd };\n}\n\nexport { BoundingBoxDimension, positionalValues, unitConversion };\n","import { resolveCSSVariables } from './css-variables-conversion.mjs';\nimport { unitConversion } from './unit-conversion.mjs';\n\n/**\n * Parse a DOM variant to make it animatable. This involves resolving CSS variables\n * and ensuring animations like \"20%\" => \"calc(50vw)\" are performed in pixels.\n */\nvar parseDomVariant = function (visualElement, target, origin, transitionEnd) {\n    var resolved = resolveCSSVariables(visualElement, target, transitionEnd);\n    target = resolved.target;\n    transitionEnd = resolved.transitionEnd;\n    return unitConversion(visualElement, target, origin, transitionEnd);\n};\n\nexport { parseDomVariant };\n","import { __rest, __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { getOrigin, checkTargetForNewValues } from '../utils/setters.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariable } from '../dom/utils/is-css-variable.mjs';\nimport { parseDomVariant } from '../dom/utils/parse-dom-variant.mjs';\nimport { isTransformProp } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\n\nfunction getComputedStyle(element) {\n    return window.getComputedStyle(element);\n}\nvar htmlConfig = {\n    treeType: \"dom\",\n    readValueFromInstance: function (domElement, key) {\n        if (isTransformProp(key)) {\n            var defaultType = getDefaultValueType(key);\n            return defaultType ? defaultType.default || 0 : 0;\n        }\n        else {\n            var computedStyle = getComputedStyle(domElement);\n            return ((isCSSVariable(key)\n                ? computedStyle.getPropertyValue(key)\n                : computedStyle[key]) || 0);\n        }\n    },\n    sortNodePosition: function (a, b) {\n        /**\n         * compareDocumentPosition returns a bitmask, by using the bitwise &\n         * we're returning true if 2 in that bitmask is set to true. 2 is set\n         * to true if b preceeds a.\n         */\n        return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n    },\n    getBaseTarget: function (props, key) {\n        var _a;\n        return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];\n    },\n    measureViewportBox: function (element, _a) {\n        var transformPagePoint = _a.transformPagePoint;\n        return measureViewportBox(element, transformPagePoint);\n    },\n    /**\n     * Reset the transform on the current Element. This is called as part\n     * of a batched process across the entire layout tree. To remove this write\n     * cycle it'd be interesting to see if it's possible to \"undo\" all the current\n     * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms\n     * works\n     */\n    resetTransform: function (element, domElement, props) {\n        var transformTemplate = props.transformTemplate;\n        domElement.style.transform = transformTemplate\n            ? transformTemplate({}, \"\")\n            : \"none\";\n        // Ensure that whatever happens next, we restore our transform on the next frame\n        element.scheduleRender();\n    },\n    restoreTransform: function (instance, mutableState) {\n        instance.style.transform = mutableState.style.transform;\n    },\n    removeValueFromRenderState: function (key, _a) {\n        var vars = _a.vars, style = _a.style;\n        delete vars[key];\n        delete style[key];\n    },\n    /**\n     * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`\n     * can be animated by Motion.\n     */\n    makeTargetAnimatable: function (element, _a, _b, isMounted) {\n        var transformValues = _b.transformValues;\n        if (isMounted === void 0) { isMounted = true; }\n        var transition = _a.transition, transitionEnd = _a.transitionEnd, target = __rest(_a, [\"transition\", \"transitionEnd\"]);\n        var origin = getOrigin(target, transition || {}, element);\n        /**\n         * If Framer has provided a function to convert `Color` etc value types, convert them\n         */\n        if (transformValues) {\n            if (transitionEnd)\n                transitionEnd = transformValues(transitionEnd);\n            if (target)\n                target = transformValues(target);\n            if (origin)\n                origin = transformValues(origin);\n        }\n        if (isMounted) {\n            checkTargetForNewValues(element, target, origin);\n            var parsed = parseDomVariant(element, target, origin, transitionEnd);\n            transitionEnd = parsed.transitionEnd;\n            target = parsed.target;\n        }\n        return __assign({ transition: transition, transitionEnd: transitionEnd }, target);\n    },\n    scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n    build: function (element, renderState, latestValues, options, props) {\n        if (element.isVisible !== undefined) {\n            renderState.style.visibility = element.isVisible\n                ? \"visible\"\n                : \"hidden\";\n        }\n        buildHTMLStyles(renderState, latestValues, options, props.transformTemplate);\n    },\n    render: renderHTML,\n};\nvar htmlVisualElement = visualElement(htmlConfig);\n\nexport { getComputedStyle, htmlConfig, htmlVisualElement };\n","import { __assign } from 'tslib';\nimport { visualElement } from '../index.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { htmlConfig } from '../html/visual-element.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { isTransformProp } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\n\nvar svgVisualElement = visualElement(__assign(__assign({}, htmlConfig), { getBaseTarget: function (props, key) {\n        return props[key];\n    }, readValueFromInstance: function (domElement, key) {\n        var _a;\n        if (isTransformProp(key)) {\n            return ((_a = getDefaultValueType(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;\n        }\n        key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n        return domElement.getAttribute(key);\n    }, scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, build: function (_element, renderState, latestValues, options, props) {\n        buildSVGAttrs(renderState, latestValues, options, props.transformTemplate);\n    }, render: renderSVG }));\n\nexport { svgVisualElement };\n","import { htmlVisualElement } from '../html/visual-element.mjs';\nimport { svgVisualElement } from '../svg/visual-element.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nvar createDomVisualElement = function (Component, options) {\n    return isSVGComponent(Component)\n        ? svgVisualElement(options, { enableHardwareAcceleration: false })\n        : htmlVisualElement(options, { enableHardwareAcceleration: true });\n};\n\nexport { createDomVisualElement };\n","import { px } from 'style-value-types';\n\nfunction pixelsToPercent(pixels, axis) {\n    if (axis.max === axis.min)\n        return 0;\n    return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nvar correctBorderRadius = {\n    correct: function (latest, node) {\n        if (!node.target)\n            return latest;\n        /**\n         * If latest is a string, if it's a percentage we can return immediately as it's\n         * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n         */\n        if (typeof latest === \"string\") {\n            if (px.test(latest)) {\n                latest = parseFloat(latest);\n            }\n            else {\n                return latest;\n            }\n        }\n        /**\n         * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n         * pixel value as a percentage of each axis\n         */\n        var x = pixelsToPercent(latest, node.target.x);\n        var y = pixelsToPercent(latest, node.target.y);\n        return \"\".concat(x, \"% \").concat(y, \"%\");\n    },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mix } from 'popmotion';\nimport { complex } from 'style-value-types';\nimport { cssVariableRegex } from '../../render/dom/utils/css-variables-conversion.mjs';\n\nvar varToken = \"_$css\";\nvar correctBoxShadow = {\n    correct: function (latest, _a) {\n        var treeScale = _a.treeScale, projectionDelta = _a.projectionDelta;\n        var original = latest;\n        /**\n         * We need to first strip and store CSS variables from the string.\n         */\n        var containsCSSVariables = latest.includes(\"var(\");\n        var cssVariables = [];\n        if (containsCSSVariables) {\n            latest = latest.replace(cssVariableRegex, function (match) {\n                cssVariables.push(match);\n                return varToken;\n            });\n        }\n        var shadow = complex.parse(latest);\n        // TODO: Doesn't support multiple shadows\n        if (shadow.length > 5)\n            return original;\n        var template = complex.createTransformer(latest);\n        var offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n        // Calculate the overall context scale\n        var xScale = projectionDelta.x.scale * treeScale.x;\n        var yScale = projectionDelta.y.scale * treeScale.y;\n        shadow[0 + offset] /= xScale;\n        shadow[1 + offset] /= yScale;\n        /**\n         * Ideally we'd correct x and y scales individually, but because blur and\n         * spread apply to both we have to take a scale average and apply that instead.\n         * We could potentially improve the outcome of this by incorporating the ratio between\n         * the two scales.\n         */\n        var averageScale = mix(xScale, yScale, 0.5);\n        // Blur\n        if (typeof shadow[2 + offset] === \"number\")\n            shadow[2 + offset] /= averageScale;\n        // Spread\n        if (typeof shadow[3 + offset] === \"number\")\n            shadow[3 + offset] /= averageScale;\n        var output = template(shadow);\n        if (containsCSSVariables) {\n            var i_1 = 0;\n            output = output.replace(varToken, function () {\n                var cssVariable = cssVariables[i_1];\n                i_1++;\n                return cssVariable;\n            });\n        }\n        return output;\n    },\n};\n\nexport { correctBoxShadow };\n","import { __extends, __assign, __read } from 'tslib';\nimport sync from 'framesync';\nimport React__default, { useContext } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/create-projection-node.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\n\nvar MeasureLayoutWithContext = /** @class */ (function (_super) {\n    __extends(MeasureLayoutWithContext, _super);\n    function MeasureLayoutWithContext() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * This only mounts projection nodes for components that\n     * need measuring, we might want to do it for all components\n     * in order to incorporate transforms\n     */\n    MeasureLayoutWithContext.prototype.componentDidMount = function () {\n        var _this = this;\n        var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, switchLayoutGroup = _a.switchLayoutGroup, layoutId = _a.layoutId;\n        var projection = visualElement.projection;\n        addScaleCorrector(defaultScaleCorrectors);\n        if (projection) {\n            if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n                layoutGroup.group.add(projection);\n            if ((switchLayoutGroup === null || switchLayoutGroup === void 0 ? void 0 : switchLayoutGroup.register) && layoutId) {\n                switchLayoutGroup.register(projection);\n            }\n            projection.root.didUpdate();\n            projection.addEventListener(\"animationComplete\", function () {\n                _this.safeToRemove();\n            });\n            projection.setOptions(__assign(__assign({}, projection.options), { onExitComplete: function () { return _this.safeToRemove(); } }));\n        }\n        globalProjectionState.hasEverUpdated = true;\n    };\n    MeasureLayoutWithContext.prototype.getSnapshotBeforeUpdate = function (prevProps) {\n        var _this = this;\n        var _a = this.props, layoutDependency = _a.layoutDependency, visualElement = _a.visualElement, drag = _a.drag, isPresent = _a.isPresent;\n        var projection = visualElement.projection;\n        if (!projection)\n            return null;\n        /**\n         * TODO: We use this data in relegate to determine whether to\n         * promote a previous element. There's no guarantee its presence data\n         * will have updated by this point - if a bug like this arises it will\n         * have to be that we markForRelegation and then find a new lead some other way,\n         * perhaps in didUpdate\n         */\n        projection.isPresent = isPresent;\n        if (drag ||\n            prevProps.layoutDependency !== layoutDependency ||\n            layoutDependency === undefined) {\n            projection.willUpdate();\n        }\n        else {\n            this.safeToRemove();\n        }\n        if (prevProps.isPresent !== isPresent) {\n            if (isPresent) {\n                projection.promote();\n            }\n            else if (!projection.relegate()) {\n                /**\n                 * If there's another stack member taking over from this one,\n                 * it's in charge of the exit animation and therefore should\n                 * be in charge of the safe to remove. Otherwise we call it here.\n                 */\n                sync.postRender(function () {\n                    var _a;\n                    if (!((_a = projection.getStack()) === null || _a === void 0 ? void 0 : _a.members.length)) {\n                        _this.safeToRemove();\n                    }\n                });\n            }\n        }\n        return null;\n    };\n    MeasureLayoutWithContext.prototype.componentDidUpdate = function () {\n        var projection = this.props.visualElement.projection;\n        if (projection) {\n            projection.root.didUpdate();\n            if (!projection.currentAnimation && projection.isLead()) {\n                this.safeToRemove();\n            }\n        }\n    };\n    MeasureLayoutWithContext.prototype.componentWillUnmount = function () {\n        var _a = this.props, visualElement = _a.visualElement, layoutGroup = _a.layoutGroup, promoteContext = _a.switchLayoutGroup;\n        var projection = visualElement.projection;\n        if (projection) {\n            projection.scheduleCheckAfterUnmount();\n            if (layoutGroup === null || layoutGroup === void 0 ? void 0 : layoutGroup.group)\n                layoutGroup.group.remove(projection);\n            if (promoteContext === null || promoteContext === void 0 ? void 0 : promoteContext.deregister)\n                promoteContext.deregister(projection);\n        }\n    };\n    MeasureLayoutWithContext.prototype.safeToRemove = function () {\n        var safeToRemove = this.props.safeToRemove;\n        safeToRemove === null || safeToRemove === void 0 ? void 0 : safeToRemove();\n    };\n    MeasureLayoutWithContext.prototype.render = function () {\n        return null;\n    };\n    return MeasureLayoutWithContext;\n}(React__default.Component));\nfunction MeasureLayout(props) {\n    var _a = __read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1];\n    var layoutGroup = useContext(LayoutGroupContext);\n    return (React__default.createElement(MeasureLayoutWithContext, __assign({}, props, { layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove })));\n}\nvar defaultScaleCorrectors = {\n    borderRadius: __assign(__assign({}, correctBorderRadius), { applyTo: [\n            \"borderTopLeftRadius\",\n            \"borderTopRightRadius\",\n            \"borderBottomLeftRadius\",\n            \"borderBottomRightRadius\",\n        ] }),\n    borderTopLeftRadius: correctBorderRadius,\n    borderTopRightRadius: correctBorderRadius,\n    borderBottomLeftRadius: correctBorderRadius,\n    borderBottomRightRadius: correctBorderRadius,\n    boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { MeasureLayout } from './MeasureLayout.mjs';\n\nvar layoutFeatures = {\n    measureLayout: MeasureLayout,\n};\n\nexport { layoutFeatures };\n","import { createProjectionNode } from './create-projection-node.mjs';\n\nvar DocumentProjectionNode = createProjectionNode({\n    attachResizeListener: function (ref, notify) {\n        ref.addEventListener(\"resize\", notify, { passive: true });\n        return function () { return ref.removeEventListener(\"resize\", notify); };\n    },\n    measureScroll: function () { return ({\n        x: document.documentElement.scrollLeft || document.body.scrollLeft,\n        y: document.documentElement.scrollTop || document.body.scrollTop,\n    }); },\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nvar rootProjectionNode = {\n    current: undefined,\n};\nvar HTMLProjectionNode = createProjectionNode({\n    measureScroll: function (instance) { return ({\n        x: instance.scrollLeft,\n        y: instance.scrollTop,\n    }); },\n    defaultParent: function () {\n        if (!rootProjectionNode.current) {\n            var documentNode = new DocumentProjectionNode(0, {});\n            documentNode.mount(window);\n            documentNode.setOptions({ layoutScroll: true });\n            rootProjectionNode.current = documentNode;\n        }\n        return rootProjectionNode.current;\n    },\n    resetTransform: function (instance, value) {\n        instance.style.transform = value !== null && value !== void 0 ? value : \"none\";\n    },\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { __assign } from 'tslib';\nimport { createMotionComponent } from '../../motion/index.mjs';\nimport { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\nimport { gestureAnimations } from '../../motion/features/gestures.mjs';\nimport { animations } from '../../motion/features/animations.mjs';\nimport { drag } from '../../motion/features/drag.mjs';\nimport { createDomVisualElement } from './create-visual-element.mjs';\nimport { layoutFeatures } from '../../motion/features/layout/index.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nvar featureBundle = __assign(__assign(__assign(__assign({}, animations), gestureAnimations), drag), layoutFeatures);\n/**\n * HTML & SVG components, optimised for use with gestures and animation. These can be used as\n * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.\n *\n * @public\n */\nvar motion = /*@__PURE__*/ createMotionProxy(function (Component, config) {\n    return createDomMotionConfig(Component, config, featureBundle, createDomVisualElement, HTMLProjectionNode);\n});\n/**\n * Create a DOM `motion` component with the provided string. This is primarily intended\n * as a full alternative to `motion` for consumers who have to support environments that don't\n * support `Proxy`.\n *\n * ```javascript\n * import { createDomMotionComponent } from \"framer-motion\"\n *\n * const motion = {\n *   div: createDomMotionComponent('div')\n * }\n * ```\n *\n * @public\n */\nfunction createDomMotionComponent(key) {\n    return createMotionComponent(createDomMotionConfig(key, { forwardMotionProps: false }, featureBundle, createDomVisualElement, HTMLProjectionNode));\n}\n\nexport { createDomMotionComponent, motion };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {\n    var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n    var baseConfig = isSVGComponent(Component)\n        ? svgMotionConfig\n        : htmlMotionConfig;\n    return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component });\n}\n\nexport { createDomMotionConfig };\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst close = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z\" />\n\t</SVG>\n);\n\nexport default close;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","/**\n * @typedef OwnProps\n *\n * @property {import('./types').IconKey} icon        Icon name\n * @property {string}                    [className] Class name\n */\n/** @typedef {import('react').ComponentPropsWithoutRef<'span'> & OwnProps} Props */\n\n/**\n * @param {Props} props\n * @return {JSX.Element} Element\n */\nfunction Dashicon( { icon, className, ...extraProps } ) {\n\tconst iconClass = [\n\t\t'dashicon',\n\t\t'dashicons',\n\t\t'dashicons-' + icon,\n\t\tclassName,\n\t]\n\t\t.filter( Boolean )\n\t\t.join( ' ' );\n\n\treturn <span className={ iconClass } { ...extraProps } />;\n}\n\nexport default Dashicon;\n","/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tComponent,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType< P > = DashiconIconKey | ComponentType< P > | JSX.Element;\n\ninterface BaseProps< P > {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType< P > | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default 24\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props< P > = BaseProps< P > & AdditionalProps< IconType< P > >;\n\nfunction Icon< P >( {\n\ticon = null,\n\tsize = 24,\n\t...additionalProps\n}: Props< P > ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\tif ( icon.prototype instanceof Component ) {\n\t\t\treturn createElement( icon, {\n\t\t\t\tsize,\n\t\t\t\t...additionalProps,\n\t\t\t} as unknown as P );\n\t\t}\n\n\t\treturn ( icon as ( ...args: any[] ) => JSX.Element )( {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"lodash\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"warning\"];","/**\n * External dependencies\n */\nimport { isEqual, merge } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseRef,\n\tuseEffect,\n\tuseMemo,\n\tmemo,\n} from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\nexport const ComponentsContext = createContext(\n\t/** @type {Record<string, any>} */ ( {} )\n);\nexport const useComponentsContext = () => useContext( ComponentsContext );\n\n/**\n * Runs an effect only on update (i.e., ignores the first render)\n *\n * @param {import('react').EffectCallback} effect\n * @param {import('react').DependencyList} deps\n */\nfunction useUpdateEffect( effect, deps ) {\n\tconst mounted = useRef( false );\n\tuseEffect( () => {\n\t\tif ( mounted.current ) {\n\t\t\treturn effect();\n\t\t}\n\t\tmounted.current = true;\n\t\treturn undefined;\n\t}, deps );\n}\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object}              props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge( { value } ) {\n\tconst parentContext = useComponentsContext();\n\n\tconst valueRef = useRef( value );\n\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\t// Objects are equivalent.\n\t\t\tisEqual( valueRef.current, value ) &&\n\t\t\t// But not the same reference.\n\t\t\tvalueRef.current !== value\n\t\t) {\n\t\t\twarn( `Please memoize your context: ${ JSON.stringify( value ) }` );\n\t\t}\n\t}, [ value ] );\n\n\t// `parentContext` will always be memoized (i.e., the result of this hook itself)\n\t// or the default value from when the `ComponentsContext` was originally\n\t// initialized (which will never change, it's a static variable)\n\t// so this memoization will prevent `merge` and `JSON.parse/stringify` from rerunning unless\n\t// the references to `value` change OR the `parentContext` has an actual material change\n\t// (because again, it's guaranteed to be memoized or a static reference to the empty object\n\t// so we know that the only changes for `parentContext` are material ones... i.e., why we\n\t// don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n\t// need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n\t// correctly warning when the `value` isn't being properly memoized. All of that to say\n\t// that this should be super safe to assume that `useMemo` will only run on actual\n\t// changes to the two dependencies, therefore saving us calls to `merge` and `JSON.parse/stringify`!\n\tconst config = useMemo( () => {\n\t\t// Deep clone `parentContext` to avoid mutating it later.\n\t\treturn merge( JSON.parse( JSON.stringify( parentContext ) ), value );\n\t}, [ parentContext, value ] );\n\n\treturn config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n *   <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object}                    options\n * @param {import('react').ReactNode} options.children Children to render.\n * @param {T}                         options.value    Props to render into connected components.\n * @return {JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ( { children, value } ) => {\n\tconst contextValue = useContextSystemBridge( { value } );\n\n\treturn (\n\t\t<ComponentsContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</ComponentsContext.Provider>\n\t);\n};\n\nexport const ContextSystemProvider = memo( BaseContextSystemProvider );\n","export const REACT_TYPEOF_KEY = '$$typeof';\nexport const COMPONENT_NAMESPACE = 'data-wp-component';\nexport const CONNECTED_NAMESPACE = 'data-wp-c16t';\nexport const CONTEXT_COMPONENT_NAMESPACE = 'data-wp-c5tc8t';\n\n/**\n * Special key where the connected namespaces are stored.\n * This is attached to Context connected components as a static property.\n */\nexport const CONNECT_STATIC_NAMESPACE = '__contextSystemKey__';\n","/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\nimport memoize from 'memize';\n\n/**\n * Generates the connected component CSS className based on the namespace.\n *\n * @param  namespace The name of the connected component.\n * @return The generated CSS className.\n */\nfunction getStyledClassName( namespace: string ): string {\n\tconst kebab = kebabCase( namespace );\n\treturn `components-${ kebab }`;\n}\n\nexport const getStyledClassNameFromKey = memoize( getStyledClassName );\n","/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n  if (tag.sheet) {\n    // $FlowFixMe\n    return tag.sheet;\n  } // this weirdness brought to you by firefox\n\n  /* istanbul ignore next */\n\n\n  for (var i = 0; i < document.styleSheets.length; i++) {\n    if (document.styleSheets[i].ownerNode === tag) {\n      // $FlowFixMe\n      return document.styleSheets[i];\n    }\n  }\n}\n\nfunction createStyleElement(options) {\n  var tag = document.createElement('style');\n  tag.setAttribute('data-emotion', options.key);\n\n  if (options.nonce !== undefined) {\n    tag.setAttribute('nonce', options.nonce);\n  }\n\n  tag.appendChild(document.createTextNode(''));\n  tag.setAttribute('data-s', '');\n  return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n  function StyleSheet(options) {\n    var _this = this;\n\n    this._insertTag = function (tag) {\n      var before;\n\n      if (_this.tags.length === 0) {\n        if (_this.insertionPoint) {\n          before = _this.insertionPoint.nextSibling;\n        } else if (_this.prepend) {\n          before = _this.container.firstChild;\n        } else {\n          before = _this.before;\n        }\n      } else {\n        before = _this.tags[_this.tags.length - 1].nextSibling;\n      }\n\n      _this.container.insertBefore(tag, before);\n\n      _this.tags.push(tag);\n    };\n\n    this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n    this.tags = [];\n    this.ctr = 0;\n    this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n    this.key = options.key;\n    this.container = options.container;\n    this.prepend = options.prepend;\n    this.insertionPoint = options.insertionPoint;\n    this.before = null;\n  }\n\n  var _proto = StyleSheet.prototype;\n\n  _proto.hydrate = function hydrate(nodes) {\n    nodes.forEach(this._insertTag);\n  };\n\n  _proto.insert = function insert(rule) {\n    // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n    // it's 1 in dev because we insert source maps that map a single rule to a location\n    // and you can only have one source map per style tag\n    if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n      this._insertTag(createStyleElement(this));\n    }\n\n    var tag = this.tags[this.tags.length - 1];\n\n    if (process.env.NODE_ENV !== 'production') {\n      var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;\n\n      if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {\n        // this would only cause problem in speedy mode\n        // but we don't want enabling speedy to affect the observable behavior\n        // so we report this error at all times\n        console.error(\"You're attempting to insert the following rule:\\n\" + rule + '\\n\\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');\n      }\n      this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;\n    }\n\n    if (this.isSpeedy) {\n      var sheet = sheetForTag(tag);\n\n      try {\n        // this is the ultrafast version, works across browsers\n        // the big drawback is that the css won't be editable in devtools\n        sheet.insertRule(rule, sheet.cssRules.length);\n      } catch (e) {\n        if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear){/.test(rule)) {\n          console.error(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n        }\n      }\n    } else {\n      tag.appendChild(document.createTextNode(rule));\n    }\n\n    this.ctr++;\n  };\n\n  _proto.flush = function flush() {\n    // $FlowFixMe\n    this.tags.forEach(function (tag) {\n      return tag.parentNode && tag.parentNode.removeChild(tag);\n    });\n    this.tags = [];\n    this.ctr = 0;\n\n    if (process.env.NODE_ENV !== 'production') {\n      this._alreadyInsertedOrderInsensitiveRule = false;\n    }\n  };\n\n  return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\n","import {IMPORT, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {string}\n */\nexport function prefix (value, length) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// flex, flex-direction\n\t\tcase 6828: case 4268:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// (s)ticky?\n\t\t\tif (charat(value, length + 1) !== 115)\n\t\t\t\tbreak\n\t\t// display: (flex|inline-flex)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n\t\t\t\t// stic(k)y\n\t\t\t\tcase 107:\n\t\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\t\t// (inline-)?fl(e)x\n\t\t\t\tcase 101:\n\t\t\t\t\treturn replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t}\n\t\t\tbreak\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t}\n\n\t\t\treturn WEBKIT + value + MS + value + value\n\t}\n\n\treturn value\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && characters.charCodeAt(length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset:\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, stringify, COMMENT, rulesheet, middleware, prefixer, serialize, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar last = function last(arr) {\n  return arr.length ? arr[arr.length - 1] : null;\n}; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244\n\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n  var previous = 0;\n  var character = 0;\n\n  while (true) {\n    previous = character;\n    character = peek(); // &\\f\n\n    if (previous === 38 && character === 12) {\n      points[index] = 1;\n    }\n\n    if (token(character)) {\n      break;\n    }\n\n    next();\n  }\n\n  return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n  // pretend we've started with a comma\n  var index = -1;\n  var character = 44;\n\n  do {\n    switch (token(character)) {\n      case 0:\n        // &\\f\n        if (character === 38 && peek() === 12) {\n          // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n          // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n          // and when it should just concatenate the outer and inner selectors\n          // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n          points[index] = 1;\n        }\n\n        parsed[index] += identifierWithPointTracking(position - 1, points, index);\n        break;\n\n      case 2:\n        parsed[index] += delimit(character);\n        break;\n\n      case 4:\n        // comma\n        if (character === 44) {\n          // colon\n          parsed[++index] = peek() === 58 ? '&\\f' : '';\n          points[index] = parsed[index].length;\n          break;\n        }\n\n      // fallthrough\n\n      default:\n        parsed[index] += from(character);\n    }\n  } while (character = next());\n\n  return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n  return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n  if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n  // negative .length indicates that this rule has been already prefixed\n  element.length < 1) {\n    return;\n  }\n\n  var value = element.value,\n      parent = element.parent;\n  var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n  while (parent.type !== 'rule') {\n    parent = parent.parent;\n    if (!parent) return;\n  } // short-circuit for the simplest case\n\n\n  if (element.props.length === 1 && value.charCodeAt(0) !== 58\n  /* colon */\n  && !fixedElements.get(parent)) {\n    return;\n  } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n  // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n  if (isImplicitRule) {\n    return;\n  }\n\n  fixedElements.set(element, true);\n  var points = [];\n  var rules = getRules(value, points);\n  var parentRules = parent.props;\n\n  for (var i = 0, k = 0; i < rules.length; i++) {\n    for (var j = 0; j < parentRules.length; j++, k++) {\n      element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n    }\n  }\n};\nvar removeLabel = function removeLabel(element) {\n  if (element.type === 'decl') {\n    var value = element.value;\n\n    if ( // charcode for l\n    value.charCodeAt(0) === 108 && // charcode for b\n    value.charCodeAt(2) === 98) {\n      // this ignores label\n      element[\"return\"] = '';\n      element.value = '';\n    }\n  }\n};\nvar ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n\nvar isIgnoringComment = function isIgnoringComment(element) {\n  return !!element && element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;\n};\n\nvar createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {\n  return function (element, index, children) {\n    if (element.type !== 'rule') return;\n    var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);\n\n    if (unsafePseudoClasses && cache.compat !== true) {\n      var prevElement = index > 0 ? children[index - 1] : null;\n\n      if (prevElement && isIgnoringComment(last(prevElement.children))) {\n        return;\n      }\n\n      unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n        console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n      });\n    }\n  };\n};\n\nvar isImportRule = function isImportRule(element) {\n  return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;\n};\n\nvar isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {\n  for (var i = index - 1; i >= 0; i--) {\n    if (!isImportRule(children[i])) {\n      return true;\n    }\n  }\n\n  return false;\n}; // use this to remove incorrect elements from further processing\n// so they don't get handed to the `sheet` (or anything else)\n// as that could potentially lead to additional logs which in turn could be overhelming to the user\n\n\nvar nullifyElement = function nullifyElement(element) {\n  element.type = '';\n  element.value = '';\n  element[\"return\"] = '';\n  element.children = '';\n  element.props = '';\n};\n\nvar incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {\n  if (!isImportRule(element)) {\n    return;\n  }\n\n  if (element.parent) {\n    console.error(\"`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.\");\n    nullifyElement(element);\n  } else if (isPrependedWithRegularRules(index, children)) {\n    console.error(\"`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.\");\n    nullifyElement(element);\n  }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n  var key = options.key;\n\n  if (process.env.NODE_ENV !== 'production' && !key) {\n    throw new Error(\"You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\\n\" + \"If multiple caches share the same key they might \\\"fight\\\" for each other's style elements.\");\n  }\n\n  if ( key === 'css') {\n    var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n    // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n    // note this very very intentionally targets all style elements regardless of the key to ensure\n    // that creating a cache works inside of render of a React component\n\n    Array.prototype.forEach.call(ssrStyles, function (node) {\n      // we want to only move elements which have a space in the data-emotion attribute value\n      // because that indicates that it is an Emotion 11 server-side rendered style elements\n      // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n      // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n      // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n      // will not result in the Emotion 10 styles being destroyed\n      var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n      if (dataEmotionAttribute.indexOf(' ') === -1) {\n        return;\n      }\n      document.head.appendChild(node);\n      node.setAttribute('data-s', '');\n    });\n  }\n\n  var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n  if (process.env.NODE_ENV !== 'production') {\n    // $FlowFixMe\n    if (/[^a-z-]/.test(key)) {\n      throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n    }\n  }\n\n  var inserted = {}; // $FlowFixMe\n\n  var container;\n  var nodesToHydrate = [];\n\n  {\n    container = options.container || document.head;\n    Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n    // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n    document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n      var attrib = node.getAttribute(\"data-emotion\").split(' '); // $FlowFixMe\n\n      for (var i = 1; i < attrib.length; i++) {\n        inserted[attrib[i]] = true;\n      }\n\n      nodesToHydrate.push(node);\n    });\n  }\n\n  var _insert;\n\n  var omnipresentPlugins = [compat, removeLabel];\n\n  if (process.env.NODE_ENV !== 'production') {\n    omnipresentPlugins.push(createUnsafeSelectorsAlarm({\n      get compat() {\n        return cache.compat;\n      }\n\n    }), incorrectImportAlarm);\n  }\n\n  {\n    var currentSheet;\n    var finalizingPlugins = [stringify, process.env.NODE_ENV !== 'production' ? function (element) {\n      if (!element.root) {\n        if (element[\"return\"]) {\n          currentSheet.insert(element[\"return\"]);\n        } else if (element.value && element.type !== COMMENT) {\n          // insert empty rule in non-production environments\n          // so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet\n          currentSheet.insert(element.value + \"{}\");\n        }\n      }\n    } : rulesheet(function (rule) {\n      currentSheet.insert(rule);\n    })];\n    var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n    var stylis = function stylis(styles) {\n      return serialize(compile(styles), serializer);\n    };\n\n    _insert = function insert(selector, serialized, sheet, shouldCache) {\n      currentSheet = sheet;\n\n      if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n        currentSheet = {\n          insert: function insert(rule) {\n            sheet.insert(rule + serialized.map);\n          }\n        };\n      }\n\n      stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n      if (shouldCache) {\n        cache.inserted[serialized.name] = true;\n      }\n    };\n  }\n\n  var cache = {\n    key: key,\n    sheet: new StyleSheet({\n      key: key,\n      container: container,\n      nonce: options.nonce,\n      speedy: options.speedy,\n      prepend: options.prepend,\n      insertionPoint: options.insertionPoint\n    }),\n    nonce: options.nonce,\n    inserted: inserted,\n    registered: {},\n    insert: _insert\n  };\n  cache.sheet.hydrate(nodesToHydrate);\n  return cache;\n};\n\nexport default createCache;\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length)\n\t\t\t\t\tbreak\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n  // 'm' and 'r' are mixing constants generated offline.\n  // They're not really 'magic', they just happen to work well.\n  // const m = 0x5bd1e995;\n  // const r = 24;\n  // Initialize the hash\n  var h = 0; // Mix 4 bytes at a time into the hash\n\n  var k,\n      i = 0,\n      len = str.length;\n\n  for (; len >= 4; ++i, len -= 4) {\n    k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n    k =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n    k ^=\n    /* k >>> r: */\n    k >>> 24;\n    h =\n    /* Math.imul(k, m): */\n    (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n    /* Math.imul(h, m): */\n    (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Handle the last few bytes of the input array\n\n\n  switch (len) {\n    case 3:\n      h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n    case 2:\n      h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n    case 1:\n      h ^= str.charCodeAt(i) & 0xff;\n      h =\n      /* Math.imul(h, m): */\n      (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  } // Do a few final mixes of the hash to ensure the last few\n  // bytes are well-incorporated.\n\n\n  h ^= h >>> 13;\n  h =\n  /* Math.imul(h, m): */\n  (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n  return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","var unitlessKeys = {\n  animationIterationCount: 1,\n  borderImageOutset: 1,\n  borderImageSlice: 1,\n  borderImageWidth: 1,\n  boxFlex: 1,\n  boxFlexGroup: 1,\n  boxOrdinalGroup: 1,\n  columnCount: 1,\n  columns: 1,\n  flex: 1,\n  flexGrow: 1,\n  flexPositive: 1,\n  flexShrink: 1,\n  flexNegative: 1,\n  flexOrder: 1,\n  gridRow: 1,\n  gridRowEnd: 1,\n  gridRowSpan: 1,\n  gridRowStart: 1,\n  gridColumn: 1,\n  gridColumnEnd: 1,\n  gridColumnSpan: 1,\n  gridColumnStart: 1,\n  msGridRow: 1,\n  msGridRowSpan: 1,\n  msGridColumn: 1,\n  msGridColumnSpan: 1,\n  fontWeight: 1,\n  lineHeight: 1,\n  opacity: 1,\n  order: 1,\n  orphans: 1,\n  tabSize: 1,\n  widows: 1,\n  zIndex: 1,\n  zoom: 1,\n  WebkitLineClamp: 1,\n  // SVG-related properties\n  fillOpacity: 1,\n  floodOpacity: 1,\n  stopOpacity: 1,\n  strokeDasharray: 1,\n  strokeDashoffset: 1,\n  strokeMiterlimit: 1,\n  strokeOpacity: 1,\n  strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n  var cache = {};\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport default memoize;\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n  return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n  return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n  return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n  switch (key) {\n    case 'animation':\n    case 'animationName':\n      {\n        if (typeof value === 'string') {\n          return value.replace(animationRegex, function (match, p1, p2) {\n            cursor = {\n              name: p1,\n              styles: p2,\n              next: cursor\n            };\n            return p1;\n          });\n        }\n      }\n  }\n\n  if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n    return value + 'px';\n  }\n\n  return value;\n};\n\nif (process.env.NODE_ENV !== 'production') {\n  var contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\\(|(no-)?(open|close)-quote/;\n  var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];\n  var oldProcessStyleValue = processStyleValue;\n  var msPattern = /^-ms-/;\n  var hyphenPattern = /-(.)/g;\n  var hyphenatedCache = {};\n\n  processStyleValue = function processStyleValue(key, value) {\n    if (key === 'content') {\n      if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n        throw new Error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n      }\n    }\n\n    var processed = oldProcessStyleValue(key, value);\n\n    if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n      hyphenatedCache[key] = true;\n      console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n        return _char.toUpperCase();\n      }) + \"?\");\n    }\n\n    return processed;\n  };\n}\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n  if (interpolation == null) {\n    return '';\n  }\n\n  if (interpolation.__emotion_styles !== undefined) {\n    if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n      throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\n    }\n\n    return interpolation;\n  }\n\n  switch (typeof interpolation) {\n    case 'boolean':\n      {\n        return '';\n      }\n\n    case 'object':\n      {\n        if (interpolation.anim === 1) {\n          cursor = {\n            name: interpolation.name,\n            styles: interpolation.styles,\n            next: cursor\n          };\n          return interpolation.name;\n        }\n\n        if (interpolation.styles !== undefined) {\n          var next = interpolation.next;\n\n          if (next !== undefined) {\n            // not the most efficient thing ever but this is a pretty rare case\n            // and there will be very few iterations of this generally\n            while (next !== undefined) {\n              cursor = {\n                name: next.name,\n                styles: next.styles,\n                next: cursor\n              };\n              next = next.next;\n            }\n          }\n\n          var styles = interpolation.styles + \";\";\n\n          if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n            styles += interpolation.map;\n          }\n\n          return styles;\n        }\n\n        return createStringFromObject(mergedProps, registered, interpolation);\n      }\n\n    case 'function':\n      {\n        if (mergedProps !== undefined) {\n          var previousCursor = cursor;\n          var result = interpolation(mergedProps);\n          cursor = previousCursor;\n          return handleInterpolation(mergedProps, registered, result);\n        } else if (process.env.NODE_ENV !== 'production') {\n          console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n        }\n\n        break;\n      }\n\n    case 'string':\n      if (process.env.NODE_ENV !== 'production') {\n        var matched = [];\n        var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n          var fakeVarName = \"animation\" + matched.length;\n          matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n          return \"${\" + fakeVarName + \"}\";\n        });\n\n        if (matched.length) {\n          console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n        }\n      }\n\n      break;\n  } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n  if (registered == null) {\n    return interpolation;\n  }\n\n  var cached = registered[interpolation];\n  return cached !== undefined ? cached : interpolation;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n  var string = '';\n\n  if (Array.isArray(obj)) {\n    for (var i = 0; i < obj.length; i++) {\n      string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n    }\n  } else {\n    for (var _key in obj) {\n      var value = obj[_key];\n\n      if (typeof value !== 'object') {\n        if (registered != null && registered[value] !== undefined) {\n          string += _key + \"{\" + registered[value] + \"}\";\n        } else if (isProcessableValue(value)) {\n          string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n        }\n      } else {\n        if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n          throw new Error('Component selectors can only be used in conjunction with @emotion/babel-plugin.');\n        }\n\n        if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n          for (var _i = 0; _i < value.length; _i++) {\n            if (isProcessableValue(value[_i])) {\n              string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n            }\n          }\n        } else {\n          var interpolated = handleInterpolation(mergedProps, registered, value);\n\n          switch (_key) {\n            case 'animation':\n            case 'animationName':\n              {\n                string += processStyleName(_key) + \":\" + interpolated + \";\";\n                break;\n              }\n\n            default:\n              {\n                if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n                  console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n                }\n\n                string += _key + \"{\" + interpolated + \"}\";\n              }\n          }\n        }\n      }\n    }\n  }\n\n  return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\nvar sourceMapPattern;\n\nif (process.env.NODE_ENV !== 'production') {\n  sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//g;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n  if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n    return args[0];\n  }\n\n  var stringMode = true;\n  var styles = '';\n  cursor = undefined;\n  var strings = args[0];\n\n  if (strings == null || strings.raw === undefined) {\n    stringMode = false;\n    styles += handleInterpolation(mergedProps, registered, strings);\n  } else {\n    if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n      console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n    }\n\n    styles += strings[0];\n  } // we start at 1 since we've already handled the first arg\n\n\n  for (var i = 1; i < args.length; i++) {\n    styles += handleInterpolation(mergedProps, registered, args[i]);\n\n    if (stringMode) {\n      if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n        console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n      }\n\n      styles += strings[i];\n    }\n  }\n\n  var sourceMap;\n\n  if (process.env.NODE_ENV !== 'production') {\n    styles = styles.replace(sourceMapPattern, function (match) {\n      sourceMap = match;\n      return '';\n    });\n  } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n  labelPattern.lastIndex = 0;\n  var identifierName = '';\n  var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n  while ((match = labelPattern.exec(styles)) !== null) {\n    identifierName += '-' + // $FlowFixMe we know it's not null\n    match[1];\n  }\n\n  var name = hashString(styles) + identifierName;\n\n  if (process.env.NODE_ENV !== 'production') {\n    // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n    return {\n      name: name,\n      styles: styles,\n      map: sourceMap,\n      next: cursor,\n      toString: function toString() {\n        return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n      }\n    };\n  }\n\n  return {\n    name: name,\n    styles: styles,\n    next: cursor\n  };\n};\n\nexport { serializeStyles };\n","import { createContext, useContext, forwardRef, createElement, Fragment } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n  key: 'css'\n}) : null);\n\nif (process.env.NODE_ENV !== 'production') {\n  EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n  return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n  // $FlowFixMe\n  return /*#__PURE__*/forwardRef(function (props, ref) {\n    // the cache will never be null in the browser\n    var cache = useContext(EmotionCacheContext);\n    return func(props, cache, ref);\n  });\n};\n\nvar ThemeContext = /* #__PURE__ */createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n  ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n  return useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n  if (typeof theme === 'function') {\n    var mergedTheme = theme(outerTheme);\n\n    if (process.env.NODE_ENV !== 'production' && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n      throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n    }\n\n    return mergedTheme;\n  }\n\n  if (process.env.NODE_ENV !== 'production' && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n    throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n  }\n\n  return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n  return weakMemoize(function (theme) {\n    return getTheme(outerTheme, theme);\n  });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n  var theme = useContext(ThemeContext);\n\n  if (props.theme !== theme) {\n    theme = createCacheWithTheme(theme)(props.theme);\n  }\n\n  return /*#__PURE__*/createElement(ThemeContext.Provider, {\n    value: theme\n  }, props.children);\n};\nfunction withTheme(Component) {\n  var componentName = Component.displayName || Component.name || 'Component';\n\n  var render = function render(props, ref) {\n    var theme = useContext(ThemeContext);\n    return /*#__PURE__*/createElement(Component, _extends({\n      theme: theme,\n      ref: ref\n    }, props));\n  }; // $FlowFixMe\n\n\n  var WithTheme = /*#__PURE__*/forwardRef(render);\n  WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n  return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {\n  // V8\n  var match = /^\\s+at\\s+([A-Za-z0-9$.]+)\\s/.exec(line);\n\n  if (match) {\n    // The match may be something like 'Object.createEmotionProps'\n    var parts = match[1].split('.');\n    return parts[parts.length - 1];\n  } // Safari / Firefox\n\n\n  match = /^([A-Za-z0-9$.]+)@/.exec(line);\n  if (match) return match[1];\n  return undefined;\n};\n\nvar internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS\n// identifiers, thus we only need to replace what is a valid character for JS,\n// but not for CSS.\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n  return identifier.replace(/\\$/g, '-');\n};\n\nvar getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {\n  if (!stackTrace) return undefined;\n  var lines = stackTrace.split('\\n');\n\n  for (var i = 0; i < lines.length; i++) {\n    var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just \"Error\"\n\n    if (!functionName) continue; // If we reach one of these, we have gone too far and should quit\n\n    if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an\n    // uppercase letter\n\n    if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);\n  }\n\n  return undefined;\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n  if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration\n  props.css.indexOf(':') !== -1) {\n    throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n  }\n\n  var newProps = {};\n\n  for (var key in props) {\n    if (hasOwnProperty.call(props, key)) {\n      newProps[key] = props[key];\n    }\n  }\n\n  newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when\n  // the label hasn't already been computed\n\n  if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {\n    var label = getLabelFromStackTrace(new Error().stack);\n    if (label) newProps[labelPropName] = label;\n  }\n\n  return newProps;\n};\n\nvar Noop = function Noop() {\n  return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n  var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n  // not passing the registered cache to serializeStyles because it would\n  // make certain babel optimisations not possible\n\n  if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n    cssProp = cache.registered[cssProp];\n  }\n\n  var type = props[typePropName];\n  var registeredStyles = [cssProp];\n  var className = '';\n\n  if (typeof props.className === 'string') {\n    className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n  } else if (props.className != null) {\n    className = props.className + \" \";\n  }\n\n  var serialized = serializeStyles(registeredStyles, undefined, useContext(ThemeContext));\n\n  if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n    var labelFromStack = props[labelPropName];\n\n    if (labelFromStack) {\n      serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n    }\n  }\n\n  var rules = insertStyles(cache, serialized, typeof type === 'string');\n  className += cache.key + \"-\" + serialized.name;\n  var newProps = {};\n\n  for (var key in props) {\n    if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n      newProps[key] = props[key];\n    }\n  }\n\n  newProps.ref = ref;\n  newProps.className = className;\n  var ele = /*#__PURE__*/createElement(type, newProps);\n  var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n  return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n  Emotion.displayName = 'EmotionCssPropInternal';\n}\n\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwnProperty as h, useTheme as u, withEmotionCache as w };\n","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n  var rawClassName = '';\n  classNames.split(' ').forEach(function (className) {\n    if (registered[className] !== undefined) {\n      registeredStyles.push(registered[className] + \";\");\n    } else {\n      rawClassName += className + \" \";\n    }\n  });\n  return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n  var className = cache.key + \"-\" + serialized.name;\n\n  if ( // we only need to add the styles to the registered cache if the\n  // class name could be used further down\n  // the tree but if it's a string tag, we know it won't\n  // so we don't have to add it to registered cache.\n  // this improves memory usage since we can avoid storing the whole style string\n  (isStringTag === false || // we need to always store it if we're in compat mode and\n  // in node since emotion-server relies on whether a style is in\n  // the registered cache to know whether a style is global or not\n  // also, note that this check will be dead code eliminated in the browser\n  isBrowser === false ) && cache.registered[className] === undefined) {\n    cache.registered[className] = serialized.styles;\n  }\n\n  if (cache.inserted[serialized.name] === undefined) {\n    var current = serialized;\n\n    do {\n      var maybeStyles = cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n      current = current.next;\n    } while (current !== undefined);\n  }\n};\n\nexport { getRegisteredStyles, insertStyles };\n","import createCache from '@emotion/cache';\nimport { serializeStyles } from '@emotion/serialize';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\n\nfunction insertWithoutScoping(cache, serialized) {\n  if (cache.inserted[serialized.name] === undefined) {\n    return cache.insert('', serialized, cache.sheet, true);\n  }\n}\n\nfunction merge(registered, css, className) {\n  var registeredStyles = [];\n  var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n  if (registeredStyles.length < 2) {\n    return className;\n  }\n\n  return rawClassName + css(registeredStyles);\n}\n\nvar createEmotion = function createEmotion(options) {\n  var cache = createCache(options); // $FlowFixMe\n\n  cache.sheet.speedy = function (value) {\n    if (process.env.NODE_ENV !== 'production' && this.ctr !== 0) {\n      throw new Error('speedy must be changed before any rules are inserted');\n    }\n\n    this.isSpeedy = value;\n  };\n\n  cache.compat = true;\n\n  var css = function css() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    var serialized = serializeStyles(args, cache.registered, undefined);\n    insertStyles(cache, serialized, false);\n    return cache.key + \"-\" + serialized.name;\n  };\n\n  var keyframes = function keyframes() {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    var serialized = serializeStyles(args, cache.registered);\n    var animation = \"animation-\" + serialized.name;\n    insertWithoutScoping(cache, {\n      name: serialized.name,\n      styles: \"@keyframes \" + animation + \"{\" + serialized.styles + \"}\"\n    });\n    return animation;\n  };\n\n  var injectGlobal = function injectGlobal() {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    var serialized = serializeStyles(args, cache.registered);\n    insertWithoutScoping(cache, serialized);\n  };\n\n  var cx = function cx() {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    return merge(cache.registered, css, classnames(args));\n  };\n\n  return {\n    css: css,\n    cx: cx,\n    injectGlobal: injectGlobal,\n    keyframes: keyframes,\n    hydrate: function hydrate(ids) {\n      ids.forEach(function (key) {\n        cache.inserted[key] = true;\n      });\n    },\n    flush: function flush() {\n      cache.registered = {};\n      cache.inserted = {};\n      cache.sheet.flush();\n    },\n    // $FlowFixMe\n    sheet: cache.sheet,\n    cache: cache,\n    getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),\n    merge: merge.bind(null, cache.registered, css)\n  };\n};\n\nvar classnames = function classnames(args) {\n  var cls = '';\n\n  for (var i = 0; i < args.length; i++) {\n    var arg = args[i];\n    if (arg == null) continue;\n    var toAdd = void 0;\n\n    switch (typeof arg) {\n      case 'boolean':\n        break;\n\n      case 'object':\n        {\n          if (Array.isArray(arg)) {\n            toAdd = classnames(arg);\n          } else {\n            toAdd = '';\n\n            for (var k in arg) {\n              if (arg[k] && k) {\n                toAdd && (toAdd += ' ');\n                toAdd += k;\n              }\n            }\n          }\n\n          break;\n        }\n\n      default:\n        {\n          toAdd = arg;\n        }\n    }\n\n    if (toAdd) {\n      cls && (cls += ' ');\n      cls += toAdd;\n    }\n  }\n\n  return cls;\n};\n\nexport default createEmotion;\n","import '@emotion/cache';\nimport '@emotion/serialize';\nimport '@emotion/utils';\nimport createEmotion from '../create-instance/dist/emotion-css-create-instance.esm.js';\n\nvar _createEmotion = createEmotion({\n  key: 'css'\n}),\n    flush = _createEmotion.flush,\n    hydrate = _createEmotion.hydrate,\n    cx = _createEmotion.cx,\n    merge = _createEmotion.merge,\n    getRegisteredStyles = _createEmotion.getRegisteredStyles,\n    injectGlobal = _createEmotion.injectGlobal,\n    keyframes = _createEmotion.keyframes,\n    css = _createEmotion.css,\n    sheet = _createEmotion.sheet,\n    cache = _createEmotion.cache;\n\nexport { cache, css, cx, flush, getRegisteredStyles, hydrate, injectGlobal, keyframes, merge, sheet };\n","/**\n * External dependencies\n */\nimport { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react';\nimport type { SerializedStyles } from '@emotion/serialize';\nimport { insertStyles } from '@emotion/utils';\n// eslint-disable-next-line no-restricted-imports\nimport { cx as innerCx, ClassNamesArg } from '@emotion/css';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\nconst isSerializedStyles = ( o: any ): o is SerializedStyles =>\n\ttypeof o !== 'undefined' &&\n\to !== null &&\n\t[ 'name', 'styles' ].every( ( p ) => typeof o[ p ] !== 'undefined' );\n\n/**\n * Retrieve a `cx` function that knows how to handle `SerializedStyles`\n * returned by the `@emotion/react` `css` function in addition to what\n * `cx` normally knows how to handle. It also hooks into the Emotion\n * Cache, allowing `css` calls to work inside iframes.\n *\n * @example\n * import { css } from '@emotion/react';\n *\n * const styles = css`\n * \tcolor: red\n * `;\n *\n * function RedText( { className, ...props } ) {\n * \tconst cx = useCx();\n *\n * \tconst classes = cx(styles, className);\n *\n * \treturn <span className={classes} {...props} />;\n * }\n */\nexport const useCx = () => {\n\tconst cache = useEmotionCache();\n\n\tconst cx = useCallback(\n\t\t( ...classNames: ( ClassNamesArg | SerializedStyles )[] ) => {\n\t\t\tif ( cache === null ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'The `useCx` hook should be only used within a valid Emotion Cache Context'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn innerCx(\n\t\t\t\t...classNames.map( ( arg ) => {\n\t\t\t\t\tif ( isSerializedStyles( arg ) ) {\n\t\t\t\t\t\tinsertStyles( cache, arg, false );\n\t\t\t\t\t\treturn `${ cache.key }-${ arg.name }`;\n\t\t\t\t\t}\n\t\t\t\t\treturn arg;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ cache ]\n\t);\n\n\treturn cx;\n};\n","/**\n * WordPress dependencies\n */\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useComponentsContext } from './context-system-provider';\nimport { getNamespace, getConnectedNamespace } from './utils';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport { useCx } from '../../utils/hooks/use-cx';\n\n/**\n * @template TProps\n * @typedef {TProps & { className: string }} ConnectedProps\n */\n\n/**\n * Custom hook that derives registered props from the Context system.\n * These derived props are then consolidated with incoming component props.\n *\n * @template {{ className?: string }} P\n * @param {P}      props     Incoming props from the component.\n * @param {string} namespace The namespace to register and to derive context props from.\n * @return {ConnectedProps<P>} The connected props.\n */\nexport function useContextSystem( props, namespace ) {\n\tconst contextSystemProps = useComponentsContext();\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'useContextSystem: Please provide a namespace' );\n\t}\n\n\tconst contextProps = contextSystemProps?.[ namespace ] || {};\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {ConnectedProps<P>} */\n\t// @ts-ignore We fill in the missing properties below\n\tconst finalComponentProps = {\n\t\t...getConnectedNamespace(),\n\t\t...getNamespace( namespace ),\n\t};\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\tconst { _overrides: overrideProps, ...otherContextProps } = contextProps;\n\n\tconst initialMergedProps = Object.entries( otherContextProps ).length\n\t\t? Object.assign( {}, otherContextProps, props )\n\t\t: props;\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tgetStyledClassNameFromKey( namespace ),\n\t\tprops.className\n\t);\n\n\t// Provides the ability to customize the render of the component.\n\tconst rendered =\n\t\ttypeof initialMergedProps.renderChildren === 'function'\n\t\t\t? initialMergedProps.renderChildren( initialMergedProps )\n\t\t\t: initialMergedProps.children;\n\n\tfor ( const key in initialMergedProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = initialMergedProps[ key ];\n\t}\n\n\tfor ( const key in overrideProps ) {\n\t\t// @ts-ignore filling in missing props\n\t\tfinalComponentProps[ key ] = overrideProps[ key ];\n\t}\n\n\t// Setting an `undefined` explicitly can cause unintended overwrites\n\t// when a `cloneElement()` is involved.\n\tif ( rendered !== undefined ) {\n\t\t// @ts-ignore\n\t\tfinalComponentProps.children = rendered;\n\t}\n\n\tfinalComponentProps.className = classes;\n\n\treturn finalComponentProps;\n}\n","/**\n * Internal dependencies\n */\nimport { CONNECTED_NAMESPACE, COMPONENT_NAMESPACE } from './constants';\n\n/**\n * Creates a dedicated context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...ns('Container')} />\n * ```\n *\n * @param {string} componentName The name for the component.\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getNamespace( componentName ) {\n\treturn { [ COMPONENT_NAMESPACE ]: componentName };\n}\n\n/**\n * Creates a dedicated connected context namespace HTML attribute for components.\n * ns is short for \"namespace\"\n *\n * @example\n * ```jsx\n * <div {...cns()} />\n * ```\n *\n * @return {Record<string, any>} A props object with the namespaced HTML attribute.\n */\nexport function getConnectedNamespace() {\n\treturn { [ CONNECTED_NAMESPACE ]: true };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactChild, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { CONNECT_STATIC_NAMESPACE } from './constants';\nimport { getStyledClassNameFromKey } from './get-styled-class-name-from-key';\nimport type { WordPressComponentFromProps } from '.';\n\ntype AcceptsTwoArgs<\n\tF extends ( ...args: any ) => any,\n\tErrorMessage = never\n> = Parameters< F >[ 'length' ] extends 2 ? {} : ErrorMessage;\n\ntype ContextConnectOptions = {\n\tforwardsRef?: boolean;\n};\n\n/**\n * Forwards ref (React.ForwardRef) and \"Connects\" (or registers) a component\n * within the Context system under a specified namespace.\n *\n * @param  Component The component to register into the Context system.\n * @param  namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null\n>(\n\tComponent: C &\n\t\tAcceptsTwoArgs<\n\t\t\tC,\n\t\t\t'Warning: Your component function does not take a ref as the second argument. Did you mean to use `contextConnectWithoutRef`?'\n\t\t>,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace, { forwardsRef: true } );\n}\n\n/**\n * \"Connects\" (or registers) a component within the Context system under a specified namespace.\n * Does not forward a ref.\n *\n * @param  Component The component to register into the Context system.\n * @param  namespace The namespace to register the component under.\n * @return The connected WordPressComponent\n */\nexport function contextConnectWithoutRef< P >(\n\tComponent: ( props: P ) => JSX.Element | null,\n\tnamespace: string\n) {\n\treturn _contextConnect( Component, namespace );\n}\n\n// This is an (experimental) evolution of the initial connect() HOC.\n// The hope is that we can improve render performance by removing functional\n// component wrappers.\nfunction _contextConnect<\n\tC extends ( props: any, ref: ForwardedRef< any > ) => JSX.Element | null,\n\tO extends ContextConnectOptions\n>(\n\tComponent: C,\n\tnamespace: string,\n\toptions?: O\n): WordPressComponentFromProps<\n\tParameters< C >[ 0 ],\n\tO[ 'forwardsRef' ] extends true ? true : false\n> {\n\tconst WrappedComponent = options?.forwardsRef\n\t\t? forwardRef< any, Parameters< C >[ 0 ] >( Component )\n\t\t: Component;\n\n\tif ( typeof namespace === 'undefined' ) {\n\t\twarn( 'contextConnect: Please provide a namespace' );\n\t}\n\n\t// @ts-expect-error internal property\n\tlet mergedNamespace = WrappedComponent[ CONNECT_STATIC_NAMESPACE ] || [\n\t\tnamespace,\n\t];\n\n\t/**\n\t * Consolidate (merge) namespaces before attaching it to the WrappedComponent.\n\t */\n\tif ( Array.isArray( namespace ) ) {\n\t\tmergedNamespace = [ ...mergedNamespace, ...namespace ];\n\t}\n\tif ( typeof namespace === 'string' ) {\n\t\tmergedNamespace = [ ...mergedNamespace, namespace ];\n\t}\n\n\t// @ts-expect-error We can't rely on inferred types here because of the\n\t// `as` prop polymorphism we're handling in https://github.com/WordPress/gutenberg/blob/9620bae6fef4fde7cc2b7833f416e240207cda29/packages/components/src/ui/context/wordpress-component.ts#L32-L33\n\treturn Object.assign( WrappedComponent, {\n\t\t[ CONNECT_STATIC_NAMESPACE ]: [ ...new Set( mergedNamespace ) ],\n\t\tdisplayName: namespace,\n\t\tselector: `.${ getStyledClassNameFromKey( namespace ) }`,\n\t} );\n}\n\n/**\n * Attempts to retrieve the connected namespace from a component.\n *\n * @param  Component The component to retrieve a namespace from.\n * @return The connected namespaces.\n */\nexport function getConnectNamespace(\n\tComponent: ReactChild | undefined | {}\n): string[] {\n\tif ( ! Component ) return [];\n\n\tlet namespaces = [];\n\n\t// @ts-ignore internal property\n\tif ( Component[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore internal property\n\t\tnamespaces = Component[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\t// @ts-ignore\n\tif ( Component.type && Component.type[ CONNECT_STATIC_NAMESPACE ] ) {\n\t\t// @ts-ignore\n\t\tnamespaces = Component.type[ CONNECT_STATIC_NAMESPACE ];\n\t}\n\n\treturn namespaces;\n}\n\n/**\n * Checks to see if a component is connected within the Context system.\n *\n * @param  Component The component to retrieve a namespace from.\n * @param  match     The namespace to check.\n */\nexport function hasConnectNamespace(\n\tComponent: ReactNode,\n\tmatch: string[] | string\n): boolean {\n\tif ( ! Component ) return false;\n\n\tif ( typeof match === 'string' ) {\n\t\treturn getConnectNamespace( Component ).includes( match );\n\t}\n\tif ( Array.isArray( match ) ) {\n\t\treturn match.some( ( result ) =>\n\t\t\tgetConnectNamespace( Component ).includes( result )\n\t\t);\n\t}\n\n\treturn false;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\nexport const visuallyHidden: CSSProperties = {\n\tborder: 0,\n\tclip: 'rect(1px, 1px, 1px, 1px)',\n\tWebkitClipPath: 'inset( 50% )',\n\tclipPath: 'inset( 50% )',\n\theight: '1px',\n\tmargin: '-1px',\n\toverflow: 'hidden',\n\tpadding: 0,\n\tposition: 'absolute',\n\twidth: '1px',\n\twordWrap: 'normal',\n};\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default isPropValid;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { useContext, createElement, Fragment } from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n  return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n  return typeof tag === 'string' && // 96 is one less than the char code\n  // for \"a\" so this is checking that\n  // it's a lowercase character\n  tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n  var shouldForwardProp;\n\n  if (options) {\n    var optionsShouldForwardProp = options.shouldForwardProp;\n    shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n      return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n    } : optionsShouldForwardProp;\n  }\n\n  if (typeof shouldForwardProp !== 'function' && isReal) {\n    shouldForwardProp = tag.__emotion_forwardProp;\n  }\n\n  return shouldForwardProp;\n};\n\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\n\nvar Noop = function Noop() {\n  return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n  if (process.env.NODE_ENV !== 'production') {\n    if (tag === undefined) {\n      throw new Error('You are trying to create a styled element with an undefined component.\\nYou may have forgotten to import it.');\n    }\n  }\n\n  var isReal = tag.__emotion_real === tag;\n  var baseTag = isReal && tag.__emotion_base || tag;\n  var identifierName;\n  var targetClassName;\n\n  if (options !== undefined) {\n    identifierName = options.label;\n    targetClassName = options.target;\n  }\n\n  var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n  var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n  var shouldUseAs = !defaultShouldForwardProp('as');\n  return function () {\n    var args = arguments;\n    var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n    if (identifierName !== undefined) {\n      styles.push(\"label:\" + identifierName + \";\");\n    }\n\n    if (args[0] == null || args[0].raw === undefined) {\n      styles.push.apply(styles, args);\n    } else {\n      if (process.env.NODE_ENV !== 'production' && args[0][0] === undefined) {\n        console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n      }\n\n      styles.push(args[0][0]);\n      var len = args.length;\n      var i = 1;\n\n      for (; i < len; i++) {\n        if (process.env.NODE_ENV !== 'production' && args[0][i] === undefined) {\n          console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n        }\n\n        styles.push(args[i], args[0][i]);\n      }\n    } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class\n\n\n    var Styled = withEmotionCache(function (props, cache, ref) {\n      var finalTag = shouldUseAs && props.as || baseTag;\n      var className = '';\n      var classInterpolations = [];\n      var mergedProps = props;\n\n      if (props.theme == null) {\n        mergedProps = {};\n\n        for (var key in props) {\n          mergedProps[key] = props[key];\n        }\n\n        mergedProps.theme = useContext(ThemeContext);\n      }\n\n      if (typeof props.className === 'string') {\n        className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n      } else if (props.className != null) {\n        className = props.className + \" \";\n      }\n\n      var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n      var rules = insertStyles(cache, serialized, typeof finalTag === 'string');\n      className += cache.key + \"-\" + serialized.name;\n\n      if (targetClassName !== undefined) {\n        className += \" \" + targetClassName;\n      }\n\n      var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp;\n      var newProps = {};\n\n      for (var _key in props) {\n        if (shouldUseAs && _key === 'as') continue;\n\n        if ( // $FlowFixMe\n        finalShouldForwardProp(_key)) {\n          newProps[_key] = props[_key];\n        }\n      }\n\n      newProps.className = className;\n      newProps.ref = ref;\n      var ele = /*#__PURE__*/createElement(finalTag, newProps);\n      var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n      return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n    });\n    Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n    Styled.defaultProps = tag.defaultProps;\n    Styled.__emotion_real = Styled;\n    Styled.__emotion_base = baseTag;\n    Styled.__emotion_styles = styles;\n    Styled.__emotion_forwardProp = shouldForwardProp;\n    Object.defineProperty(Styled, 'toString', {\n      value: function value() {\n        if (targetClassName === undefined && process.env.NODE_ENV !== 'production') {\n          return 'NO_COMPONENT_SELECTOR';\n        } // $FlowFixMe: coerce undefined to string\n\n\n        return \".\" + targetClassName;\n      }\n    });\n\n    Styled.withComponent = function (nextTag, nextOptions) {\n      return createStyled(nextTag, _extends({}, options, nextOptions, {\n        shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n      })).apply(void 0, styles);\n    };\n\n    return Styled;\n  };\n};\n\nexport default createStyled;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport type { RefAttributes } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponent } from '../ui/context/wordpress-component';\nimport type { ViewProps } from './types';\n\n/**\n * `View` is a core component that renders everything in the library.\n * It is the principle component in the entire library.\n *\n * @example\n * ```jsx\n * import { View } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<View>\n * \t\t\t Code is Poetry\n * \t\t</View>\n * \t);\n * }\n * ```\n */\n// @ts-expect-error\nexport const View: WordPressComponent<\n\t'div',\n\tViewProps & RefAttributes< any >\n> = styled.div``;\n\nView.selector = '.components-view';\nView.displayName = 'View';\n\nexport default View;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { visuallyHidden } from './styles';\nimport { View } from '../view';\nimport type { VisuallyHiddenProps } from './types';\n\nfunction UnconnectedVisuallyHidden(\n\tprops: WordPressComponentProps< VisuallyHiddenProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { style: styleProp, ...contextProps } = useContextSystem(\n\t\tprops,\n\t\t'VisuallyHidden'\n\t);\n\treturn (\n\t\t<View\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...contextProps }\n\t\t\tstyle={ { ...visuallyHidden, ...( styleProp || {} ) } }\n\t\t/>\n\t);\n}\n\n/**\n * `VisuallyHidden` is a component used to render text intended to be visually\n * hidden, but will show for alternate devices, for example a screen reader.\n *\n * ```jsx\n * import { VisuallyHidden } from `@wordpress/components`;\n *\n * function Example() {\n *   return (\n *     <VisuallyHidden>\n *       <label>Code is Poetry</label>\n *     </VisuallyHidden>\n *   );\n * }\n * ```\n */\nexport const VisuallyHidden = contextConnect(\n\tUnconnectedVisuallyHidden,\n\t'VisuallyHidden'\n);\n\nexport default VisuallyHidden;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\n\nconst disabledEventsOnDisabledButton = [ 'onMouseDown', 'onClick' ];\n\nfunction useDeprecatedProps( {\n\tisDefault,\n\tisPrimary,\n\tisSecondary,\n\tisTertiary,\n\tisLink,\n\tvariant,\n\t...otherProps\n} ) {\n\tlet computedVariant = variant;\n\n\tif ( isPrimary ) {\n\t\tcomputedVariant ??= 'primary';\n\t}\n\n\tif ( isTertiary ) {\n\t\tcomputedVariant ??= 'tertiary';\n\t}\n\n\tif ( isSecondary ) {\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isDefault ) {\n\t\tdeprecated( 'Button isDefault prop', {\n\t\t\tsince: '5.4',\n\t\t\talternative: 'variant=\"secondary\"',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\tcomputedVariant ??= 'secondary';\n\t}\n\n\tif ( isLink ) {\n\t\tcomputedVariant ??= 'link';\n\t}\n\n\treturn {\n\t\t...otherProps,\n\t\tvariant: computedVariant,\n\t};\n}\n\nexport function Button( props, ref ) {\n\tconst {\n\t\thref,\n\t\ttarget,\n\t\tisSmall,\n\t\tisPressed,\n\t\tisBusy,\n\t\tisDestructive,\n\t\tclassName,\n\t\tdisabled,\n\t\ticon,\n\t\ticonPosition = 'left',\n\t\ticonSize,\n\t\tshowTooltip,\n\t\ttooltipPosition,\n\t\tshortcut,\n\t\tlabel,\n\t\tchildren,\n\t\ttext,\n\t\tvariant,\n\t\t__experimentalIsFocusable: isFocusable,\n\t\tdescribedBy,\n\t\t...additionalProps\n\t} = useDeprecatedProps( props );\n\tconst instanceId = useInstanceId(\n\t\tButton,\n\t\t'components-button__description'\n\t);\n\n\tconst hasChildren =\n\t\tchildren?.[ 0 ] &&\n\t\tchildren[ 0 ] !== null &&\n\t\t// Tooltip should not considered as a child\n\t\tchildren?.[ 0 ]?.props?.className !== 'components-tooltip';\n\n\tconst classes = classnames( 'components-button', className, {\n\t\t'is-secondary': variant === 'secondary',\n\t\t'is-primary': variant === 'primary',\n\t\t'is-small': isSmall,\n\t\t'is-tertiary': variant === 'tertiary',\n\t\t'is-pressed': isPressed,\n\t\t'is-busy': isBusy,\n\t\t'is-link': variant === 'link',\n\t\t'is-destructive': isDestructive,\n\t\t'has-text': !! icon && hasChildren,\n\t\t'has-icon': !! icon,\n\t} );\n\n\tconst trulyDisabled = disabled && ! isFocusable;\n\tconst Tag = href !== undefined && ! trulyDisabled ? 'a' : 'button';\n\tconst tagProps =\n\t\tTag === 'a'\n\t\t\t? { href, target }\n\t\t\t: {\n\t\t\t\t\ttype: 'button',\n\t\t\t\t\tdisabled: trulyDisabled,\n\t\t\t\t\t'aria-pressed': isPressed,\n\t\t\t  };\n\n\tif ( disabled && isFocusable ) {\n\t\t// In this case, the button will be disabled, but still focusable and\n\t\t// perceivable by screen reader users.\n\t\ttagProps[ 'aria-disabled' ] = true;\n\n\t\tfor ( const disabledEvent of disabledEventsOnDisabledButton ) {\n\t\t\tadditionalProps[ disabledEvent ] = ( event ) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t};\n\t\t}\n\t}\n\n\t// Should show the tooltip if...\n\tconst shouldShowTooltip =\n\t\t! trulyDisabled &&\n\t\t// An explicit tooltip is passed or...\n\t\t( ( showTooltip && label ) ||\n\t\t\t// There's a shortcut or...\n\t\t\tshortcut ||\n\t\t\t// There's a label and...\n\t\t\t( !! label &&\n\t\t\t\t// The children are empty and...\n\t\t\t\t! children?.length &&\n\t\t\t\t// The tooltip is not explicitly disabled.\n\t\t\t\tfalse !== showTooltip ) );\n\n\tconst descriptionId = describedBy ? instanceId : null;\n\n\tconst describedById =\n\t\tadditionalProps[ 'aria-describedby' ] || descriptionId;\n\n\tconst element = (\n\t\t<Tag\n\t\t\t{ ...tagProps }\n\t\t\t{ ...additionalProps }\n\t\t\tclassName={ classes }\n\t\t\taria-label={ additionalProps[ 'aria-label' ] || label }\n\t\t\taria-describedby={ describedById }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ icon && iconPosition === 'left' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ text && <>{ text }</> }\n\t\t\t{ icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } size={ iconSize } />\n\t\t\t) }\n\t\t\t{ children }\n\t\t</Tag>\n\t);\n\n\tif ( ! shouldShowTooltip ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ element }\n\t\t\t\t{ describedBy && (\n\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip\n\t\t\t\ttext={ children?.length && describedBy ? describedBy : label }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tposition={ tooltipPosition }\n\t\t\t>\n\t\t\t\t{ element }\n\t\t\t</Tooltip>\n\t\t\t{ describedBy && (\n\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t<span id={ descriptionId }>{ describedBy }</span>\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default forwardRef( Button );\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/*\n * Setting `overflow: hidden` on html and body elements resets body scroll in iOS.\n * Save scroll top so we can restore it after locking scroll.\n *\n * NOTE: It would be cleaner and possibly safer to find a localized solution such\n * as preventing default on certain touchmove events.\n */\nlet previousScrollTop = 0;\n\nfunction setLocked( locked: boolean ) {\n\tconst scrollingElement = document.scrollingElement || document.body;\n\n\tif ( locked ) {\n\t\tpreviousScrollTop = scrollingElement.scrollTop;\n\t}\n\n\tconst methodName = locked ? 'add' : 'remove';\n\tscrollingElement.classList[ methodName ]( 'lockscroll' );\n\n\t// Adding the class to the document element seems to be necessary in iOS.\n\tdocument.documentElement.classList[ methodName ]( 'lockscroll' );\n\n\tif ( ! locked ) {\n\t\tscrollingElement.scrollTop = previousScrollTop;\n\t}\n}\n\nlet lockCounter = 0;\n\n/**\n * ScrollLock is a content-free React component for declaratively preventing\n * scroll bleed from modal UI to the page body. This component applies a\n * `lockscroll` class to the `document.documentElement` and\n * `document.scrollingElement` elements to stop the body from scrolling. When it\n * is present, the lock is applied.\n *\n * ```jsx\n * import { ScrollLock, Button } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyScrollLock = () => {\n *   const [ isScrollLocked, setIsScrollLocked ] = useState( false );\n *\n *   const toggleLock = () => {\n *     setIsScrollLocked( ( locked ) => ! locked ) );\n *   };\n *\n *   return (\n *     <div>\n *       <Button variant=\"secondary\" onClick={ toggleLock }>\n *         Toggle scroll lock\n *       </Button>\n *       { isScrollLocked && <ScrollLock /> }\n *       <p>\n *         Scroll locked:\n *         <strong>{ isScrollLocked ? 'Yes' : 'No' }</strong>\n *       </p>\n *     </div>\n *   );\n * };\n * ```\n */\nexport function ScrollLock(): null {\n\tuseEffect( () => {\n\t\tif ( lockCounter === 0 ) {\n\t\t\tsetLocked( true );\n\t\t}\n\n\t\t++lockCounter;\n\n\t\treturn () => {\n\t\t\tif ( lockCounter === 1 ) {\n\t\t\t\tsetLocked( false );\n\t\t\t}\n\n\t\t\t--lockCounter;\n\t\t};\n\t}, [] );\n\n\treturn null;\n}\n\nexport default ScrollLock;\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nexport const SlotFillContext = createContext( {\n\tregisterSlot: () => {},\n\tunregisterSlot: () => {},\n\tregisterFill: () => {},\n\tunregisterFill: () => {},\n\tgetSlot: () => {},\n\tgetFills: () => {},\n\tsubscribe: () => {},\n} );\n\nexport default SlotFillContext;\n","// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { createPortal, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport useSlot from './use-slot';\n\nfunction FillComponent( { name, children, registerFill, unregisterFill } ) {\n\tconst slot = useSlot( name );\n\n\tconst ref = useRef( {\n\t\tname,\n\t\tchildren,\n\t} );\n\n\tuseLayoutEffect( () => {\n\t\tregisterFill( name, ref.current );\n\t\treturn () => unregisterFill( name, ref.current );\n\t}, [] );\n\n\tuseLayoutEffect( () => {\n\t\tref.current.children = children;\n\t\tif ( slot ) {\n\t\t\tslot.forceUpdate();\n\t\t}\n\t}, [ children ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( name === ref.current.name ) {\n\t\t\t// Ignore initial effect.\n\t\t\treturn;\n\t\t}\n\t\tunregisterFill( ref.current.name, ref.current );\n\t\tref.current.name = name;\n\t\tregisterFill( name, ref.current );\n\t}, [ name ] );\n\n\tif ( ! slot || ! slot.node ) {\n\t\treturn null;\n\t}\n\n\t// If a function is passed as a child, provide it with the fillProps.\n\tif ( typeof children === 'function' ) {\n\t\tchildren = children( slot.props.fillProps );\n\t}\n\n\treturn createPortal( children, slot.node );\n}\n\nconst Fill = ( props ) => (\n\t<SlotFillContext.Consumer>\n\t\t{ ( { registerFill, unregisterFill } ) => (\n\t\t\t<FillComponent\n\t\t\t\t{ ...props }\n\t\t\t\tregisterFill={ registerFill }\n\t\t\t\tunregisterFill={ unregisterFill }\n\t\t\t/>\n\t\t) }\n\t</SlotFillContext.Consumer>\n);\n\nexport default Fill;\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { useContext, useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\n\n/**\n * React hook returning the active slot given a name.\n *\n * @param {string} name Slot name.\n * @return {Object} Slot object.\n */\nconst useSlot = ( name ) => {\n\tconst { getSlot, subscribe } = useContext( SlotFillContext );\n\tconst [ slot, setSlot ] = useState( getSlot( name ) );\n\n\tuseEffect( () => {\n\t\tsetSlot( getSlot( name ) );\n\t\tconst unsubscribe = subscribe( () => {\n\t\t\tsetSlot( getSlot( name ) );\n\t\t} );\n\n\t\treturn unsubscribe;\n\t}, [ name ] );\n\n\treturn slot;\n};\n\nexport default useSlot;\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tComponent,\n\tcloneElement,\n\tisEmptyElement,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\n\n/**\n * Whether the argument is a function.\n *\n * @param {*} maybeFunc The argument to check.\n * @return {boolean} True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc ) {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass SlotComponent extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.isUnmounted = false;\n\t\tthis.bindNode = this.bindNode.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { registerSlot } = this.props;\n\n\t\tregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tconst { unregisterSlot } = this.props;\n\t\tthis.isUnmounted = true;\n\t\tunregisterSlot( this.props.name, this );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { name, unregisterSlot, registerSlot } = this.props;\n\n\t\tif ( prevProps.name !== name ) {\n\t\t\tunregisterSlot( prevProps.name );\n\t\t\tregisterSlot( name, this );\n\t\t}\n\t}\n\n\tbindNode( node ) {\n\t\tthis.node = node;\n\t}\n\n\tforceUpdate() {\n\t\tif ( this.isUnmounted ) {\n\t\t\treturn;\n\t\t}\n\t\tsuper.forceUpdate();\n\t}\n\n\trender() {\n\t\tconst { children, name, fillProps = {}, getFills } = this.props;\n\n\t\tconst fills = ( getFills( name, this ) ?? [] )\n\t\t\t.map( ( fill ) => {\n\t\t\t\tconst fillChildren = isFunction( fill.children )\n\t\t\t\t\t? fill.children( fillProps )\n\t\t\t\t\t: fill.children;\n\n\t\t\t\treturn Children.map( fillChildren, ( child, childIndex ) => {\n\t\t\t\t\tif ( ! child || typeof child === 'string' ) {\n\t\t\t\t\t\treturn child;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst childKey = child.key || childIndex;\n\t\t\t\t\treturn cloneElement( child, { key: childKey } );\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.filter(\n\t\t\t\t// In some cases fills are rendered only when some conditions apply.\n\t\t\t\t// This ensures that we only use non-empty fills when rendering, i.e.,\n\t\t\t\t// it allows us to render wrappers only when the fills are actually present.\n\t\t\t\t( element ) => ! isEmptyElement( element )\n\t\t\t);\n\n\t\treturn <>{ isFunction( children ) ? children( fills ) : fills }</>;\n\t}\n}\n\nconst Slot = ( props ) => (\n\t<SlotFillContext.Consumer>\n\t\t{ ( { registerSlot, unregisterSlot, getFills } ) => (\n\t\t\t<SlotComponent\n\t\t\t\t{ ...props }\n\t\t\t\tregisterSlot={ registerSlot }\n\t\t\t\tunregisterSlot={ unregisterSlot }\n\t\t\t\tgetFills={ getFills }\n\t\t\t/>\n\t\t) }\n\t</SlotFillContext.Consumer>\n);\n\nexport default Slot;\n","// symbols\nconst OWN_KEYS_SYMBOL = Symbol();\nconst TRACK_MEMO_SYMBOL = Symbol();\nconst GET_ORIGINAL_SYMBOL = Symbol();\n\n// properties\nconst AFFECTED_PROPERTY = 'a';\nconst FROZEN_PROPERTY = 'f';\nconst PROXY_PROPERTY = 'p';\nconst PROXY_CACHE_PROPERTY = 'c';\nconst NEXT_OBJECT_PROPERTY = 'n';\nconst CHANGED_PROPERTY = 'g';\n\n// function to create a new bare proxy\nlet newProxy = <T extends object>(\n  target: T,\n  handler: ProxyHandler<T>,\n) => new Proxy(target, handler);\n\n// get object prototype\nconst getProto = Object.getPrototypeOf;\n\nconst objectsToTrack = new WeakMap<object, boolean>();\n\n// check if obj is a plain object or an array\nconst isObjectToTrack = <T>(obj: T): obj is T extends object ? T : never => (\n  obj && (objectsToTrack.has(obj as unknown as object)\n    ? objectsToTrack.get(obj as unknown as object) as boolean\n    : (getProto(obj) === Object.prototype || getProto(obj) === Array.prototype)\n  )\n);\n\n// check if it is object\nconst isObject = (x: unknown): x is object => (\n  typeof x === 'object' && x !== null\n);\n\n// check if frozen\nconst isFrozen = (obj: object) => (\n  Object.isFrozen(obj) || (\n    // Object.isFrozen() doesn't detect non-writable properties\n    // See: https://github.com/dai-shi/proxy-compare/pull/8\n    Object.values(Object.getOwnPropertyDescriptors(obj)).some(\n      (descriptor) => !descriptor.writable,\n    )\n  )\n);\n\n// copy frozen object\nconst unfrozenCache = new WeakMap<object, object>();\nconst unfreeze = <T extends object>(obj: T): T => {\n  let unfrozen = unfrozenCache.get(obj);\n  if (!unfrozen) {\n    if (Array.isArray(obj)) {\n      // Arrays need a special way to copy\n      unfrozen = Array.from(obj);\n    } else {\n      // For non-array objects, we create a new object keeping the prototype\n      // with changing all configurable options (otherwise, proxies will complain)\n      const descriptors = Object.getOwnPropertyDescriptors(obj);\n      Object.values(descriptors).forEach((desc) => { desc.configurable = true; });\n      unfrozen = Object.create(getProto(obj), descriptors);\n    }\n    unfrozenCache.set(obj, unfrozen as object);\n  }\n  return unfrozen as T;\n};\n\ntype Affected = WeakMap<object, Set<string | symbol>>;\ntype ProxyHandlerState<T extends object> = {\n  readonly [FROZEN_PROPERTY]: boolean;\n  [PROXY_PROPERTY]?: T;\n  [PROXY_CACHE_PROPERTY]?: ProxyCache<object> | undefined;\n  [AFFECTED_PROPERTY]?: Affected;\n}\ntype ProxyCache<T extends object> = WeakMap<\n  object,\n  readonly [ProxyHandler<T>, ProxyHandlerState<T>]\n>;\n\nconst createProxyHandler = <T extends object>(origObj: T, frozen: boolean) => {\n  const state: ProxyHandlerState<T> = {\n    [FROZEN_PROPERTY]: frozen,\n  };\n  let trackObject = false; // for trackMemo\n  const recordUsage = (key: string | symbol, skipWithOwnKeys?: boolean) => {\n    if (!trackObject) {\n      let used = (state[AFFECTED_PROPERTY] as Affected).get(origObj);\n      if (!used) {\n        used = new Set();\n        (state[AFFECTED_PROPERTY] as Affected).set(origObj, used);\n      }\n      if (!skipWithOwnKeys || !used.has(OWN_KEYS_SYMBOL)) {\n        used.add(key);\n      }\n    }\n  };\n  const recordObjectAsUsed = () => {\n    trackObject = true;\n    (state[AFFECTED_PROPERTY] as Affected).delete(origObj);\n  };\n  const handler: ProxyHandler<T> = {\n    get(target, key) {\n      if (key === GET_ORIGINAL_SYMBOL) {\n        return origObj;\n      }\n      recordUsage(key);\n      return createProxy(\n        (target as any)[key],\n        (state[AFFECTED_PROPERTY] as Affected),\n        state[PROXY_CACHE_PROPERTY],\n      );\n    },\n    has(target, key) {\n      if (key === TRACK_MEMO_SYMBOL) {\n        recordObjectAsUsed();\n        return true;\n      }\n      // LIMITATION: We simply record the same as `get`.\n      // This means { a: {} } and { a: {} } is detected as changed,\n      // if `'a' in obj` is handled.\n      recordUsage(key);\n      return key in target;\n    },\n    getOwnPropertyDescriptor(target, key) {\n      // LIMITATION: We simply record the same as `get`.\n      // This means { a: {} } and { a: {} } is detected as changed,\n      // if `obj.getOwnPropertyDescriptor('a'))` is handled.\n      recordUsage(key, true);\n      return Object.getOwnPropertyDescriptor(target, key);\n    },\n    ownKeys(target) {\n      recordUsage(OWN_KEYS_SYMBOL);\n      return Reflect.ownKeys(target);\n    },\n  };\n  if (frozen) {\n    handler.set = handler.deleteProperty = () => false;\n  }\n  return [handler, state] as const;\n};\n\nconst getOriginalObject = <T extends object>(obj: T) => (\n  // unwrap proxy\n  (obj as { [GET_ORIGINAL_SYMBOL]?: typeof obj })[GET_ORIGINAL_SYMBOL]\n  // otherwise\n  || obj\n);\n\n/**\n * Create a proxy.\n *\n * This function will create a proxy at top level and proxy nested objects as you access them,\n * in order to keep track of which properties were accessed via get/has proxy handlers:\n *\n * NOTE: Printing of WeakMap is hard to inspect and not very readable\n * for this purpose you can use the `affectedToPathList` helper.\n *\n * @param {object} obj - Object that will be wrapped on the proxy.\n * @param {WeakMap<object, unknown>} affected -\n * WeakMap that will hold the tracking of which properties in the proxied object were accessed.\n * @param {WeakMap<object, unknown>} [proxyCache] -\n * WeakMap that will help keep referential identity for proxies.\n * @returns {Proxy<object>} - Object wrapped in a proxy.\n *\n * @example\n * import { createProxy } from 'proxy-compare';\n *\n * const original = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n * const proxy = createProxy(original, affected);\n *\n * proxy.a // Will mark as used and track its value.\n * // This will update the affected WeakMap with original as key\n * // and a Set with \"a\"\n *\n * proxy.d // Will mark \"d\" as accessed to track and proxy itself ({ e: \"3\" }).\n * // This will update the affected WeakMap with original as key\n * // and a Set with \"d\"\n */\nexport const createProxy = <T>(\n  obj: T,\n  affected: WeakMap<object, unknown>,\n  proxyCache?: WeakMap<object, unknown>,\n): T => {\n  if (!isObjectToTrack(obj)) return obj;\n  const target = getOriginalObject(obj);\n  const frozen = isFrozen(target);\n  let handlerAndState = (\n    proxyCache && (proxyCache as ProxyCache<typeof target>).get(target)\n  );\n  if (!handlerAndState || handlerAndState[1][FROZEN_PROPERTY] !== frozen) {\n    handlerAndState = createProxyHandler<typeof target>(target, frozen);\n    handlerAndState[1][PROXY_PROPERTY] = newProxy(\n      frozen ? unfreeze(target) : target,\n      handlerAndState[0],\n    );\n    if (proxyCache) {\n      proxyCache.set(target, handlerAndState);\n    }\n  }\n  handlerAndState[1][AFFECTED_PROPERTY] = affected as Affected;\n  handlerAndState[1][PROXY_CACHE_PROPERTY] = proxyCache as ProxyCache<object> | undefined;\n  return handlerAndState[1][PROXY_PROPERTY] as typeof target;\n};\n\nconst isOwnKeysChanged = (prevObj: object, nextObj: object) => {\n  const prevKeys = Reflect.ownKeys(prevObj);\n  const nextKeys = Reflect.ownKeys(nextObj);\n  return prevKeys.length !== nextKeys.length\n    || prevKeys.some((k, i) => k !== nextKeys[i]);\n};\n\ntype ChangedCache = WeakMap<object, {\n  [NEXT_OBJECT_PROPERTY]: object;\n  [CHANGED_PROPERTY]: boolean;\n}>;\n\n/**\n * Compare changes on objects.\n *\n * This will compare the affected properties on tracked objects inside the proxy\n * to check if there were any changes made to it,\n * by default if no property was accessed on the proxy it will attempt to do a\n * reference equality check for the objects provided (Object.is(a, b)). If you access a property\n * on the proxy, then isChanged will only compare the affected properties.\n *\n * @param {object} prevObj - The previous object to compare.\n * @param {object} nextObj - Object to compare with the previous one.\n * @param {WeakMap<object, unknown>} affected -\n * WeakMap that holds the tracking of which properties in the proxied object were accessed.\n * @param {WeakMap<object, unknown>} [cache] -\n * WeakMap that holds a cache of the comparisons for better performance with repetitive comparisons,\n * and to avoid infinite loop with circular structures.\n * @returns {boolean} - Boolean indicating if the affected property on the object has changed.\n *\n * @example\n * import { createProxy, isChanged } from 'proxy-compare';\n *\n * const obj = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(obj, affected);\n *\n * proxy.a\n *\n * isChanged(obj, { a: \"1\" }, affected) // false\n *\n * proxy.a = \"2\"\n *\n * isChanged(obj, { a: \"1\" }, affected) // true\n */\n\nexport const isChanged = (\n  prevObj: unknown,\n  nextObj: unknown,\n  affected: WeakMap<object, unknown>,\n  cache?: WeakMap<object, unknown>,\n): boolean => {\n  if (Object.is(prevObj, nextObj)) {\n    return false;\n  }\n  if (!isObject(prevObj) || !isObject(nextObj)) return true;\n  const used = (affected as Affected).get(getOriginalObject(prevObj));\n  if (!used) return true;\n  if (cache) {\n    const hit = (cache as ChangedCache).get(prevObj);\n    if (hit && hit[NEXT_OBJECT_PROPERTY] === nextObj) {\n      return hit[CHANGED_PROPERTY];\n    }\n    // for object with cycles\n    (cache as ChangedCache).set(prevObj, {\n      [NEXT_OBJECT_PROPERTY]: nextObj,\n      [CHANGED_PROPERTY]: false,\n    });\n  }\n  let changed: boolean | null = null;\n  // eslint-disable-next-line no-restricted-syntax\n  for (const key of used) {\n    const c = key === OWN_KEYS_SYMBOL ? isOwnKeysChanged(prevObj, nextObj)\n      : isChanged(\n        (prevObj as any)[key],\n        (nextObj as any)[key],\n        affected,\n        cache,\n      );\n    if (c === true || c === false) changed = c;\n    if (changed) break;\n  }\n  if (changed === null) changed = true;\n  if (cache) {\n    cache.set(prevObj, {\n      [NEXT_OBJECT_PROPERTY]: nextObj,\n      [CHANGED_PROPERTY]: changed,\n    });\n  }\n  return changed;\n};\n\n// explicitly track object with memo\nexport const trackMemo = (obj: unknown) => {\n  if (isObjectToTrack(obj)) {\n    return TRACK_MEMO_SYMBOL in obj;\n  }\n  return false;\n};\n\n/**\n * Unwrap proxy to get the original object.\n *\n * Used to retrieve the original object used to create the proxy instance with `createProxy`.\n *\n * @param {Proxy<object>} obj -  The proxy wrapper of the originial object.\n * @returns {object | null} - Return either the unwrapped object if exists.\n *\n * @example\n * import { createProxy, getUntracked } from 'proxy-compare';\n *\n * const original = { a: \"1\", c: \"2\", d: { e: \"3\" } };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(original, affected);\n * const originalFromProxy = getUntracked(proxy)\n *\n * Object.is(original, originalFromProxy) // true\n * isChanged(original, originalFromProxy, affected) // false\n */\nexport const getUntracked = <T>(obj: T): T | null => {\n  if (isObjectToTrack(obj)) {\n    return (obj as { [GET_ORIGINAL_SYMBOL]?: T })[GET_ORIGINAL_SYMBOL] || null;\n  }\n  return null;\n};\n\n/**\n * Mark object to be tracked.\n *\n * This function marks an object that will be passed into `createProxy`\n * as marked to track or not. By default only Array and Object are marked to track,\n * so this is useful for example to mark a class instance to track or to mark a object\n * to be untracked when creating your proxy.\n *\n * @param obj - Object to mark as tracked or not.\n * @param mark - Boolean indicating whether you want to track this object or not.\n * @returns No return.\n *\n * @example\n * import { createProxy, markToTrack, isChanged } from 'proxy-compare';\n *\n * const nested = { e: \"3\" }\n *\n * markToTrack(nested, false)\n *\n * const original = { a: \"1\", c: \"2\", d: nested };\n * const affected = new WeakMap();\n *\n * const proxy = createProxy(original, affected);\n *\n * proxy.d.e\n *\n * isChanged(original, { d: { e: \"3\" } }, affected) // true\n */\nexport const markToTrack = (obj: object, mark = true) => {\n  objectsToTrack.set(obj, mark);\n};\n\n// convert affected to path list\nexport const affectedToPathList = (\n  obj: unknown,\n  affected: WeakMap<object, unknown>,\n) => {\n  const list: (string | symbol)[][] = [];\n  const seen = new WeakSet();\n  const walk = (x: unknown, path?: (string | symbol)[]) => {\n    if (seen.has(x as object)) {\n      // for object with cycles\n      return;\n    }\n    if (isObject(x)) {\n      seen.add(x);\n    }\n    const used = isObject(x) && (affected as Affected).get(getOriginalObject(x));\n    if (used) {\n      used.forEach((key) => {\n        walk((x as any)[key], path ? [...path, key] : [key]);\n      });\n    } else if (path) {\n      list.push(path);\n    }\n  };\n  walk(obj);\n  return list;\n};\n\n/**\n * replace newProxy function.\n *\n * This can be used if you want to use proxy-polyfill.\n * Note that proxy-polyfill can't polyfill everything.\n * Use it at your own risk.\n */\nexport const replaceNewProxy = (fn: typeof newProxy) => {\n  newProxy = fn;\n};\n","import { markToTrack, getUntracked } from 'proxy-compare';\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst refSet = /* @__PURE__ */ new WeakSet();\nconst VERSION = (import.meta.env && import.meta.env.MODE) !== \"production\" ? Symbol(\"VERSION\") : Symbol();\nconst LISTENERS = (import.meta.env && import.meta.env.MODE) !== \"production\" ? Symbol(\"LISTENERS\") : Symbol();\nconst SNAPSHOT = (import.meta.env && import.meta.env.MODE) !== \"production\" ? Symbol(\"SNAPSHOT\") : Symbol();\nconst buildProxyFunction = (objectIs = Object.is, newProxy = (target, handler) => new Proxy(target, handler), canProxy = (x) => isObject(x) && !refSet.has(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !(x instanceof WeakMap) && !(x instanceof WeakSet) && !(x instanceof Error) && !(x instanceof Number) && !(x instanceof Date) && !(x instanceof String) && !(x instanceof RegExp) && !(x instanceof ArrayBuffer), PROMISE_RESULT = (import.meta.env && import.meta.env.MODE) !== \"production\" ? Symbol(\"PROMISE_RESULT\") : Symbol(), PROMISE_ERROR = (import.meta.env && import.meta.env.MODE) !== \"production\" ? Symbol(\"PROMISE_ERROR\") : Symbol(), snapshotCache = /* @__PURE__ */ new WeakMap(), createSnapshot = (version, target, receiver) => {\n  const cache = snapshotCache.get(receiver);\n  if ((cache == null ? void 0 : cache[0]) === version) {\n    return cache[1];\n  }\n  const snapshot2 = Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));\n  markToTrack(snapshot2, true);\n  snapshotCache.set(receiver, [version, snapshot2]);\n  Reflect.ownKeys(target).forEach((key) => {\n    const value = Reflect.get(target, key, receiver);\n    if (refSet.has(value)) {\n      markToTrack(value, false);\n      snapshot2[key] = value;\n    } else if (value instanceof Promise) {\n      if (PROMISE_RESULT in value) {\n        snapshot2[key] = value[PROMISE_RESULT];\n      } else {\n        const errorOrPromise = value[PROMISE_ERROR] || value;\n        Object.defineProperty(snapshot2, key, {\n          get() {\n            if (PROMISE_RESULT in value) {\n              return value[PROMISE_RESULT];\n            }\n            throw errorOrPromise;\n          }\n        });\n      }\n    } else if (value == null ? void 0 : value[LISTENERS]) {\n      snapshot2[key] = value[SNAPSHOT];\n    } else {\n      snapshot2[key] = value;\n    }\n  });\n  return Object.freeze(snapshot2);\n}, proxyCache = /* @__PURE__ */ new WeakMap(), versionHolder = [1], proxyFunction2 = (initialObject) => {\n  if (!isObject(initialObject)) {\n    throw new Error(\"object required\");\n  }\n  const found = proxyCache.get(initialObject);\n  if (found) {\n    return found;\n  }\n  let version = versionHolder[0];\n  const listeners = /* @__PURE__ */ new Set();\n  const notifyUpdate = (op, nextVersion = ++versionHolder[0]) => {\n    if (version !== nextVersion) {\n      version = nextVersion;\n      listeners.forEach((listener) => listener(op, nextVersion));\n    }\n  };\n  const propListeners = /* @__PURE__ */ new Map();\n  const getPropListener = (prop) => {\n    let propListener = propListeners.get(prop);\n    if (!propListener) {\n      propListener = (op, nextVersion) => {\n        const newOp = [...op];\n        newOp[1] = [prop, ...newOp[1]];\n        notifyUpdate(newOp, nextVersion);\n      };\n      propListeners.set(prop, propListener);\n    }\n    return propListener;\n  };\n  const popPropListener = (prop) => {\n    const propListener = propListeners.get(prop);\n    propListeners.delete(prop);\n    return propListener;\n  };\n  const baseObject = Array.isArray(initialObject) ? [] : Object.create(Object.getPrototypeOf(initialObject));\n  const handler = {\n    get(target, prop, receiver) {\n      if (prop === VERSION) {\n        return version;\n      }\n      if (prop === LISTENERS) {\n        return listeners;\n      }\n      if (prop === SNAPSHOT) {\n        return createSnapshot(version, target, receiver);\n      }\n      return Reflect.get(target, prop, receiver);\n    },\n    deleteProperty(target, prop) {\n      const prevValue = Reflect.get(target, prop);\n      const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS];\n      if (childListeners) {\n        childListeners.delete(popPropListener(prop));\n      }\n      const deleted = Reflect.deleteProperty(target, prop);\n      if (deleted) {\n        notifyUpdate([\"delete\", [prop], prevValue]);\n      }\n      return deleted;\n    },\n    set(target, prop, value, receiver) {\n      var _a;\n      const hasPrevValue = Reflect.has(target, prop);\n      const prevValue = Reflect.get(target, prop, receiver);\n      if (hasPrevValue && objectIs(prevValue, value)) {\n        return true;\n      }\n      const childListeners = prevValue == null ? void 0 : prevValue[LISTENERS];\n      if (childListeners) {\n        childListeners.delete(popPropListener(prop));\n      }\n      if (isObject(value)) {\n        value = getUntracked(value) || value;\n      }\n      let nextValue;\n      if ((_a = Object.getOwnPropertyDescriptor(target, prop)) == null ? void 0 : _a.set) {\n        nextValue = value;\n      } else if (value instanceof Promise) {\n        nextValue = value.then((v) => {\n          nextValue[PROMISE_RESULT] = v;\n          notifyUpdate([\"resolve\", [prop], v]);\n          return v;\n        }).catch((e) => {\n          nextValue[PROMISE_ERROR] = e;\n          notifyUpdate([\"reject\", [prop], e]);\n        });\n      } else if (value == null ? void 0 : value[LISTENERS]) {\n        nextValue = value;\n        nextValue[LISTENERS].add(getPropListener(prop));\n      } else if (canProxy(value)) {\n        nextValue = proxy(value);\n        nextValue[LISTENERS].add(getPropListener(prop));\n      } else {\n        nextValue = value;\n      }\n      Reflect.set(target, prop, nextValue, receiver);\n      notifyUpdate([\"set\", [prop], value, prevValue]);\n      return true;\n    }\n  };\n  const proxyObject = newProxy(baseObject, handler);\n  proxyCache.set(initialObject, proxyObject);\n  Reflect.ownKeys(initialObject).forEach((key) => {\n    const desc = Object.getOwnPropertyDescriptor(\n      initialObject,\n      key\n    );\n    if (desc.get || desc.set) {\n      Object.defineProperty(baseObject, key, desc);\n    } else {\n      proxyObject[key] = initialObject[key];\n    }\n  });\n  return proxyObject;\n}) => [\n  proxyFunction2,\n  refSet,\n  VERSION,\n  LISTENERS,\n  SNAPSHOT,\n  objectIs,\n  newProxy,\n  canProxy,\n  PROMISE_RESULT,\n  PROMISE_ERROR,\n  snapshotCache,\n  createSnapshot,\n  proxyCache,\n  versionHolder\n];\nconst [proxyFunction] = buildProxyFunction();\nfunction proxy(initialObject = {}) {\n  return proxyFunction(initialObject);\n}\nfunction getVersion(proxyObject) {\n  return isObject(proxyObject) ? proxyObject[VERSION] : void 0;\n}\nfunction subscribe(proxyObject, callback, notifyInSync) {\n  if ((import.meta.env && import.meta.env.MODE) !== \"production\" && !(proxyObject == null ? void 0 : proxyObject[LISTENERS])) {\n    console.warn(\"Please use proxy object\");\n  }\n  let promise;\n  const ops = [];\n  const listener = (op) => {\n    ops.push(op);\n    if (notifyInSync) {\n      callback(ops.splice(0));\n      return;\n    }\n    if (!promise) {\n      promise = Promise.resolve().then(() => {\n        promise = void 0;\n        callback(ops.splice(0));\n      });\n    }\n  };\n  proxyObject[LISTENERS].add(listener);\n  return () => {\n    proxyObject[LISTENERS].delete(listener);\n  };\n}\nfunction snapshot(proxyObject) {\n  if ((import.meta.env && import.meta.env.MODE) !== \"production\" && !(proxyObject == null ? void 0 : proxyObject[SNAPSHOT])) {\n    console.warn(\"Please use proxy object\");\n  }\n  return proxyObject[SNAPSHOT];\n}\nfunction ref(obj) {\n  refSet.add(obj);\n  return obj;\n}\nconst unstable_buildProxyFunction = buildProxyFunction;\n\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction };\n","import { useRef, useCallback, useEffect, useMemo, useDebugValue } from 'react';\nimport { isChanged, createProxy, affectedToPathList } from 'proxy-compare';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/index.js';\nimport { subscribe, snapshot } from 'valtio/vanilla';\nexport { getVersion, proxy, ref, snapshot, subscribe, unstable_buildProxyFunction } from 'valtio/vanilla';\n\nconst { useSyncExternalStore } = useSyncExternalStoreExports;\nconst useAffectedDebugValue = (state, affected) => {\n  const pathList = useRef();\n  useEffect(() => {\n    pathList.current = affectedToPathList(state, affected);\n  });\n  useDebugValue(pathList.current);\n};\nfunction useSnapshot(proxyObject, options) {\n  const notifyInSync = options == null ? void 0 : options.sync;\n  const lastSnapshot = useRef();\n  const lastAffected = useRef();\n  let inRender = true;\n  const currSnapshot = useSyncExternalStore(\n    useCallback(\n      (callback) => {\n        const unsub = subscribe(proxyObject, callback, notifyInSync);\n        callback();\n        return unsub;\n      },\n      [proxyObject, notifyInSync]\n    ),\n    () => {\n      const nextSnapshot = snapshot(proxyObject);\n      try {\n        if (!inRender && lastSnapshot.current && lastAffected.current && !isChanged(\n          lastSnapshot.current,\n          nextSnapshot,\n          lastAffected.current,\n          /* @__PURE__ */ new WeakMap()\n        )) {\n          return lastSnapshot.current;\n        }\n      } catch (e) {\n      }\n      return nextSnapshot;\n    },\n    () => snapshot(proxyObject)\n  );\n  inRender = false;\n  const currAffected = /* @__PURE__ */ new WeakMap();\n  useEffect(() => {\n    lastSnapshot.current = currSnapshot;\n    lastAffected.current = currAffected;\n  });\n  if ((import.meta.env && import.meta.env.MODE) !== \"production\") {\n    useAffectedDebugValue(currSnapshot, currAffected);\n  }\n  const proxyCache = useMemo(() => /* @__PURE__ */ new WeakMap(), []);\n  return createProxy(currSnapshot, currAffected, proxyCache);\n}\n\nexport { useSnapshot };\n","import { subscribe, snapshot, proxy, getVersion, ref } from 'valtio/vanilla';\n\nfunction subscribeKey(proxyObject, key, callback, notifyInSync) {\n  return subscribe(\n    proxyObject,\n    (ops) => {\n      if (ops.some((op) => op[1][0] === key)) {\n        callback(proxyObject[key]);\n      }\n    },\n    notifyInSync\n  );\n}\n\nlet currentCleanups;\nfunction watch(callback, options) {\n  let alive = true;\n  const cleanups = /* @__PURE__ */ new Set();\n  const subscriptions = /* @__PURE__ */ new Map();\n  const cleanup = () => {\n    if (alive) {\n      alive = false;\n      cleanups.forEach((clean) => clean());\n      cleanups.clear();\n      subscriptions.forEach((unsubscribe) => unsubscribe());\n      subscriptions.clear();\n    }\n  };\n  const revalidate = () => {\n    if (!alive) {\n      return;\n    }\n    cleanups.forEach((clean) => clean());\n    cleanups.clear();\n    const proxiesToSubscribe = /* @__PURE__ */ new Set();\n    const parent = currentCleanups;\n    currentCleanups = cleanups;\n    try {\n      const cleanupReturn = callback((proxyObject) => {\n        proxiesToSubscribe.add(proxyObject);\n        return proxyObject;\n      });\n      if (cleanupReturn) {\n        cleanups.add(cleanupReturn);\n      }\n    } finally {\n      currentCleanups = parent;\n    }\n    subscriptions.forEach((unsubscribe, proxyObject) => {\n      if (proxiesToSubscribe.has(proxyObject)) {\n        proxiesToSubscribe.delete(proxyObject);\n      } else {\n        subscriptions.delete(proxyObject);\n        unsubscribe();\n      }\n    });\n    proxiesToSubscribe.forEach((proxyObject) => {\n      const unsubscribe = subscribe(proxyObject, revalidate, options == null ? void 0 : options.sync);\n      subscriptions.set(proxyObject, unsubscribe);\n    });\n  };\n  if (currentCleanups) {\n    currentCleanups.add(cleanup);\n  }\n  revalidate();\n  return cleanup;\n}\n\nconst DEVTOOLS = Symbol();\nfunction devtools(proxyObject, options) {\n  if (typeof options === \"string\") {\n    console.warn(\n      \"string name option is deprecated, use { name }. https://github.com/pmndrs/valtio/pull/400\"\n    );\n    options = { name: options };\n  }\n  const { enabled, name = \"\" } = options || {};\n  let extension;\n  try {\n    extension = (enabled != null ? enabled : (import.meta.env && import.meta.env.MODE) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n  } catch {\n  }\n  if (!extension) {\n    if ((import.meta.env && import.meta.env.MODE) !== \"production\" && enabled) {\n      console.warn(\"[Warning] Please install/enable Redux devtools extension\");\n    }\n    return;\n  }\n  let isTimeTraveling = false;\n  const devtools2 = extension.connect({ name });\n  const unsub1 = subscribe(proxyObject, (ops) => {\n    const action = ops.filter(([_, path]) => path[0] !== DEVTOOLS).map(([op, path]) => `${op}:${path.map(String).join(\".\")}`).join(\", \");\n    if (!action) {\n      return;\n    }\n    if (isTimeTraveling) {\n      isTimeTraveling = false;\n    } else {\n      const snapWithoutDevtools = Object.assign({}, snapshot(proxyObject));\n      delete snapWithoutDevtools[DEVTOOLS];\n      devtools2.send(\n        {\n          type: action,\n          updatedAt: new Date().toLocaleString()\n        },\n        snapWithoutDevtools\n      );\n    }\n  });\n  const unsub2 = devtools2.subscribe((message) => {\n    var _a, _b, _c, _d, _e, _f;\n    if (message.type === \"ACTION\" && message.payload) {\n      try {\n        Object.assign(proxyObject, JSON.parse(message.payload));\n      } catch (e) {\n        console.error(\n          \"please dispatch a serializable value that JSON.parse() and proxy() support\\n\",\n          e\n        );\n      }\n    }\n    if (message.type === \"DISPATCH\" && message.state) {\n      if (((_a = message.payload) == null ? void 0 : _a.type) === \"JUMP_TO_ACTION\" || ((_b = message.payload) == null ? void 0 : _b.type) === \"JUMP_TO_STATE\") {\n        isTimeTraveling = true;\n        const state = JSON.parse(message.state);\n        Object.assign(proxyObject, state);\n      }\n      proxyObject[DEVTOOLS] = message;\n    } else if (message.type === \"DISPATCH\" && ((_c = message.payload) == null ? void 0 : _c.type) === \"COMMIT\") {\n      devtools2.init(snapshot(proxyObject));\n    } else if (message.type === \"DISPATCH\" && ((_d = message.payload) == null ? void 0 : _d.type) === \"IMPORT_STATE\") {\n      const actions = (_e = message.payload.nextLiftedState) == null ? void 0 : _e.actionsById;\n      const computedStates = ((_f = message.payload.nextLiftedState) == null ? void 0 : _f.computedStates) || [];\n      isTimeTraveling = true;\n      computedStates.forEach(({ state }, index) => {\n        const action = actions[index] || \"No action found\";\n        Object.assign(proxyObject, state);\n        if (index === 0) {\n          devtools2.init(snapshot(proxyObject));\n        } else {\n          devtools2.send(action, snapshot(proxyObject));\n        }\n      });\n    }\n  });\n  devtools2.init(snapshot(proxyObject));\n  return () => {\n    unsub1();\n    unsub2 == null ? void 0 : unsub2();\n  };\n}\n\nconst sourceObjectMap = /* @__PURE__ */ new WeakMap();\nconst derivedObjectMap = /* @__PURE__ */ new WeakMap();\nconst markPending = (sourceObject, callback) => {\n  const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n  if (sourceObjectEntry) {\n    sourceObjectEntry[0].forEach((subscription) => {\n      const { d: derivedObject } = subscription;\n      if (sourceObject !== derivedObject) {\n        markPending(derivedObject);\n      }\n    });\n    ++sourceObjectEntry[2];\n    if (callback) {\n      sourceObjectEntry[3].add(callback);\n    }\n  }\n};\nconst checkPending = (sourceObject, callback) => {\n  const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n  if (sourceObjectEntry == null ? void 0 : sourceObjectEntry[2]) {\n    sourceObjectEntry[3].add(callback);\n    return true;\n  }\n  return false;\n};\nconst unmarkPending = (sourceObject) => {\n  const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n  if (sourceObjectEntry) {\n    --sourceObjectEntry[2];\n    if (!sourceObjectEntry[2]) {\n      sourceObjectEntry[3].forEach((callback) => callback());\n      sourceObjectEntry[3].clear();\n    }\n    sourceObjectEntry[0].forEach((subscription) => {\n      const { d: derivedObject } = subscription;\n      if (sourceObject !== derivedObject) {\n        unmarkPending(derivedObject);\n      }\n    });\n  }\n};\nconst addSubscription = (subscription) => {\n  const { s: sourceObject, d: derivedObject } = subscription;\n  let derivedObjectEntry = derivedObjectMap.get(derivedObject);\n  if (!derivedObjectEntry) {\n    derivedObjectEntry = [/* @__PURE__ */ new Set()];\n    derivedObjectMap.set(subscription.d, derivedObjectEntry);\n  }\n  derivedObjectEntry[0].add(subscription);\n  let sourceObjectEntry = sourceObjectMap.get(sourceObject);\n  if (!sourceObjectEntry) {\n    const subscriptions = /* @__PURE__ */ new Set();\n    const unsubscribe = subscribe(\n      sourceObject,\n      (ops) => {\n        subscriptions.forEach((subscription2) => {\n          const {\n            d: derivedObject2,\n            c: callback,\n            n: notifyInSync,\n            i: ignoreKeys\n          } = subscription2;\n          if (sourceObject === derivedObject2 && ops.every(\n            (op) => op[1].length === 1 && ignoreKeys.includes(op[1][0])\n          )) {\n            return;\n          }\n          if (subscription2.p) {\n            return;\n          }\n          markPending(sourceObject, callback);\n          if (notifyInSync) {\n            unmarkPending(sourceObject);\n          } else {\n            subscription2.p = Promise.resolve().then(() => {\n              delete subscription2.p;\n              unmarkPending(sourceObject);\n            });\n          }\n        });\n      },\n      true\n    );\n    sourceObjectEntry = [subscriptions, unsubscribe, 0, /* @__PURE__ */ new Set()];\n    sourceObjectMap.set(sourceObject, sourceObjectEntry);\n  }\n  sourceObjectEntry[0].add(subscription);\n};\nconst removeSubscription = (subscription) => {\n  const { s: sourceObject, d: derivedObject } = subscription;\n  const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n  derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].delete(subscription);\n  if ((derivedObjectEntry == null ? void 0 : derivedObjectEntry[0].size) === 0) {\n    derivedObjectMap.delete(derivedObject);\n  }\n  const sourceObjectEntry = sourceObjectMap.get(sourceObject);\n  if (sourceObjectEntry) {\n    const [subscriptions, unsubscribe] = sourceObjectEntry;\n    subscriptions.delete(subscription);\n    if (!subscriptions.size) {\n      unsubscribe();\n      sourceObjectMap.delete(sourceObject);\n    }\n  }\n};\nconst listSubscriptions = (derivedObject) => {\n  const derivedObjectEntry = derivedObjectMap.get(derivedObject);\n  if (derivedObjectEntry) {\n    return Array.from(derivedObjectEntry[0]);\n  }\n  return [];\n};\nconst unstable_deriveSubscriptions = {\n  add: addSubscription,\n  remove: removeSubscription,\n  list: listSubscriptions\n};\nfunction derive(derivedFns, options) {\n  const proxyObject = (options == null ? void 0 : options.proxy) || proxy({});\n  const notifyInSync = !!(options == null ? void 0 : options.sync);\n  const derivedKeys = Object.keys(derivedFns);\n  derivedKeys.forEach((key) => {\n    if (Object.getOwnPropertyDescriptor(proxyObject, key)) {\n      throw new Error(\"object property already defined\");\n    }\n    const fn = derivedFns[key];\n    let lastDependencies = null;\n    const evaluate = () => {\n      if (lastDependencies) {\n        if (Array.from(lastDependencies).map(([p]) => checkPending(p, evaluate)).some((isPending) => isPending)) {\n          return;\n        }\n        if (Array.from(lastDependencies).every(\n          ([p, entry]) => getVersion(p) === entry.v\n        )) {\n          return;\n        }\n      }\n      const dependencies = /* @__PURE__ */ new Map();\n      const get = (p) => {\n        dependencies.set(p, { v: getVersion(p) });\n        return p;\n      };\n      const value = fn(get);\n      const subscribeToDependencies = () => {\n        dependencies.forEach((entry, p) => {\n          var _a;\n          const lastSubscription = (_a = lastDependencies == null ? void 0 : lastDependencies.get(p)) == null ? void 0 : _a.s;\n          if (lastSubscription) {\n            entry.s = lastSubscription;\n          } else {\n            const subscription = {\n              s: p,\n              d: proxyObject,\n              k: key,\n              c: evaluate,\n              n: notifyInSync,\n              i: derivedKeys\n            };\n            addSubscription(subscription);\n            entry.s = subscription;\n          }\n        });\n        lastDependencies == null ? void 0 : lastDependencies.forEach((entry, p) => {\n          if (!dependencies.has(p) && entry.s) {\n            removeSubscription(entry.s);\n          }\n        });\n        lastDependencies = dependencies;\n      };\n      if (value instanceof Promise) {\n        value.finally(subscribeToDependencies);\n      } else {\n        subscribeToDependencies();\n      }\n      proxyObject[key] = value;\n    };\n    evaluate();\n  });\n  return proxyObject;\n}\nfunction underive(proxyObject, options) {\n  const keysToDelete = (options == null ? void 0 : options.delete) ? /* @__PURE__ */ new Set() : null;\n  listSubscriptions(proxyObject).forEach((subscription) => {\n    const { k: key } = subscription;\n    if (!(options == null ? void 0 : options.keys) || options.keys.includes(key)) {\n      removeSubscription(subscription);\n      if (keysToDelete) {\n        keysToDelete.add(key);\n      }\n    }\n  });\n  if (keysToDelete) {\n    keysToDelete.forEach((key) => {\n      delete proxyObject[key];\n    });\n  }\n}\n\nfunction addComputed_DEPRECATED(proxyObject, computedFns_FAKE, targetObject = proxyObject) {\n  console.warn(\n    \"addComputed is deprecated. Please consider using `derive` or `proxyWithComputed` instead. Falling back to emulation with derive. https://github.com/pmndrs/valtio/pull/201\"\n  );\n  const derivedFns = {};\n  Object.keys(computedFns_FAKE).forEach((key) => {\n    derivedFns[key] = (get) => computedFns_FAKE[key](get(proxyObject));\n  });\n  return derive(derivedFns, { proxy: targetObject });\n}\n\nfunction proxyWithComputed(initialObject, computedFns) {\n  Object.keys(computedFns).forEach((key) => {\n    if (Object.getOwnPropertyDescriptor(initialObject, key)) {\n      throw new Error(\"object property already defined\");\n    }\n    const computedFn = computedFns[key];\n    const { get, set } = typeof computedFn === \"function\" ? { get: computedFn } : computedFn;\n    const desc = {};\n    desc.get = () => get(snapshot(proxyObject));\n    if (set) {\n      desc.set = (newValue) => set(proxyObject, newValue);\n    }\n    Object.defineProperty(initialObject, key, desc);\n  });\n  const proxyObject = proxy(initialObject);\n  return proxyObject;\n}\n\nconst isObject = (x) => typeof x === \"object\" && x !== null;\nconst deepClone = (obj) => {\n  if (!isObject(obj)) {\n    return obj;\n  }\n  const baseObject = Array.isArray(obj) ? [] : Object.create(Object.getPrototypeOf(obj));\n  Reflect.ownKeys(obj).forEach((key) => {\n    baseObject[key] = deepClone(obj[key]);\n  });\n  return baseObject;\n};\nfunction proxyWithHistory(initialValue, skipSubscribe = false) {\n  const proxyObject = proxy({\n    value: initialValue,\n    history: ref({\n      wip: void 0,\n      snapshots: [],\n      index: -1\n    }),\n    canUndo: () => proxyObject.history.index > 0,\n    undo: () => {\n      if (proxyObject.canUndo()) {\n        proxyObject.value = proxyObject.history.wip = deepClone(\n          proxyObject.history.snapshots[--proxyObject.history.index]\n        );\n      }\n    },\n    canRedo: () => proxyObject.history.index < proxyObject.history.snapshots.length - 1,\n    redo: () => {\n      if (proxyObject.canRedo()) {\n        proxyObject.value = proxyObject.history.wip = deepClone(\n          proxyObject.history.snapshots[++proxyObject.history.index]\n        );\n      }\n    },\n    saveHistory: () => {\n      proxyObject.history.snapshots.splice(proxyObject.history.index + 1);\n      proxyObject.history.snapshots.push(snapshot(proxyObject).value);\n      ++proxyObject.history.index;\n    },\n    subscribe: () => subscribe(proxyObject, (ops) => {\n      if (ops.every(\n        (op) => op[1][0] === \"value\" && (op[0] !== \"set\" || op[2] !== proxyObject.history.wip)\n      )) {\n        proxyObject.saveHistory();\n      }\n    })\n  });\n  proxyObject.saveHistory();\n  if (!skipSubscribe) {\n    proxyObject.subscribe();\n  }\n  return proxyObject;\n}\n\nfunction proxySet(initialValues) {\n  const set = proxy({\n    data: Array.from(new Set(initialValues)),\n    has(value) {\n      return this.data.indexOf(value) !== -1;\n    },\n    add(value) {\n      let hasProxy = false;\n      if (typeof value === \"object\" && value !== null) {\n        hasProxy = this.data.indexOf(proxy(value)) !== -1;\n      }\n      if (this.data.indexOf(value) === -1 && !hasProxy) {\n        this.data.push(value);\n      }\n      return this;\n    },\n    delete(value) {\n      const index = this.data.indexOf(value);\n      if (index === -1) {\n        return false;\n      }\n      this.data.splice(index, 1);\n      return true;\n    },\n    clear() {\n      this.data.splice(0);\n    },\n    get size() {\n      return this.data.length;\n    },\n    forEach(cb) {\n      this.data.forEach((value) => {\n        cb(value, value, this);\n      });\n    },\n    get [Symbol.toStringTag]() {\n      return \"Set\";\n    },\n    toJSON() {\n      return {};\n    },\n    [Symbol.iterator]() {\n      return this.data[Symbol.iterator]();\n    },\n    values() {\n      return this.data.values();\n    },\n    keys() {\n      return this.data.values();\n    },\n    entries() {\n      return new Set(this.data).entries();\n    }\n  });\n  Object.defineProperties(set, {\n    data: {\n      enumerable: false\n    },\n    size: {\n      enumerable: false\n    },\n    toJSON: {\n      enumerable: false\n    }\n  });\n  Object.seal(set);\n  return set;\n}\n\nfunction proxyMap(entries) {\n  const map = proxy({\n    data: Array.from(entries || []),\n    has(key) {\n      return this.data.some((p) => p[0] === key);\n    },\n    set(key, value) {\n      const record = this.data.find((p) => p[0] === key);\n      if (record) {\n        record[1] = value;\n      } else {\n        this.data.push([key, value]);\n      }\n      return this;\n    },\n    get(key) {\n      var _a;\n      return (_a = this.data.find((p) => p[0] === key)) == null ? void 0 : _a[1];\n    },\n    delete(key) {\n      const index = this.data.findIndex((p) => p[0] === key);\n      if (index === -1) {\n        return false;\n      }\n      this.data.splice(index, 1);\n      return true;\n    },\n    clear() {\n      this.data.splice(0);\n    },\n    get size() {\n      return this.data.length;\n    },\n    toJSON() {\n      return {};\n    },\n    forEach(cb) {\n      this.data.forEach((p) => {\n        cb(p[1], p[0], this);\n      });\n    },\n    keys() {\n      return this.data.map((p) => p[0]).values();\n    },\n    values() {\n      return this.data.map((p) => p[1]).values();\n    },\n    entries() {\n      return new Map(this.data).entries();\n    },\n    get [Symbol.toStringTag]() {\n      return \"Map\";\n    },\n    [Symbol.iterator]() {\n      return this.entries();\n    }\n  });\n  Object.defineProperties(map, {\n    data: {\n      enumerable: false\n    },\n    size: {\n      enumerable: false\n    },\n    toJSON: {\n      enumerable: false\n    }\n  });\n  Object.seal(map);\n  return map;\n}\n\nexport { addComputed_DEPRECATED as addComputed, derive, devtools, proxyMap, proxySet, proxyWithComputed, proxyWithHistory, subscribeKey, underive, unstable_deriveSubscriptions, watch };\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { proxyMap } from 'valtio/utils';\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\nconst SlotFillContext = createContext( {\n\tslots: proxyMap(),\n\tfills: proxyMap(),\n\tregisterSlot: () => {\n\t\twarning(\n\t\t\t'Components must be wrapped within `SlotFillProvider`. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/slot-fill/'\n\t\t);\n\t},\n\tupdateSlot: () => {},\n\tunregisterSlot: () => {},\n\tregisterFill: () => {},\n\tunregisterFill: () => {},\n} );\n\nexport default SlotFillContext;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSnapshot } from 'valtio';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\n\nexport default function useSlot( name ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst slots = useSnapshot( registry.slots, { sync: true } );\n\t// The important bit here is that this call ensures\n\t// the hook only causes a re-render if the slot\n\t// with the given name change, not any other slot.\n\tconst slot = slots.get( name );\n\n\tconst updateSlot = useCallback(\n\t\t( fillProps ) => {\n\t\t\tregistry.updateSlot( name, fillProps );\n\t\t},\n\t\t[ name, registry.updateSlot ]\n\t);\n\n\tconst unregisterSlot = useCallback(\n\t\t( slotRef ) => {\n\t\t\tregistry.unregisterSlot( name, slotRef );\n\t\t},\n\t\t[ name, registry.unregisterSlot ]\n\t);\n\n\tconst registerFill = useCallback(\n\t\t( fillRef ) => {\n\t\t\tregistry.registerFill( name, fillRef );\n\t\t},\n\t\t[ name, registry.registerFill ]\n\t);\n\n\tconst unregisterFill = useCallback(\n\t\t( fillRef ) => {\n\t\t\tregistry.unregisterFill( name, fillRef );\n\t\t},\n\t\t[ name, registry.unregisterFill ]\n\t);\n\n\treturn {\n\t\t...slot,\n\t\tupdateSlot,\n\t\tunregisterSlot,\n\t\tregisterFill,\n\t\tunregisterFill,\n\t};\n}\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n  if (!getRandomValues) {\n    throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n  }\n\n  return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n  return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n  byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n  var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  // Note: Be careful editing this code!  It's been tuned for performance\n  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n  var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one\n  // of the following:\n  // - One or more input array values don't map to a hex octet (leading to\n  // \"undefined\" in the uuid)\n  // - Invalid input values for the RFC `version` or `variant` fields\n\n  if (!validate(uuid)) {\n    throw TypeError('Stringified UUID is invalid');\n  }\n\n  return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n  options = options || {};\n  var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n  rnds[6] = rnds[6] & 0x0f | 0x40;\n  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n  if (buf) {\n    offset = offset || 0;\n\n    for (var i = 0; i < 16; ++i) {\n      buf[offset + i] = rnds[i];\n    }\n\n    return buf;\n  }\n\n  return stringify(rnds);\n}\n\nexport default v4;","/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport memoize from 'memize';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n\nconst memoizedCreateCacheWithContainer = memoize(\n\t( container: HTMLElement ) => {\n\t\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t\t// strip the numbers from the UUID. It _should_ be fine.\n\t\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\t\twhile ( uuidCache.has( key ) ) {\n\t\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t\t}\n\t\tuuidCache.add( key );\n\t\treturn createCache( { container, key } );\n\t}\n);\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { useRef, useState, useEffect, createPortal } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useSlot from './use-slot';\nimport StyleProvider from '../../style-provider';\n\nfunction useForceUpdate() {\n\tconst [ , setState ] = useState( {} );\n\tconst mounted = useRef( true );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tmounted.current = false;\n\t\t};\n\t}, [] );\n\n\treturn () => {\n\t\tif ( mounted.current ) {\n\t\t\tsetState( {} );\n\t\t}\n\t};\n}\n\nexport default function Fill( { name, children } ) {\n\tconst slot = useSlot( name );\n\tconst ref = useRef( { rerender: useForceUpdate() } );\n\n\tuseEffect( () => {\n\t\t// We register fills so we can keep track of their existance.\n\t\t// Some Slot implementations need to know if there're already fills\n\t\t// registered so they can choose to render themselves or not.\n\t\tslot.registerFill( ref );\n\t\treturn () => {\n\t\t\tslot.unregisterFill( ref );\n\t\t};\n\t}, [ slot.registerFill, slot.unregisterFill ] );\n\n\tif ( ! slot.ref || ! slot.ref.current ) {\n\t\treturn null;\n\t}\n\n\tif ( typeof children === 'function' ) {\n\t\tchildren = children( slot.fillProps );\n\t}\n\n\t// When using a `Fill`, the `children` will be rendered in the document of the\n\t// `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n\t// to make sure we're referencing the right document/iframe (instead of the\n\t// context of the `Fill`'s parent).\n\tconst wrappedChildren = (\n\t\t<StyleProvider document={ slot.ref.current.ownerDocument }>\n\t\t\t{ children }\n\t\t</StyleProvider>\n\t);\n\n\treturn createPortal( wrappedChildren, slot.ref.current );\n}\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tuseContext,\n\tforwardRef,\n} from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\n\nfunction Slot(\n\t{ name, fillProps = {}, as: Component = 'div', ...props },\n\tforwardedRef\n) {\n\tconst registry = useContext( SlotFillContext );\n\tconst ref = useRef();\n\n\tuseLayoutEffect( () => {\n\t\tregistry.registerSlot( name, ref, fillProps );\n\t\treturn () => {\n\t\t\tregistry.unregisterSlot( name, ref );\n\t\t};\n\t\t// We are not including fillProps in the deps because we don't want to\n\t\t// unregister and register the slot whenever fillProps change, which would\n\t\t// cause the fill to be re-mounted. We are only considering the initial value\n\t\t// of fillProps.\n\t}, [ registry.registerSlot, registry.unregisterSlot, name ] );\n\t// fillProps may be an update that interacts with the layout, so we\n\t// useLayoutEffect.\n\tuseLayoutEffect( () => {\n\t\tregistry.updateSlot( name, fillProps );\n\t} );\n\n\treturn (\n\t\t<Component ref={ useMergeRefs( [ forwardedRef, ref ] ) } { ...props } />\n\t);\n}\n\nexport default forwardRef( Slot );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"isShallowEqual\"];","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { ref as valRef } from 'valtio';\nimport { proxyMap } from 'valtio/utils';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback, useRef } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\n\nfunction useSlotRegistry() {\n\tconst slots = useRef( proxyMap() );\n\tconst fills = useRef( proxyMap() );\n\n\tconst registerSlot = useCallback( ( name, ref, fillProps ) => {\n\t\tconst slot = slots.current.get( name ) || {};\n\t\tslots.current.set(\n\t\t\tname,\n\t\t\tvalRef( {\n\t\t\t\t...slot,\n\t\t\t\tref: ref || slot.ref,\n\t\t\t\tfillProps: fillProps || slot.fillProps || {},\n\t\t\t} )\n\t\t);\n\t}, [] );\n\n\tconst unregisterSlot = useCallback( ( name, ref ) => {\n\t\t// Make sure we're not unregistering a slot registered by another element\n\t\t// See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412\n\t\tif ( slots.current.get( name )?.ref === ref ) {\n\t\t\tslots.current.delete( name );\n\t\t}\n\t}, [] );\n\n\tconst updateSlot = useCallback( ( name, fillProps ) => {\n\t\tconst slot = slots.current.get( name );\n\t\tif ( ! slot ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isShallowEqual( slot.fillProps, fillProps ) ) {\n\t\t\tslot.fillProps = fillProps;\n\t\t\tconst slotFills = fills.current.get( name );\n\t\t\tif ( slotFills ) {\n\t\t\t\t// Force update fills.\n\t\t\t\tslotFills.map( ( fill ) => fill.current.rerender() );\n\t\t\t}\n\t\t}\n\t}, [] );\n\n\tconst registerFill = useCallback( ( name, ref ) => {\n\t\tfills.current.set(\n\t\t\tname,\n\t\t\tvalRef( [ ...( fills.current.get( name ) || [] ), ref ] )\n\t\t);\n\t}, [] );\n\n\tconst unregisterFill = useCallback( ( name, ref ) => {\n\t\tif ( fills.current.get( name ) ) {\n\t\t\tfills.current.set(\n\t\t\t\tname,\n\t\t\t\tvalRef(\n\t\t\t\t\tfills.current\n\t\t\t\t\t\t.get( name )\n\t\t\t\t\t\t.filter( ( fillRef ) => fillRef !== ref )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}, [] );\n\n\t// Memoizing the return value so it can be directly passed to Provider value\n\tconst registry = useMemo(\n\t\t() => ( {\n\t\t\tslots: slots.current,\n\t\t\tfills: fills.current,\n\t\t\tregisterSlot,\n\t\t\tupdateSlot,\n\t\t\tunregisterSlot,\n\t\t\tregisterFill,\n\t\t\tunregisterFill,\n\t\t} ),\n\t\t[\n\t\t\tregisterSlot,\n\t\t\tupdateSlot,\n\t\t\tunregisterSlot,\n\t\t\tregisterFill,\n\t\t\tunregisterFill,\n\t\t]\n\t);\n\n\treturn registry;\n}\n\nexport default function SlotFillProvider( { children } ) {\n\tconst registry = useSlotRegistry();\n\treturn (\n\t\t<SlotFillContext.Provider value={ registry }>\n\t\t\t{ children }\n\t\t</SlotFillContext.Provider>\n\t);\n}\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\n\nexport default class SlotFillProvider extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.registerSlot = this.registerSlot.bind( this );\n\t\tthis.registerFill = this.registerFill.bind( this );\n\t\tthis.unregisterSlot = this.unregisterSlot.bind( this );\n\t\tthis.unregisterFill = this.unregisterFill.bind( this );\n\t\tthis.getSlot = this.getSlot.bind( this );\n\t\tthis.getFills = this.getFills.bind( this );\n\t\tthis.hasFills = this.hasFills.bind( this );\n\t\tthis.subscribe = this.subscribe.bind( this );\n\n\t\tthis.slots = {};\n\t\tthis.fills = {};\n\t\tthis.listeners = [];\n\t\tthis.contextValue = {\n\t\t\tregisterSlot: this.registerSlot,\n\t\t\tunregisterSlot: this.unregisterSlot,\n\t\t\tregisterFill: this.registerFill,\n\t\t\tunregisterFill: this.unregisterFill,\n\t\t\tgetSlot: this.getSlot,\n\t\t\tgetFills: this.getFills,\n\t\t\thasFills: this.hasFills,\n\t\t\tsubscribe: this.subscribe,\n\t\t};\n\t}\n\n\tregisterSlot( name, slot ) {\n\t\tconst previousSlot = this.slots[ name ];\n\t\tthis.slots[ name ] = slot;\n\t\tthis.triggerListeners();\n\n\t\t// Sometimes the fills are registered after the initial render of slot\n\t\t// But before the registerSlot call, we need to rerender the slot.\n\t\tthis.forceUpdateSlot( name );\n\n\t\t// If a new instance of a slot is being mounted while another with the\n\t\t// same name exists, force its update _after_ the new slot has been\n\t\t// assigned into the instance, such that its own rendering of children\n\t\t// will be empty (the new Slot will subsume all fills for this name).\n\t\tif ( previousSlot ) {\n\t\t\tpreviousSlot.forceUpdate();\n\t\t}\n\t}\n\n\tregisterFill( name, instance ) {\n\t\tthis.fills[ name ] = [ ...( this.fills[ name ] || [] ), instance ];\n\t\tthis.forceUpdateSlot( name );\n\t}\n\n\tunregisterSlot( name, instance ) {\n\t\t// If a previous instance of a Slot by this name unmounts, do nothing,\n\t\t// as the slot and its fills should only be removed for the current\n\t\t// known instance.\n\t\tif ( this.slots[ name ] !== instance ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete this.slots[ name ];\n\t\tthis.triggerListeners();\n\t}\n\n\tunregisterFill( name, instance ) {\n\t\tthis.fills[ name ] =\n\t\t\tthis.fills[ name ]?.filter( ( fill ) => fill !== instance ) ?? [];\n\t\tthis.forceUpdateSlot( name );\n\t}\n\n\tgetSlot( name ) {\n\t\treturn this.slots[ name ];\n\t}\n\n\tgetFills( name, slotInstance ) {\n\t\t// Fills should only be returned for the current instance of the slot\n\t\t// in which they occupy.\n\t\tif ( this.slots[ name ] !== slotInstance ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn this.fills[ name ];\n\t}\n\n\thasFills( name ) {\n\t\treturn this.fills[ name ] && !! this.fills[ name ].length;\n\t}\n\n\tforceUpdateSlot( name ) {\n\t\tconst slot = this.getSlot( name );\n\n\t\tif ( slot ) {\n\t\t\tslot.forceUpdate();\n\t\t}\n\t}\n\n\ttriggerListeners() {\n\t\tthis.listeners.forEach( ( listener ) => listener() );\n\t}\n\n\tsubscribe( listener ) {\n\t\tthis.listeners.push( listener );\n\n\t\treturn () => {\n\t\t\tthis.listeners = this.listeners.filter( ( l ) => l !== listener );\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<SlotFillContext.Provider value={ this.contextValue }>\n\t\t\t\t{ this.props.children }\n\t\t\t</SlotFillContext.Provider>\n\t\t);\n\t}\n}\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport useSlot from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\n\nexport function Fill( props ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\nexport const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...props } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...props } />;\n} );\n\nexport function Provider( { children, ...props } ) {\n\treturn (\n\t\t<SlotFillProvider { ...props }>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport function createSlotFill( name ) {\n\tconst FillComponent = ( props ) => <Fill name={ name } { ...props } />;\n\tFillComponent.displayName = name + 'Fill';\n\n\tconst SlotComponent = ( props ) => <Slot name={ name } { ...props } />;\n\tSlotComponent.displayName = name + 'Slot';\n\tSlotComponent.__unstableName = name;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport { useSlot };\n","/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { MotionProps } from 'framer-motion';\nimport type { ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tNonNullable< PopoverProps[ 'placement' ] >\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param  position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n): NonNullable< PopoverProps[ 'placement' ] > =>\n\tPOSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param  placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\n/**\n * Returns the offset of a document's frame element.\n *\n * @param  document The iframe's owner document.\n *\n * @return The offset of the document's frame element, or undefined if the\n * document has no frame element.\n */\nexport const getFrameOffset = (\n\tdocument?: Document\n): { x: number; y: number } | undefined => {\n\tconst frameElement = document?.defaultView?.frameElement;\n\tif ( ! frameElement ) {\n\t\treturn;\n\t}\n\tconst iframeRect = frameElement.getBoundingClientRect();\n\treturn { x: iframeRect.left, y: iframeRect.top };\n};\n\nexport const getReferenceOwnerDocument = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tfallbackDocument,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tfallbackDocument: Document;\n} ): Document => {\n\t// In floating-ui's terms:\n\t// - \"reference\" refers to the popover's anchor element.\n\t// - \"floating\" refers the floating popover's element.\n\t// A floating element can also be positioned relative to a virtual element,\n\t// instead of a real one. A virtual element is represented by an object\n\t// with the `getBoundingClientRect()` function (like real elements).\n\t// See https://floating-ui.com/docs/virtual-elements for more info.\n\tlet resultingReferenceOwnerDoc;\n\tif ( anchor ) {\n\t\tresultingReferenceOwnerDoc = anchor.ownerDocument;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as PopoverAnchorRefTopBottom )\n\t\t\t?.top.ownerDocument;\n\t} else if ( ( anchorRef as Range | undefined )?.startContainer ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Range ).startContainer\n\t\t\t.ownerDocument;\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\tresultingReferenceOwnerDoc = (\n\t\t\t( anchorRef as PopoverAnchorRefReference ).current as Element\n\t\t ).ownerDocument;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// This one should be deprecated.\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Element ).ownerDocument;\n\t} else if ( anchorRect && anchorRect?.ownerDocument ) {\n\t\tresultingReferenceOwnerDoc = anchorRect.ownerDocument;\n\t} else if ( getAnchorRect ) {\n\t\tresultingReferenceOwnerDoc = getAnchorRect(\n\t\t\tfallbackReferenceElement\n\t\t)?.ownerDocument;\n\t}\n\n\treturn resultingReferenceOwnerDoc ?? fallbackDocument;\n};\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\t// Standard React ref.\n\t\treferenceElement = ( anchorRef as PopoverAnchorRefReference ).current;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n","/**\n * External dependencies\n */\nimport type {\n\tAxis,\n\tCoords,\n\tPlacement,\n\tSide,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n\n/**\n * Parts of this source were derived and modified from `floating-ui`,\n * released under the MIT license.\n *\n * https://github.com/floating-ui/floating-ui\n *\n * Copyright (c) 2021 Floating UI contributors\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/**\n * Custom limiter function for the `shift` middleware.\n * This function is mostly identical default `limitShift` from ``@floating-ui`;\n * the only difference is that, when computing the min/max shift limits, it\n * also takes into account the iframe offset that is added by the\n * custom \"frameOffset\" middleware.\n *\n * All unexported types and functions are also from the `@floating-ui` library,\n * and have been copied to this file for convenience.\n */\n\ntype LimitShiftOffset =\n\t| ( ( args: MiddlewareArguments ) =>\n\t\t\t| number\n\t\t\t| {\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tmainAxis?: number;\n\t\t\t\t\t/**\n\t\t\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t\t\t * floating element.\n\t\t\t\t\t */\n\t\t\t\t\tcrossAxis?: number;\n\t\t\t  } )\n\t| number\n\t| {\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the alignment of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tmainAxis?: number;\n\t\t\t/**\n\t\t\t * Offset the limiting of the axis that runs along the side of the\n\t\t\t * floating element.\n\t\t\t */\n\t\t\tcrossAxis?: number;\n\t  };\n\ntype LimitShiftOptions = {\n\t/**\n\t * Offset when limiting starts. `0` will limit when the opposite edges of the\n\t * reference and floating elements are aligned.\n\t * - positive = start limiting earlier\n\t * - negative = start limiting later\n\t */\n\toffset: LimitShiftOffset;\n\t/**\n\t * Whether to limit the axis that runs along the alignment of the floating\n\t * element.\n\t */\n\tmainAxis: boolean;\n\t/**\n\t * Whether to limit the axis that runs along the side of the floating element.\n\t */\n\tcrossAxis: boolean;\n};\n\nfunction getSide( placement: Placement ): Side {\n\treturn placement.split( '-' )[ 0 ] as Side;\n}\n\nfunction getMainAxisFromPlacement( placement: Placement ): Axis {\n\treturn [ 'top', 'bottom' ].includes( getSide( placement ) ) ? 'x' : 'y';\n}\n\nfunction getCrossAxis( axis: Axis ): Axis {\n\treturn axis === 'x' ? 'y' : 'x';\n}\n\nexport const limitShift = (\n\toptions: Partial< LimitShiftOptions > = {}\n): {\n\toptions: Partial< LimitShiftOffset >;\n\tfn: ( middlewareArguments: MiddlewareArguments ) => Coords;\n} => ( {\n\toptions,\n\tfn( middlewareArguments ) {\n\t\tconst { x, y, placement, rects, middlewareData } = middlewareArguments;\n\t\tconst {\n\t\t\toffset = 0,\n\t\t\tmainAxis: checkMainAxis = true,\n\t\t\tcrossAxis: checkCrossAxis = true,\n\t\t} = options;\n\n\t\tconst coords = { x, y };\n\t\tconst mainAxis = getMainAxisFromPlacement( placement );\n\t\tconst crossAxis = getCrossAxis( mainAxis );\n\n\t\tlet mainAxisCoord = coords[ mainAxis ];\n\t\tlet crossAxisCoord = coords[ crossAxis ];\n\n\t\tconst rawOffset =\n\t\t\ttypeof offset === 'function'\n\t\t\t\t? offset( middlewareArguments )\n\t\t\t\t: offset;\n\t\tconst computedOffset =\n\t\t\ttypeof rawOffset === 'number'\n\t\t\t\t? { mainAxis: rawOffset, crossAxis: 0 }\n\t\t\t\t: { mainAxis: 0, crossAxis: 0, ...rawOffset };\n\n\t\t// At the moment of writing, this is the only difference\n\t\t// with the `limitShift` function from `@floating-ui`.\n\t\t// This offset needs to be added to all min/max limits\n\t\t// in order to make the shift-limiting work as expected.\n\t\tconst additionalFrameOffset = {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\t...middlewareData.frameOffset?.amount,\n\t\t};\n\n\t\tif ( checkMainAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'height' : 'width';\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ mainAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ mainAxis ] +\n\t\t\t\trects.reference[ len ] -\n\t\t\t\tcomputedOffset.mainAxis +\n\t\t\t\tadditionalFrameOffset[ mainAxis ];\n\n\t\t\tif ( mainAxisCoord < limitMin ) {\n\t\t\t\tmainAxisCoord = limitMin;\n\t\t\t} else if ( mainAxisCoord > limitMax ) {\n\t\t\t\tmainAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\tif ( checkCrossAxis ) {\n\t\t\tconst len = mainAxis === 'y' ? 'width' : 'height';\n\t\t\tconst isOriginSide = [ 'top', 'left' ].includes(\n\t\t\t\tgetSide( placement )\n\t\t\t);\n\t\t\tconst limitMin =\n\t\t\t\trects.reference[ crossAxis ] -\n\t\t\t\trects.floating[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? middlewareData.offset?.[ crossAxis ] ?? 0\n\t\t\t\t\t: 0 ) +\n\t\t\t\t( isOriginSide ? 0 : computedOffset.crossAxis ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\t\t\tconst limitMax =\n\t\t\t\trects.reference[ crossAxis ] +\n\t\t\t\trects.reference[ len ] +\n\t\t\t\t( isOriginSide\n\t\t\t\t\t? 0\n\t\t\t\t\t: middlewareData.offset?.[ crossAxis ] ?? 0 ) -\n\t\t\t\t( isOriginSide ? computedOffset.crossAxis : 0 ) +\n\t\t\t\tadditionalFrameOffset[ crossAxis ];\n\n\t\t\tif ( crossAxisCoord < limitMin ) {\n\t\t\t\tcrossAxisCoord = limitMin;\n\t\t\t} else if ( crossAxisCoord > limitMax ) {\n\t\t\t\tcrossAxisCoord = limitMax;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t[ mainAxis ]: mainAxisCoord,\n\t\t\t[ crossAxis ]: crossAxisCoord,\n\t\t} as Coords;\n\t},\n} );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n\tMiddleware,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport {\n\tmotion,\n\tuseReducedMotion,\n\tHTMLMotionProps,\n\tMotionProps,\n} from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tgetFrameOffset,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceOwnerDocument,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\n\tAnimatedWrapperProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { limitShift as customLimitShift } from './limit-shift';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nconst SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst AnimatedWrapper = forwardRef(\n\t(\n\t\t{\n\t\t\tstyle: receivedInlineStyles,\n\t\t\tplacement,\n\t\t\tshouldAnimate = false,\n\t\t\t...props\n\t\t}: HTMLMotionProps< 'div' > & AnimatedWrapperProps,\n\t\tforwardedRef: ForwardedRef< any >\n\t) => {\n\t\t// When animating, animate only once (i.e. when the popover is opened), and\n\t\t// do not animate on subsequent prop changes (as it conflicts with\n\t\t// floating-ui's positioning updates).\n\t\tconst [ hasAnimatedOnce, setHasAnimatedOnce ] = useState( false );\n\t\tconst shouldReduceMotion = useReducedMotion();\n\n\t\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t\t() => placementToMotionAnimationProps( placement ),\n\t\t\t[ placement ]\n\t\t);\n\n\t\tconst onAnimationComplete = useCallback(\n\t\t\t() => setHasAnimatedOnce( true ),\n\t\t\t[]\n\t\t);\n\n\t\tconst computedAnimationProps: HTMLMotionProps< 'div' > =\n\t\t\tshouldAnimate && ! shouldReduceMotion\n\t\t\t\t? {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t\t\t...receivedInlineStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...otherMotionProps,\n\t\t\t\t\t\tonAnimationComplete,\n\t\t\t\t\t\tanimate: hasAnimatedOnce\n\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t: otherMotionProps.animate,\n\t\t\t\t  }\n\t\t\t\t: {\n\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\tstyle: receivedInlineStyles,\n\t\t\t\t  };\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\t{ ...computedAnimationProps }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate`, which is re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tisAlternate,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\t__unstableShift,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\trange,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = props;\n\n\tif ( range ) {\n\t\tdeprecated( '`range` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t} );\n\t}\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and  `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tlet shouldShift = shift;\n\tif ( __unstableShift !== undefined ) {\n\t\tdeprecated( '`__unstableShift` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`shift` prop`',\n\t\t} );\n\n\t\t// Back-compat.\n\t\tshouldShift = __unstableShift;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\tconst [ referenceOwnerDocument, setReferenceOwnerDocument ] = useState<\n\t\tDocument | undefined\n\t>();\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\t/**\n\t * Offsets the position of the popover when the anchor is inside an iframe.\n\t *\n\t * Store the offset in a ref, due to constraints with floating-ui:\n\t * https://floating-ui.com/docs/react-dom#variables-inside-middleware-functions.\n\t */\n\tconst frameOffsetRef = useRef( getFrameOffset( referenceOwnerDocument ) );\n\n\tconst middleware = [\n\t\t// Custom middleware which adjusts the popover's position by taking into\n\t\t// account the offset of the anchor's iframe (if any) compared to the page.\n\t\t{\n\t\t\tname: 'frameOffset',\n\t\t\tfn( { x, y }: MiddlewareArguments ) {\n\t\t\t\tif ( ! frameOffsetRef.current ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: x + frameOffsetRef.current.x,\n\t\t\t\t\ty: y + frameOffsetRef.current.y,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t// This will be used in the customLimitShift() function.\n\t\t\t\t\t\tamount: frameOffsetRef.current,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp ? flipMiddleware() : undefined,\n\t\tcomputedResizeProp\n\t\t\t? size( {\n\t\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\t\tconst { firstElementChild } =\n\t\t\t\t\t\t\trefs.floating.current ?? {};\n\n\t\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) )\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t  } )\n\t\t\t: undefined,\n\t\tshouldShift\n\t\t\t? shiftMiddleware( {\n\t\t\t\t\tcrossAxis: true,\n\t\t\t\t\tlimiter: customLimitShift(),\n\t\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t  } )\n\t\t\t: undefined,\n\t\tarrow( { element: arrowRef } ),\n\t].filter(\n\t\t( m: Middleware | undefined ): m is Middleware => m !== undefined\n\t);\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Callback refs (not regular refs). This allows the position to be updated.\n\t\t// when either elements change.\n\t\treference: referenceCallbackRef,\n\t\tfloating,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceOwnerDoc = getReferenceOwnerDocument( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tfallbackDocument: document,\n\t\t} );\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\treferenceCallbackRef( resultingReferenceElement );\n\n\t\tsetReferenceOwnerDocument( resultingReferenceOwnerDoc );\n\t}, [\n\t\tanchor,\n\t\tanchorRef as Element | undefined,\n\t\t( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top,\n\t\t( anchorRef as PopoverAnchorRefTopBottom | undefined )?.bottom,\n\t\t( anchorRef as Range | undefined )?.startContainer,\n\t\t( anchorRef as PopoverAnchorRefReference )?.current,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\treferenceCallbackRef,\n\t] );\n\n\t// If the reference element is in a different ownerDocument (e.g. iFrame),\n\t// we need to manually update the floating's position as the reference's owner\n\t// document scrolls. Also update the frame offset if the view resizes.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\t// Reference and root documents are the same.\n\t\t\treferenceOwnerDocument === document ||\n\t\t\t// Reference and floating are in the same document.\n\t\t\treferenceOwnerDocument === refs?.floating?.current?.ownerDocument ||\n\t\t\t// The reference's document has no view (i.e. window)\n\t\t\t// or frame element (ie. it's not an iframe).\n\t\t\t! referenceOwnerDocument?.defaultView?.frameElement\n\t\t) {\n\t\t\tframeOffsetRef.current = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = referenceOwnerDocument;\n\n\t\tconst updateFrameOffset = () => {\n\t\t\tframeOffsetRef.current = getFrameOffset( referenceOwnerDocument );\n\t\t\tupdate();\n\t\t};\n\t\tdefaultView.addEventListener( 'resize', updateFrameOffset );\n\n\t\tupdateFrameOffset();\n\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'resize', updateFrameOffset );\n\t\t};\n\t}, [ referenceOwnerDocument, update ] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\tfloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t// within popover as inferring close intent.\n\n\tlet content = (\n\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<AnimatedWrapper\n\t\t\tshouldAnimate={ animate && ! isExpanded }\n\t\t\tplacement={ computedPlacement }\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-alternate': isAlternate,\n\t\t\t} ) }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={\n\t\t\t\tisExpanded\n\t\t\t\t\t? undefined\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tposition: strategy,\n\t\t\t\t\t\t\tleft: Number.isNaN( x ) ? 0 : x ?? undefined,\n\t\t\t\t\t\t\ttop: Number.isNaN( y ) ? 0 : y ?? undefined,\n\t\t\t\t\t  }\n\t\t\t}\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.x +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.x ?? 0 )\n\t\t\t\t\t\t\t\t  }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.y +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.y ?? 0 )\n\t\t\t\t\t\t\t\t  }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</AnimatedWrapper>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect || anchor ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = forwardRef( UnforwardedPopover );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\t// @ts-expect-error Need to type `SlotFill`\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n","/**\n * Internal dependencies\n */\nimport type { ShortcutProps } from './types';\n\nfunction Shortcut( props: ShortcutProps ) {\n\tconst { shortcut, className } = props;\n\n\tif ( ! shortcut ) {\n\t\treturn null;\n\t}\n\n\tlet displayText;\n\tlet ariaLabel;\n\n\tif ( typeof shortcut === 'string' ) {\n\t\tdisplayText = shortcut;\n\t}\n\n\tif ( shortcut !== null && typeof shortcut === 'object' ) {\n\t\tdisplayText = shortcut.display;\n\t\tariaLabel = shortcut.ariaLabel;\n\t}\n\n\treturn (\n\t\t<span className={ className } aria-label={ ariaLabel }>\n\t\t\t{ displayText }\n\t\t</span>\n\t);\n}\n\nexport default Shortcut;\n","// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport {\n\tChildren,\n\tcloneElement,\n\tconcatChildren,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { useDebounce, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Popover from '../popover';\nimport Shortcut from '../shortcut';\n\n/**\n * Time over children to wait before showing tooltip\n *\n * @type {number}\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst eventCatcher = <div className=\"event-catcher\" />;\n\nconst getDisabledElement = ( {\n\teventHandlers,\n\tchild,\n\tchildrenWithPopover,\n\tmergedRefs,\n} ) => {\n\treturn cloneElement(\n\t\t<span className=\"disabled-element-wrapper\">\n\t\t\t{ cloneElement( eventCatcher, eventHandlers ) }\n\t\t\t{ cloneElement( child, {\n\t\t\t\tchildren: childrenWithPopover,\n\t\t\t\tref: mergedRefs,\n\t\t\t} ) }\n\t\t</span>,\n\t\t{ ...eventHandlers }\n\t);\n};\n\nconst getRegularElement = ( {\n\tchild,\n\teventHandlers,\n\tchildrenWithPopover,\n\tmergedRefs,\n} ) => {\n\treturn cloneElement( child, {\n\t\t...eventHandlers,\n\t\tchildren: childrenWithPopover,\n\t\tref: mergedRefs,\n\t} );\n};\n\nconst addPopoverToGrandchildren = ( {\n\tanchor,\n\tgrandchildren,\n\tisOver,\n\toffset,\n\tposition,\n\tshortcut,\n\ttext,\n} ) =>\n\tconcatChildren(\n\t\tgrandchildren,\n\t\tisOver && (\n\t\t\t<Popover\n\t\t\t\tfocusOnMount={ false }\n\t\t\t\tposition={ position }\n\t\t\t\tclassName=\"components-tooltip\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tanimate={ false }\n\t\t\t\toffset={ offset }\n\t\t\t\tanchor={ anchor }\n\t\t\t\tshift\n\t\t\t>\n\t\t\t\t{ text }\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-tooltip__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t</Popover>\n\t\t)\n\t);\n\nconst emitToChild = ( children, eventName, event ) => {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn;\n\t}\n\n\tconst child = Children.only( children );\n\n\t// If the underlying element is disabled, do not emit the event.\n\tif ( child.props.disabled ) {\n\t\treturn;\n\t}\n\n\tif ( typeof child.props[ eventName ] === 'function' ) {\n\t\tchild.props[ eventName ]( event );\n\t}\n};\n\nfunction Tooltip( props ) {\n\tconst {\n\t\tchildren,\n\t\tposition = 'bottom middle',\n\t\ttext,\n\t\tshortcut,\n\t\tdelay = TOOLTIP_DELAY,\n\t} = props;\n\t/**\n\t * Whether a mouse is currently pressed, used in determining whether\n\t * to handle a focus event as displaying the tooltip immediately.\n\t *\n\t * @type {boolean}\n\t */\n\tconst [ isMouseDown, setIsMouseDown ] = useState( false );\n\tconst [ isOver, setIsOver ] = useState( false );\n\tconst delayedSetIsOver = useDebounce( setIsOver, delay );\n\t// Using internal state (instead of a ref) for the popover anchor to make sure\n\t// that the component re-renders when the anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\t// Create a reference to the Tooltip's child, to be passed to the Popover\n\t// so that the Tooltip can be correctly positioned. Also, merge with the\n\t// existing ref for the first child, so that its ref is preserved.\n\tconst existingChildRef = Children.toArray( children )[ 0 ]?.ref;\n\tconst mergedChildRefs = useMergeRefs( [\n\t\tsetPopoverAnchor,\n\t\texistingChildRef,\n\t] );\n\n\tconst createMouseDown = ( event ) => {\n\t\t// In firefox, the mouse down event is also fired when the select\n\t\t// list is chosen.\n\t\t// Cancel further processing because re-rendering of child components\n\t\t// causes onChange to be triggered with the old value.\n\t\t// See https://github.com/WordPress/gutenberg/pull/42483\n\t\tif ( event.target.tagName === 'OPTION' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Preserve original child callback behavior.\n\t\temitToChild( children, 'onMouseDown', event );\n\n\t\t// On mouse down, the next `mouseup` should revert the value of the\n\t\t// instance property and remove its own event handler. The bind is\n\t\t// made on the document since the `mouseup` might not occur within\n\t\t// the bounds of the element.\n\t\tdocument.addEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( true );\n\t};\n\n\tconst createMouseUp = ( event ) => {\n\t\t// In firefox, the mouse up event is also fired when the select\n\t\t// list is chosen.\n\t\t// Cancel further processing because re-rendering of child components\n\t\t// causes onChange to be triggered with the old value.\n\t\t// See https://github.com/WordPress/gutenberg/pull/42483\n\t\tif ( event.target.tagName === 'OPTION' ) {\n\t\t\treturn;\n\t\t}\n\n\t\temitToChild( children, 'onMouseUp', event );\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t\tsetIsMouseDown( false );\n\t};\n\n\tconst createMouseEvent = ( type ) => {\n\t\tif ( type === 'mouseUp' ) return createMouseUp;\n\t\tif ( type === 'mouseDown' ) return createMouseDown;\n\t};\n\n\t/**\n\t * Prebound `isInMouseDown` handler, created as a constant reference to\n\t * assure ability to remove in component unmount.\n\t *\n\t * @type {Function}\n\t */\n\tconst cancelIsMouseDown = createMouseEvent( 'mouseUp' );\n\n\tconst createToggleIsOver = ( eventName, isDelayed ) => {\n\t\treturn ( event ) => {\n\t\t\t// Preserve original child callback behavior.\n\t\t\temitToChild( children, eventName, event );\n\n\t\t\t// Mouse events behave unreliably in React for disabled elements,\n\t\t\t// firing on mouseenter but not mouseleave.  Further, the default\n\t\t\t// behavior for disabled elements in some browsers is to ignore\n\t\t\t// mouse events. Don't bother trying to handle them.\n\t\t\t//\n\t\t\t// See: https://github.com/facebook/react/issues/4251\n\t\t\tif ( event.currentTarget.disabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// A focus event will occur as a result of a mouse click, but it\n\t\t\t// should be disambiguated between interacting with the button and\n\t\t\t// using an explicit focus shift as a cue to display the tooltip.\n\t\t\tif ( 'focus' === event.type && isMouseDown ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Needed in case unsetting is over while delayed set pending, i.e.\n\t\t\t// quickly blur/mouseleave before delayedSetIsOver is called.\n\t\t\tdelayedSetIsOver.cancel();\n\n\t\t\tconst _isOver = [ 'focus', 'mouseenter' ].includes( event.type );\n\t\t\tif ( _isOver === isOver ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isDelayed ) {\n\t\t\t\tdelayedSetIsOver( _isOver );\n\t\t\t} else {\n\t\t\t\tsetIsOver( _isOver );\n\t\t\t}\n\t\t};\n\t};\n\tconst clearOnUnmount = () => {\n\t\tdelayedSetIsOver.cancel();\n\t\tdocument.removeEventListener( 'mouseup', cancelIsMouseDown );\n\t};\n\n\tuseEffect( () => clearOnUnmount, [] );\n\n\tif ( Children.count( children ) !== 1 ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\n\t\treturn children;\n\t}\n\n\tconst eventHandlers = {\n\t\tonMouseEnter: createToggleIsOver( 'onMouseEnter', true ),\n\t\tonMouseLeave: createToggleIsOver( 'onMouseLeave' ),\n\t\tonClick: createToggleIsOver( 'onClick' ),\n\t\tonFocus: createToggleIsOver( 'onFocus' ),\n\t\tonBlur: createToggleIsOver( 'onBlur' ),\n\t\tonMouseDown: createMouseEvent( 'mouseDown' ),\n\t};\n\n\tconst child = Children.only( children );\n\tconst { children: grandchildren, disabled } = child.props;\n\tconst getElementWithPopover = disabled\n\t\t? getDisabledElement\n\t\t: getRegularElement;\n\n\tconst popoverData = {\n\t\tanchor: popoverAnchor,\n\t\tisOver,\n\t\toffset: 4,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\t};\n\tconst childrenWithPopover = addPopoverToGrandchildren( {\n\t\tgrandchildren,\n\t\t...popoverData,\n\t} );\n\n\treturn getElementWithPopover( {\n\t\tchild,\n\t\teventHandlers,\n\t\tchildrenWithPopover,\n\t\tmergedRefs: mergedChildRefs,\n\t} );\n}\n\nexport default Tooltip;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const GRID = [\n\t[ 'top left', 'top center', 'top right' ],\n\t[ 'center left', 'center center', 'center right' ],\n\t[ 'bottom left', 'bottom center', 'bottom right' ],\n];\n\n// Stored as map as i18n __() only accepts strings (not variables)\nexport const ALIGNMENT_LABEL = {\n\t'top left': __( 'Top Left' ),\n\t'top center': __( 'Top Center' ),\n\t'top right': __( 'Top Right' ),\n\t'center left': __( 'Center Left' ),\n\t'center center': __( 'Center Center' ),\n\t'center right': __( 'Center Right' ),\n\t'bottom left': __( 'Bottom Left' ),\n\t'bottom center': __( 'Bottom Center' ),\n\t'bottom right': __( 'Bottom Right' ),\n};\n\n// Transforms GRID into a flat Array of values.\nexport const ALIGNMENTS = GRID.flat();\n\n/**\n * Parses and transforms an incoming value to better match the alignment values\n *\n * @param {string} value An alignment value to parse.\n *\n * @return {string} The parsed value.\n */\nexport function transformValue( value ) {\n\tconst nextValue = value === 'center' ? 'center center' : value;\n\n\treturn nextValue.replace( '-', ' ' );\n}\n\n/**\n * Creates an item ID based on a prefix ID and an alignment value.\n *\n * @param {string} prefixId An ID to prefix.\n * @param {string} value    An alignment value.\n *\n * @return {string} The item id.\n */\nexport function getItemId( prefixId, value ) {\n\tconst valueId = transformValue( value ).replace( ' ', '-' );\n\n\treturn `${ prefixId }-${ valueId }`;\n}\n\n/**\n * Retrieves the alignment index from a value.\n *\n * @param {string} alignment Value to check.\n *\n * @return {number} The index of a matching alignment.\n */\nexport function getAlignmentIndex( alignment = 'center' ) {\n\tconst item = transformValue( alignment ).replace( '-', ' ' );\n\tconst index = ALIGNMENTS.indexOf( item );\n\n\treturn index > -1 ? index : undefined;\n}\n","import { createElement, useContext, useRef, useLayoutEffect, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-699e6908.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-699e6908.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport 'hoist-non-react-statics';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\n\nvar pkg = {\n\tname: \"@emotion/react\",\n\tversion: \"11.7.1\",\n\tmain: \"dist/emotion-react.cjs.js\",\n\tmodule: \"dist/emotion-react.esm.js\",\n\tbrowser: {\n\t\t\"./dist/emotion-react.cjs.js\": \"./dist/emotion-react.browser.cjs.js\",\n\t\t\"./dist/emotion-react.esm.js\": \"./dist/emotion-react.browser.esm.js\"\n\t},\n\ttypes: \"types/index.d.ts\",\n\tfiles: [\n\t\t\"src\",\n\t\t\"dist\",\n\t\t\"jsx-runtime\",\n\t\t\"jsx-dev-runtime\",\n\t\t\"_isolated-hnrs\",\n\t\t\"types/*.d.ts\",\n\t\t\"macro.js\",\n\t\t\"macro.d.ts\",\n\t\t\"macro.js.flow\"\n\t],\n\tsideEffects: false,\n\tauthor: \"mitchellhamilton <mitchell@mitchellhamilton.me>\",\n\tlicense: \"MIT\",\n\tscripts: {\n\t\t\"test:typescript\": \"dtslint types\"\n\t},\n\tdependencies: {\n\t\t\"@babel/runtime\": \"^7.13.10\",\n\t\t\"@emotion/cache\": \"^11.7.1\",\n\t\t\"@emotion/serialize\": \"^1.0.2\",\n\t\t\"@emotion/sheet\": \"^1.1.0\",\n\t\t\"@emotion/utils\": \"^1.0.0\",\n\t\t\"@emotion/weak-memoize\": \"^0.2.5\",\n\t\t\"hoist-non-react-statics\": \"^3.3.1\"\n\t},\n\tpeerDependencies: {\n\t\t\"@babel/core\": \"^7.0.0\",\n\t\treact: \">=16.8.0\"\n\t},\n\tpeerDependenciesMeta: {\n\t\t\"@babel/core\": {\n\t\t\toptional: true\n\t\t},\n\t\t\"@types/react\": {\n\t\t\toptional: true\n\t\t}\n\t},\n\tdevDependencies: {\n\t\t\"@babel/core\": \"^7.13.10\",\n\t\t\"@emotion/css\": \"11.7.1\",\n\t\t\"@emotion/css-prettifier\": \"1.0.1\",\n\t\t\"@emotion/server\": \"11.4.0\",\n\t\t\"@emotion/styled\": \"11.6.0\",\n\t\t\"@types/react\": \"^16.9.11\",\n\t\tdtslint: \"^0.3.0\",\n\t\t\"html-tag-names\": \"^1.1.2\",\n\t\treact: \"16.14.0\",\n\t\t\"svg-tag-names\": \"^1.1.1\"\n\t},\n\trepository: \"https://github.com/emotion-js/emotion/tree/main/packages/react\",\n\tpublishConfig: {\n\t\taccess: \"public\"\n\t},\n\t\"umd:main\": \"dist/emotion-react.umd.min.js\",\n\tpreconstruct: {\n\t\tentrypoints: [\n\t\t\t\"./index.js\",\n\t\t\t\"./jsx-runtime.js\",\n\t\t\t\"./jsx-dev-runtime.js\",\n\t\t\t\"./_isolated-hnrs.js\"\n\t\t],\n\t\tumdName: \"emotionReact\"\n\t}\n};\n\nvar jsx = function jsx(type, props) {\n  var args = arguments;\n\n  if (props == null || !hasOwnProperty.call(props, 'css')) {\n    // $FlowFixMe\n    return createElement.apply(undefined, args);\n  }\n\n  var argsLength = args.length;\n  var createElementArgArray = new Array(argsLength);\n  createElementArgArray[0] = Emotion;\n  createElementArgArray[1] = createEmotionProps(type, props);\n\n  for (var i = 2; i < argsLength; i++) {\n    createElementArgArray[i] = args[i];\n  } // $FlowFixMe\n\n\n  return createElement.apply(null, createElementArgArray);\n};\n\nvar warnedAboutCssPropForGlobal = false; // maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n  if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is\n  // probably using the custom createElement which\n  // means it will be turned into a className prop\n  // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n  props.className || props.css)) {\n    console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n    warnedAboutCssPropForGlobal = true;\n  }\n\n  var styles = props.styles;\n  var serialized = serializeStyles([styles], undefined, useContext(ThemeContext));\n  // but it is based on a constant that will never change at runtime\n  // it's effectively like having two implementations and switching them out\n  // so it's not actually breaking anything\n\n\n  var sheetRef = useRef();\n  useLayoutEffect(function () {\n    var key = cache.key + \"-global\";\n    var sheet = new StyleSheet({\n      key: key,\n      nonce: cache.sheet.nonce,\n      container: cache.sheet.container,\n      speedy: cache.sheet.isSpeedy\n    });\n    var rehydrating = false; // $FlowFixMe\n\n    var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n    if (cache.sheet.tags.length) {\n      sheet.before = cache.sheet.tags[0];\n    }\n\n    if (node !== null) {\n      rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n      node.setAttribute('data-emotion', key);\n      sheet.hydrate([node]);\n    }\n\n    sheetRef.current = [sheet, rehydrating];\n    return function () {\n      sheet.flush();\n    };\n  }, [cache]);\n  useLayoutEffect(function () {\n    var sheetRefCurrent = sheetRef.current;\n    var sheet = sheetRefCurrent[0],\n        rehydrating = sheetRefCurrent[1];\n\n    if (rehydrating) {\n      sheetRefCurrent[1] = false;\n      return;\n    }\n\n    if (serialized.next !== undefined) {\n      // insert keyframes\n      insertStyles(cache, serialized.next, true);\n    }\n\n    if (sheet.tags.length) {\n      // if this doesn't exist then it will be null so the style element will be appended\n      var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n      sheet.before = element;\n      sheet.flush();\n    }\n\n    cache.insert(\"\", serialized, sheet, false);\n  }, [cache, serialized.name]);\n  return null;\n});\n\nif (process.env.NODE_ENV !== 'production') {\n  Global.displayName = 'EmotionGlobal';\n}\n\nfunction css() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return serializeStyles(args);\n}\n\nvar keyframes = function keyframes() {\n  var insertable = css.apply(void 0, arguments);\n  var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n  return {\n    name: name,\n    styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n    anim: 1,\n    toString: function toString() {\n      return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n    }\n  };\n};\n\nvar classnames = function classnames(args) {\n  var len = args.length;\n  var i = 0;\n  var cls = '';\n\n  for (; i < len; i++) {\n    var arg = args[i];\n    if (arg == null) continue;\n    var toAdd = void 0;\n\n    switch (typeof arg) {\n      case 'boolean':\n        break;\n\n      case 'object':\n        {\n          if (Array.isArray(arg)) {\n            toAdd = classnames(arg);\n          } else {\n            if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {\n              console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');\n            }\n\n            toAdd = '';\n\n            for (var k in arg) {\n              if (arg[k] && k) {\n                toAdd && (toAdd += ' ');\n                toAdd += k;\n              }\n            }\n          }\n\n          break;\n        }\n\n      default:\n        {\n          toAdd = arg;\n        }\n    }\n\n    if (toAdd) {\n      cls && (cls += ' ');\n      cls += toAdd;\n    }\n  }\n\n  return cls;\n};\n\nfunction merge(registered, css, className) {\n  var registeredStyles = [];\n  var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n  if (registeredStyles.length < 2) {\n    return className;\n  }\n\n  return rawClassName + css(registeredStyles);\n}\n\nvar Noop = function Noop() {\n  return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n  var hasRendered = false;\n\n  var css = function css() {\n    if (hasRendered && process.env.NODE_ENV !== 'production') {\n      throw new Error('css can only be used during render');\n    }\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    var serialized = serializeStyles(args, cache.registered);\n\n    {\n      insertStyles(cache, serialized, false);\n    }\n\n    return cache.key + \"-\" + serialized.name;\n  };\n\n  var cx = function cx() {\n    if (hasRendered && process.env.NODE_ENV !== 'production') {\n      throw new Error('cx can only be used during render');\n    }\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    return merge(cache.registered, css, classnames(args));\n  };\n\n  var content = {\n    css: css,\n    cx: cx,\n    theme: useContext(ThemeContext)\n  };\n  var ele = props.children(content);\n  hasRendered = true;\n  var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n\n\n  return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n});\n\nif (process.env.NODE_ENV !== 'production') {\n  ClassNames.displayName = 'EmotionClassNames';\n}\n\nif (process.env.NODE_ENV !== 'production') {\n  var isBrowser = \"object\" !== 'undefined'; // #1727 for some reason Jest evaluates modules twice if some consuming module gets mocked with jest.mock\n\n  var isJest = typeof jest !== 'undefined';\n\n  if (isBrowser && !isJest) {\n    // globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later\n    var globalContext = // $FlowIgnore\n    typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef\n    : isBrowser ? window : global;\n    var globalKey = \"__EMOTION_REACT_\" + pkg.version.split('.')[0] + \"__\";\n\n    if (globalContext[globalKey]) {\n      console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');\n    }\n\n    globalContext[globalKey] = true;\n  }\n}\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return\"string\"==typeof r?N(r.trim(),y.string):\"object\"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n","export default function(e,f){var a={white:\"#ffffff\",bisque:\"#ffe4c4\",blue:\"#0000ff\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",azure:\"#f0ffff\",whitesmoke:\"#f5f5f5\",papayawhip:\"#ffefd5\",plum:\"#dda0dd\",blanchedalmond:\"#ffebcd\",black:\"#000000\",gold:\"#ffd700\",goldenrod:\"#daa520\",gainsboro:\"#dcdcdc\",cornsilk:\"#fff8dc\",cornflowerblue:\"#6495ed\",burlywood:\"#deb887\",aquamarine:\"#7fffd4\",beige:\"#f5f5dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkkhaki:\"#bdb76b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",peachpuff:\"#ffdab9\",darkmagenta:\"#8b008b\",darkred:\"#8b0000\",darkorchid:\"#9932cc\",darkorange:\"#ff8c00\",darkslateblue:\"#483d8b\",gray:\"#808080\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",wheat:\"#f5deb3\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",ghostwhite:\"#f8f8ff\",darkviolet:\"#9400d3\",magenta:\"#ff00ff\",green:\"#008000\",dodgerblue:\"#1e90ff\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",blueviolet:\"#8a2be2\",forestgreen:\"#228b22\",lawngreen:\"#7cfc00\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",fuchsia:\"#ff00ff\",brown:\"#a52a2a\",maroon:\"#800000\",mediumblue:\"#0000cd\",lightcoral:\"#f08080\",darkturquoise:\"#00ced1\",lightcyan:\"#e0ffff\",ivory:\"#fffff0\",lightyellow:\"#ffffe0\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",linen:\"#faf0e6\",mediumaquamarine:\"#66cdaa\",lemonchiffon:\"#fffacd\",lime:\"#00ff00\",khaki:\"#f0e68c\",mediumseagreen:\"#3cb371\",limegreen:\"#32cd32\",mediumspringgreen:\"#00fa9a\",lightskyblue:\"#87cefa\",lightblue:\"#add8e6\",midnightblue:\"#191970\",lightpink:\"#ffb6c1\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",mintcream:\"#f5fffa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",navajowhite:\"#ffdead\",navy:\"#000080\",mediumvioletred:\"#c71585\",powderblue:\"#b0e0e6\",palegoldenrod:\"#eee8aa\",oldlace:\"#fdf5e6\",paleturquoise:\"#afeeee\",mediumturquoise:\"#48d1cc\",mediumorchid:\"#ba55d3\",rebeccapurple:\"#663399\",lightsteelblue:\"#b0c4de\",mediumslateblue:\"#7b68ee\",thistle:\"#d8bfd8\",tan:\"#d2b48c\",orchid:\"#da70d6\",mediumpurple:\"#9370db\",purple:\"#800080\",pink:\"#ffc0cb\",skyblue:\"#87ceeb\",springgreen:\"#00ff7f\",palegreen:\"#98fb98\",red:\"#ff0000\",yellow:\"#ffff00\",slateblue:\"#6a5acd\",lavenderblush:\"#fff0f5\",peru:\"#cd853f\",palevioletred:\"#db7093\",violet:\"#ee82ee\",teal:\"#008080\",slategray:\"#708090\",slategrey:\"#708090\",aliceblue:\"#f0f8ff\",darkseagreen:\"#8fbc8f\",darkolivegreen:\"#556b2f\",greenyellow:\"#adff2f\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",tomato:\"#ff6347\",silver:\"#c0c0c0\",sienna:\"#a0522d\",lavender:\"#e6e6fa\",lightgreen:\"#90ee90\",orange:\"#ffa500\",orangered:\"#ff4500\",steelblue:\"#4682b4\",royalblue:\"#4169e1\",turquoise:\"#40e0d0\",yellowgreen:\"#9acd32\",salmon:\"#fa8072\",saddlebrown:\"#8b4513\",sandybrown:\"#f4a460\",rosybrown:\"#bc8f8f\",darksalmon:\"#e9967a\",lightgoldenrodyellow:\"#fafad2\",snow:\"#fffafa\",lightgrey:\"#d3d3d3\",lightgray:\"#d3d3d3\",dimgray:\"#696969\",dimgrey:\"#696969\",olivedrab:\"#6b8e23\",olive:\"#808000\"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return\"transparent\";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b=\"black\";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d=\"transparent\"===r?\"#0000\":a[r];return d?new e(d).toRgb():null},\"name\"])}\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\nextend( [ namesPlugin ] );\n\n/**\n * Generating a CSS compliant rgba() color value.\n *\n * @param {string} hexValue The hex value to convert to rgba().\n * @param {number} alpha    The alpha value for opacity.\n * @return {string} The converted rgba() color value.\n *\n * @example\n * rgba( '#000000', 0.5 )\n * // rgba(0, 0, 0, 0.5)\n */\nexport function rgba( hexValue = '', alpha = 1 ) {\n\treturn colord( hexValue ).alpha( alpha ).toRgbString();\n}\n","/**\n * Internal dependencies\n */\nimport { rgba } from './colors';\n\nconst white = '#fff';\n\n// Matches the grays in @wordpress/base-styles\nconst GRAY = {\n\t900: '#1e1e1e',\n\t800: '#2f2f2f',\n\t/** Meets 4.6:1 text contrast against white. */\n\t700: '#757575',\n\t/** Meets 3:1 UI or large text contrast against white. */\n\t600: '#949494',\n\t400: '#ccc',\n\t/** Used for most borders. */\n\t300: '#ddd',\n\t/** Used sparingly for light borders. */\n\t200: '#e0e0e0',\n\t/** Used for light gray backgrounds. */\n\t100: '#f0f0f0',\n};\n\n// Matches @wordpress/base-styles\nconst ALERT = {\n\tyellow: '#f0b849',\n\tred: '#d94f4f',\n\tgreen: '#4ab866',\n};\n\n// Matches @wordpress/base-styles\nconst ADMIN = {\n\ttheme: 'var( --wp-admin-theme-color, #007cba)',\n\tthemeDark10: 'var( --wp-admin-theme-color-darker-10, #006ba1)',\n};\n\nconst UI = {\n\ttheme: ADMIN.theme,\n\tbackground: white,\n\tbackgroundDisabled: GRAY[ 100 ],\n\tborder: GRAY[ 700 ],\n\tborderHover: GRAY[ 700 ],\n\tborderFocus: ADMIN.themeDark10,\n\tborderDisabled: GRAY[ 400 ],\n\ttextDisabled: GRAY[ 600 ],\n\ttextDark: white,\n\n\t// Matches @wordpress/base-styles\n\tdarkGrayPlaceholder: rgba( GRAY[ 900 ], 0.62 ),\n\tlightGrayPlaceholder: rgba( white, 0.65 ),\n};\n\nexport const COLORS = Object.freeze( {\n\t/**\n\t * The main gray color object.\n\t */\n\tgray: GRAY,\n\twhite,\n\talert: ALERT,\n\tui: UI,\n} );\n\nexport default COLORS;\n","/**\n * Allows users to opt-out of animations via OS-level preferences.\n *\n * @param {'transition' | 'animation' | string} [prop='transition'] CSS Property name\n * @return {string} Generated CSS code for the reduced style\n */\nexport function reduceMotion( prop = 'transition' ) {\n\tlet style;\n\n\tswitch ( prop ) {\n\t\tcase 'transition':\n\t\t\tstyle = 'transition-duration: 0ms;';\n\t\t\tbreak;\n\n\t\tcase 'animation':\n\t\t\tstyle = 'animation-duration: 1ms;';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tstyle = `\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t`;\n\t}\n\n\treturn `\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${ style };\n\t\t}\n\t`;\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, reduceMotion } from '../../utils';\n\nexport const rootBase = () => {\n\treturn css`\n\t\tborder-radius: 2px;\n\t\tbox-sizing: border-box;\n\t\tdirection: ltr;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat( 3, 1fr );\n\t\toutline: none;\n\t`;\n};\n\nconst rootSize = ( { size = 92 } ) => {\n\treturn css`\n\t\tgrid-template-rows: repeat( 3, calc( ${ size }px / 3 ) );\n\t\twidth: ${ size }px;\n\t`;\n};\n\nexport const Root = styled.div`\n\t${ rootBase };\n\n\tborder: 1px solid transparent;\n\tcursor: pointer;\n\tgrid-template-columns: auto;\n\n\t${ rootSize };\n`;\n\nexport const Row = styled.div`\n\tbox-sizing: border-box;\n\tdisplay: grid;\n\tgrid-template-columns: repeat( 3, 1fr );\n`;\n\nconst pointActive = ( { isActive } ) => {\n\tconst boxShadow = isActive ? `0 0 0 2px ${ COLORS.gray[ 900 ] }` : null;\n\tconst pointColor = isActive ? COLORS.gray[ 900 ] : COLORS.gray[ 400 ];\n\tconst pointColorHover = isActive ? COLORS.gray[ 900 ] : COLORS.ui.theme;\n\n\treturn css`\n\t\tbox-shadow: ${ boxShadow };\n\t\tcolor: ${ pointColor };\n\n\t\t*:hover > & {\n\t\t\tcolor: ${ pointColorHover };\n\t\t}\n\t`;\n};\n\nexport const pointBase = ( props ) => {\n\treturn css`\n\t\tbackground: currentColor;\n\t\tbox-sizing: border-box;\n\t\tdisplay: grid;\n\t\tmargin: auto;\n\t\ttransition: all 120ms linear;\n\n\t\t${ reduceMotion( 'transition' ) }\n\t\t${ pointActive( props ) }\n\t`;\n};\n\nexport const Point = styled.span`\n\theight: 6px;\n\twidth: 6px;\n\t${ pointBase }\n`;\n\nexport const Cell = styled.span`\n\tappearance: none;\n\tborder: none;\n\tbox-sizing: border-box;\n\tmargin: 0;\n\tdisplay: flex;\n\tposition: relative;\n\toutline: none;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n`;\n","/**\n * Internal dependencies\n */\nimport { CompositeItem } from '../composite';\nimport Tooltip from '../tooltip';\nimport { VisuallyHidden } from '../visually-hidden';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENT_LABEL } from './utils';\nimport {\n\tCell as CellView,\n\tPoint,\n} from './styles/alignment-matrix-control-styles';\n\nexport default function Cell( { isActive = false, value, ...props } ) {\n\tconst tooltipText = ALIGNMENT_LABEL[ value ];\n\n\treturn (\n\t\t<Tooltip text={ tooltipText }>\n\t\t\t<CompositeItem as={ CellView } role=\"gridcell\" { ...props }>\n\t\t\t\t{ /* VoiceOver needs a text content to be rendered within grid cell,\n\t\t\totherwise it'll announce the content as \"blank\". So we use a visually\n\t\t\thidden element instead of aria-label. */ }\n\t\t\t\t<VisuallyHidden>{ value }</VisuallyHidden>\n\t\t\t\t<Point isActive={ isActive } role=\"presentation\" />\n\t\t\t</CompositeItem>\n\t\t</Tooltip>\n\t);\n}\n","import { useState } from 'react';\n\n/**\n * React custom hook that returns the very first value passed to `initialState`,\n * even if it changes between re-renders.\n */\nfunction useSealedState(initialState) {\n  var _React$useState = useState(initialState),\n      sealed = _React$useState[0];\n\n  return sealed;\n}\n\nexport { useSealedState };\n","import { b as _createForOfIteratorHelperLoose } from './_rollupPluginBabelHelpers-1f0bf8c2.js';\n\nfunction groupItems(items) {\n  var groups = [[]];\n\n  var _loop = function _loop() {\n    var item = _step.value;\n    var group = groups.find(function (g) {\n      return !g[0] || g[0].groupId === item.groupId;\n    });\n\n    if (group) {\n      group.push(item);\n    } else {\n      groups.push([item]);\n    }\n  };\n\n  for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {\n    _loop();\n  }\n\n  return groups;\n}\n\nfunction flatten(grid) {\n  var flattened = [];\n\n  for (var _iterator = _createForOfIteratorHelperLoose(grid), _step; !(_step = _iterator()).done;) {\n    var row = _step.value;\n    flattened.push.apply(flattened, row);\n  }\n\n  return flattened;\n}\n\nfunction reverse(array) {\n  return array.slice().reverse();\n}\n\nexport { flatten as f, groupItems as g, reverse as r };\n","function findEnabledItemById(items, id) {\n  if (!id) return undefined;\n  return items === null || items === void 0 ? void 0 : items.find(function (item) {\n    return item.id === id && !item.disabled;\n  });\n}\n\nexport { findEnabledItemById as f };\n","function isUpdater(argument) {\n  return typeof argument === \"function\";\n}\n/**\n * Receives a `setState` argument and calls it with `currentValue` if it's a\n * function. Otherwise return the argument as the new value.\n *\n * @example\n * import { applyState } from \"reakit-utils\";\n *\n * applyState((value) => value + 1, 1); // 2\n * applyState(2, 1); // 2\n */\n\n\nfunction applyState(argument, currentValue) {\n  if (isUpdater(argument)) {\n    return argument(currentValue);\n  }\n\n  return argument;\n}\n\nexport { applyState };\n","import { useContext, useRef, useState } from 'react';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport { unstable_IdContext } from './IdProvider.js';\n\nfunction unstable_useIdState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      initialBaseId = _useSealedState.baseId;\n\n  var generateId = useContext(unstable_IdContext);\n  var idCountRef = useRef(0);\n\n  var _React$useState = useState(function () {\n    return initialBaseId || generateId();\n  }),\n      baseId = _React$useState[0],\n      setBaseId = _React$useState[1];\n\n  return {\n    baseId: baseId,\n    setBaseId: setBaseId,\n    unstable_idCountRef: idCountRef\n  };\n}\n\nexport { unstable_useIdState };\n","import { b as _createForOfIteratorHelperLoose, a as _objectSpread2, _ as _objectWithoutPropertiesLoose } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { useRef, useEffect, useReducer, useState, useCallback } from 'react';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport { getDocument } from 'reakit-utils/getDocument';\nimport { g as groupItems, r as reverse, f as flatten } from '../reverse-30eaa122.js';\nimport { f as findFirstEnabledItem, g as getCurrentId } from '../getCurrentId-5aa9849e.js';\nimport { f as findEnabledItemById } from '../findEnabledItemById-8ddca752.js';\nimport '../Id/IdProvider.js';\nimport { applyState } from 'reakit-utils/applyState';\nimport { unstable_useIdState } from '../Id/IdState.js';\n\nfunction isElementPreceding(element1, element2) {\n  return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING);\n}\n\nfunction findDOMIndex(items, item) {\n  return items.findIndex(function (currentItem) {\n    if (!currentItem.ref.current || !item.ref.current) {\n      return false;\n    }\n\n    return isElementPreceding(item.ref.current, currentItem.ref.current);\n  });\n}\n\nfunction getMaxLength(rows) {\n  var maxLength = 0;\n\n  for (var _iterator = _createForOfIteratorHelperLoose(rows), _step; !(_step = _iterator()).done;) {\n    var length = _step.value.length;\n\n    if (length > maxLength) {\n      maxLength = length;\n    }\n  }\n\n  return maxLength;\n}\n\n/**\n * Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]\n */\n\nfunction verticalizeItems(items) {\n  var groups = groupItems(items);\n  var maxLength = getMaxLength(groups);\n  var verticalized = [];\n\n  for (var i = 0; i < maxLength; i += 1) {\n    for (var _iterator = _createForOfIteratorHelperLoose(groups), _step; !(_step = _iterator()).done;) {\n      var group = _step.value;\n\n      if (group[i]) {\n        verticalized.push(_objectSpread2(_objectSpread2({}, group[i]), {}, {\n          // If there's no groupId, it means that it's not a grid composite,\n          // but a single row instead. So, instead of verticalizing it, that\n          // is, assigning a different groupId based on the column index, we\n          // keep it undefined so they will be part of the same group.\n          // It's useful when using up/down on one-dimensional composites.\n          groupId: group[i].groupId ? \"\" + i : undefined\n        }));\n      }\n    }\n  }\n\n  return verticalized;\n}\n\nfunction createEmptyItem(groupId) {\n  return {\n    id: \"__EMPTY_ITEM__\",\n    disabled: true,\n    ref: {\n      current: null\n    },\n    groupId: groupId\n  };\n}\n/**\n * Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]\n */\n\n\nfunction fillGroups(groups, currentId, shift) {\n  var maxLength = getMaxLength(groups);\n\n  for (var _iterator = _createForOfIteratorHelperLoose(groups), _step; !(_step = _iterator()).done;) {\n    var group = _step.value;\n\n    for (var i = 0; i < maxLength; i += 1) {\n      var item = group[i];\n\n      if (!item || shift && item.disabled) {\n        var isFrist = i === 0;\n        var previousItem = isFrist && shift ? findFirstEnabledItem(group) : group[i - 1];\n        group[i] = previousItem && currentId !== (previousItem === null || previousItem === void 0 ? void 0 : previousItem.id) && shift ? previousItem : createEmptyItem(previousItem === null || previousItem === void 0 ? void 0 : previousItem.groupId);\n      }\n    }\n  }\n\n  return groups;\n}\n\nvar nullItem = {\n  id: null,\n  ref: {\n    current: null\n  }\n};\nfunction placeItemsAfter(items, id, shouldInsertNullItem) {\n  var index = items.findIndex(function (item) {\n    return item.id === id;\n  });\n  return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index));\n}\n\nfunction getItemsInGroup(items, groupId) {\n  return items.filter(function (item) {\n    return item.groupId === groupId;\n  });\n}\n\nvar map = {\n  horizontal: \"vertical\",\n  vertical: \"horizontal\"\n};\nfunction getOppositeOrientation(orientation) {\n  return orientation && map[orientation];\n}\n\nfunction addItemAtIndex(array, item, index) {\n  if (!(index in array)) {\n    return [].concat(array, [item]);\n  }\n\n  return [].concat(array.slice(0, index), [item], array.slice(index));\n}\n\nfunction sortBasedOnDOMPosition(items) {\n  var pairs = items.map(function (item, index) {\n    return [index, item];\n  });\n  var isOrderDifferent = false;\n  pairs.sort(function (_ref, _ref2) {\n    var indexA = _ref[0],\n        a = _ref[1];\n    var indexB = _ref2[0],\n        b = _ref2[1];\n    var elementA = a.ref.current;\n    var elementB = b.ref.current;\n    if (!elementA || !elementB) return 0; // a before b\n\n    if (isElementPreceding(elementA, elementB)) {\n      if (indexA > indexB) {\n        isOrderDifferent = true;\n      }\n\n      return -1;\n    } // a after b\n\n\n    if (indexA < indexB) {\n      isOrderDifferent = true;\n    }\n\n    return 1;\n  });\n\n  if (isOrderDifferent) {\n    return pairs.map(function (_ref3) {\n      var _ = _ref3[0],\n          item = _ref3[1];\n      return item;\n    });\n  }\n\n  return items;\n}\n\nfunction setItemsBasedOnDOMPosition(items, setItems) {\n  var sortedItems = sortBasedOnDOMPosition(items);\n\n  if (items !== sortedItems) {\n    setItems(sortedItems);\n  }\n}\n\nfunction getCommonParent(items) {\n  var _firstItem$ref$curren;\n\n  var firstItem = items[0],\n      nextItems = items.slice(1);\n  var parentElement = firstItem === null || firstItem === void 0 ? void 0 : (_firstItem$ref$curren = firstItem.ref.current) === null || _firstItem$ref$curren === void 0 ? void 0 : _firstItem$ref$curren.parentElement;\n\n  var _loop = function _loop() {\n    var parent = parentElement;\n\n    if (nextItems.every(function (item) {\n      return parent.contains(item.ref.current);\n    })) {\n      return {\n        v: parentElement\n      };\n    }\n\n    parentElement = parentElement.parentElement;\n  };\n\n  while (parentElement) {\n    var _ret = _loop();\n\n    if (typeof _ret === \"object\") return _ret.v;\n  }\n\n  return getDocument(parentElement).body;\n} // istanbul ignore next: JSDOM doesn't support IntersectionObverser\n// See https://github.com/jsdom/jsdom/issues/2032\n\n\nfunction useIntersectionObserver(items, setItems) {\n  var previousItems = useRef([]);\n  useEffect(function () {\n    var callback = function callback() {\n      var hasPreviousItems = !!previousItems.current.length; // We don't want to sort items if items have been just registered.\n\n      if (hasPreviousItems) {\n        setItemsBasedOnDOMPosition(items, setItems);\n      }\n\n      previousItems.current = items;\n    };\n\n    var root = getCommonParent(items);\n    var observer = new IntersectionObserver(callback, {\n      root: root\n    });\n\n    for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {\n      var item = _step.value;\n\n      if (item.ref.current) {\n        observer.observe(item.ref.current);\n      }\n    }\n\n    return function () {\n      observer.disconnect();\n    };\n  }, [items]);\n}\n\nfunction useTimeoutObserver(items, setItems) {\n  useEffect(function () {\n    var callback = function callback() {\n      return setItemsBasedOnDOMPosition(items, setItems);\n    };\n\n    var timeout = setTimeout(callback, 250);\n    return function () {\n      return clearTimeout(timeout);\n    };\n  });\n}\n\nfunction useSortBasedOnDOMPosition(items, setItems) {\n  if (typeof IntersectionObserver === \"function\") {\n    useIntersectionObserver(items, setItems);\n  } else {\n    useTimeoutObserver(items, setItems);\n  }\n}\n\nfunction reducer(state, action) {\n  var virtual = state.unstable_virtual,\n      rtl = state.rtl,\n      orientation = state.orientation,\n      items = state.items,\n      groups = state.groups,\n      currentId = state.currentId,\n      loop = state.loop,\n      wrap = state.wrap,\n      pastIds = state.pastIds,\n      shift = state.shift,\n      moves = state.unstable_moves,\n      includesBaseElement = state.unstable_includesBaseElement,\n      initialVirtual = state.initialVirtual,\n      initialRTL = state.initialRTL,\n      initialOrientation = state.initialOrientation,\n      initialCurrentId = state.initialCurrentId,\n      initialLoop = state.initialLoop,\n      initialWrap = state.initialWrap,\n      initialShift = state.initialShift,\n      hasSetCurrentId = state.hasSetCurrentId;\n\n  switch (action.type) {\n    case \"registerGroup\":\n      {\n        var _group = action.group; // If there are no groups yet, just add it as the first one\n\n        if (groups.length === 0) {\n          return _objectSpread2(_objectSpread2({}, state), {}, {\n            groups: [_group]\n          });\n        } // Finds the group index based on DOM position\n\n\n        var index = findDOMIndex(groups, _group);\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          groups: addItemAtIndex(groups, _group, index)\n        });\n      }\n\n    case \"unregisterGroup\":\n      {\n        var _id = action.id;\n        var nextGroups = groups.filter(function (group) {\n          return group.id !== _id;\n        }); // The group isn't registered, so do nothing\n\n        if (nextGroups.length === groups.length) {\n          return state;\n        }\n\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          groups: nextGroups\n        });\n      }\n\n    case \"registerItem\":\n      {\n        var _item = action.item; // Finds the item group based on the DOM hierarchy\n\n        var _group2 = groups.find(function (r) {\n          var _r$ref$current;\n\n          return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current);\n        }); // Group will be null if it's a one-dimensional composite\n\n\n        var nextItem = _objectSpread2({\n          groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id\n        }, _item);\n\n        var _index = findDOMIndex(items, nextItem);\n\n        var nextState = _objectSpread2(_objectSpread2({}, state), {}, {\n          items: addItemAtIndex(items, nextItem, _index)\n        });\n\n        if (!hasSetCurrentId && !moves && initialCurrentId === undefined) {\n          var _findFirstEnabledItem;\n\n          // Sets currentId to the first enabled item. This runs whenever an item\n          // is registered because the first enabled item may be registered\n          // asynchronously.\n          return _objectSpread2(_objectSpread2({}, nextState), {}, {\n            currentId: (_findFirstEnabledItem = findFirstEnabledItem(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id\n          });\n        }\n\n        return nextState;\n      }\n\n    case \"unregisterItem\":\n      {\n        var _id2 = action.id;\n        var nextItems = items.filter(function (item) {\n          return item.id !== _id2;\n        }); // The item isn't registered, so do nothing\n\n        if (nextItems.length === items.length) {\n          return state;\n        } // Filters out the item that is being removed from the pastIds list\n\n\n        var nextPastIds = pastIds.filter(function (pastId) {\n          return pastId !== _id2;\n        });\n\n        var _nextState = _objectSpread2(_objectSpread2({}, state), {}, {\n          pastIds: nextPastIds,\n          items: nextItems\n        }); // If the current item is the item that is being removed, focus pastId\n\n\n        if (currentId && currentId === _id2) {\n          var nextId = includesBaseElement ? null : getCurrentId(_objectSpread2(_objectSpread2({}, _nextState), {}, {\n            currentId: nextPastIds[0]\n          }));\n          return _objectSpread2(_objectSpread2({}, _nextState), {}, {\n            currentId: nextId\n          });\n        }\n\n        return _nextState;\n      }\n\n    case \"move\":\n      {\n        var _id3 = action.id; // move() does nothing\n\n        if (_id3 === undefined) {\n          return state;\n        } // Removes the current item and the item that is receiving focus from the\n        // pastIds list\n\n\n        var filteredPastIds = pastIds.filter(function (pastId) {\n          return pastId !== currentId && pastId !== _id3;\n        }); // If there's a currentId, add it to the pastIds list so it can be focused\n        // if the new item gets removed or disabled\n\n        var _nextPastIds = currentId ? [currentId].concat(filteredPastIds) : filteredPastIds;\n\n        var _nextState2 = _objectSpread2(_objectSpread2({}, state), {}, {\n          pastIds: _nextPastIds\n        }); // move(null) will focus the composite element itself, not an item\n\n\n        if (_id3 === null) {\n          return _objectSpread2(_objectSpread2({}, _nextState2), {}, {\n            unstable_moves: moves + 1,\n            currentId: getCurrentId(_nextState2, _id3)\n          });\n        }\n\n        var _item2 = findEnabledItemById(items, _id3);\n\n        return _objectSpread2(_objectSpread2({}, _nextState2), {}, {\n          unstable_moves: _item2 ? moves + 1 : moves,\n          currentId: getCurrentId(_nextState2, _item2 === null || _item2 === void 0 ? void 0 : _item2.id)\n        });\n      }\n\n    case \"next\":\n      {\n        // If there's no item focused, we just move the first one\n        if (currentId == null) {\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"first\"\n          }));\n        } // RTL doesn't make sense on vertical navigation\n\n\n        var isHorizontal = orientation !== \"vertical\";\n        var isRTL = rtl && isHorizontal;\n        var allItems = isRTL ? reverse(items) : items;\n        var currentItem = allItems.find(function (item) {\n          return item.id === currentId;\n        }); // If there's no item focused, we just move the first one\n\n        if (!currentItem) {\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"first\"\n          }));\n        }\n\n        var isGrid = !!currentItem.groupId;\n        var currentIndex = allItems.indexOf(currentItem);\n\n        var _nextItems = allItems.slice(currentIndex + 1);\n\n        var nextItemsInGroup = getItemsInGroup(_nextItems, currentItem.groupId); // Home, End\n\n        if (action.allTheWay) {\n          // We reverse so we can get the last enabled item in the group. If it's\n          // RTL, nextItems and nextItemsInGroup are already reversed and don't\n          // have the items before the current one anymore. So we have to get\n          // items in group again with allItems.\n          var _nextItem2 = findFirstEnabledItem(isRTL ? getItemsInGroup(allItems, currentItem.groupId) : reverse(nextItemsInGroup));\n\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"move\",\n            id: _nextItem2 === null || _nextItem2 === void 0 ? void 0 : _nextItem2.id\n          }));\n        }\n\n        var oppositeOrientation = getOppositeOrientation( // If it's a grid and orientation is not set, it's a next/previous\n        // call, which is inherently horizontal. up/down will call next with\n        // orientation set to vertical by default (see below on up/down cases).\n        isGrid ? orientation || \"horizontal\" : orientation);\n        var canLoop = loop && loop !== oppositeOrientation;\n        var canWrap = isGrid && wrap && wrap !== oppositeOrientation;\n        var hasNullItem = // `previous` and `up` will set action.hasNullItem, but when calling\n        // next directly, hasNullItem will only be true if it's not a grid and\n        // loop is set to true, which means that pressing right or down keys on\n        // grids will never focus the composite element. On one-dimensional\n        // composites that don't loop, pressing right or down keys also doesn't\n        // focus the composite element.\n        action.hasNullItem || !isGrid && canLoop && includesBaseElement;\n\n        if (canLoop) {\n          var loopItems = canWrap && !hasNullItem ? allItems : getItemsInGroup(allItems, currentItem.groupId); // Turns [0, 1, current, 3, 4] into [3, 4, 0, 1]\n\n          var sortedItems = placeItemsAfter(loopItems, currentId, hasNullItem);\n\n          var _nextItem3 = findFirstEnabledItem(sortedItems, currentId);\n\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"move\",\n            id: _nextItem3 === null || _nextItem3 === void 0 ? void 0 : _nextItem3.id\n          }));\n        }\n\n        if (canWrap) {\n          var _nextItem4 = findFirstEnabledItem( // We can use nextItems, which contains all the next items, including\n          // items from other groups, to wrap between groups. However, if there\n          // is a null item (the composite element), we'll only use the next\n          // items in the group. So moving next from the last item will focus\n          // the composite element (null). On grid composites, horizontal\n          // navigation never focuses the composite element, only vertical.\n          hasNullItem ? nextItemsInGroup : _nextItems, currentId);\n\n          var _nextId = hasNullItem ? (_nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id) || null : _nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id;\n\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"move\",\n            id: _nextId\n          }));\n        }\n\n        var _nextItem = findFirstEnabledItem(nextItemsInGroup, currentId);\n\n        if (!_nextItem && hasNullItem) {\n          return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n            type: \"move\",\n            id: null\n          }));\n        }\n\n        return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"move\",\n          id: _nextItem === null || _nextItem === void 0 ? void 0 : _nextItem.id\n        }));\n      }\n\n    case \"previous\":\n      {\n        // If currentId is initially set to null, the composite element will be\n        // focusable while navigating with arrow keys. But, if it's a grid, we\n        // don't want to focus the composite element with horizontal navigation.\n        var _isGrid = !!groups.length;\n\n        var _hasNullItem = !_isGrid && includesBaseElement;\n\n        var _nextState3 = reducer(_objectSpread2(_objectSpread2({}, state), {}, {\n          items: reverse(items)\n        }), _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"next\",\n          hasNullItem: _hasNullItem\n        }));\n\n        return _objectSpread2(_objectSpread2({}, _nextState3), {}, {\n          items: items\n        });\n      }\n\n    case \"down\":\n      {\n        var shouldShift = shift && !action.allTheWay; // First, we make sure groups have the same number of items by filling it\n        // with disabled fake items. Then, we reorganize the items list so\n        // [1-1, 1-2, 2-1, 2-2] becomes [1-1, 2-1, 1-2, 2-2].\n\n        var verticalItems = verticalizeItems(flatten(fillGroups(groupItems(items), currentId, shouldShift)));\n\n        var _canLoop = loop && loop !== \"horizontal\"; // Pressing down arrow key will only focus the composite element if loop\n        // is true or vertical.\n\n\n        var _hasNullItem2 = _canLoop && includesBaseElement;\n\n        var _nextState4 = reducer(_objectSpread2(_objectSpread2({}, state), {}, {\n          orientation: \"vertical\",\n          items: verticalItems\n        }), _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"next\",\n          hasNullItem: _hasNullItem2\n        }));\n\n        return _objectSpread2(_objectSpread2({}, _nextState4), {}, {\n          orientation: orientation,\n          items: items\n        });\n      }\n\n    case \"up\":\n      {\n        var _shouldShift = shift && !action.allTheWay;\n\n        var _verticalItems = verticalizeItems(reverse(flatten(fillGroups(groupItems(items), currentId, _shouldShift)))); // If currentId is initially set to null, we'll always focus the\n        // composite element when the up arrow key is pressed in the first row.\n\n\n        var _hasNullItem3 = includesBaseElement;\n\n        var _nextState5 = reducer(_objectSpread2(_objectSpread2({}, state), {}, {\n          orientation: \"vertical\",\n          items: _verticalItems\n        }), _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"next\",\n          hasNullItem: _hasNullItem3\n        }));\n\n        return _objectSpread2(_objectSpread2({}, _nextState5), {}, {\n          orientation: orientation,\n          items: items\n        });\n      }\n\n    case \"first\":\n      {\n        var firstItem = findFirstEnabledItem(items);\n        return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"move\",\n          id: firstItem === null || firstItem === void 0 ? void 0 : firstItem.id\n        }));\n      }\n\n    case \"last\":\n      {\n        var _nextState6 = reducer(_objectSpread2(_objectSpread2({}, state), {}, {\n          items: reverse(items)\n        }), _objectSpread2(_objectSpread2({}, action), {}, {\n          type: \"first\"\n        }));\n\n        return _objectSpread2(_objectSpread2({}, _nextState6), {}, {\n          items: items\n        });\n      }\n\n    case \"sort\":\n      {\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          items: sortBasedOnDOMPosition(items),\n          groups: sortBasedOnDOMPosition(groups)\n        });\n      }\n\n    case \"setVirtual\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        unstable_virtual: applyState(action.virtual, virtual)\n      });\n\n    case \"setRTL\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        rtl: applyState(action.rtl, rtl)\n      });\n\n    case \"setOrientation\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        orientation: applyState(action.orientation, orientation)\n      });\n\n    case \"setCurrentId\":\n      {\n        var nextCurrentId = getCurrentId(_objectSpread2(_objectSpread2({}, state), {}, {\n          currentId: applyState(action.currentId, currentId)\n        }));\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          currentId: nextCurrentId,\n          hasSetCurrentId: true\n        });\n      }\n\n    case \"setLoop\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        loop: applyState(action.loop, loop)\n      });\n\n    case \"setWrap\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        wrap: applyState(action.wrap, wrap)\n      });\n\n    case \"setShift\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        shift: applyState(action.shift, shift)\n      });\n\n    case \"setIncludesBaseElement\":\n      {\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          unstable_includesBaseElement: applyState(action.includesBaseElement, includesBaseElement)\n        });\n      }\n\n    case \"reset\":\n      return _objectSpread2(_objectSpread2({}, state), {}, {\n        unstable_virtual: initialVirtual,\n        rtl: initialRTL,\n        orientation: initialOrientation,\n        currentId: getCurrentId(_objectSpread2(_objectSpread2({}, state), {}, {\n          currentId: initialCurrentId\n        })),\n        loop: initialLoop,\n        wrap: initialWrap,\n        shift: initialShift,\n        unstable_moves: 0,\n        pastIds: []\n      });\n\n    case \"setItems\":\n      {\n        return _objectSpread2(_objectSpread2({}, state), {}, {\n          items: action.items\n        });\n      }\n\n    default:\n      throw new Error();\n  }\n}\n\nfunction useAction(fn) {\n  return useCallback(fn, []);\n}\n\nfunction useIsUnmountedRef() {\n  var isUnmountedRef = useRef(false);\n  useIsomorphicEffect(function () {\n    return function () {\n      isUnmountedRef.current = true;\n    };\n  }, []);\n  return isUnmountedRef;\n}\n\nfunction useCompositeState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$unsta = _useSealedState.unstable_virtual,\n      virtual = _useSealedState$unsta === void 0 ? false : _useSealedState$unsta,\n      _useSealedState$rtl = _useSealedState.rtl,\n      rtl = _useSealedState$rtl === void 0 ? false : _useSealedState$rtl,\n      orientation = _useSealedState.orientation,\n      currentId = _useSealedState.currentId,\n      _useSealedState$loop = _useSealedState.loop,\n      loop = _useSealedState$loop === void 0 ? false : _useSealedState$loop,\n      _useSealedState$wrap = _useSealedState.wrap,\n      wrap = _useSealedState$wrap === void 0 ? false : _useSealedState$wrap,\n      _useSealedState$shift = _useSealedState.shift,\n      shift = _useSealedState$shift === void 0 ? false : _useSealedState$shift,\n      unstable_includesBaseElement = _useSealedState.unstable_includesBaseElement,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"unstable_virtual\", \"rtl\", \"orientation\", \"currentId\", \"loop\", \"wrap\", \"shift\", \"unstable_includesBaseElement\"]);\n\n  var idState = unstable_useIdState(sealed);\n\n  var _React$useReducer = useReducer(reducer, {\n    unstable_virtual: virtual,\n    rtl: rtl,\n    orientation: orientation,\n    items: [],\n    groups: [],\n    currentId: currentId,\n    loop: loop,\n    wrap: wrap,\n    shift: shift,\n    unstable_moves: 0,\n    pastIds: [],\n    unstable_includesBaseElement: unstable_includesBaseElement != null ? unstable_includesBaseElement : currentId === null,\n    initialVirtual: virtual,\n    initialRTL: rtl,\n    initialOrientation: orientation,\n    initialCurrentId: currentId,\n    initialLoop: loop,\n    initialWrap: wrap,\n    initialShift: shift\n  }),\n      _React$useReducer$ = _React$useReducer[0],\n      pastIds = _React$useReducer$.pastIds,\n      initialVirtual = _React$useReducer$.initialVirtual,\n      initialRTL = _React$useReducer$.initialRTL,\n      initialOrientation = _React$useReducer$.initialOrientation,\n      initialCurrentId = _React$useReducer$.initialCurrentId,\n      initialLoop = _React$useReducer$.initialLoop,\n      initialWrap = _React$useReducer$.initialWrap,\n      initialShift = _React$useReducer$.initialShift,\n      hasSetCurrentId = _React$useReducer$.hasSetCurrentId,\n      state = _objectWithoutPropertiesLoose(_React$useReducer$, [\"pastIds\", \"initialVirtual\", \"initialRTL\", \"initialOrientation\", \"initialCurrentId\", \"initialLoop\", \"initialWrap\", \"initialShift\", \"hasSetCurrentId\"]),\n      dispatch = _React$useReducer[1];\n\n  var _React$useState = useState(false),\n      hasActiveWidget = _React$useState[0],\n      setHasActiveWidget = _React$useState[1]; // register/unregister may be called when this component is unmounted. We\n  // store the unmounted state here so we don't update the state if it's true.\n  // This only happens in a very specific situation.\n  // See https://github.com/reakit/reakit/issues/650\n\n\n  var isUnmountedRef = useIsUnmountedRef();\n  var setItems = useCallback(function (items) {\n    return dispatch({\n      type: \"setItems\",\n      items: items\n    });\n  }, []);\n  useSortBasedOnDOMPosition(state.items, setItems);\n  return _objectSpread2(_objectSpread2(_objectSpread2({}, idState), state), {}, {\n    unstable_hasActiveWidget: hasActiveWidget,\n    unstable_setHasActiveWidget: setHasActiveWidget,\n    registerItem: useAction(function (item) {\n      if (isUnmountedRef.current) return;\n      dispatch({\n        type: \"registerItem\",\n        item: item\n      });\n    }),\n    unregisterItem: useAction(function (id) {\n      if (isUnmountedRef.current) return;\n      dispatch({\n        type: \"unregisterItem\",\n        id: id\n      });\n    }),\n    registerGroup: useAction(function (group) {\n      if (isUnmountedRef.current) return;\n      dispatch({\n        type: \"registerGroup\",\n        group: group\n      });\n    }),\n    unregisterGroup: useAction(function (id) {\n      if (isUnmountedRef.current) return;\n      dispatch({\n        type: \"unregisterGroup\",\n        id: id\n      });\n    }),\n    move: useAction(function (id) {\n      return dispatch({\n        type: \"move\",\n        id: id\n      });\n    }),\n    next: useAction(function (allTheWay) {\n      return dispatch({\n        type: \"next\",\n        allTheWay: allTheWay\n      });\n    }),\n    previous: useAction(function (allTheWay) {\n      return dispatch({\n        type: \"previous\",\n        allTheWay: allTheWay\n      });\n    }),\n    up: useAction(function (allTheWay) {\n      return dispatch({\n        type: \"up\",\n        allTheWay: allTheWay\n      });\n    }),\n    down: useAction(function (allTheWay) {\n      return dispatch({\n        type: \"down\",\n        allTheWay: allTheWay\n      });\n    }),\n    first: useAction(function () {\n      return dispatch({\n        type: \"first\"\n      });\n    }),\n    last: useAction(function () {\n      return dispatch({\n        type: \"last\"\n      });\n    }),\n    sort: useAction(function () {\n      return dispatch({\n        type: \"sort\"\n      });\n    }),\n    unstable_setVirtual: useAction(function (value) {\n      return dispatch({\n        type: \"setVirtual\",\n        virtual: value\n      });\n    }),\n    setRTL: useAction(function (value) {\n      return dispatch({\n        type: \"setRTL\",\n        rtl: value\n      });\n    }),\n    setOrientation: useAction(function (value) {\n      return dispatch({\n        type: \"setOrientation\",\n        orientation: value\n      });\n    }),\n    setCurrentId: useAction(function (value) {\n      return dispatch({\n        type: \"setCurrentId\",\n        currentId: value\n      });\n    }),\n    setLoop: useAction(function (value) {\n      return dispatch({\n        type: \"setLoop\",\n        loop: value\n      });\n    }),\n    setWrap: useAction(function (value) {\n      return dispatch({\n        type: \"setWrap\",\n        wrap: value\n      });\n    }),\n    setShift: useAction(function (value) {\n      return dispatch({\n        type: \"setShift\",\n        shift: value\n      });\n    }),\n    unstable_setIncludesBaseElement: useAction(function (value) {\n      return dispatch({\n        type: \"setIncludesBaseElement\",\n        includesBaseElement: value\n      });\n    }),\n    reset: useAction(function () {\n      return dispatch({\n        type: \"reset\"\n      });\n    })\n  });\n}\n\nexport { useCompositeState };\n","import './getDocument.js';\nimport { a as _objectSpread2 } from './_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createEvent } from './createEvent.js';\n\nfunction createFocusEvent(element, type, eventInit) {\n  if (eventInit === void 0) {\n    eventInit = {};\n  }\n\n  if (typeof FocusEvent === \"function\") {\n    return new FocusEvent(type, eventInit);\n  }\n\n  return createEvent(element, type, eventInit);\n}\n/**\n * Creates and dispatches a blur event in a way that also works on IE 11.\n *\n * @example\n * import { fireBlurEvent } from \"reakit-utils\";\n *\n * fireBlurEvent(document.getElementById(\"id\"));\n */\n\n\nfunction fireBlurEvent(element, eventInit) {\n  var event = createFocusEvent(element, \"blur\", eventInit);\n  var defaultAllowed = element.dispatchEvent(event);\n\n  var bubbleInit = _objectSpread2(_objectSpread2({}, eventInit), {}, {\n    bubbles: true\n  });\n\n  element.dispatchEvent(createFocusEvent(element, \"focusout\", bubbleInit));\n  return defaultAllowed;\n}\n\nexport { fireBlurEvent };\n","import './getDocument.js';\nimport './getWindow.js';\nimport { canUseDOM } from './canUseDOM.js';\nimport { getActiveElement } from './getActiveElement.js';\n\nvar isIE11 = canUseDOM && \"msCrypto\" in window;\n/**\n * Cross-browser method that returns the next active element (the element that\n * is receiving focus) after a blur event is dispatched. It receives the blur\n * event object as the argument.\n *\n * @example\n * import { getNextActiveElementOnBlur } from \"reakit-utils\";\n *\n * const element = document.getElementById(\"id\");\n * element.addEventListener(\"blur\", (event) => {\n *   const nextActiveElement = getNextActiveElementOnBlur(event);\n * });\n */\n\nfunction getNextActiveElementOnBlur(event) {\n  // IE 11 doesn't support event.relatedTarget on blur.\n  // document.activeElement points the the next active element.\n  // On modern browsers, document.activeElement points to the current target.\n  if (isIE11) {\n    var activeElement = getActiveElement(event.currentTarget);\n    return activeElement;\n  }\n\n  return event.relatedTarget;\n}\n\nexport { getNextActiveElementOnBlur };\n","import { a as _objectSpread2, _ as _objectWithoutPropertiesLoose } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRef, useEffect, useCallback, useReducer } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport { warning, useWarning } from 'reakit-warning';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { isSelfTarget } from 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport { useRole } from '../Role/Role.js';\nimport { useTabbable } from '../Tabbable/Tabbable.js';\nimport { useCreateElement } from 'reakit-system/useCreateElement';\nimport { getDocument } from 'reakit-utils/getDocument';\nimport { fireBlurEvent } from 'reakit-utils/fireBlurEvent';\nimport { fireKeyboardEvent } from 'reakit-utils/fireKeyboardEvent';\nimport { canUseDOM } from 'reakit-utils/canUseDOM';\nimport { getNextActiveElementOnBlur } from 'reakit-utils/getNextActiveElementOnBlur';\nimport { f as flatten, r as reverse, g as groupItems } from '../reverse-30eaa122.js';\nimport { g as getCurrentId, f as findFirstEnabledItem } from '../getCurrentId-5aa9849e.js';\nimport { f as findEnabledItemById } from '../findEnabledItemById-8ddca752.js';\nimport { C as COMPOSITE_KEYS } from '../__keys-6742f591.js';\nimport { u as userFocus } from '../userFocus-e16425e3.js';\n\nvar isIE11 = canUseDOM && \"msCrypto\" in window;\n\nfunction canProxyKeyboardEvent(event) {\n  if (!isSelfTarget(event)) return false;\n  if (event.metaKey) return false;\n  if (event.key === \"Tab\") return false;\n  return true;\n}\n\nfunction useKeyboardEventProxy(virtual, currentItem, htmlEventHandler) {\n  var eventHandlerRef = useLiveRef(htmlEventHandler);\n  return useCallback(function (event) {\n    var _eventHandlerRef$curr;\n\n    (_eventHandlerRef$curr = eventHandlerRef.current) === null || _eventHandlerRef$curr === void 0 ? void 0 : _eventHandlerRef$curr.call(eventHandlerRef, event);\n    if (event.defaultPrevented) return;\n\n    if (virtual && canProxyKeyboardEvent(event)) {\n      var currentElement = currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current;\n\n      if (currentElement) {\n        if (!fireKeyboardEvent(currentElement, event.type, event)) {\n          event.preventDefault();\n        } // The event will be triggered on the composite item and then\n        // propagated up to this composite element again, so we can pretend\n        // that it wasn't called on this component in the first place.\n\n\n        if (event.currentTarget.contains(currentElement)) {\n          event.stopPropagation();\n        }\n      }\n    }\n  }, [virtual, currentItem]);\n} // istanbul ignore next\n\n\nfunction useActiveElementRef(elementRef) {\n  var activeElementRef = useRef(null);\n  useEffect(function () {\n    var document = getDocument(elementRef.current);\n\n    var onFocus = function onFocus(event) {\n      var target = event.target;\n      activeElementRef.current = target;\n    };\n\n    document.addEventListener(\"focus\", onFocus, true);\n    return function () {\n      document.removeEventListener(\"focus\", onFocus, true);\n    };\n  }, []);\n  return activeElementRef;\n}\n\nfunction findFirstEnabledItemInTheLastRow(items) {\n  return findFirstEnabledItem(flatten(reverse(groupItems(items))));\n}\n\nfunction isItem(items, element) {\n  return items === null || items === void 0 ? void 0 : items.some(function (item) {\n    return !!element && item.ref.current === element;\n  });\n}\n\nfunction useScheduleUserFocus(currentItem) {\n  var currentItemRef = useLiveRef(currentItem);\n\n  var _React$useReducer = useReducer(function (n) {\n    return n + 1;\n  }, 0),\n      scheduled = _React$useReducer[0],\n      schedule = _React$useReducer[1];\n\n  useEffect(function () {\n    var _currentItemRef$curre;\n\n    var currentElement = (_currentItemRef$curre = currentItemRef.current) === null || _currentItemRef$curre === void 0 ? void 0 : _currentItemRef$curre.ref.current;\n\n    if (scheduled && currentElement) {\n      userFocus(currentElement);\n    }\n  }, [scheduled]);\n  return schedule;\n}\n\nvar useComposite = createHook({\n  name: \"Composite\",\n  compose: [useTabbable],\n  keys: COMPOSITE_KEYS,\n  useOptions: function useOptions(options) {\n    return _objectSpread2(_objectSpread2({}, options), {}, {\n      currentId: getCurrentId(options)\n    });\n  },\n  useProps: function useProps(options, _ref) {\n    var htmlRef = _ref.ref,\n        htmlOnFocusCapture = _ref.onFocusCapture,\n        htmlOnFocus = _ref.onFocus,\n        htmlOnBlurCapture = _ref.onBlurCapture,\n        htmlOnKeyDown = _ref.onKeyDown,\n        htmlOnKeyDownCapture = _ref.onKeyDownCapture,\n        htmlOnKeyUpCapture = _ref.onKeyUpCapture,\n        htmlProps = _objectWithoutPropertiesLoose(_ref, [\"ref\", \"onFocusCapture\", \"onFocus\", \"onBlurCapture\", \"onKeyDown\", \"onKeyDownCapture\", \"onKeyUpCapture\"]);\n\n    var ref = useRef(null);\n    var currentItem = findEnabledItemById(options.items, options.currentId);\n    var previousElementRef = useRef(null);\n    var onFocusCaptureRef = useLiveRef(htmlOnFocusCapture);\n    var onFocusRef = useLiveRef(htmlOnFocus);\n    var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture);\n    var onKeyDownRef = useLiveRef(htmlOnKeyDown);\n    var scheduleUserFocus = useScheduleUserFocus(currentItem); // IE 11 doesn't support event.relatedTarget, so we use the active element\n    // ref instead.\n\n    var activeElementRef = isIE11 ? useActiveElementRef(ref) : undefined;\n    useEffect(function () {\n      var element = ref.current;\n\n      if (options.unstable_moves && !currentItem) {\n        process.env.NODE_ENV !== \"production\" ? warning(!element, \"Can't focus composite component because `ref` wasn't passed to component.\", \"See https://reakit.io/docs/composite\") : void 0; // If composite.move(null) has been called, the composite container\n        // will receive focus.\n\n        element === null || element === void 0 ? void 0 : element.focus();\n      }\n    }, [options.unstable_moves, currentItem]);\n    var onKeyDownCapture = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyDownCapture);\n    var onKeyUpCapture = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyUpCapture);\n    var onFocusCapture = useCallback(function (event) {\n      var _onFocusCaptureRef$cu;\n\n      (_onFocusCaptureRef$cu = onFocusCaptureRef.current) === null || _onFocusCaptureRef$cu === void 0 ? void 0 : _onFocusCaptureRef$cu.call(onFocusCaptureRef, event);\n      if (event.defaultPrevented) return;\n      if (!options.unstable_virtual) return; // IE11 doesn't support event.relatedTarget, so we use the active\n      // element ref instead.\n\n      var previousActiveElement = (activeElementRef === null || activeElementRef === void 0 ? void 0 : activeElementRef.current) || event.relatedTarget;\n      var previousActiveElementWasItem = isItem(options.items, previousActiveElement);\n\n      if (isSelfTarget(event) && previousActiveElementWasItem) {\n        // Composite has been focused as a result of an item receiving focus.\n        // The composite item will move focus back to the composite\n        // container. In this case, we don't want to propagate this\n        // additional event nor call the onFocus handler passed to\n        // <Composite onFocus={...} />.\n        event.stopPropagation(); // We keep track of the previous active item element so we can\n        // manually fire a blur event on it later when the focus is moved to\n        // another item on the onBlurCapture event below.\n\n        previousElementRef.current = previousActiveElement;\n      }\n    }, [options.unstable_virtual, options.items]);\n    var onFocus = useCallback(function (event) {\n      var _onFocusRef$current;\n\n      (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);\n      if (event.defaultPrevented) return;\n\n      if (options.unstable_virtual) {\n        if (isSelfTarget(event)) {\n          // This means that the composite element has been focused while the\n          // composite item has not. For example, by clicking on the\n          // composite element without touching any item, or by tabbing into\n          // the composite element. In this case, we want to trigger focus on\n          // the item, just like it would happen with roving tabindex.\n          // When it receives focus, the composite item will put focus back\n          // on the composite element, in which case hasItemWithFocus will be\n          // true.\n          scheduleUserFocus();\n        }\n      } else if (isSelfTarget(event)) {\n        var _options$setCurrentId;\n\n        // When the roving tabindex composite gets intentionally focused (for\n        // example, by clicking directly on it, and not on an item), we make\n        // sure to set the current id to null (which means the composite\n        // itself is focused).\n        (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, null);\n      }\n    }, [options.unstable_virtual, options.setCurrentId]);\n    var onBlurCapture = useCallback(function (event) {\n      var _onBlurCaptureRef$cur;\n\n      (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event);\n      if (event.defaultPrevented) return;\n      if (!options.unstable_virtual) return; // When virtual is set to true, we move focus from the composite\n      // container (this component) to the composite item that is being\n      // selected. Then we move focus back to the composite container. This\n      // is so we can provide the same API as the roving tabindex method,\n      // which means people can attach onFocus/onBlur handlers on the\n      // CompositeItem component regardless of whether it's virtual or not.\n      // This sequence of blurring and focusing items and composite may be\n      // confusing, so we ignore intermediate focus and blurs by stopping its\n      // propagation and not calling the passed onBlur handler (htmlOnBlur).\n\n      var currentElement = (currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current) || null;\n      var nextActiveElement = getNextActiveElementOnBlur(event);\n      var nextActiveElementIsItem = isItem(options.items, nextActiveElement);\n\n      if (isSelfTarget(event) && nextActiveElementIsItem) {\n        // This is an intermediate blur event: blurring the composite\n        // container to focus an item (nextActiveElement).\n        if (nextActiveElement === currentElement) {\n          // The next active element will be the same as the current item in\n          // the state in two scenarios:\n          //   - Moving focus with keyboard: the state is updated before the\n          // blur event is triggered, so here the current item is already\n          // pointing to the next active element.\n          //   - Clicking on the current active item with a pointer: this\n          // will trigger blur on the composite element and then the next\n          // active element will be the same as the current item. Clicking on\n          // an item other than the current one doesn't end up here as the\n          // currentItem state will be updated only after it.\n          if (previousElementRef.current && previousElementRef.current !== nextActiveElement) {\n            // If there's a previous active item and it's not a click action,\n            // then we fire a blur event on it so it will work just like if\n            // it had DOM focus before (like when using roving tabindex).\n            fireBlurEvent(previousElementRef.current, event);\n          }\n        } else if (currentElement) {\n          // This will be true when the next active element is not the\n          // current element, but there's a current item. This will only\n          // happen when clicking with a pointer on a different item, when\n          // there's already an item selected, in which case currentElement\n          // is the item that is getting blurred, and nextActiveElement is\n          // the item that is being clicked.\n          fireBlurEvent(currentElement, event);\n        } // We want to ignore intermediate blur events, so we stop its\n        // propagation and return early so onFocus will not be called.\n\n\n        event.stopPropagation();\n      } else {\n        var targetIsItem = isItem(options.items, event.target);\n\n        if (!targetIsItem && currentElement) {\n          // If target is not a composite item, it may be the composite\n          // element itself (isSelfTarget) or a tabbable element inside the\n          // composite widget. This may be triggered by clicking outside the\n          // composite widget or by tabbing out of it. In either cases we\n          // want to fire a blur event on the current item.\n          fireBlurEvent(currentElement, event);\n        }\n      }\n    }, [options.unstable_virtual, options.items, currentItem]);\n    var onKeyDown = useCallback(function (event) {\n      var _onKeyDownRef$current, _options$groups;\n\n      (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);\n      if (event.defaultPrevented) return;\n      if (options.currentId !== null) return;\n      if (!isSelfTarget(event)) return;\n      var isVertical = options.orientation !== \"horizontal\";\n      var isHorizontal = options.orientation !== \"vertical\";\n      var isGrid = !!((_options$groups = options.groups) !== null && _options$groups !== void 0 && _options$groups.length);\n\n      var up = function up() {\n        if (isGrid) {\n          var item = findFirstEnabledItemInTheLastRow(options.items);\n\n          if (item !== null && item !== void 0 && item.id) {\n            var _options$move;\n\n            (_options$move = options.move) === null || _options$move === void 0 ? void 0 : _options$move.call(options, item.id);\n          }\n        } else {\n          var _options$last;\n\n          (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options);\n        }\n      };\n\n      var keyMap = {\n        ArrowUp: (isGrid || isVertical) && up,\n        ArrowRight: (isGrid || isHorizontal) && options.first,\n        ArrowDown: (isGrid || isVertical) && options.first,\n        ArrowLeft: (isGrid || isHorizontal) && options.last,\n        Home: options.first,\n        End: options.last,\n        PageUp: options.first,\n        PageDown: options.last\n      };\n      var action = keyMap[event.key];\n\n      if (action) {\n        event.preventDefault();\n        action();\n      }\n    }, [options.currentId, options.orientation, options.groups, options.items, options.move, options.last, options.first]);\n    return _objectSpread2({\n      ref: useForkRef(ref, htmlRef),\n      id: options.baseId,\n      onFocus: onFocus,\n      onFocusCapture: onFocusCapture,\n      onBlurCapture: onBlurCapture,\n      onKeyDownCapture: onKeyDownCapture,\n      onKeyDown: onKeyDown,\n      onKeyUpCapture: onKeyUpCapture,\n      \"aria-activedescendant\": options.unstable_virtual ? (currentItem === null || currentItem === void 0 ? void 0 : currentItem.id) || undefined : undefined\n    }, htmlProps);\n  },\n  useComposeProps: function useComposeProps(options, htmlProps) {\n    htmlProps = useRole(options, htmlProps, true);\n    var tabbableHTMLProps = useTabbable(options, htmlProps, true);\n\n    if (options.unstable_virtual || options.currentId === null) {\n      // Composite will only be tabbable by default if the focus is managed\n      // using aria-activedescendant, which requires DOM focus on the container\n      // element (the composite)\n      return _objectSpread2({\n        tabIndex: 0\n      }, tabbableHTMLProps);\n    }\n\n    return _objectSpread2(_objectSpread2({}, htmlProps), {}, {\n      ref: tabbableHTMLProps.ref\n    });\n  }\n});\nvar Composite = createComponent({\n  as: \"div\",\n  useHook: useComposite,\n  useCreateElement: function useCreateElement$1(type, props, children) {\n    process.env.NODE_ENV !== \"production\" ? useWarning(!props[\"aria-label\"] && !props[\"aria-labelledby\"], \"You should provide either `aria-label` or `aria-labelledby` props.\", \"See https://reakit.io/docs/composite\") : void 0;\n    return useCreateElement(type, props, children);\n  }\n});\n\nexport { Composite, useComposite };\n","import { getDocument } from './getDocument.js';\nimport { getWindow } from './getWindow.js';\n\nfunction createKeyboardEvent(element, type, eventInit) {\n  if (eventInit === void 0) {\n    eventInit = {};\n  }\n\n  if (typeof KeyboardEvent === \"function\") {\n    return new KeyboardEvent(type, eventInit);\n  } // IE 11 doesn't support Event constructors\n\n\n  var event = getDocument(element).createEvent(\"KeyboardEvent\");\n  event.initKeyboardEvent(type, eventInit.bubbles, eventInit.cancelable, getWindow(element), eventInit.key, eventInit.location, eventInit.ctrlKey, eventInit.altKey, eventInit.shiftKey, eventInit.metaKey);\n  return event;\n}\n/**\n * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11.\n *\n * @example\n * import { fireKeyboardEvent } from \"reakit-utils\";\n *\n * fireKeyboardEvent(document.getElementById(\"id\"), \"keydown\", {\n *   key: \"ArrowDown\",\n *   shiftKey: true,\n * });\n */\n\n\nfunction fireKeyboardEvent(element, type, eventInit) {\n  return element.dispatchEvent(createKeyboardEvent(element, type, eventInit));\n}\n\nexport { fireKeyboardEvent };\n","import { a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRole } from '../Role/Role.js';\n\n// Automatically generated\nvar GROUP_KEYS = [];\n\nvar useGroup = createHook({\n  name: \"Group\",\n  compose: useRole,\n  keys: GROUP_KEYS,\n  useProps: function useProps(_, htmlProps) {\n    return _objectSpread2({\n      role: \"group\"\n    }, htmlProps);\n  }\n});\nvar Group = createComponent({\n  as: \"div\",\n  useHook: useGroup\n});\n\nexport { Group, useGroup };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRef } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport '../Role/Role.js';\nimport { f as findEnabledItemById } from '../findEnabledItemById-8ddca752.js';\nimport { a as COMPOSITE_GROUP_KEYS } from '../__keys-6742f591.js';\nimport '../Id/IdProvider.js';\nimport { unstable_useId } from '../Id/Id.js';\nimport { useGroup } from '../Group/Group.js';\n\nvar useCompositeGroup = createHook({\n  name: \"CompositeGroup\",\n  compose: [useGroup, unstable_useId],\n  keys: COMPOSITE_GROUP_KEYS,\n  propsAreEqual: function propsAreEqual(prev, next) {\n    if (!next.id || prev.id !== next.id) {\n      return useGroup.unstable_propsAreEqual(prev, next);\n    }\n\n    var prevCurrentId = prev.currentId,\n        prevMoves = prev.unstable_moves,\n        prevProps = _objectWithoutPropertiesLoose(prev, [\"currentId\", \"unstable_moves\"]);\n\n    var nextCurrentId = next.currentId,\n        nextMoves = next.unstable_moves,\n        nextProps = _objectWithoutPropertiesLoose(next, [\"currentId\", \"unstable_moves\"]);\n\n    if (prev.items && next.items) {\n      var prevCurrentItem = findEnabledItemById(prev.items, prevCurrentId);\n      var nextCurrentItem = findEnabledItemById(next.items, nextCurrentId);\n      var prevGroupId = prevCurrentItem === null || prevCurrentItem === void 0 ? void 0 : prevCurrentItem.groupId;\n      var nextGroupId = nextCurrentItem === null || nextCurrentItem === void 0 ? void 0 : nextCurrentItem.groupId;\n\n      if (next.id === nextGroupId || next.id === prevGroupId) {\n        return false;\n      }\n    }\n\n    return useGroup.unstable_propsAreEqual(prevProps, nextProps);\n  },\n  useProps: function useProps(options, _ref) {\n    var htmlRef = _ref.ref,\n        htmlProps = _objectWithoutPropertiesLoose(_ref, [\"ref\"]);\n\n    var ref = useRef(null);\n    var id = options.id; // We need this to be called before CompositeItems' register\n\n    useIsomorphicEffect(function () {\n      var _options$registerGrou;\n\n      if (!id) return undefined;\n      (_options$registerGrou = options.registerGroup) === null || _options$registerGrou === void 0 ? void 0 : _options$registerGrou.call(options, {\n        id: id,\n        ref: ref\n      });\n      return function () {\n        var _options$unregisterGr;\n\n        (_options$unregisterGr = options.unregisterGroup) === null || _options$unregisterGr === void 0 ? void 0 : _options$unregisterGr.call(options, id);\n      };\n    }, [id, options.registerGroup, options.unregisterGroup]);\n    return _objectSpread2({\n      ref: useForkRef(ref, htmlRef)\n    }, htmlProps);\n  }\n});\nvar CompositeGroup = createComponent({\n  as: \"div\",\n  useHook: useCompositeGroup\n});\n\nexport { CompositeGroup, useCompositeGroup };\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport {\n\trootBase,\n\tpointBase,\n\tCell as CellBase,\n} from './alignment-matrix-control-styles';\n\nconst rootSize = () => {\n\tconst padding = 1.5;\n\tconst size = 24;\n\n\treturn css( {\n\t\tgridTemplateRows: `repeat( 3, calc( ${ size - padding * 2 }px / 3))`,\n\t\tpadding,\n\t\tmaxHeight: size,\n\t\tmaxWidth: size,\n\t} );\n};\n\nconst rootPointerEvents = ( { disablePointerEvents } ) => {\n\treturn css( {\n\t\tpointerEvents: disablePointerEvents ? 'none' : null,\n\t} );\n};\n\nexport const Wrapper = styled.div`\n\tbox-sizing: border-box;\n\tpadding: 2px;\n`;\n\nexport const Root = styled.div`\n\ttransform-origin: top left;\n\theight: 100%;\n\twidth: 100%;\n\n\t${ rootBase };\n\t${ rootSize };\n\t${ rootPointerEvents };\n`;\n\nconst pointActive = ( { isActive } ) => {\n\tconst boxShadow = isActive ? `0 0 0 1px currentColor` : null;\n\n\treturn css`\n\t\tbox-shadow: ${ boxShadow };\n\t\tcolor: currentColor;\n\n\t\t*:hover > & {\n\t\t\tcolor: currentColor;\n\t\t}\n\t`;\n};\n\nexport const Point = styled.span`\n\theight: 2px;\n\twidth: 2px;\n\t${ pointBase };\n\t${ pointActive };\n`;\n\nexport const Cell = CellBase;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { ALIGNMENTS, getAlignmentIndex } from './utils';\nimport {\n\tRoot,\n\tCell,\n\tPoint,\n} from './styles/alignment-matrix-control-icon-styles';\n\nconst BASE_SIZE = 24;\n\nexport default function AlignmentMatrixControlIcon( {\n\tclassName,\n\tdisablePointerEvents = true,\n\tsize = BASE_SIZE,\n\tstyle = {},\n\tvalue = 'center',\n\t...props\n} ) {\n\tconst alignIndex = getAlignmentIndex( value );\n\tconst scale = ( size / BASE_SIZE ).toFixed( 2 );\n\n\tconst classes = classnames(\n\t\t'component-alignment-matrix-control-icon',\n\t\tclassName\n\t);\n\n\tconst styles = {\n\t\t...style,\n\t\ttransform: `scale(${ scale })`,\n\t};\n\n\treturn (\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdisablePointerEvents={ disablePointerEvents }\n\t\t\trole=\"presentation\"\n\t\t\tsize={ size }\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ ALIGNMENTS.map( ( align, index ) => {\n\t\t\t\tconst isActive = alignIndex === index;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Cell key={ align }>\n\t\t\t\t\t\t<Point isActive={ isActive } />\n\t\t\t\t\t</Cell>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Root>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Cell from './cell';\nimport { Composite, CompositeGroup, useCompositeState } from '../composite';\nimport { Root, Row } from './styles/alignment-matrix-control-styles';\nimport AlignmentMatrixControlIcon from './icon';\nimport { GRID, getItemId } from './utils';\n\nconst noop = () => {};\n\nfunction useBaseId( id ) {\n\tconst instanceId = useInstanceId(\n\t\tAlignmentMatrixControl,\n\t\t'alignment-matrix-control'\n\t);\n\n\treturn id || instanceId;\n}\n\nexport default function AlignmentMatrixControl( {\n\tclassName,\n\tid,\n\tlabel = __( 'Alignment Matrix Control' ),\n\tdefaultValue = 'center center',\n\tvalue,\n\tonChange = noop,\n\twidth = 92,\n\t...props\n} ) {\n\tconst [ immutableDefaultValue ] = useState( value ?? defaultValue );\n\tconst baseId = useBaseId( id );\n\tconst initialCurrentId = getItemId( baseId, immutableDefaultValue );\n\n\tconst composite = useCompositeState( {\n\t\tbaseId,\n\t\tcurrentId: initialCurrentId,\n\t\trtl: isRTL(),\n\t} );\n\n\tconst handleOnChange = ( nextValue ) => {\n\t\tonChange( nextValue );\n\t};\n\n\tconst { setCurrentId } = composite;\n\n\tuseEffect( () => {\n\t\tif ( typeof value !== 'undefined' ) {\n\t\t\tsetCurrentId( getItemId( baseId, value ) );\n\t\t}\n\t}, [ value, setCurrentId, baseId ] );\n\n\tconst classes = classnames(\n\t\t'component-alignment-matrix-control',\n\t\tclassName\n\t);\n\n\treturn (\n\t\t<Composite\n\t\t\t{ ...props }\n\t\t\t{ ...composite }\n\t\t\taria-label={ label }\n\t\t\tas={ Root }\n\t\t\tclassName={ classes }\n\t\t\trole=\"grid\"\n\t\t\tsize={ width }\n\t\t>\n\t\t\t{ GRID.map( ( cells, index ) => (\n\t\t\t\t<CompositeGroup\n\t\t\t\t\t{ ...composite }\n\t\t\t\t\tas={ Row }\n\t\t\t\t\trole=\"row\"\n\t\t\t\t\tkey={ index }\n\t\t\t\t>\n\t\t\t\t\t{ cells.map( ( cell ) => {\n\t\t\t\t\t\tconst cellId = getItemId( baseId, cell );\n\t\t\t\t\t\tconst isActive = composite.currentId === cellId;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Cell\n\t\t\t\t\t\t\t\t{ ...composite }\n\t\t\t\t\t\t\t\tid={ cellId }\n\t\t\t\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\t\t\t\tkey={ cell }\n\t\t\t\t\t\t\t\tvalue={ cell }\n\t\t\t\t\t\t\t\tonFocus={ () => handleOnChange( cell ) }\n\t\t\t\t\t\t\t\ttabIndex={ isActive ? 0 : -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</CompositeGroup>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\nAlignmentMatrixControl.Icon = AlignmentMatrixControlIcon;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * @typedef {'top' | 'top left' | 'top right' | 'middle' | 'middle left' | 'middle right' | 'bottom' | 'bottom left' | 'bottom right'} AppearOrigin\n * @typedef {'left' | 'right'} SlideInOrigin\n * @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions\n * @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions\n * @typedef {{ type: 'loading' }} LoadingOptions\n * @typedef {AppearOptions | SlideInOptions | LoadingOptions} GetAnimateOptions\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @param {GetAnimateOptions['type']} type The animation type\n * @return {'top' | 'left'} Default origin\n */\nfunction getDefaultOrigin( type ) {\n\treturn type === 'appear' ? 'top' : 'left';\n}\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * @param {GetAnimateOptions} options\n *\n * @return {string | void} ClassName that applies the animations\n */\nexport function getAnimateClassName( options ) {\n\tif ( options.type === 'loading' ) {\n\t\treturn classnames( 'components-animate__loading' );\n\t}\n\n\tconst { type, origin = getDefaultOrigin( type ) } = options;\n\n\tif ( type === 'appear' ) {\n\t\tconst [ yAxis, xAxis = 'center' ] = origin.split( ' ' );\n\t\treturn classnames( 'components-animate__appear', {\n\t\t\t[ 'is-from-' + xAxis ]: xAxis !== 'center',\n\t\t\t[ 'is-from-' + yAxis ]: yAxis !== 'middle',\n\t\t} );\n\t}\n\n\tif ( type === 'slide-in' ) {\n\t\treturn classnames(\n\t\t\t'components-animate__slide-in',\n\t\t\t'is-from-' + origin\n\t\t);\n\t}\n}\n\n// @ts-ignore Reason: Planned for deprecation\nexport default function Animate( { type, options = {}, children } ) {\n\treturn children( {\n\t\tclassName: getAnimateClassName( { type, ...options } ),\n\t} );\n}\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n    var isMounted = useRef(false);\n    useIsomorphicLayoutEffect(function () {\n        isMounted.current = true;\n        return function () {\n            isMounted.current = false;\n        };\n    }, []);\n    return isMounted;\n}\n\nexport { useIsMounted };\n","import { __values } from 'tslib';\nimport * as React from 'react';\nimport { useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useId } from '../../utils/use-id.mjs';\n\nvar PresenceChild = function (_a) {\n    var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;\n    var presenceChildren = useConstant(newChildrenMap);\n    var id = useId();\n    var context = useMemo(function () { return ({\n        id: id,\n        initial: initial,\n        isPresent: isPresent,\n        custom: custom,\n        onExitComplete: function (childId) {\n            var e_1, _a;\n            presenceChildren.set(childId, true);\n            try {\n                for (var _b = __values(presenceChildren.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n                    var isComplete = _c.value;\n                    if (!isComplete)\n                        return; // can stop searching when any is incomplete\n                }\n            }\n            catch (e_1_1) { e_1 = { error: e_1_1 }; }\n            finally {\n                try {\n                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n                }\n                finally { if (e_1) throw e_1.error; }\n            }\n            onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete();\n        },\n        register: function (childId) {\n            presenceChildren.set(childId, false);\n            return function () { return presenceChildren.delete(childId); };\n        },\n    }); }, \n    /**\n     * If the presence of a child affects the layout of the components around it,\n     * we want to make a new context value to ensure they get re-rendered\n     * so they can detect that layout change.\n     */\n    presenceAffectsLayout ? undefined : [isPresent]);\n    useMemo(function () {\n        presenceChildren.forEach(function (_, key) { return presenceChildren.set(key, false); });\n    }, [isPresent]);\n    /**\n     * If there's no `motion` components to fire exit animations, we want to remove this\n     * component immediately.\n     */\n    React.useEffect(function () {\n        !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n    }, [isPresent]);\n    return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n    return new Map();\n}\n\nexport { PresenceChild };\n","import { __read, __spreadArray } from 'tslib';\nimport * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\n\nvar getChildKey = function (child) { return child.key || \"\"; };\nvar isDev = process.env.NODE_ENV !== \"production\";\nfunction updateChildLookup(children, allChildren) {\n    var seenChildren = isDev ? new Set() : null;\n    children.forEach(function (child) {\n        var key = getChildKey(child);\n        if (isDev && seenChildren && seenChildren.has(key)) {\n            console.warn(\"Children of AnimatePresence require unique keys. \\\"\".concat(key, \"\\\" is a duplicate.\"));\n            seenChildren.add(key);\n        }\n        allChildren.set(key, child);\n    });\n}\nfunction onlyElements(children) {\n    var filtered = [];\n    // We use forEach here instead of map as map mutates the component key by preprending `.$`\n    Children.forEach(children, function (child) {\n        if (isValidElement(child))\n            filtered.push(child);\n    });\n    return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n *   <AnimatePresence>\n *     {items.map(item => (\n *       <motion.div\n *         key={item.id}\n *         initial={{ opacity: 0 }}\n *         animate={{ opacity: 1 }}\n *         exit={{ opacity: 0 }}\n *       />\n *     ))}\n *   </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nvar AnimatePresence = function (_a) {\n    var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;\n    // We want to force a re-render once all exiting animations have finished. We\n    // either use a local forceRender function, or one from a parent context if it exists.\n    var _d = __read(useForceUpdate(), 1), forceRender = _d[0];\n    var forceRenderLayoutGroup = useContext(LayoutGroupContext).forceRender;\n    if (forceRenderLayoutGroup)\n        forceRender = forceRenderLayoutGroup;\n    var isMounted = useIsMounted();\n    // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n    var filteredChildren = onlyElements(children);\n    var childrenToRender = filteredChildren;\n    var exiting = new Set();\n    // Keep a living record of the children we're actually rendering so we\n    // can diff to figure out which are entering and exiting\n    var presentChildren = useRef(childrenToRender);\n    // A lookup table to quickly reference components by key\n    var allChildren = useRef(new Map()).current;\n    // If this is the initial component render, just deal with logic surrounding whether\n    // we play onMount animations or not.\n    var isInitialRender = useRef(true);\n    useIsomorphicLayoutEffect(function () {\n        isInitialRender.current = false;\n        updateChildLookup(filteredChildren, allChildren);\n        presentChildren.current = childrenToRender;\n    });\n    useUnmountEffect(function () {\n        isInitialRender.current = true;\n        allChildren.clear();\n        exiting.clear();\n    });\n    if (isInitialRender.current) {\n        return (React.createElement(React.Fragment, null, childrenToRender.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));\n    }\n    // If this is a subsequent render, deal with entering and exiting children\n    childrenToRender = __spreadArray([], __read(childrenToRender), false);\n    // Diff the keys of the currently-present and target children to update our\n    // exiting list.\n    var presentKeys = presentChildren.current.map(getChildKey);\n    var targetKeys = filteredChildren.map(getChildKey);\n    // Diff the present children with our target children and mark those that are exiting\n    var numPresent = presentKeys.length;\n    for (var i = 0; i < numPresent; i++) {\n        var key = presentKeys[i];\n        if (targetKeys.indexOf(key) === -1) {\n            exiting.add(key);\n        }\n    }\n    // If we currently have exiting children, and we're deferring rendering incoming children\n    // until after all current children have exiting, empty the childrenToRender array\n    if (exitBeforeEnter && exiting.size) {\n        childrenToRender = [];\n    }\n    // Loop through all currently exiting components and clone them to overwrite `animate`\n    // with any `exit` prop they might have defined.\n    exiting.forEach(function (key) {\n        // If this component is actually entering again, early return\n        if (targetKeys.indexOf(key) !== -1)\n            return;\n        var child = allChildren.get(key);\n        if (!child)\n            return;\n        var insertionIndex = presentKeys.indexOf(key);\n        var onExit = function () {\n            allChildren.delete(key);\n            exiting.delete(key);\n            // Remove this child from the present children\n            var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });\n            presentChildren.current.splice(removeIndex, 1);\n            // Defer re-rendering until all exiting children have indeed left\n            if (!exiting.size) {\n                presentChildren.current = filteredChildren;\n                if (isMounted.current === false)\n                    return;\n                forceRender();\n                onExitComplete && onExitComplete();\n            }\n        };\n        childrenToRender.splice(insertionIndex, 0, React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));\n    });\n    // Add `MotionContext` even to children that don't need it to ensure we're rendering\n    // the same tree between renders\n    childrenToRender = childrenToRender.map(function (child) {\n        var key = child.key;\n        return exiting.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));\n    });\n    if (process.env.NODE_ENV !== \"production\" &&\n        exitBeforeEnter &&\n        childrenToRender.length > 1) {\n        console.warn(\"You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.\");\n    }\n    return (React.createElement(React.Fragment, null, exiting.size\n        ? childrenToRender\n        : childrenToRender.map(function (child) { return cloneElement(child); })));\n};\n\nexport { AnimatePresence };\n","import { __read } from 'tslib';\nimport sync from 'framesync';\nimport { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\n\nfunction useForceUpdate() {\n    var isMounted = useIsMounted();\n    var _a = __read(useState(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];\n    var forceRender = useCallback(function () {\n        isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n    }, [forcedRenderCount]);\n    /**\n     * Defer this to the end of the next animation frame in case there are multiple\n     * synchronous calls.\n     */\n    var deferredForceRender = useCallback(function () { return sync.postRender(forceRender); }, [forceRender]);\n    return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const FlexContext = createContext< {\n\tflexItemDisplay: 'block' | undefined;\n} >( {\n\tflexItemDisplay: undefined,\n} );\n\nexport const useFlexContext = () => useContext( FlexContext );\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Flex = css`\n\tdisplay: flex;\n`;\n\nexport const Item = css`\n\tdisplay: block;\n\tmax-height: 100%;\n\tmax-width: 100%;\n\tmin-height: 0;\n\tmin-width: 0;\n`;\n\nexport const block = css`\n\tflex: 1;\n`;\n\n/**\n * Workaround to optimize DOM rendering.\n * We'll enhance alignment with naive parent flex assumptions.\n *\n * Trade-off:\n * Far less DOM less. However, UI rendering is not as reliable.\n */\n\n/**\n * Improves stability of width/height rendering.\n * https://github.com/ItsJonQ/g2/pull/149\n */\nexport const ItemsColumn = css`\n\t> * {\n\t\tmin-height: 0;\n\t}\n`;\n\nexport const ItemsRow = css`\n\t> * {\n\t\tmin-width: 0;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css, SerializedStyles } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useFlexContext } from '../context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { FlexItemProps } from '../types';\n\nexport function useFlexItem(\n\tprops: WordPressComponentProps< FlexItemProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisplay: displayProp,\n\t\tisBlock = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'FlexItem' );\n\n\tconst sx: {\n\t\tBase?: SerializedStyles;\n\t} = {};\n\n\tconst contextDisplay = useFlexContext().flexItemDisplay;\n\n\tsx.Base = css( {\n\t\tdisplay: displayProp || contextDisplay,\n\t} );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tstyles.Item,\n\t\tsx.Base,\n\t\tisBlock && styles.block,\n\t\tclassName\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport type { FlexBlockProps } from '../types';\nimport { useFlexBlock } from './hook';\n\nfunction UnconnectedFlexBlock(\n\tprops: WordPressComponentProps< FlexBlockProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst flexBlockProps = useFlexBlock( props );\n\n\treturn <View { ...flexBlockProps } ref={ forwardedRef } />;\n}\n\n/**\n * `FlexBlock` is a primitive layout component that adaptively resizes content\n * within layout containers like `Flex`.\n *\n * ```jsx\n * import { Flex, FlexBlock } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <Flex>\n *       <FlexBlock>...</FlexBlock>\n *     </Flex>\n *   );\n * }\n * ```\n */\nexport const FlexBlock = contextConnect( UnconnectedFlexBlock, 'FlexBlock' );\n\nexport default FlexBlock;\n","/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useFlexItem } from '../flex-item';\nimport type { FlexBlockProps } from '../types';\n\nexport function useFlexBlock(\n\tprops: WordPressComponentProps< FlexBlockProps, 'div' >\n) {\n\tconst otherProps = useContextSystem( props, 'FlexBlock' );\n\tconst flexItemProps = useFlexItem( { isBlock: true, ...otherProps } );\n\n\treturn flexItemProps;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useFlexItem } from './hook';\nimport type { FlexItemProps } from '../types';\n\nfunction UnconnectedFlexItem(\n\tprops: WordPressComponentProps< FlexItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst flexItemProps = useFlexItem( props );\n\n\treturn <View { ...flexItemProps } ref={ forwardedRef } />;\n}\n\n/**\n * `FlexItem` is a primitive layout component that aligns content within layout\n * containers like `Flex`.\n *\n * ```jsx\n * import { Flex, FlexItem } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <Flex>\n *       <FlexItem>...</FlexItem>\n *     </Flex>\n *   );\n * }\n * ```\n */\nexport const FlexItem = contextConnect( UnconnectedFlexItem, 'FlexItem' );\n\nexport default FlexItem;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nconst breakpoints = [ '40em', '52em', '64em' ];\n\nexport const useBreakpointIndex = (\n\toptions: { defaultIndex?: number } = {}\n) => {\n\tconst { defaultIndex = 0 } = options;\n\n\tif ( typeof defaultIndex !== 'number' ) {\n\t\tthrow new TypeError(\n\t\t\t`Default breakpoint index should be a number. Got: ${ defaultIndex }, ${ typeof defaultIndex }`\n\t\t);\n\t} else if ( defaultIndex < 0 || defaultIndex > breakpoints.length - 1 ) {\n\t\tthrow new RangeError(\n\t\t\t`Default breakpoint index out of range. Theme has ${ breakpoints.length } breakpoints, got index ${ defaultIndex }`\n\t\t);\n\t}\n\n\tconst [ value, setValue ] = useState( defaultIndex );\n\n\tuseEffect( () => {\n\t\tconst getIndex = () =>\n\t\t\tbreakpoints.filter( ( bp ) => {\n\t\t\t\treturn typeof window !== 'undefined'\n\t\t\t\t\t? window.matchMedia( `screen and (min-width: ${ bp })` )\n\t\t\t\t\t\t\t.matches\n\t\t\t\t\t: false;\n\t\t\t} ).length;\n\n\t\tconst onResize = () => {\n\t\t\tconst newValue = getIndex();\n\t\t\tif ( value !== newValue ) {\n\t\t\t\tsetValue( newValue );\n\t\t\t}\n\t\t};\n\n\t\tonResize();\n\n\t\tif ( typeof window !== 'undefined' ) {\n\t\t\twindow.addEventListener( 'resize', onResize );\n\t\t}\n\t\treturn () => {\n\t\t\tif ( typeof window !== 'undefined' ) {\n\t\t\t\twindow.removeEventListener( 'resize', onResize );\n\t\t\t}\n\t\t};\n\t}, [ value ] );\n\n\treturn value;\n};\n\nexport function useResponsiveValue< T >(\n\tvalues: ( T | undefined )[],\n\toptions: Parameters< typeof useBreakpointIndex >[ 0 ] = {}\n): T | undefined {\n\tconst index = useBreakpointIndex( options );\n\n\t// Allow calling the function with a \"normal\" value without having to check on the outside.\n\tif ( ! Array.isArray( values ) && typeof values !== 'function' )\n\t\treturn values;\n\n\tconst array = values || [];\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\treturn /** @type {T[]} */ array[\n\t\t/* eslint-enable jsdoc/no-undefined-types */\n\t\tindex >= array.length ? array.length - 1 : index\n\t];\n}\n","/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param  value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useResponsiveValue } from '../../ui/utils/use-responsive-value';\nimport { space } from '../../ui/utils/space';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils';\nimport type { FlexProps } from '../types';\n\nfunction useDeprecatedProps(\n\tprops: WordPressComponentProps< FlexProps, 'div' >\n): WordPressComponentProps< FlexProps, 'div' > {\n\tconst { isReversed, ...otherProps } = props;\n\n\tif ( typeof isReversed !== 'undefined' ) {\n\t\tdeprecated( 'Flex isReversed', {\n\t\t\talternative: 'Flex direction=\"row-reverse\" or \"column-reverse\"',\n\t\t\tsince: '5.9',\n\t\t} );\n\t\treturn {\n\t\t\t...otherProps,\n\t\t\tdirection: isReversed ? 'row-reverse' : 'row',\n\t\t};\n\t}\n\n\treturn otherProps;\n}\n\nexport function useFlex( props: WordPressComponentProps< FlexProps, 'div' > ) {\n\tconst {\n\t\talign = 'center',\n\t\tclassName,\n\t\tdirection: directionProp = 'row',\n\t\texpanded = true,\n\t\tgap = 2,\n\t\tjustify = 'space-between',\n\t\twrap = false,\n\t\t...otherProps\n\t} = useContextSystem( useDeprecatedProps( props ), 'Flex' );\n\n\tconst directionAsArray = Array.isArray( directionProp )\n\t\t? directionProp\n\t\t: [ directionProp ];\n\tconst direction = useResponsiveValue( directionAsArray );\n\n\tconst isColumn =\n\t\ttypeof direction === 'string' && !! direction.includes( 'column' );\n\tconst isReverse =\n\t\ttypeof direction === 'string' && direction.includes( 'reverse' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst base = css( {\n\t\t\talignItems: isColumn ? 'normal' : align,\n\t\t\tflexDirection: direction,\n\t\t\tflexWrap: wrap ? 'wrap' : undefined,\n\t\t\tgap: space( gap ),\n\t\t\tjustifyContent: justify,\n\t\t\theight: isColumn && expanded ? '100%' : undefined,\n\t\t\twidth: ! isColumn && expanded ? '100%' : undefined,\n\t\t} );\n\n\t\treturn cx(\n\t\t\tstyles.Flex,\n\t\t\tbase,\n\t\t\tisColumn ? styles.ItemsColumn : styles.ItemsRow,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\talign,\n\t\tclassName,\n\t\tcx,\n\t\tdirection,\n\t\texpanded,\n\t\tgap,\n\t\tisColumn,\n\t\tisReverse,\n\t\tjustify,\n\t\twrap,\n\t] );\n\n\treturn { ...otherProps, className: classes, isColumn };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useFlex } from './hook';\nimport { FlexContext } from './../context';\nimport { View } from '../../view';\nimport type { FlexProps } from '../types';\n\nfunction UnconnectedFlex(\n\tprops: WordPressComponentProps< FlexProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { children, isColumn, ...otherProps } = useFlex( props );\n\n\treturn (\n\t\t<FlexContext.Provider\n\t\t\tvalue={ { flexItemDisplay: isColumn ? 'block' : undefined } }\n\t\t>\n\t\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t</FlexContext.Provider>\n\t);\n}\n\n/**\n * `Flex` is a primitive layout component that adaptively aligns child content\n * horizontally or vertically. `Flex` powers components like `HStack` and\n * `VStack`.\n *\n * `Flex` is used with any of its two sub-components, `FlexItem` and\n * `FlexBlock`.\n *\n * ```jsx\n * import { Flex, FlexBlock, FlexItem } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <Flex>\n *       <FlexItem>\n *         <p>Code</p>\n *       </FlexItem>\n *       <FlexBlock>\n *         <p>Poetry</p>\n *       </FlexBlock>\n *     </Flex>\n *   );\n * }\n * ```\n */\nexport const Flex = contextConnect( UnconnectedFlex, 'Flex' );\n\nexport default Flex;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Truncate = css`\n\tdisplay: block;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n`;\n","/* eslint-disable jsdoc/valid-types */\n/**\n * Determines if a value is null or undefined.\n *\n * @template T\n *\n * @param {T} value The value to check.\n * @return {value is Exclude<T, null | undefined>} Whether value is not null or undefined.\n */\nexport function isValueDefined( value ) {\n\treturn value !== undefined && value !== null;\n}\n/* eslint-enable jsdoc/valid-types */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Determines if a value is empty, null, or undefined.\n *\n * @param {string | number | null | undefined} value The value to check.\n * @return {value is (\"\" | null | undefined)} Whether value is empty.\n */\nexport function isValueEmpty( value ) {\n\tconst isEmptyString = value === '';\n\n\treturn ! isValueDefined( value ) || isEmptyString;\n}\n/* eslint-enable jsdoc/valid-types */\n\n/**\n * Get the first defined/non-null value from an array.\n *\n * @template T\n *\n * @param {Array<T | null | undefined>} values        Values to derive from.\n * @param {T}                           fallbackValue Fallback value if there are no defined values.\n * @return {T} A defined value or the fallback value.\n */\nexport function getDefinedValue( values = [], fallbackValue ) {\n\treturn values.find( isValueDefined ) ?? fallbackValue;\n}\n\n/**\n * @param {string} [locale]\n * @return {[RegExp, RegExp]} The delimiter and decimal regexp\n */\nconst getDelimiterAndDecimalRegex = ( locale ) => {\n\tconst formatted = Intl.NumberFormat( locale ).format( 1000.1 );\n\tconst delimiter = formatted[ 1 ];\n\tconst decimal = formatted[ formatted.length - 2 ];\n\treturn [\n\t\tnew RegExp( `\\\\${ delimiter }`, 'g' ),\n\t\tnew RegExp( `\\\\${ decimal }`, 'g' ),\n\t];\n};\n\n// https://en.wikipedia.org/wiki/Decimal_separator#Current_standards\nconst INTERNATIONAL_THOUSANDS_DELIMITER = / /g;\n\nconst ARABIC_NUMERAL_LOCALES = [ 'ar', 'fa', 'ur', 'ckb', 'ps' ];\n\nconst EASTERN_ARABIC_NUMBERS = /([۰-۹]|[٠-٩])/g;\n\n/**\n * Checks to see if a value is a numeric value (`number` or `string`).\n *\n * Intentionally ignores whether the thousands delimiters are only\n * in the thousands marks.\n *\n * @param {any}    value\n * @param {string} [locale]\n * @return {boolean} Whether value is numeric.\n */\nexport function isValueNumeric( value, locale = window.navigator.language ) {\n\tif ( ARABIC_NUMERAL_LOCALES.some( ( l ) => locale.startsWith( l ) ) ) {\n\t\tlocale = 'en-GB';\n\t\tif ( EASTERN_ARABIC_NUMBERS.test( value ) ) {\n\t\t\tvalue = value\n\t\t\t\t.replace( /[٠-٩]/g, ( /** @type {string} */ d ) =>\n\t\t\t\t\t'٠١٢٣٤٥٦٧٨٩'.indexOf( d )\n\t\t\t\t)\n\t\t\t\t.replace( /[۰-۹]/g, ( /** @type {string} */ d ) =>\n\t\t\t\t\t'۰۱۲۳۴۵۶۷۸۹'.indexOf( d )\n\t\t\t\t)\n\t\t\t\t.replace( /٬/g, ',' )\n\t\t\t\t.replace( /٫/g, '.' );\n\t\t}\n\t}\n\n\tconst [ delimiterRegexp, decimalRegexp ] =\n\t\tgetDelimiterAndDecimalRegex( locale );\n\tconst valueToCheck =\n\t\ttypeof value === 'string'\n\t\t\t? value\n\t\t\t\t\t.replace( delimiterRegexp, '' )\n\t\t\t\t\t.replace( decimalRegexp, '.' )\n\t\t\t\t\t.replace( INTERNATIONAL_THOUSANDS_DELIMITER, '' )\n\t\t\t: value;\n\treturn ! isNaN( parseFloat( valueToCheck ) ) && isFinite( valueToCheck );\n}\n\n/**\n * Converts a string to a number.\n *\n * @param {string} value\n * @return {number} String as a number.\n */\nexport const stringToNumber = ( value ) => {\n\treturn parseFloat( value );\n};\n\n/**\n * Converts a number to a string.\n *\n * @param {number} value\n * @return {string} Number as a string.\n */\nexport const numberToString = ( value ) => {\n\treturn `${ value }`;\n};\n\n/**\n * Regardless of the input being a string or a number, returns a number.\n *\n * Returns `undefined` in case the string is `undefined` or not a valid numeric value.\n *\n * @param {string | number} value\n * @return {number} The parsed number.\n */\nexport const ensureNumber = ( value ) => {\n\treturn typeof value === 'string' ? stringToNumber( value ) : value;\n};\n\n/**\n * Regardless of the input being a string or a number, returns a number.\n *\n * Returns `undefined` in case the string is `undefined` or not a valid numeric value.\n *\n * @param {string | number} value\n * @return {string} The converted string, or `undefined` in case the input is `undefined` or `NaN`.\n */\nexport const ensureString = ( value ) => {\n\treturn typeof value === 'string' ? value : numberToString( value );\n};\n","/**\n * Internal dependencies\n */\nimport { isValueDefined } from '../utils/values';\nimport type { TruncateProps } from './types';\n\nexport const TRUNCATE_ELLIPSIS = '…';\nexport const TRUNCATE_TYPE = {\n\tauto: 'auto',\n\thead: 'head',\n\tmiddle: 'middle',\n\ttail: 'tail',\n\tnone: 'none',\n} as const;\n\nexport const TRUNCATE_DEFAULT_PROPS = {\n\tellipsis: TRUNCATE_ELLIPSIS,\n\tellipsizeMode: TRUNCATE_TYPE.auto,\n\tlimit: 0,\n\tnumberOfLines: 0,\n};\n\n// Source\n// https://github.com/kahwee/truncate-middle\nexport function truncateMiddle(\n\tword: string,\n\theadLength: number,\n\ttailLength: number,\n\tellipsis: string\n) {\n\tif ( typeof word !== 'string' ) {\n\t\treturn '';\n\t}\n\tconst wordLength = word.length;\n\t// Setting default values\n\t// eslint-disable-next-line no-bitwise\n\tconst frontLength = ~~headLength; // Will cast to integer\n\t// eslint-disable-next-line no-bitwise\n\tconst backLength = ~~tailLength;\n\t/* istanbul ignore next */\n\tconst truncateStr = isValueDefined( ellipsis )\n\t\t? ellipsis\n\t\t: TRUNCATE_ELLIPSIS;\n\n\tif (\n\t\t( frontLength === 0 && backLength === 0 ) ||\n\t\tfrontLength >= wordLength ||\n\t\tbackLength >= wordLength ||\n\t\tfrontLength + backLength >= wordLength\n\t) {\n\t\treturn word;\n\t} else if ( backLength === 0 ) {\n\t\treturn word.slice( 0, frontLength ) + truncateStr;\n\t}\n\treturn (\n\t\tword.slice( 0, frontLength ) +\n\t\ttruncateStr +\n\t\tword.slice( wordLength - backLength )\n\t);\n}\n\nexport function truncateContent(\n\twords: string = '',\n\tprops: Omit< TruncateProps, 'children' >\n) {\n\tconst mergedProps = { ...TRUNCATE_DEFAULT_PROPS, ...props };\n\tconst { ellipsis, ellipsizeMode, limit } = mergedProps;\n\n\tif ( ellipsizeMode === TRUNCATE_TYPE.none ) {\n\t\treturn words;\n\t}\n\n\tlet truncateHead: number;\n\tlet truncateTail: number;\n\n\tswitch ( ellipsizeMode ) {\n\t\tcase TRUNCATE_TYPE.head:\n\t\t\ttruncateHead = 0;\n\t\t\ttruncateTail = limit;\n\t\t\tbreak;\n\t\tcase TRUNCATE_TYPE.middle:\n\t\t\ttruncateHead = Math.floor( limit / 2 );\n\t\t\ttruncateTail = Math.floor( limit / 2 );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttruncateHead = limit;\n\t\t\ttruncateTail = 0;\n\t}\n\n\tconst truncatedContent =\n\t\tellipsizeMode !== TRUNCATE_TYPE.auto\n\t\t\t? truncateMiddle( words, truncateHead, truncateTail, ellipsis )\n\t\t\t: words;\n\n\treturn truncatedContent;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport * as styles from './styles';\nimport { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { TruncateProps } from './types';\n\nexport default function useTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tchildren,\n\t\tellipsis = TRUNCATE_ELLIPSIS,\n\t\tellipsizeMode = TRUNCATE_TYPE.auto,\n\t\tlimit = 0,\n\t\tnumberOfLines = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Truncate' );\n\n\tconst cx = useCx();\n\n\tconst truncatedContent = truncateContent(\n\t\ttypeof children === 'string' ? children : '',\n\t\t{\n\t\t\tellipsis,\n\t\t\tellipsizeMode,\n\t\t\tlimit,\n\t\t\tnumberOfLines,\n\t\t}\n\t);\n\n\tconst shouldTruncate = ellipsizeMode === TRUNCATE_TYPE.auto;\n\n\tconst classes = useMemo( () => {\n\t\tconst truncateLines = css`\n\t\t\t-webkit-box-orient: vertical;\n\t\t\t-webkit-line-clamp: ${ numberOfLines };\n\t\t\tdisplay: -webkit-box;\n\t\t\toverflow: hidden;\n\t\t`;\n\n\t\treturn cx(\n\t\t\tshouldTruncate && ! numberOfLines && styles.Truncate,\n\t\t\tshouldTruncate && !! numberOfLines && truncateLines,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, numberOfLines, shouldTruncate ] );\n\n\treturn { ...otherProps, className: classes, children: truncatedContent };\n}\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/** @type {HTMLDivElement} */\nlet colorComputationNode;\n\nextend( [ namesPlugin ] );\n\n/**\n * @return {HTMLDivElement | undefined} The HTML element for color computation.\n */\nfunction getColorComputationNode() {\n\tif ( typeof document === 'undefined' ) return;\n\n\tif ( ! colorComputationNode ) {\n\t\t// Create a temporary element for style computation.\n\t\tconst el = document.createElement( 'div' );\n\t\tel.setAttribute( 'data-g2-color-computation-node', '' );\n\t\t// Inject for window computed style.\n\t\tdocument.body.appendChild( el );\n\t\tcolorComputationNode = el;\n\t}\n\n\treturn colorComputationNode;\n}\n\n/**\n * @param {string | unknown} value\n *\n * @return {boolean} Whether the value is a valid color.\n */\nfunction isColor( value ) {\n\tif ( typeof value !== 'string' ) return false;\n\tconst test = colord( value );\n\n\treturn test.isValid();\n}\n\n/**\n * Retrieves the computed background color. This is useful for getting the\n * value of a CSS variable color.\n *\n * @param {string | unknown} backgroundColor The background color to compute.\n *\n * @return {string} The computed background color.\n */\nfunction _getComputedBackgroundColor( backgroundColor ) {\n\tif ( typeof backgroundColor !== 'string' ) return '';\n\n\tif ( isColor( backgroundColor ) ) return backgroundColor;\n\n\tif ( ! backgroundColor.includes( 'var(' ) ) return '';\n\tif ( typeof document === 'undefined' ) return '';\n\n\t// Attempts to gracefully handle CSS variables color values.\n\tconst el = getColorComputationNode();\n\tif ( ! el ) return '';\n\n\tel.style.background = backgroundColor;\n\t// Grab the style.\n\tconst computedColor = window?.getComputedStyle( el ).background;\n\t// Reset.\n\tel.style.background = '';\n\n\treturn computedColor || '';\n}\n\nconst getComputedBackgroundColor = memoize( _getComputedBackgroundColor );\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text color (black or white).\n */\nexport function getOptimalTextColor( backgroundColor ) {\n\tconst background = getComputedBackgroundColor( backgroundColor );\n\n\treturn colord( background ).isLight() ? '#000000' : '#ffffff';\n}\n\n/**\n * Get the text shade optimized for readability, based on a background color.\n *\n * @param {string | unknown} backgroundColor The background color.\n *\n * @return {string} The optimized text shade (dark or light).\n */\nexport function getOptimalTextShade( backgroundColor ) {\n\tconst result = getOptimalTextColor( backgroundColor );\n\n\treturn result === '#000000' ? 'dark' : 'light';\n}\n","/**\n * Internal dependencies\n */\nimport { space } from '../ui/utils/space';\nimport { COLORS } from './colors-values';\n\nconst CONTROL_HEIGHT = '36px';\nconst CONTROL_PADDING_X = '12px';\n\nconst CONTROL_PROPS = {\n\tcontrolSurfaceColor: COLORS.white,\n\tcontrolTextActiveColor: COLORS.ui.theme,\n\tcontrolPaddingX: CONTROL_PADDING_X,\n\tcontrolPaddingXLarge: `calc(${ CONTROL_PADDING_X } * 1.3334)`,\n\tcontrolPaddingXSmall: `calc(${ CONTROL_PADDING_X } / 1.3334)`,\n\tcontrolBackgroundColor: COLORS.white,\n\tcontrolBorderRadius: '2px',\n\tcontrolBorderColor: COLORS.gray[ 700 ],\n\tcontrolBoxShadow: 'transparent',\n\tcontrolBorderColorHover: COLORS.gray[ 700 ],\n\tcontrolBoxShadowFocus: `0 0 0 0.5px ${ COLORS.ui.theme }`,\n\tcontrolDestructiveBorderColor: COLORS.alert.red,\n\tcontrolHeight: CONTROL_HEIGHT,\n\tcontrolHeightXSmall: `calc( ${ CONTROL_HEIGHT } * 0.6 )`,\n\tcontrolHeightSmall: `calc( ${ CONTROL_HEIGHT } * 0.8 )`,\n\tcontrolHeightLarge: `calc( ${ CONTROL_HEIGHT } * 1.2 )`,\n\tcontrolHeightXLarge: `calc( ${ CONTROL_HEIGHT } * 1.4 )`,\n};\n\nconst TOGGLE_GROUP_CONTROL_PROPS = {\n\ttoggleGroupControlBackgroundColor: CONTROL_PROPS.controlBackgroundColor,\n\ttoggleGroupControlBorderColor: COLORS.ui.border,\n\ttoggleGroupControlBackdropBackgroundColor:\n\t\tCONTROL_PROPS.controlSurfaceColor,\n\ttoggleGroupControlBackdropBorderColor: COLORS.ui.border,\n\ttoggleGroupControlBackdropBoxShadow: 'transparent',\n\ttoggleGroupControlButtonColorActive: CONTROL_PROPS.controlBackgroundColor,\n};\n\n// Using Object.assign to avoid creating circular references when emitting\n// TypeScript type declarations.\nexport default Object.assign( {}, CONTROL_PROPS, TOGGLE_GROUP_CONTROL_PROPS, {\n\tcolorDivider: 'rgba(0, 0, 0, 0.1)',\n\tcolorScrollbarThumb: 'rgba(0, 0, 0, 0.2)',\n\tcolorScrollbarThumbHover: 'rgba(0, 0, 0, 0.5)',\n\tcolorScrollbarTrack: 'rgba(0, 0, 0, 0.04)',\n\televationIntensity: 1,\n\tradiusBlockUi: '2px',\n\tborderWidth: '1px',\n\tborderWidthFocus: '1.5px',\n\tborderWidthTab: '4px',\n\tspinnerSize: 16,\n\tfontSize: '13px',\n\tfontSizeH1: 'calc(2.44 * 13px)',\n\tfontSizeH2: 'calc(1.95 * 13px)',\n\tfontSizeH3: 'calc(1.56 * 13px)',\n\tfontSizeH4: 'calc(1.25 * 13px)',\n\tfontSizeH5: '13px',\n\tfontSizeH6: 'calc(0.8 * 13px)',\n\tfontSizeInputMobile: '16px',\n\tfontSizeMobile: '15px',\n\tfontSizeSmall: 'calc(0.92 * 13px)',\n\tfontSizeXSmall: 'calc(0.75 * 13px)',\n\tfontLineHeightBase: '1.2',\n\tfontWeight: 'normal',\n\tfontWeightHeading: '600',\n\tgridBase: '4px',\n\tcardBorderRadius: '2px',\n\tcardPaddingXSmall: `${ space( 2 ) }`,\n\tcardPaddingSmall: `${ space( 4 ) }`,\n\tcardPaddingMedium: `${ space( 4 ) } ${ space( 6 ) }`,\n\tcardPaddingLarge: `${ space( 6 ) } ${ space( 8 ) }`,\n\tsurfaceBackgroundColor: COLORS.white,\n\tsurfaceBackgroundSubtleColor: '#F3F3F3',\n\tsurfaceBackgroundTintColor: '#F5F5F5',\n\tsurfaceBorderColor: 'rgba(0, 0, 0, 0.1)',\n\tsurfaceBorderBoldColor: 'rgba(0, 0, 0, 0.15)',\n\tsurfaceBorderSubtleColor: 'rgba(0, 0, 0, 0.05)',\n\tsurfaceBackgroundTertiaryColor: COLORS.white,\n\tsurfaceColor: COLORS.white,\n\ttransitionDuration: '200ms',\n\ttransitionDurationFast: '160ms',\n\ttransitionDurationFaster: '120ms',\n\ttransitionDurationFastest: '100ms',\n\ttransitionTimingFunction: 'cubic-bezier(0.08, 0.52, 0.52, 1)',\n\ttransitionTimingFunctionControl: 'cubic-bezier(0.12, 0.8, 0.32, 1)',\n} );\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nexport const Text = css`\n\tcolor: ${ COLORS.gray[ 900 ] };\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\tmargin: 0;\n`;\n\nexport const block = css`\n\tdisplay: block;\n`;\n\nexport const positive = css`\n\tcolor: ${ COLORS.alert.green };\n`;\n\nexport const destructive = css`\n\tcolor: ${ COLORS.alert.red };\n`;\n\nexport const muted = css`\n\tcolor: ${ COLORS.gray[ 700 ] };\n`;\n\nexport const highlighterText = css`\n\tmark {\n\t\tbackground: ${ COLORS.alert.yellow };\n\t\tborder-radius: 2px;\n\t\tbox-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,\n\t\t\t0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;\n\t}\n`;\n\nexport const upperCase = css`\n\ttext-transform: uppercase;\n`;\n","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport { findAll } from 'highlight-words-core';\n\n/**\n * WordPress dependencies\n */\nimport { createElement } from '@wordpress/element';\n\n/**\n * Source:\n * https://github.com/bvaughn/react-highlight-words/blob/HEAD/src/Highlighter.js\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * @typedef Options\n * @property {string}                                                     [activeClassName='']      Classname for active highlighted areas.\n * @property {number}                                                     [activeIndex=-1]          The index of the active highlighted area.\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [activeStyle]             Styles to apply to the active highlighted area.\n * @property {boolean}                                                    [autoEscape]              Whether to automatically escape text.\n * @property {boolean}                                                    [caseSensitive=false]     Whether to highlight in a case-sensitive manner.\n * @property {string}                                                     children                  Children to highlight.\n * @property {import('highlight-words-core').FindAllArgs['findChunks']}   [findChunks]              Custom `findChunks` function to pass to `highlight-words-core`.\n * @property {string | Record<string, unknown>}                           [highlightClassName='']   Classname to apply to highlighted text or a Record of classnames to apply to given text (which should be the key).\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [highlightStyle={}]       Styles to apply to highlighted text.\n * @property {keyof JSX.IntrinsicElements}                                [highlightTag='mark']     Tag to use for the highlighted text.\n * @property {import('highlight-words-core').FindAllArgs['sanitize']}     [sanitize]                Custom `santize` function to pass to `highlight-words-core`.\n * @property {string[]}                                                   [searchWords=[]]          Words to search for and highlight.\n * @property {string}                                                     [unhighlightClassName=''] Classname to apply to unhighlighted text.\n * @property {import('react').AllHTMLAttributes<HTMLDivElement>['style']} [unhighlightStyle]        Style to apply to unhighlighted text.\n */\n\n/**\n * Maps props to lowercase names.\n *\n * @template {Record<string, unknown>} T\n * @param {T} object Props to map.\n * @return {{[K in keyof T as Lowercase<string & K>]: T[K]}} The mapped props.\n */\n/* eslint-enable jsdoc/valid-types */\nconst lowercaseProps = ( object ) => {\n\t/** @type {any} */\n\tconst mapped = {};\n\tfor ( const key in object ) {\n\t\tmapped[ key.toLowerCase() ] = object[ key ];\n\t}\n\treturn mapped;\n};\n\nconst memoizedLowercaseProps = memoize( lowercaseProps );\n\n/**\n *\n * @param {Options} options\n */\nexport function createHighlighterText( {\n\tactiveClassName = '',\n\tactiveIndex = -1,\n\tactiveStyle,\n\tautoEscape,\n\tcaseSensitive = false,\n\tchildren,\n\tfindChunks,\n\thighlightClassName = '',\n\thighlightStyle = {},\n\thighlightTag = 'mark',\n\tsanitize,\n\tsearchWords = [],\n\tunhighlightClassName = '',\n\tunhighlightStyle,\n} ) {\n\tif ( ! children ) return null;\n\tif ( typeof children !== 'string' ) return children;\n\n\tconst textToHighlight = children;\n\n\tconst chunks = findAll( {\n\t\tautoEscape,\n\t\tcaseSensitive,\n\t\tfindChunks,\n\t\tsanitize,\n\t\tsearchWords,\n\t\ttextToHighlight,\n\t} );\n\tconst HighlightTag = highlightTag;\n\tlet highlightIndex = -1;\n\tlet highlightClassNames = '';\n\tlet highlightStyles;\n\n\tconst textContent = chunks.map( ( chunk, index ) => {\n\t\tconst text = textToHighlight.substr(\n\t\t\tchunk.start,\n\t\t\tchunk.end - chunk.start\n\t\t);\n\n\t\tif ( chunk.highlight ) {\n\t\t\thighlightIndex++;\n\n\t\t\tlet highlightClass;\n\t\t\tif ( typeof highlightClassName === 'object' ) {\n\t\t\t\tif ( ! caseSensitive ) {\n\t\t\t\t\thighlightClassName =\n\t\t\t\t\t\tmemoizedLowercaseProps( highlightClassName );\n\t\t\t\t\thighlightClass = highlightClassName[ text.toLowerCase() ];\n\t\t\t\t} else {\n\t\t\t\t\thighlightClass = highlightClassName[ text ];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thighlightClass = highlightClassName;\n\t\t\t}\n\n\t\t\tconst isActive = highlightIndex === +activeIndex;\n\n\t\t\thighlightClassNames = `${ highlightClass } ${\n\t\t\t\tisActive ? activeClassName : ''\n\t\t\t}`;\n\t\t\thighlightStyles =\n\t\t\t\tisActive === true && activeStyle !== null\n\t\t\t\t\t? Object.assign( {}, highlightStyle, activeStyle )\n\t\t\t\t\t: highlightStyle;\n\n\t\t\t/** @type {Record<string, any>} */\n\t\t\tconst props = {\n\t\t\t\tchildren: text,\n\t\t\t\tclassName: highlightClassNames,\n\t\t\t\tkey: index,\n\t\t\t\tstyle: highlightStyles,\n\t\t\t};\n\n\t\t\t// Don't attach arbitrary props to DOM elements; this triggers React DEV warnings (https://fb.me/react-unknown-prop)\n\t\t\t// Only pass through the highlightIndex attribute for custom components.\n\t\t\tif ( typeof HighlightTag !== 'string' ) {\n\t\t\t\tprops.highlightIndex = highlightIndex;\n\t\t\t}\n\n\t\t\treturn createElement( HighlightTag, props );\n\t\t}\n\t\treturn createElement( 'span', {\n\t\t\tchildren: text,\n\t\t\tclassName: unhighlightClassName,\n\t\t\tkey: index,\n\t\t\tstyle: unhighlightStyle,\n\t\t} );\n\t} );\n\n\treturn textContent;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties, ReactText } from 'react';\n\n/**\n * Internal dependencies\n */\nimport CONFIG from '../../utils/config-values';\n\nexport type HeadingSize =\n\t| 1\n\t| 2\n\t| 3\n\t| 4\n\t| 5\n\t| 6\n\t| '1'\n\t| '2'\n\t| '3'\n\t| '4'\n\t| '5'\n\t| '6';\n\nexport const BASE_FONT_SIZE = 13;\n\nexport const PRESET_FONT_SIZES = {\n\tbody: BASE_FONT_SIZE,\n\tcaption: 10,\n\tfootnote: 11,\n\tlargeTitle: 28,\n\tsubheadline: 12,\n\ttitle: 20,\n};\n\nexport const HEADING_FONT_SIZES = [ 1, 2, 3, 4, 5, 6 ].flatMap( ( n ) => [\n\tn as HeadingSize,\n\tn.toString() as HeadingSize,\n] );\n\nexport function getFontSize(\n\tsize:\n\t\t| CSSProperties[ 'fontSize' ]\n\t\t| keyof typeof PRESET_FONT_SIZES = BASE_FONT_SIZE\n): string {\n\tif ( size in PRESET_FONT_SIZES ) {\n\t\treturn getFontSize(\n\t\t\tPRESET_FONT_SIZES[ size as keyof typeof PRESET_FONT_SIZES ]\n\t\t);\n\t}\n\n\tif ( typeof size !== 'number' ) {\n\t\tconst parsed = parseFloat( size );\n\t\tif ( Number.isNaN( parsed ) ) return size;\n\t\tsize = parsed;\n\t}\n\n\tconst ratio = `(${ size } / ${ BASE_FONT_SIZE })`;\n\treturn `calc(${ ratio } * ${ CONFIG.fontSize })`;\n}\n\nexport function getHeadingFontSize( size: ReactText = 3 ): string {\n\tif ( ! HEADING_FONT_SIZES.includes( size as HeadingSize ) ) {\n\t\treturn getFontSize( size );\n\t}\n\n\tconst headingSize = `fontSizeH${ size }` as `fontSizeH${ HeadingSize }`;\n\treturn CONFIG[ headingSize ];\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, Children, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { hasConnectNamespace, useContextSystem } from '../ui/context';\nimport { useTruncate } from '../truncate';\nimport { getOptimalTextShade } from '../ui/utils';\nimport * as styles from './styles';\nimport { createHighlighterText } from './utils';\nimport { getFontSize } from '../ui/utils/font-size';\nimport { CONFIG, COLORS } from '../utils';\nimport { getLineHeight } from './get-line-height';\nimport { useCx } from '../utils/hooks/use-cx';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props\n */\nexport default function useText( props ) {\n\tconst {\n\t\tadjustLineHeightForInnerControls,\n\t\talign,\n\t\tchildren,\n\t\tclassName,\n\t\tcolor,\n\t\tellipsizeMode,\n\t\tisDestructive = false,\n\t\tdisplay,\n\t\thighlightEscape = false,\n\t\thighlightCaseSensitive = false,\n\t\thighlightWords,\n\t\thighlightSanitize,\n\t\tisBlock = false,\n\t\tletterSpacing,\n\t\tlineHeight: lineHeightProp,\n\t\toptimizeReadabilityFor,\n\t\tsize,\n\t\ttruncate = false,\n\t\tupperCase = false,\n\t\tvariant,\n\t\tweight = CONFIG.fontWeight,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Text' );\n\n\t/** @type {import('react').ReactNode} */\n\tlet content = children;\n\tconst isHighlighter = Array.isArray( highlightWords );\n\tconst isCaption = size === 'caption';\n\n\tif ( isHighlighter ) {\n\t\tif ( typeof children !== 'string' ) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'`children` of `Text` must only be `string` types when `highlightWords` is defined'\n\t\t\t);\n\t\t}\n\n\t\tcontent = createHighlighterText( {\n\t\t\tautoEscape: highlightEscape,\n\t\t\t// Disable reason: We need to disable this otherwise it erases the cast\n\t\t\t// eslint-disable-next-line object-shorthand\n\t\t\tchildren: /** @type {string} */ ( children ),\n\t\t\tcaseSensitive: highlightCaseSensitive,\n\t\t\tsearchWords: highlightWords,\n\t\t\tsanitize: highlightSanitize,\n\t\t} );\n\t}\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx = {};\n\n\t\tconst lineHeight = getLineHeight(\n\t\t\tadjustLineHeightForInnerControls,\n\t\t\tlineHeightProp\n\t\t);\n\n\t\tsx.Base = css( {\n\t\t\tcolor,\n\t\t\tdisplay,\n\t\t\tfontSize: getFontSize( size ),\n\t\t\t/* eslint-disable jsdoc/valid-types */\n\t\t\tfontWeight:\n\t\t\t\t/** @type {import('react').CSSProperties['fontWeight']} */ (\n\t\t\t\t\tweight\n\t\t\t\t),\n\t\t\t/* eslint-enable jsdoc/valid-types */\n\t\t\tlineHeight,\n\t\t\tletterSpacing,\n\t\t\ttextAlign: align,\n\t\t} );\n\n\t\tsx.upperCase = css( { textTransform: 'uppercase' } );\n\n\t\tsx.optimalTextColor = null;\n\n\t\tif ( optimizeReadabilityFor ) {\n\t\t\tconst isOptimalTextColorDark =\n\t\t\t\tgetOptimalTextShade( optimizeReadabilityFor ) === 'dark';\n\n\t\t\tsx.optimalTextColor = isOptimalTextColorDark\n\t\t\t\t? css( { color: COLORS.gray[ 900 ] } )\n\t\t\t\t: css( { color: COLORS.white } );\n\t\t}\n\n\t\treturn cx(\n\t\t\tstyles.Text,\n\t\t\tsx.Base,\n\t\t\tsx.optimalTextColor,\n\t\t\tisDestructive && styles.destructive,\n\t\t\t!! isHighlighter && styles.highlighterText,\n\t\t\tisBlock && styles.block,\n\t\t\tisCaption && styles.muted,\n\t\t\tvariant && styles[ variant ],\n\t\t\tupperCase && sx.upperCase,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tadjustLineHeightForInnerControls,\n\t\talign,\n\t\tclassName,\n\t\tcolor,\n\t\tcx,\n\t\tdisplay,\n\t\tisBlock,\n\t\tisCaption,\n\t\tisDestructive,\n\t\tisHighlighter,\n\t\tletterSpacing,\n\t\tlineHeightProp,\n\t\toptimizeReadabilityFor,\n\t\tsize,\n\t\tupperCase,\n\t\tvariant,\n\t\tweight,\n\t] );\n\n\t/** @type {undefined | 'auto' | 'none'} */\n\tlet finalEllipsizeMode;\n\tif ( truncate === true ) {\n\t\tfinalEllipsizeMode = 'auto';\n\t}\n\tif ( truncate === false ) {\n\t\tfinalEllipsizeMode = 'none';\n\t}\n\n\tconst finalComponentProps = {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tchildren,\n\t\tellipsizeMode: ellipsizeMode || finalEllipsizeMode,\n\t};\n\n\tconst truncateProps = useTruncate( finalComponentProps );\n\n\t/**\n\t * Enhance child `<Link />` components to inherit font size.\n\t */\n\tif ( ! truncate && Array.isArray( children ) ) {\n\t\tcontent = Children.map( children, ( child ) => {\n\t\t\tif (\n\t\t\t\ttypeof child !== 'object' ||\n\t\t\t\tchild === null ||\n\t\t\t\t! ( 'props' in child )\n\t\t\t) {\n\t\t\t\treturn child;\n\t\t\t}\n\n\t\t\tconst isLink = hasConnectNamespace( child, [ 'Link' ] );\n\t\t\tif ( isLink ) {\n\t\t\t\treturn cloneElement( child, {\n\t\t\t\t\tsize: child.props.size || 'inherit',\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn child;\n\t\t} );\n\t}\n\n\treturn {\n\t\t...truncateProps,\n\t\tchildren: truncate ? truncateProps.children : content,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Props } from './types';\nimport { space } from '../ui/utils/space';\nimport { CONFIG } from '../utils';\n\nexport function getLineHeight(\n\tadjustLineHeightForInnerControls: Props[ 'adjustLineHeightForInnerControls' ],\n\tlineHeight: CSSProperties[ 'lineHeight' ]\n) {\n\tif ( lineHeight ) return lineHeight;\n\n\tif ( ! adjustLineHeightForInnerControls ) return;\n\n\tlet value = `calc(${ CONFIG.controlHeight } + ${ space( 2 ) })`;\n\n\tswitch ( adjustLineHeightForInnerControls ) {\n\t\tcase 'large':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightLarge } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tcase 'small':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightSmall } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tcase 'xSmall':\n\t\t\tvalue = `calc(${ CONFIG.controlHeightXSmall } + ${ space( 2 ) })`;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\treturn value;\n}\n","/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport useText from './hook';\n\n/**\n * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'span'>} props\n * @param {import('react').ForwardedRef<any>}                                                forwardedRef\n */\nfunction Text( props, forwardedRef ) {\n\tconst textProps = useText( props );\n\n\treturn <View as=\"span\" { ...textProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Text` is a core component that renders text in the library, using the\n * library's typography system.\n *\n * `Text` can be used to render any text-content, like an HTML `p` or `span`.\n *\n * @example\n *\n * ```jsx\n * import { __experimentalText as Text } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn <Text>Code is Poetry</Text>;\n * }\n * ```\n */\nconst ConnectedText = contextConnect( Text, 'Text' );\n\nexport default ConnectedText;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n// This is a very low-level mixin which you shouldn't have to use directly.\n// Try to use BaseControl's StyledLabel or BaseControl.VisualLabel if you can.\nexport const baseLabelTypography = css`\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\ttext-transform: uppercase;\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\nconst LOWER_LEFT_REGEXP = new RegExp( /-left/g );\nconst LOWER_RIGHT_REGEXP = new RegExp( /-right/g );\nconst UPPER_LEFT_REGEXP = new RegExp( /Left/g );\nconst UPPER_RIGHT_REGEXP = new RegExp( /Right/g );\n\n/**\n * Flips a CSS property from left <-> right.\n *\n * @param {string} key The CSS property name.\n *\n * @return {string} The flipped CSS property name, if applicable.\n */\nfunction getConvertedKey( key ) {\n\tif ( key === 'left' ) {\n\t\treturn 'right';\n\t}\n\n\tif ( key === 'right' ) {\n\t\treturn 'left';\n\t}\n\n\tif ( LOWER_LEFT_REGEXP.test( key ) ) {\n\t\treturn key.replace( LOWER_LEFT_REGEXP, '-right' );\n\t}\n\n\tif ( LOWER_RIGHT_REGEXP.test( key ) ) {\n\t\treturn key.replace( LOWER_RIGHT_REGEXP, '-left' );\n\t}\n\n\tif ( UPPER_LEFT_REGEXP.test( key ) ) {\n\t\treturn key.replace( UPPER_LEFT_REGEXP, 'Right' );\n\t}\n\n\tif ( UPPER_RIGHT_REGEXP.test( key ) ) {\n\t\treturn key.replace( UPPER_RIGHT_REGEXP, 'Left' );\n\t}\n\n\treturn key;\n}\n\n/**\n * An incredibly basic ltr -> rtl converter for style properties\n *\n * @param {import('react').CSSProperties} ltrStyles\n *\n * @return {import('react').CSSProperties} Converted ltr -> rtl styles\n */\nexport const convertLTRToRTL = ( ltrStyles = {} ) => {\n\treturn Object.fromEntries(\n\t\tObject.entries( ltrStyles ).map( ( [ key, value ] ) => [\n\t\t\tgetConvertedKey( key ),\n\t\t\tvalue,\n\t\t] )\n\t);\n};\n\n/**\n * A higher-order function that create an incredibly basic ltr -> rtl style converter for CSS objects.\n *\n * @param {import('react').CSSProperties} ltrStyles   Ltr styles. Converts and renders from ltr -> rtl styles, if applicable.\n * @param {import('react').CSSProperties} [rtlStyles] Rtl styles. Renders if provided.\n *\n * @return {() => import('@emotion/react').SerializedStyles} A function to output CSS styles for Emotion's renderer\n */\nexport function rtl( ltrStyles = {}, rtlStyles ) {\n\treturn () => {\n\t\tif ( rtlStyles ) {\n\t\t\t// @ts-ignore: `css` types are wrong, it can accept an object: https://emotion.sh/docs/object-styles#with-css\n\t\t\treturn isRTL() ? css( rtlStyles ) : css( ltrStyles );\n\t\t}\n\n\t\t// @ts-ignore: `css` types are wrong, it can accept an object: https://emotion.sh/docs/object-styles#with-css\n\t\treturn isRTL() ? css( convertLTRToRTL( ltrStyles ) ) : css( ltrStyles );\n\t};\n}\n\n/**\n * Call this in the `useMemo` dependency array to ensure that subsequent renders will\n * cause rtl styles to update based on the `isRTL` return value even if all other dependencies\n * remain the same.\n *\n * @example\n * const styles = useMemo( () => {\n *   return css`\n *     ${ rtl( { marginRight: '10px' } ) }\n *   `;\n * }, [ rtl.watch() ] );\n */\nrtl.watch = () => isRTL();\n","/**\n * External dependencies\n */\nimport { css, SerializedStyles } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\nimport { space } from '../../ui/utils/space';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\ntype RootProps = {\n\tisFocused?: boolean;\n\tlabelPosition?: LabelPosition;\n};\n\nconst rootFocusedStyles = ( { isFocused }: RootProps ) => {\n\tif ( ! isFocused ) return '';\n\n\treturn css( { zIndex: 1 } );\n};\n\nexport const Root = styled( Flex )< RootProps >`\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\t${ rootFocusedStyles }\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) return css( { width: '100%' } );\n\n\tif ( labelPosition === 'side' ) return '';\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next36pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) return '';\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nconst fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) return '';\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next36pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 36,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 36,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t};\n\n\tif ( ! __next36pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\theight: 30,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 30,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t};\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisFocused?: boolean;\n};\n\nconst backdropFocusedStyles = ( {\n\tdisabled,\n\tisFocused,\n}: BackdropProps ): SerializedStyles => {\n\tlet borderColor = isFocused ? COLORS.ui.borderFocus : COLORS.ui.border;\n\n\tlet boxShadow;\n\n\tif ( isFocused ) {\n\t\tboxShadow = `0 0 0 1px ${ COLORS.ui.borderFocus } inset`;\n\t}\n\n\tif ( disabled ) {\n\t\tborderColor = COLORS.ui.borderDisabled;\n\t}\n\n\treturn css( {\n\t\tboxShadow,\n\t\tborderColor,\n\t\tborderStyle: 'solid',\n\t\tborderWidth: 1,\n\t} );\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-radius: inherit;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ backdropFocusedStyles }\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n","/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { BackdropUI } from './styles/input-control-styles';\n\nfunction Backdrop( { disabled = false, isFocused = false } ) {\n\treturn (\n\t\t<BackdropUI\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-input-control__backdrop\"\n\t\t\tdisabled={ disabled }\n\t\t\tisFocused={ isFocused }\n\t\t/>\n\t);\n}\n\nconst MemoizedBackdrop = memo( Backdrop );\n\nexport default MemoizedBackdrop;\n","/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport {\n\tLabel as BaseLabel,\n\tLabelWrapper,\n} from './styles/input-control-styles';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { InputControlLabelProps } from './types';\n\nexport default function Label( {\n\tchildren,\n\thideLabelFromVision,\n\thtmlFor,\n\t...props\n}: WordPressComponentProps< InputControlLabelProps, 'label', false > ) {\n\tif ( ! children ) return null;\n\n\tif ( hideLabelFromVision ) {\n\t\treturn (\n\t\t\t<VisuallyHidden as=\"label\" htmlFor={ htmlFor }>\n\t\t\t\t{ children }\n\t\t\t</VisuallyHidden>\n\t\t);\n\t}\n\n\treturn (\n\t\t<LabelWrapper>\n\t\t\t<BaseLabel htmlFor={ htmlFor } { ...props }>\n\t\t\t\t{ children }\n\t\t\t</BaseLabel>\n\t\t</LabelWrapper>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport {\n\tContainer,\n\tRoot,\n\tPrefix,\n\tSuffix,\n\tgetSizeConfig,\n} from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\nimport { ContextSystemProvider } from '../ui/context';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex compopnent.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: { direction?: string; gap?: number; justify?: string } = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nexport function InputBase(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisFocused = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...props\n\t}: InputBaseProps,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\tconst { paddingLeft, paddingRight } = getSizeConfig( {\n\t\tinputSize: size,\n\t\t__next36pxDefaultSize,\n\t} );\n\tconst prefixSuffixContextValue = useMemo( () => {\n\t\treturn {\n\t\t\tInputControlPrefixWrapper: { paddingLeft },\n\t\t\tInputControlSuffixWrapper: { paddingRight },\n\t\t};\n\t}, [ paddingLeft, paddingRight ] );\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tgap={ 2 }\n\t\t\tisFocused={ isFocused }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Label\n\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\thtmlFor={ id }\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Label>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t<ContextSystemProvider value={ prefixSuffixContextValue }>\n\t\t\t\t\t{ prefix && (\n\t\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t\t</Prefix>\n\t\t\t\t\t) }\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ suffix && (\n\t\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</Suffix>\n\t\t\t\t\t) }\n\t\t\t\t</ContextSystemProvider>\n\t\t\t\t<Backdrop disabled={ disabled } isFocused={ isFocused } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\nexport default forwardRef( InputBase );\n","function clamp(v, min, max) {\n  return Math.max(min, Math.min(v, max));\n}\nconst V = {\n  toVector(v, fallback) {\n    if (v === undefined) v = fallback;\n    return Array.isArray(v) ? v : [v, v];\n  },\n\n  add(v1, v2) {\n    return [v1[0] + v2[0], v1[1] + v2[1]];\n  },\n\n  sub(v1, v2) {\n    return [v1[0] - v2[0], v1[1] - v2[1]];\n  },\n\n  addTo(v1, v2) {\n    v1[0] += v2[0];\n    v1[1] += v2[1];\n  },\n\n  subTo(v1, v2) {\n    v1[0] -= v2[0];\n    v1[1] -= v2[1];\n  }\n\n};\n\nfunction rubberband(distance, dimension, constant) {\n  if (dimension === 0 || Math.abs(dimension) === Infinity) return Math.pow(distance, constant * 5);\n  return distance * dimension * constant / (dimension + constant * distance);\n}\n\nfunction rubberbandIfOutOfBounds(position, min, max, constant = 0.15) {\n  if (constant === 0) return clamp(position, min, max);\n  if (position < min) return -rubberband(min - position, max - min, constant) + min;\n  if (position > max) return +rubberband(position - max, max - min, constant) + max;\n  return position;\n}\nfunction computeRubberband(bounds, [Vx, Vy], [Rx, Ry]) {\n  const [[X0, X1], [Y0, Y1]] = bounds;\n  return [rubberbandIfOutOfBounds(Vx, X0, X1, Rx), rubberbandIfOutOfBounds(Vy, Y0, Y1, Ry)];\n}\n\nexport { V, computeRubberband as c, rubberbandIfOutOfBounds as r };\n","import { V, c as computeRubberband } from './maths-b2a210f4.esm.js';\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n\n  return target;\n}\n\nconst EVENT_TYPE_MAP = {\n  pointer: {\n    start: 'down',\n    change: 'move',\n    end: 'up'\n  },\n  mouse: {\n    start: 'down',\n    change: 'move',\n    end: 'up'\n  },\n  touch: {\n    start: 'start',\n    change: 'move',\n    end: 'end'\n  },\n  gesture: {\n    start: 'start',\n    change: 'change',\n    end: 'end'\n  }\n};\n\nfunction capitalize(string) {\n  if (!string) return '';\n  return string[0].toUpperCase() + string.slice(1);\n}\n\nfunction toHandlerProp(device, action = '', capture = false) {\n  const deviceProps = EVENT_TYPE_MAP[device];\n  const actionKey = deviceProps ? deviceProps[action] || action : action;\n  return 'on' + capitalize(device) + capitalize(actionKey) + (capture ? 'Capture' : '');\n}\nconst pointerCaptureEvents = ['gotpointercapture', 'lostpointercapture'];\nfunction parseProp(prop) {\n  let eventKey = prop.substring(2).toLowerCase();\n  const passive = !!~eventKey.indexOf('passive');\n  if (passive) eventKey = eventKey.replace('passive', '');\n  const captureKey = pointerCaptureEvents.includes(eventKey) ? 'capturecapture' : 'capture';\n  const capture = !!~eventKey.indexOf(captureKey);\n  if (capture) eventKey = eventKey.replace('capture', '');\n  return {\n    device: eventKey,\n    capture,\n    passive\n  };\n}\nfunction toDomEventType(device, action = '') {\n  const deviceProps = EVENT_TYPE_MAP[device];\n  const actionKey = deviceProps ? deviceProps[action] || action : action;\n  return device + actionKey;\n}\nfunction isTouch(event) {\n  return 'touches' in event;\n}\n\nfunction getCurrentTargetTouchList(event) {\n  return Array.from(event.touches).filter(e => {\n    var _event$currentTarget, _event$currentTarget$;\n\n    return e.target === event.currentTarget || ((_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : (_event$currentTarget$ = _event$currentTarget.contains) === null || _event$currentTarget$ === void 0 ? void 0 : _event$currentTarget$.call(_event$currentTarget, e.target));\n  });\n}\n\nfunction getTouchList(event) {\n  return event.type === 'touchend' || event.type === 'touchcancel' ? event.changedTouches : event.targetTouches;\n}\n\nfunction getValueEvent(event) {\n  return isTouch(event) ? getTouchList(event)[0] : event;\n}\n\nfunction distanceAngle(P1, P2) {\n  const dx = P2.clientX - P1.clientX;\n  const dy = P2.clientY - P1.clientY;\n  const cx = (P2.clientX + P1.clientX) / 2;\n  const cy = (P2.clientY + P1.clientY) / 2;\n  const distance = Math.hypot(dx, dy);\n  const angle = -(Math.atan2(dx, dy) * 180) / Math.PI;\n  const origin = [cx, cy];\n  return {\n    angle,\n    distance,\n    origin\n  };\n}\nfunction touchIds(event) {\n  return getCurrentTargetTouchList(event).map(touch => touch.identifier);\n}\nfunction touchDistanceAngle(event, ids) {\n  const [P1, P2] = Array.from(event.touches).filter(touch => ids.includes(touch.identifier));\n  return distanceAngle(P1, P2);\n}\nfunction pointerId(event) {\n  const valueEvent = getValueEvent(event);\n  return isTouch(event) ? valueEvent.identifier : valueEvent.pointerId;\n}\nfunction pointerValues(event) {\n  const valueEvent = getValueEvent(event);\n  return [valueEvent.clientX, valueEvent.clientY];\n}\nconst LINE_HEIGHT = 40;\nconst PAGE_HEIGHT = 800;\nfunction wheelValues(event) {\n  let {\n    deltaX,\n    deltaY,\n    deltaMode\n  } = event;\n\n  if (deltaMode === 1) {\n    deltaX *= LINE_HEIGHT;\n    deltaY *= LINE_HEIGHT;\n  } else if (deltaMode === 2) {\n    deltaX *= PAGE_HEIGHT;\n    deltaY *= PAGE_HEIGHT;\n  }\n\n  return [deltaX, deltaY];\n}\nfunction scrollValues(event) {\n  var _ref, _ref2;\n\n  const {\n    scrollX,\n    scrollY,\n    scrollLeft,\n    scrollTop\n  } = event.currentTarget;\n  return [(_ref = scrollX !== null && scrollX !== void 0 ? scrollX : scrollLeft) !== null && _ref !== void 0 ? _ref : 0, (_ref2 = scrollY !== null && scrollY !== void 0 ? scrollY : scrollTop) !== null && _ref2 !== void 0 ? _ref2 : 0];\n}\nfunction getEventDetails(event) {\n  const payload = {};\n  if ('buttons' in event) payload.buttons = event.buttons;\n\n  if ('shiftKey' in event) {\n    const {\n      shiftKey,\n      altKey,\n      metaKey,\n      ctrlKey\n    } = event;\n    Object.assign(payload, {\n      shiftKey,\n      altKey,\n      metaKey,\n      ctrlKey\n    });\n  }\n\n  return payload;\n}\n\nfunction call(v, ...args) {\n  if (typeof v === 'function') {\n    return v(...args);\n  } else {\n    return v;\n  }\n}\nfunction noop() {}\nfunction chain(...fns) {\n  if (fns.length === 0) return noop;\n  if (fns.length === 1) return fns[0];\n  return function () {\n    let result;\n\n    for (const fn of fns) {\n      result = fn.apply(this, arguments) || result;\n    }\n\n    return result;\n  };\n}\nfunction assignDefault(value, fallback) {\n  return Object.assign({}, fallback, value || {});\n}\n\nconst BEFORE_LAST_KINEMATICS_DELAY = 32;\nclass Engine {\n  constructor(ctrl, args, key) {\n    this.ctrl = ctrl;\n    this.args = args;\n    this.key = key;\n\n    if (!this.state) {\n      this.state = {};\n      this.computeValues([0, 0]);\n      this.computeInitial();\n      if (this.init) this.init();\n      this.reset();\n    }\n  }\n\n  get state() {\n    return this.ctrl.state[this.key];\n  }\n\n  set state(state) {\n    this.ctrl.state[this.key] = state;\n  }\n\n  get shared() {\n    return this.ctrl.state.shared;\n  }\n\n  get eventStore() {\n    return this.ctrl.gestureEventStores[this.key];\n  }\n\n  get timeoutStore() {\n    return this.ctrl.gestureTimeoutStores[this.key];\n  }\n\n  get config() {\n    return this.ctrl.config[this.key];\n  }\n\n  get sharedConfig() {\n    return this.ctrl.config.shared;\n  }\n\n  get handler() {\n    return this.ctrl.handlers[this.key];\n  }\n\n  reset() {\n    const {\n      state,\n      shared,\n      ingKey,\n      args\n    } = this;\n    shared[ingKey] = state._active = state.active = state._blocked = state._force = false;\n    state._step = [false, false];\n    state.intentional = false;\n    state._movement = [0, 0];\n    state._distance = [0, 0];\n    state._direction = [0, 0];\n    state._delta = [0, 0];\n    state._bounds = [[-Infinity, Infinity], [-Infinity, Infinity]];\n    state.args = args;\n    state.axis = undefined;\n    state.memo = undefined;\n    state.elapsedTime = 0;\n    state.direction = [0, 0];\n    state.distance = [0, 0];\n    state.overflow = [0, 0];\n    state._movementBound = [false, false];\n    state.velocity = [0, 0];\n    state.movement = [0, 0];\n    state.delta = [0, 0];\n    state.timeStamp = 0;\n  }\n\n  start(event) {\n    const state = this.state;\n    const config = this.config;\n\n    if (!state._active) {\n      this.reset();\n      this.computeInitial();\n      state._active = true;\n      state.target = event.target;\n      state.currentTarget = event.currentTarget;\n      state.lastOffset = config.from ? call(config.from, state) : state.offset;\n      state.offset = state.lastOffset;\n    }\n\n    state.startTime = state.timeStamp = event.timeStamp;\n  }\n\n  computeValues(values) {\n    const state = this.state;\n    state._values = values;\n    state.values = this.config.transform(values);\n  }\n\n  computeInitial() {\n    const state = this.state;\n    state._initial = state._values;\n    state.initial = state.values;\n  }\n\n  compute(event) {\n    const {\n      state,\n      config,\n      shared\n    } = this;\n    state.args = this.args;\n    let dt = 0;\n\n    if (event) {\n      state.event = event;\n      if (config.preventDefault && event.cancelable) state.event.preventDefault();\n      state.type = event.type;\n      shared.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size;\n      shared.locked = !!document.pointerLockElement;\n      Object.assign(shared, getEventDetails(event));\n      shared.down = shared.pressed = shared.buttons % 2 === 1 || shared.touches > 0;\n      dt = event.timeStamp - state.timeStamp;\n      state.timeStamp = event.timeStamp;\n      state.elapsedTime = state.timeStamp - state.startTime;\n    }\n\n    if (state._active) {\n      const _absoluteDelta = state._delta.map(Math.abs);\n\n      V.addTo(state._distance, _absoluteDelta);\n    }\n\n    const [_m0, _m1] = state._movement;\n    const [t0, t1] = config.threshold;\n    const {\n      _step,\n      values\n    } = state;\n\n    if (config.hasCustomTransform) {\n      if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && values[0];\n      if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && values[1];\n    } else {\n      if (_step[0] === false) _step[0] = Math.abs(_m0) >= t0 && Math.sign(_m0) * t0;\n      if (_step[1] === false) _step[1] = Math.abs(_m1) >= t1 && Math.sign(_m1) * t1;\n    }\n\n    state.intentional = _step[0] !== false || _step[1] !== false;\n    if (!state.intentional) return;\n    const movement = [0, 0];\n\n    if (config.hasCustomTransform) {\n      const [v0, v1] = values;\n      movement[0] = _step[0] !== false ? v0 - _step[0] : 0;\n      movement[1] = _step[1] !== false ? v1 - _step[1] : 0;\n    } else {\n      movement[0] = _step[0] !== false ? _m0 - _step[0] : 0;\n      movement[1] = _step[1] !== false ? _m1 - _step[1] : 0;\n    }\n\n    if (this.intent) this.intent(movement);\n\n    if (state._active && !state._blocked || state.active) {\n      state.first = state._active && !state.active;\n      state.last = !state._active && state.active;\n      state.active = shared[this.ingKey] = state._active;\n\n      if (event) {\n        if (state.first) {\n          if ('bounds' in config) state._bounds = call(config.bounds, state);\n          if (this.setup) this.setup();\n        }\n\n        state.movement = movement;\n        const previousOffset = state.offset;\n        this.computeOffset();\n\n        if (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY) {\n          state.delta = V.sub(state.offset, previousOffset);\n          const absoluteDelta = state.delta.map(Math.abs);\n          V.addTo(state.distance, absoluteDelta);\n          state.direction = state.delta.map(Math.sign);\n          state._direction = state._delta.map(Math.sign);\n\n          if (!state.first && dt > 0) {\n            state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt];\n          }\n        }\n      }\n    }\n\n    const [ox, oy] = state.offset;\n    const [[x0, x1], [y0, y1]] = state._bounds;\n    state.overflow = [ox < x0 ? -1 : ox > x1 ? 1 : 0, oy < y0 ? -1 : oy > y1 ? 1 : 0];\n    state._movementBound[0] = state.overflow[0] ? state._movementBound[0] === false ? state._movement[0] : state._movementBound[0] : false;\n    state._movementBound[1] = state.overflow[1] ? state._movementBound[1] === false ? state._movement[1] : state._movementBound[1] : false;\n    const rubberband = state._active ? config.rubberband || [0, 0] : [0, 0];\n    state.offset = computeRubberband(state._bounds, state.offset, rubberband);\n    this.computeMovement();\n  }\n\n  emit() {\n    const state = this.state;\n    const shared = this.shared;\n    const config = this.config;\n    if (!state._active) this.clean();\n    if ((state._blocked || !state.intentional) && !state._force && !config.triggerAllEvents) return;\n    const memo = this.handler(_objectSpread2(_objectSpread2(_objectSpread2({}, shared), state), {}, {\n      [this.aliasKey]: state.values\n    }));\n    if (memo !== undefined) state.memo = memo;\n  }\n\n  clean() {\n    this.eventStore.clean();\n    this.timeoutStore.clean();\n  }\n\n}\n\nfunction selectAxis([dx, dy]) {\n  const d = Math.abs(dx) - Math.abs(dy);\n  if (d > 0) return 'x';\n  if (d < 0) return 'y';\n  return undefined;\n}\n\nfunction restrictVectorToAxis(v, axis) {\n  switch (axis) {\n    case 'x':\n      v[1] = 0;\n      break;\n\n    case 'y':\n      v[0] = 0;\n      break;\n  }\n}\n\nclass CoordinatesEngine extends Engine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"aliasKey\", 'xy');\n  }\n\n  reset() {\n    super.reset();\n    this.state.axis = undefined;\n  }\n\n  init() {\n    this.state.offset = [0, 0];\n    this.state.lastOffset = [0, 0];\n  }\n\n  computeOffset() {\n    this.state.offset = V.add(this.state.lastOffset, this.state.movement);\n  }\n\n  computeMovement() {\n    this.state.movement = V.sub(this.state.offset, this.state.lastOffset);\n  }\n\n  intent(v) {\n    this.state.axis = this.state.axis || selectAxis(v);\n    this.state._blocked = (this.config.lockDirection || !!this.config.axis) && !this.state.axis || !!this.config.axis && this.config.axis !== this.state.axis;\n    if (this.state._blocked) return;\n\n    if (this.config.axis || this.config.lockDirection) {\n      restrictVectorToAxis(v, this.state.axis);\n    }\n  }\n\n}\n\nconst identity = v => v;\nconst DEFAULT_RUBBERBAND = 0.15;\nconst commonConfigResolver = {\n  enabled(value = true) {\n    return value;\n  },\n\n  preventDefault(value = false) {\n    return value;\n  },\n\n  triggerAllEvents(value = false) {\n    return value;\n  },\n\n  rubberband(value = 0) {\n    switch (value) {\n      case true:\n        return [DEFAULT_RUBBERBAND, DEFAULT_RUBBERBAND];\n\n      case false:\n        return [0, 0];\n\n      default:\n        return V.toVector(value);\n    }\n  },\n\n  from(value) {\n    if (typeof value === 'function') return value;\n    if (value != null) return V.toVector(value);\n  },\n\n  transform(value, _k, config) {\n    const transform = value || config.shared.transform;\n    this.hasCustomTransform = !!transform;\n\n    if (process.env.NODE_ENV === 'development') {\n      const originalTransform = transform || identity;\n      return v => {\n        const r = originalTransform(v);\n\n        if (!isFinite(r[0]) || !isFinite(r[1])) {\n          console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${r[0]},${[1]}]`);\n        }\n\n        return r;\n      };\n    }\n\n    return transform || identity;\n  },\n\n  threshold(value) {\n    return V.toVector(value, 0);\n  }\n\n};\n\nif (process.env.NODE_ENV === 'development') {\n  Object.assign(commonConfigResolver, {\n    domTarget(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`domTarget\\` option has been renamed to \\`target\\`.`);\n      }\n\n      return NaN;\n    },\n\n    lockDirection(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`lockDirection\\` option has been merged with \\`axis\\`. Use it as in \\`{ axis: 'lock' }\\``);\n      }\n\n      return NaN;\n    },\n\n    initial(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`initial\\` option has been renamed to \\`from\\`.`);\n      }\n\n      return NaN;\n    }\n\n  });\n}\n\nconst coordinatesConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {\n  axis(_v, _k, {\n    axis\n  }) {\n    this.lockDirection = axis === 'lock';\n    if (!this.lockDirection) return axis;\n  },\n\n  bounds(value = {}) {\n    if (typeof value === 'function') {\n      return state => coordinatesConfigResolver.bounds(value(state));\n    }\n\n    if ('current' in value) {\n      return () => value.current;\n    }\n\n    if (typeof HTMLElement === 'function' && value instanceof HTMLElement) {\n      return value;\n    }\n\n    const {\n      left = -Infinity,\n      right = Infinity,\n      top = -Infinity,\n      bottom = Infinity\n    } = value;\n    return [[left, right], [top, bottom]];\n  }\n\n});\n\nconst DISPLACEMENT = 10;\nconst KEYS_DELTA_MAP = {\n  ArrowRight: (factor = 1) => [DISPLACEMENT * factor, 0],\n  ArrowLeft: (factor = 1) => [-DISPLACEMENT * factor, 0],\n  ArrowUp: (factor = 1) => [0, -DISPLACEMENT * factor],\n  ArrowDown: (factor = 1) => [0, DISPLACEMENT * factor]\n};\nclass DragEngine extends CoordinatesEngine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'dragging');\n  }\n\n  reset() {\n    super.reset();\n    const state = this.state;\n    state._pointerId = undefined;\n    state._pointerActive = false;\n    state._keyboardActive = false;\n    state._preventScroll = false;\n    state._delayed = false;\n    state.swipe = [0, 0];\n    state.tap = false;\n    state.canceled = false;\n    state.cancel = this.cancel.bind(this);\n  }\n\n  setup() {\n    const state = this.state;\n\n    if (state._bounds instanceof HTMLElement) {\n      const boundRect = state._bounds.getBoundingClientRect();\n\n      const targetRect = state.currentTarget.getBoundingClientRect();\n      const _bounds = {\n        left: boundRect.left - targetRect.left + state.offset[0],\n        right: boundRect.right - targetRect.right + state.offset[0],\n        top: boundRect.top - targetRect.top + state.offset[1],\n        bottom: boundRect.bottom - targetRect.bottom + state.offset[1]\n      };\n      state._bounds = coordinatesConfigResolver.bounds(_bounds);\n    }\n  }\n\n  cancel() {\n    const state = this.state;\n    if (state.canceled) return;\n    state.canceled = true;\n    state._active = false;\n    setTimeout(() => {\n      this.compute();\n      this.emit();\n    }, 0);\n  }\n\n  setActive() {\n    this.state._active = this.state._pointerActive || this.state._keyboardActive;\n  }\n\n  clean() {\n    this.pointerClean();\n    this.state._pointerActive = false;\n    this.state._keyboardActive = false;\n    super.clean();\n  }\n\n  pointerDown(event) {\n    const config = this.config;\n    const state = this.state;\n    if (event.buttons != null && (Array.isArray(config.pointerButtons) ? !config.pointerButtons.includes(event.buttons) : config.pointerButtons !== -1 && config.pointerButtons !== event.buttons)) return;\n    this.ctrl.setEventIds(event);\n\n    if (config.pointerCapture) {\n      event.target.setPointerCapture(event.pointerId);\n    }\n\n    if (state._pointerActive) return;\n    this.start(event);\n    this.setupPointer(event);\n    state._pointerId = pointerId(event);\n    state._pointerActive = true;\n    this.computeValues(pointerValues(event));\n    this.computeInitial();\n\n    if (config.preventScroll) {\n      this.setupScrollPrevention(event);\n    } else if (config.delay > 0) {\n      this.setupDelayTrigger(event);\n    } else {\n      this.startPointerDrag(event);\n    }\n  }\n\n  startPointerDrag(event) {\n    const state = this.state;\n    state._active = true;\n    state._preventScroll = true;\n    state._delayed = false;\n    this.compute(event);\n    this.emit();\n  }\n\n  pointerMove(event) {\n    const state = this.state;\n    const config = this.config;\n    if (!state._pointerActive) return;\n    if (state.type === event.type && event.timeStamp === state.timeStamp) return;\n    const id = pointerId(event);\n    if (state._pointerId && id !== state._pointerId) return;\n\n    const _values = pointerValues(event);\n\n    if (document.pointerLockElement === event.target) {\n      state._delta = [event.movementX, event.movementY];\n    } else {\n      state._delta = V.sub(_values, state._values);\n      this.computeValues(_values);\n    }\n\n    V.addTo(state._movement, state._delta);\n    this.compute(event);\n\n    if (state._delayed) {\n      this.timeoutStore.remove('dragDelay');\n      state.active = false;\n      this.startPointerDrag(event);\n      return;\n    }\n\n    if (config.preventScroll && !state._preventScroll) {\n      if (state.axis) {\n        if (state.axis === config.preventScrollAxis || config.preventScrollAxis === 'xy') {\n          state._active = false;\n          this.clean();\n          return;\n        } else {\n          this.timeoutStore.remove('startPointerDrag');\n          this.startPointerDrag(event);\n          return;\n        }\n      } else {\n        return;\n      }\n    }\n\n    this.emit();\n  }\n\n  pointerUp(event) {\n    this.ctrl.setEventIds(event);\n\n    try {\n      if (this.config.pointerCapture && event.target.hasPointerCapture(event.pointerId)) {\n        ;\n        event.target.releasePointerCapture(event.pointerId);\n      }\n    } catch (_unused) {\n      if (process.env.NODE_ENV === 'development') {\n        console.warn(`[@use-gesture]: If you see this message, it's likely that you're using an outdated version of \\`@react-three/fiber\\`. \\n\\nPlease upgrade to the latest version.`);\n      }\n    }\n\n    const state = this.state;\n    const config = this.config;\n    if (!state._pointerActive) return;\n    const id = pointerId(event);\n    if (state._pointerId && id !== state._pointerId) return;\n    this.state._pointerActive = false;\n    this.setActive();\n    this.compute(event);\n    const [dx, dy] = state._distance;\n    state.tap = dx <= config.tapsThreshold && dy <= config.tapsThreshold;\n\n    if (state.tap && config.filterTaps) {\n      state._force = true;\n    } else {\n      const [dirx, diry] = state.direction;\n      const [vx, vy] = state.velocity;\n      const [mx, my] = state.movement;\n      const [svx, svy] = config.swipe.velocity;\n      const [sx, sy] = config.swipe.distance;\n      const sdt = config.swipe.duration;\n\n      if (state.elapsedTime < sdt) {\n        if (Math.abs(vx) > svx && Math.abs(mx) > sx) state.swipe[0] = dirx;\n        if (Math.abs(vy) > svy && Math.abs(my) > sy) state.swipe[1] = diry;\n      }\n    }\n\n    this.emit();\n  }\n\n  pointerClick(event) {\n    if (!this.state.tap) {\n      event.preventDefault();\n      event.stopPropagation();\n    }\n  }\n\n  setupPointer(event) {\n    const config = this.config;\n    let device = config.device;\n\n    if (process.env.NODE_ENV === 'development') {\n      try {\n        if (device === 'pointer') {\n          const currentTarget = 'uv' in event ? event.sourceEvent.currentTarget : event.currentTarget;\n          const style = window.getComputedStyle(currentTarget);\n\n          if (style.touchAction === 'auto') {\n            console.warn(`[@use-gesture]: The drag target has its \\`touch-action\\` style property set to \\`auto\\`. It is recommended to add \\`touch-action: 'none'\\` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\\n\\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.`, currentTarget);\n          }\n        }\n      } catch (_unused2) {}\n    }\n\n    if (config.pointerLock) {\n      event.currentTarget.requestPointerLock();\n    }\n\n    if (!config.pointerCapture) {\n      this.eventStore.add(this.sharedConfig.window, device, 'change', this.pointerMove.bind(this));\n      this.eventStore.add(this.sharedConfig.window, device, 'end', this.pointerUp.bind(this));\n      this.eventStore.add(this.sharedConfig.window, device, 'cancel', this.pointerUp.bind(this));\n    }\n  }\n\n  pointerClean() {\n    if (this.config.pointerLock && document.pointerLockElement === this.state.currentTarget) {\n      document.exitPointerLock();\n    }\n  }\n\n  preventScroll(event) {\n    if (this.state._preventScroll && event.cancelable) {\n      event.preventDefault();\n    }\n  }\n\n  setupScrollPrevention(event) {\n    persistEvent(event);\n    this.eventStore.add(this.sharedConfig.window, 'touch', 'change', this.preventScroll.bind(this), {\n      passive: false\n    });\n    this.eventStore.add(this.sharedConfig.window, 'touch', 'end', this.clean.bind(this), {\n      passive: false\n    });\n    this.eventStore.add(this.sharedConfig.window, 'touch', 'cancel', this.clean.bind(this), {\n      passive: false\n    });\n    this.timeoutStore.add('startPointerDrag', this.startPointerDrag.bind(this), this.config.preventScroll, event);\n  }\n\n  setupDelayTrigger(event) {\n    this.state._delayed = true;\n    this.timeoutStore.add('dragDelay', this.startPointerDrag.bind(this), this.config.delay, event);\n  }\n\n  keyDown(event) {\n    const deltaFn = KEYS_DELTA_MAP[event.key];\n\n    if (deltaFn) {\n      const state = this.state;\n      const factor = event.shiftKey ? 10 : event.altKey ? 0.1 : 1;\n      state._delta = deltaFn(factor);\n      this.start(event);\n      state._keyboardActive = true;\n      V.addTo(state._movement, state._delta);\n      this.compute(event);\n      this.emit();\n    }\n  }\n\n  keyUp(event) {\n    if (!(event.key in KEYS_DELTA_MAP)) return;\n    this.state._keyboardActive = false;\n    this.setActive();\n    this.compute(event);\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    const device = this.config.device;\n    bindFunction(device, 'start', this.pointerDown.bind(this));\n\n    if (this.config.pointerCapture) {\n      bindFunction(device, 'change', this.pointerMove.bind(this));\n      bindFunction(device, 'end', this.pointerUp.bind(this));\n      bindFunction(device, 'cancel', this.pointerUp.bind(this));\n      bindFunction('lostPointerCapture', '', this.pointerUp.bind(this));\n    }\n\n    bindFunction('key', 'down', this.keyDown.bind(this));\n    bindFunction('key', 'up', this.keyUp.bind(this));\n\n    if (this.config.filterTaps) {\n      bindFunction('click', '', this.pointerClick.bind(this), {\n        capture: true,\n        passive: false\n      });\n    }\n  }\n\n}\n\nfunction persistEvent(event) {\n  'persist' in event && typeof event.persist === 'function' && event.persist();\n}\n\nconst isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement;\n\nfunction supportsTouchEvents() {\n  return isBrowser && 'ontouchstart' in window;\n}\n\nfunction isTouchScreen() {\n  return supportsTouchEvents() || isBrowser && window.navigator.maxTouchPoints > 1;\n}\n\nfunction supportsPointerEvents() {\n  return isBrowser && 'onpointerdown' in window;\n}\n\nfunction supportsPointerLock() {\n  return isBrowser && 'exitPointerLock' in window.document;\n}\n\nfunction supportsGestureEvents() {\n  try {\n    return 'constructor' in GestureEvent;\n  } catch (e) {\n    return false;\n  }\n}\n\nconst SUPPORT = {\n  isBrowser,\n  gesture: supportsGestureEvents(),\n  touch: isTouchScreen(),\n  touchscreen: isTouchScreen(),\n  pointer: supportsPointerEvents(),\n  pointerLock: supportsPointerLock()\n};\n\nconst DEFAULT_PREVENT_SCROLL_DELAY = 250;\nconst DEFAULT_DRAG_DELAY = 180;\nconst DEFAULT_SWIPE_VELOCITY = 0.5;\nconst DEFAULT_SWIPE_DISTANCE = 50;\nconst DEFAULT_SWIPE_DURATION = 250;\nconst dragConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n  pointerLock(_v, _k, {\n    pointer: {\n      lock = false,\n      touch = false\n    } = {}\n  }) {\n    this.useTouch = touch && SUPPORT.touch;\n    return lock && SUPPORT.pointerLock;\n  },\n\n  device(_v, _k) {\n    if (this.useTouch) return 'touch';\n    if (this.pointerLock) return 'mouse';\n    if (SUPPORT.pointer) return 'pointer';\n    if (SUPPORT.touch) return 'touch';\n    return 'mouse';\n  },\n\n  preventScroll(value = false, _k, {\n    preventScrollAxis = 'y'\n  }) {\n    if (preventScrollAxis) this.preventScrollAxis = preventScrollAxis;\n    if (!SUPPORT.touchscreen) return false;\n    if (typeof value === 'number') return value;\n    return value ? DEFAULT_PREVENT_SCROLL_DELAY : false;\n  },\n\n  pointerCapture(_v, _k, {\n    pointer: {\n      capture = true,\n      buttons = 1\n    } = {}\n  }) {\n    this.pointerButtons = buttons;\n    return !this.pointerLock && this.device === 'pointer' && capture;\n  },\n\n  threshold(value, _k, {\n    filterTaps = false,\n    tapsThreshold = 3,\n    axis = undefined\n  }) {\n    const threshold = V.toVector(value, filterTaps ? tapsThreshold : axis ? 1 : 0);\n    this.filterTaps = filterTaps;\n    this.tapsThreshold = tapsThreshold;\n    return threshold;\n  },\n\n  swipe({\n    velocity = DEFAULT_SWIPE_VELOCITY,\n    distance = DEFAULT_SWIPE_DISTANCE,\n    duration = DEFAULT_SWIPE_DURATION\n  } = {}) {\n    return {\n      velocity: this.transform(V.toVector(velocity)),\n      distance: this.transform(V.toVector(distance)),\n      duration\n    };\n  },\n\n  delay(value = 0) {\n    switch (value) {\n      case true:\n        return DEFAULT_DRAG_DELAY;\n\n      case false:\n        return 0;\n\n      default:\n        return value;\n    }\n  }\n\n});\n\nif (process.env.NODE_ENV === 'development') {\n  Object.assign(dragConfigResolver, {\n    useTouch(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`useTouch\\` option has been renamed to \\`pointer.touch\\`. Use it as in \\`{ pointer: { touch: true } }\\`.`);\n      }\n\n      return NaN;\n    },\n\n    experimental_preventWindowScrollY(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`experimental_preventWindowScrollY\\` option has been renamed to \\`preventScroll\\`.`);\n      }\n\n      return NaN;\n    },\n\n    swipeVelocity(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`swipeVelocity\\` option has been renamed to \\`swipe.velocity\\`. Use it as in \\`{ swipe: { velocity: 0.5 } }\\`.`);\n      }\n\n      return NaN;\n    },\n\n    swipeDistance(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`swipeDistance\\` option has been renamed to \\`swipe.distance\\`. Use it as in \\`{ swipe: { distance: 50 } }\\`.`);\n      }\n\n      return NaN;\n    },\n\n    swipeDuration(value) {\n      if (value !== undefined) {\n        throw Error(`[@use-gesture]: \\`swipeDuration\\` option has been renamed to \\`swipe.duration\\`. Use it as in \\`{ swipe: { duration: 250 } }\\`.`);\n      }\n\n      return NaN;\n    }\n\n  });\n}\n\nconst SCALE_ANGLE_RATIO_INTENT_DEG = 30;\nconst PINCH_WHEEL_RATIO = 36;\nclass PinchEngine extends Engine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'pinching');\n\n    _defineProperty(this, \"aliasKey\", 'da');\n  }\n\n  init() {\n    this.state.offset = [1, 0];\n    this.state.lastOffset = [1, 0];\n    this.state._pointerEvents = new Map();\n  }\n\n  reset() {\n    super.reset();\n    const state = this.state;\n    state._touchIds = [];\n    state.canceled = false;\n    state.cancel = this.cancel.bind(this);\n    state.turns = 0;\n  }\n\n  computeOffset() {\n    const {\n      type,\n      movement,\n      lastOffset\n    } = this.state;\n\n    if (type === 'wheel') {\n      this.state.offset = V.add(movement, lastOffset);\n    } else {\n      this.state.offset = [(1 + movement[0]) * lastOffset[0], movement[1] + lastOffset[1]];\n    }\n  }\n\n  computeMovement() {\n    const {\n      offset,\n      lastOffset\n    } = this.state;\n    this.state.movement = [offset[0] / lastOffset[0], offset[1] - lastOffset[1]];\n  }\n\n  intent(v) {\n    const state = this.state;\n\n    if (!state.axis) {\n      const axisMovementDifference = Math.abs(v[0]) * SCALE_ANGLE_RATIO_INTENT_DEG - Math.abs(v[1]);\n      if (axisMovementDifference < 0) state.axis = 'angle';else if (axisMovementDifference > 0) state.axis = 'scale';\n    }\n\n    if (this.config.lockDirection) {\n      if (state.axis === 'scale') v[1] = 0;else if (state.axis === 'angle') v[0] = 0;\n    }\n  }\n\n  cancel() {\n    const state = this.state;\n    if (state.canceled) return;\n    setTimeout(() => {\n      state.canceled = true;\n      state._active = false;\n      this.compute();\n      this.emit();\n    }, 0);\n  }\n\n  touchStart(event) {\n    this.ctrl.setEventIds(event);\n    const state = this.state;\n    const ctrlTouchIds = this.ctrl.touchIds;\n\n    if (state._active) {\n      if (state._touchIds.every(id => ctrlTouchIds.has(id))) return;\n    }\n\n    if (ctrlTouchIds.size < 2) return;\n    this.start(event);\n    state._touchIds = Array.from(ctrlTouchIds).slice(0, 2);\n    const payload = touchDistanceAngle(event, state._touchIds);\n    this.pinchStart(event, payload);\n  }\n\n  pointerStart(event) {\n    if (event.buttons != null && event.buttons % 2 !== 1) return;\n    this.ctrl.setEventIds(event);\n    event.target.setPointerCapture(event.pointerId);\n    const state = this.state;\n    const _pointerEvents = state._pointerEvents;\n    const ctrlPointerIds = this.ctrl.pointerIds;\n\n    if (state._active) {\n      if (Array.from(_pointerEvents.keys()).every(id => ctrlPointerIds.has(id))) return;\n    }\n\n    if (_pointerEvents.size < 2) {\n      _pointerEvents.set(event.pointerId, event);\n    }\n\n    if (state._pointerEvents.size < 2) return;\n    this.start(event);\n    const payload = distanceAngle(...Array.from(_pointerEvents.values()));\n    this.pinchStart(event, payload);\n  }\n\n  pinchStart(event, payload) {\n    const state = this.state;\n    state.origin = payload.origin;\n    this.computeValues([payload.distance, payload.angle]);\n    this.computeInitial();\n    this.compute(event);\n    this.emit();\n  }\n\n  touchMove(event) {\n    if (!this.state._active) return;\n    const payload = touchDistanceAngle(event, this.state._touchIds);\n    this.pinchMove(event, payload);\n  }\n\n  pointerMove(event) {\n    const _pointerEvents = this.state._pointerEvents;\n\n    if (_pointerEvents.has(event.pointerId)) {\n      _pointerEvents.set(event.pointerId, event);\n    }\n\n    if (!this.state._active) return;\n    const payload = distanceAngle(...Array.from(_pointerEvents.values()));\n    this.pinchMove(event, payload);\n  }\n\n  pinchMove(event, payload) {\n    const state = this.state;\n    const prev_a = state._values[1];\n    const delta_a = payload.angle - prev_a;\n    let delta_turns = 0;\n    if (Math.abs(delta_a) > 270) delta_turns += Math.sign(delta_a);\n    this.computeValues([payload.distance, payload.angle - 360 * delta_turns]);\n    state.origin = payload.origin;\n    state.turns = delta_turns;\n    state._movement = [state._values[0] / state._initial[0] - 1, state._values[1] - state._initial[1]];\n    this.compute(event);\n    this.emit();\n  }\n\n  touchEnd(event) {\n    this.ctrl.setEventIds(event);\n    if (!this.state._active) return;\n\n    if (this.state._touchIds.some(id => !this.ctrl.touchIds.has(id))) {\n      this.state._active = false;\n      this.compute(event);\n      this.emit();\n    }\n  }\n\n  pointerEnd(event) {\n    const state = this.state;\n    this.ctrl.setEventIds(event);\n\n    try {\n      event.target.releasePointerCapture(event.pointerId);\n    } catch (_unused) {}\n\n    if (state._pointerEvents.has(event.pointerId)) {\n      state._pointerEvents.delete(event.pointerId);\n    }\n\n    if (!state._active) return;\n\n    if (state._pointerEvents.size < 2) {\n      state._active = false;\n      this.compute(event);\n      this.emit();\n    }\n  }\n\n  gestureStart(event) {\n    if (event.cancelable) event.preventDefault();\n    const state = this.state;\n    if (state._active) return;\n    this.start(event);\n    this.computeValues([event.scale, event.rotation]);\n    state.origin = [event.clientX, event.clientY];\n    this.compute(event);\n    this.emit();\n  }\n\n  gestureMove(event) {\n    if (event.cancelable) event.preventDefault();\n    if (!this.state._active) return;\n    const state = this.state;\n    this.computeValues([event.scale, event.rotation]);\n    state.origin = [event.clientX, event.clientY];\n    const _previousMovement = state._movement;\n    state._movement = [event.scale - 1, event.rotation];\n    state._delta = V.sub(state._movement, _previousMovement);\n    this.compute(event);\n    this.emit();\n  }\n\n  gestureEnd(event) {\n    if (!this.state._active) return;\n    this.state._active = false;\n    this.compute(event);\n    this.emit();\n  }\n\n  wheel(event) {\n    if (!event.ctrlKey) return;\n    if (!this.state._active) this.wheelStart(event);else this.wheelChange(event);\n    this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this));\n  }\n\n  wheelStart(event) {\n    this.start(event);\n    this.wheelChange(event);\n  }\n\n  wheelChange(event) {\n    const isR3f = ('uv' in event);\n\n    if (!isR3f) {\n      if (event.cancelable) {\n        event.preventDefault();\n      }\n\n      if (process.env.NODE_ENV === 'development' && !event.defaultPrevented) {\n        console.warn(`[@use-gesture]: To properly support zoom on trackpads, try using the \\`target\\` option.\\n\\nThis message will only appear in development mode.`);\n      }\n    }\n\n    const state = this.state;\n    state._delta = [-wheelValues(event)[1] / PINCH_WHEEL_RATIO * state.offset[0], 0];\n    V.addTo(state._movement, state._delta);\n    this.state.origin = [event.clientX, event.clientY];\n    this.compute(event);\n    this.emit();\n  }\n\n  wheelEnd() {\n    if (!this.state._active) return;\n    this.state._active = false;\n    this.compute();\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    const device = this.config.device;\n\n    if (!!device) {\n      bindFunction(device, 'start', this[device + 'Start'].bind(this));\n      bindFunction(device, 'change', this[device + 'Move'].bind(this));\n      bindFunction(device, 'end', this[device + 'End'].bind(this));\n      bindFunction(device, 'cancel', this[device + 'End'].bind(this));\n    } else {\n      bindFunction('wheel', '', this.wheel.bind(this), {\n        passive: false\n      });\n    }\n  }\n\n}\n\nconst pinchConfigResolver = _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {\n  useTouch(_v, _k, {\n    pointer: {\n      touch = false\n    } = {}\n  }) {\n    return touch && SUPPORT.touch;\n  },\n\n  device(_v, _k, config) {\n    const sharedConfig = config.shared;\n    if (sharedConfig.target && !SUPPORT.touch && SUPPORT.gesture) return 'gesture';\n    if (this.useTouch) return 'touch';\n\n    if (SUPPORT.touchscreen) {\n      if (SUPPORT.pointer) return 'pointer';\n      if (SUPPORT.touch) return 'touch';\n    }\n  },\n\n  bounds(_v, _k, {\n    scaleBounds = {},\n    angleBounds = {}\n  }) {\n    const _scaleBounds = state => {\n      const D = assignDefault(call(scaleBounds, state), {\n        min: -Infinity,\n        max: Infinity\n      });\n      return [D.min, D.max];\n    };\n\n    const _angleBounds = state => {\n      const A = assignDefault(call(angleBounds, state), {\n        min: -Infinity,\n        max: Infinity\n      });\n      return [A.min, A.max];\n    };\n\n    if (typeof scaleBounds !== 'function' && typeof angleBounds !== 'function') return [_scaleBounds(), _angleBounds()];\n    return state => [_scaleBounds(state), _angleBounds(state)];\n  },\n\n  threshold(value, _k, config) {\n    this.lockDirection = config.axis === 'lock';\n    const threshold = V.toVector(value, this.lockDirection ? [0.1, 3] : 0);\n    return threshold;\n  }\n\n});\n\nclass MoveEngine extends CoordinatesEngine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'moving');\n  }\n\n  move(event) {\n    if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n    if (!this.state._active) this.moveStart(event);else this.moveChange(event);\n    this.timeoutStore.add('moveEnd', this.moveEnd.bind(this));\n  }\n\n  moveStart(event) {\n    this.start(event);\n    this.computeValues(pointerValues(event));\n    this.compute(event);\n    this.computeInitial();\n    this.emit();\n  }\n\n  moveChange(event) {\n    if (!this.state._active) return;\n    const values = pointerValues(event);\n    const state = this.state;\n    state._delta = V.sub(values, state._values);\n    V.addTo(state._movement, state._delta);\n    this.computeValues(values);\n    this.compute(event);\n    this.emit();\n  }\n\n  moveEnd(event) {\n    if (!this.state._active) return;\n    this.state._active = false;\n    this.compute(event);\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    bindFunction('pointer', 'change', this.move.bind(this));\n    bindFunction('pointer', 'leave', this.moveEnd.bind(this));\n  }\n\n}\n\nconst moveConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n  mouseOnly: (value = true) => value\n});\n\nclass ScrollEngine extends CoordinatesEngine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'scrolling');\n  }\n\n  scroll(event) {\n    if (!this.state._active) this.start(event);\n    this.scrollChange(event);\n    this.timeoutStore.add('scrollEnd', this.scrollEnd.bind(this));\n  }\n\n  scrollChange(event) {\n    if (event.cancelable) event.preventDefault();\n    const state = this.state;\n    const values = scrollValues(event);\n    state._delta = V.sub(values, state._values);\n    V.addTo(state._movement, state._delta);\n    this.computeValues(values);\n    this.compute(event);\n    this.emit();\n  }\n\n  scrollEnd() {\n    if (!this.state._active) return;\n    this.state._active = false;\n    this.compute();\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    bindFunction('scroll', '', this.scroll.bind(this));\n  }\n\n}\n\nconst scrollConfigResolver = coordinatesConfigResolver;\n\nclass WheelEngine extends CoordinatesEngine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'wheeling');\n  }\n\n  wheel(event) {\n    if (!this.state._active) this.start(event);\n    this.wheelChange(event);\n    this.timeoutStore.add('wheelEnd', this.wheelEnd.bind(this));\n  }\n\n  wheelChange(event) {\n    const state = this.state;\n    state._delta = wheelValues(event);\n    V.addTo(state._movement, state._delta);\n    const [ox, oy] = state.overflow;\n    const [dx, dy] = state._delta;\n    const [dirx, diry] = state._direction;\n\n    if (ox < 0 && dx > 0 && dirx < 0 || ox > 0 && dx < 0 && dirx > 0) {\n      state._movement[0] = state._movementBound[0];\n    }\n\n    if (oy < 0 && dy > 0 && diry < 0 || oy > 0 && dy < 0 && diry > 0) {\n      state._movement[1] = state._movementBound[1];\n    }\n\n    this.compute(event);\n    this.emit();\n  }\n\n  wheelEnd() {\n    if (!this.state._active) return;\n    this.state._active = false;\n    this.compute();\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    bindFunction('wheel', '', this.wheel.bind(this));\n  }\n\n}\n\nconst wheelConfigResolver = coordinatesConfigResolver;\n\nclass HoverEngine extends CoordinatesEngine {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"ingKey\", 'hovering');\n  }\n\n  enter(event) {\n    if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n    this.start(event);\n    this.computeValues(pointerValues(event));\n    this.compute(event);\n    this.emit();\n  }\n\n  leave(event) {\n    if (this.config.mouseOnly && event.pointerType !== 'mouse') return;\n    const state = this.state;\n    if (!state._active) return;\n    state._active = false;\n    const values = pointerValues(event);\n    state._movement = state._delta = V.sub(values, state._values);\n    this.computeValues(values);\n    this.compute(event);\n    state.delta = state.movement;\n    this.emit();\n  }\n\n  bind(bindFunction) {\n    bindFunction('pointer', 'enter', this.enter.bind(this));\n    bindFunction('pointer', 'leave', this.leave.bind(this));\n  }\n\n}\n\nconst hoverConfigResolver = _objectSpread2(_objectSpread2({}, coordinatesConfigResolver), {}, {\n  mouseOnly: (value = true) => value\n});\n\nconst EngineMap = new Map();\nconst ConfigResolverMap = new Map();\nfunction registerAction(action) {\n  EngineMap.set(action.key, action.engine);\n  ConfigResolverMap.set(action.key, action.resolver);\n}\nconst dragAction = {\n  key: 'drag',\n  engine: DragEngine,\n  resolver: dragConfigResolver\n};\nconst hoverAction = {\n  key: 'hover',\n  engine: HoverEngine,\n  resolver: hoverConfigResolver\n};\nconst moveAction = {\n  key: 'move',\n  engine: MoveEngine,\n  resolver: moveConfigResolver\n};\nconst pinchAction = {\n  key: 'pinch',\n  engine: PinchEngine,\n  resolver: pinchConfigResolver\n};\nconst scrollAction = {\n  key: 'scroll',\n  engine: ScrollEngine,\n  resolver: scrollConfigResolver\n};\nconst wheelAction = {\n  key: 'wheel',\n  engine: WheelEngine,\n  resolver: wheelConfigResolver\n};\n\nexport { ConfigResolverMap as C, EngineMap as E, SUPPORT as S, _objectSpread2 as _, _defineProperty as a, touchIds as b, chain as c, toHandlerProp as d, dragAction as e, pinchAction as f, hoverAction as h, isTouch as i, moveAction as m, parseProp as p, registerAction as r, scrollAction as s, toDomEventType as t, wheelAction as w };\n","import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, E as EngineMap, c as chain, p as parseProp, d as toHandlerProp } from './actions-5ad85d2f.esm.js';\nimport './maths-b2a210f4.esm.js';\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\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nconst sharedConfigResolver = {\n  target(value) {\n    if (value) {\n      return () => 'current' in value ? value.current : value;\n    }\n\n    return undefined;\n  },\n\n  enabled(value = true) {\n    return value;\n  },\n\n  window(value = SUPPORT.isBrowser ? window : undefined) {\n    return value;\n  },\n\n  eventOptions({\n    passive = true,\n    capture = false\n  } = {}) {\n    return {\n      passive,\n      capture\n    };\n  },\n\n  transform(value) {\n    return value;\n  }\n\n};\n\nconst _excluded = [\"target\", \"eventOptions\", \"window\", \"enabled\", \"transform\"];\nfunction resolveWith(config = {}, resolvers) {\n  const result = {};\n\n  for (const [key, resolver] of Object.entries(resolvers)) {\n    switch (typeof resolver) {\n      case 'function':\n        if (process.env.NODE_ENV === 'development') {\n          const r = resolver.call(result, config[key], key, config);\n          if (!Number.isNaN(r)) result[key] = r;\n        } else {\n          result[key] = resolver.call(result, config[key], key, config);\n        }\n\n        break;\n\n      case 'object':\n        result[key] = resolveWith(config[key], resolver);\n        break;\n\n      case 'boolean':\n        if (resolver) result[key] = config[key];\n        break;\n    }\n  }\n\n  return result;\n}\nfunction parse(config, gestureKey) {\n  const _ref = config,\n        {\n    target,\n    eventOptions,\n    window,\n    enabled,\n    transform\n  } = _ref,\n        rest = _objectWithoutProperties(_ref, _excluded);\n\n  const _config = {\n    shared: resolveWith({\n      target,\n      eventOptions,\n      window,\n      enabled,\n      transform\n    }, sharedConfigResolver)\n  };\n\n  if (gestureKey) {\n    const resolver = ConfigResolverMap.get(gestureKey);\n    _config[gestureKey] = resolveWith(_objectSpread2({\n      shared: _config.shared\n    }, rest), resolver);\n  } else {\n    for (const key in rest) {\n      const resolver = ConfigResolverMap.get(key);\n\n      if (resolver) {\n        _config[key] = resolveWith(_objectSpread2({\n          shared: _config.shared\n        }, rest[key]), resolver);\n      } else if (process.env.NODE_ENV === 'development') {\n        if (!['drag', 'pinch', 'scroll', 'wheel', 'move', 'hover'].includes(key)) {\n          if (key === 'domTarget') {\n            throw Error(`[@use-gesture]: \\`domTarget\\` option has been renamed to \\`target\\`.`);\n          }\n\n          console.warn(`[@use-gesture]: Unknown config key \\`${key}\\` was used. Please read the documentation for further information.`);\n        }\n      }\n    }\n  }\n\n  return _config;\n}\n\nclass EventStore {\n  constructor(ctrl) {\n    _defineProperty(this, \"_listeners\", []);\n\n    this._ctrl = ctrl;\n  }\n\n  add(element, device, action, handler, options) {\n    const type = toDomEventType(device, action);\n\n    const eventOptions = _objectSpread2(_objectSpread2({}, this._ctrl.config.shared.eventOptions), options);\n\n    element.addEventListener(type, handler, eventOptions);\n\n    this._listeners.push(() => element.removeEventListener(type, handler, eventOptions));\n  }\n\n  clean() {\n    this._listeners.forEach(remove => remove());\n\n    this._listeners = [];\n  }\n\n}\n\nclass TimeoutStore {\n  constructor() {\n    _defineProperty(this, \"_timeouts\", new Map());\n  }\n\n  add(key, callback, ms = 140, ...args) {\n    this.remove(key);\n\n    this._timeouts.set(key, window.setTimeout(callback, ms, ...args));\n  }\n\n  remove(key) {\n    const timeout = this._timeouts.get(key);\n\n    if (timeout) window.clearTimeout(timeout);\n  }\n\n  clean() {\n    this._timeouts.forEach(timeout => void window.clearTimeout(timeout));\n\n    this._timeouts.clear();\n  }\n\n}\n\nclass Controller {\n  constructor(handlers) {\n    _defineProperty(this, \"gestures\", new Set());\n\n    _defineProperty(this, \"_targetEventStore\", new EventStore(this));\n\n    _defineProperty(this, \"gestureEventStores\", {});\n\n    _defineProperty(this, \"gestureTimeoutStores\", {});\n\n    _defineProperty(this, \"handlers\", {});\n\n    _defineProperty(this, \"config\", {});\n\n    _defineProperty(this, \"pointerIds\", new Set());\n\n    _defineProperty(this, \"touchIds\", new Set());\n\n    _defineProperty(this, \"state\", {\n      shared: {\n        shiftKey: false,\n        metaKey: false,\n        ctrlKey: false,\n        altKey: false\n      }\n    });\n\n    resolveGestures(this, handlers);\n  }\n\n  setEventIds(event) {\n    if (isTouch(event)) {\n      this.touchIds = new Set(touchIds(event));\n    } else if ('pointerId' in event) {\n      if (event.type === 'pointerup' || event.type === 'pointercancel') this.pointerIds.delete(event.pointerId);else if (event.type === 'pointerdown') this.pointerIds.add(event.pointerId);\n    }\n  }\n\n  applyHandlers(handlers, nativeHandlers) {\n    this.handlers = handlers;\n    this.nativeHandlers = nativeHandlers;\n  }\n\n  applyConfig(config, gestureKey) {\n    this.config = parse(config, gestureKey);\n  }\n\n  clean() {\n    this._targetEventStore.clean();\n\n    for (const key of this.gestures) {\n      this.gestureEventStores[key].clean();\n      this.gestureTimeoutStores[key].clean();\n    }\n  }\n\n  effect() {\n    if (this.config.shared.target) this.bind();\n    return () => this._targetEventStore.clean();\n  }\n\n  bind(...args) {\n    const sharedConfig = this.config.shared;\n    const eventOptions = sharedConfig.eventOptions;\n    const props = {};\n    let target;\n\n    if (sharedConfig.target) {\n      target = sharedConfig.target();\n      if (!target) return;\n    }\n\n    const bindFunction = bindToProps(props, eventOptions, !!target);\n\n    if (sharedConfig.enabled) {\n      for (const gestureKey of this.gestures) {\n        if (this.config[gestureKey].enabled) {\n          const Engine = EngineMap.get(gestureKey);\n          new Engine(this, args, gestureKey).bind(bindFunction);\n        }\n      }\n\n      for (const eventKey in this.nativeHandlers) {\n        bindFunction(eventKey, '', event => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, {\n          event,\n          args\n        })), undefined, true);\n      }\n    }\n\n    for (const handlerProp in props) {\n      props[handlerProp] = chain(...props[handlerProp]);\n    }\n\n    if (!target) return props;\n\n    for (const handlerProp in props) {\n      const {\n        device,\n        capture,\n        passive\n      } = parseProp(handlerProp);\n\n      this._targetEventStore.add(target, device, '', props[handlerProp], {\n        capture,\n        passive\n      });\n    }\n  }\n\n}\n\nfunction setupGesture(ctrl, gestureKey) {\n  ctrl.gestures.add(gestureKey);\n  ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl);\n  ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();\n}\n\nfunction resolveGestures(ctrl, internalHandlers) {\n  if (internalHandlers.drag) setupGesture(ctrl, 'drag');\n  if (internalHandlers.wheel) setupGesture(ctrl, 'wheel');\n  if (internalHandlers.scroll) setupGesture(ctrl, 'scroll');\n  if (internalHandlers.move) setupGesture(ctrl, 'move');\n  if (internalHandlers.pinch) setupGesture(ctrl, 'pinch');\n  if (internalHandlers.hover) setupGesture(ctrl, 'hover');\n}\n\nconst bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => {\n  var _options$capture, _options$passive;\n\n  const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;\n  const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;\n  let handlerProp = isNative ? device : toHandlerProp(device, action, capture);\n  if (withPassiveOption && passive) handlerProp += 'Passive';\n  props[handlerProp] = props[handlerProp] || [];\n  props[handlerProp].push(handler);\n};\n\nconst RE_NOT_NATIVE = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;\n\nfunction sortHandlers(_handlers) {\n  const native = {};\n  const handlers = {};\n  const actions = new Set();\n\n  for (let key in _handlers) {\n    if (RE_NOT_NATIVE.test(key)) {\n      actions.add(RegExp.lastMatch);\n      handlers[key] = _handlers[key];\n    } else {\n      native[key] = _handlers[key];\n    }\n  }\n\n  return [handlers, native, actions];\n}\n\nfunction registerGesture(actions, handlers, handlerKey, key, internalHandlers, config) {\n  if (!actions.has(handlerKey)) return;\n\n  if (!EngineMap.has(key)) {\n    if (process.env.NODE_ENV === 'development') {\n      console.warn(`[@use-gesture]: You've created a custom handler that that uses the \\`${key}\\` gesture but isn't properly configured.\\n\\nPlease add \\`${key}Action\\` when creating your handler.`);\n    }\n\n    return;\n  }\n\n  const startKey = handlerKey + 'Start';\n  const endKey = handlerKey + 'End';\n\n  const fn = state => {\n    let memo = undefined;\n    if (state.first && startKey in handlers) handlers[startKey](state);\n    if (handlerKey in handlers) memo = handlers[handlerKey](state);\n    if (state.last && endKey in handlers) handlers[endKey](state);\n    return memo;\n  };\n\n  internalHandlers[key] = fn;\n  config[key] = config[key] || {};\n}\n\nfunction parseMergedHandlers(mergedHandlers, mergedConfig) {\n  const [handlers, nativeHandlers, actions] = sortHandlers(mergedHandlers);\n  const internalHandlers = {};\n  registerGesture(actions, handlers, 'onDrag', 'drag', internalHandlers, mergedConfig);\n  registerGesture(actions, handlers, 'onWheel', 'wheel', internalHandlers, mergedConfig);\n  registerGesture(actions, handlers, 'onScroll', 'scroll', internalHandlers, mergedConfig);\n  registerGesture(actions, handlers, 'onPinch', 'pinch', internalHandlers, mergedConfig);\n  registerGesture(actions, handlers, 'onMove', 'move', internalHandlers, mergedConfig);\n  registerGesture(actions, handlers, 'onHover', 'hover', internalHandlers, mergedConfig);\n  return {\n    handlers: internalHandlers,\n    config: mergedConfig,\n    nativeHandlers\n  };\n}\n\nexport { Controller, parseMergedHandlers };\n","import { registerAction, dragAction, pinchAction, wheelAction, scrollAction, moveAction, hoverAction } from '@use-gesture/core/actions';\nexport * from '@use-gesture/core/actions';\nimport React from 'react';\nimport { Controller, parseMergedHandlers } from '@use-gesture/core';\nexport * from '@use-gesture/core/utils';\nexport * from '@use-gesture/core/types';\n\nfunction useRecognizers(handlers, config = {}, gestureKey, nativeHandlers) {\n  const ctrl = React.useMemo(() => new Controller(handlers), []);\n  ctrl.applyHandlers(handlers, nativeHandlers);\n  ctrl.applyConfig(config, gestureKey);\n  React.useEffect(ctrl.effect.bind(ctrl));\n  React.useEffect(() => {\n    return ctrl.clean.bind(ctrl);\n  }, []);\n\n  if (config.target === undefined) {\n    return ctrl.bind.bind(ctrl);\n  }\n\n  return undefined;\n}\n\nfunction useDrag(handler, config = {}) {\n  registerAction(dragAction);\n  return useRecognizers({\n    drag: handler\n  }, config, 'drag');\n}\n\nfunction usePinch(handler, config = {}) {\n  registerAction(pinchAction);\n  return useRecognizers({\n    pinch: handler\n  }, config, 'pinch');\n}\n\nfunction useWheel(handler, config = {}) {\n  registerAction(wheelAction);\n  return useRecognizers({\n    wheel: handler\n  }, config, 'wheel');\n}\n\nfunction useScroll(handler, config = {}) {\n  registerAction(scrollAction);\n  return useRecognizers({\n    scroll: handler\n  }, config, 'scroll');\n}\n\nfunction useMove(handler, config = {}) {\n  registerAction(moveAction);\n  return useRecognizers({\n    move: handler\n  }, config, 'move');\n}\n\nfunction useHover(handler, config = {}) {\n  registerAction(hoverAction);\n  return useRecognizers({\n    hover: handler\n  }, config, 'hover');\n}\n\nfunction createUseGesture(actions) {\n  actions.forEach(registerAction);\n  return function useGesture(_handlers, _config = {}) {\n    const {\n      handlers,\n      nativeHandlers,\n      config\n    } = parseMergedHandlers(_handlers, _config);\n    return useRecognizers(handlers, config, undefined, nativeHandlers);\n  };\n}\n\nfunction useGesture(handlers, config = {}) {\n  const hook = createUseGesture([dragAction, pinchAction, scrollAction, wheelAction, moveAction, hoverAction]);\n  return hook(handlers, config);\n}\n\nexport { createUseGesture, useDrag, useGesture, useHover, useMove, usePinch, useScroll, useWheel };\n","/**\n * External dependencies\n */\nimport type { Reducer, SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { Action, InputAction } from './actions';\n\nexport interface InputState {\n\t_event?: SyntheticEvent;\n\terror: unknown;\n\tinitialValue?: string;\n\tisDirty: boolean;\n\tisDragEnabled: boolean;\n\tisDragging: boolean;\n\tisPressEnterToChange: boolean;\n\tvalue?: string;\n}\n\nexport type StateReducer< SpecializedAction = {} > = Reducer<\n\tInputState,\n\tSpecializedAction extends Action\n\t\t? InputAction | SpecializedAction\n\t\t: InputAction\n>;\n\nexport const initialStateReducer: StateReducer = ( state: InputState ) => state;\n\nexport const initialInputControlState: InputState = {\n\terror: null,\n\tinitialValue: '',\n\tisDirty: false,\n\tisDragEnabled: false,\n\tisDragging: false,\n\tisPressEnterToChange: false,\n\tvalue: '',\n};\n","/**\n * External dependencies\n */\nimport type { SyntheticEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { DragProps } from '../types';\n\nexport const CHANGE = 'CHANGE';\nexport const COMMIT = 'COMMIT';\nexport const CONTROL = 'CONTROL';\nexport const DRAG_END = 'DRAG_END';\nexport const DRAG_START = 'DRAG_START';\nexport const DRAG = 'DRAG';\nexport const INVALIDATE = 'INVALIDATE';\nexport const PRESS_DOWN = 'PRESS_DOWN';\nexport const PRESS_ENTER = 'PRESS_ENTER';\nexport const PRESS_UP = 'PRESS_UP';\nexport const RESET = 'RESET';\n\ninterface EventPayload {\n\tevent?: SyntheticEvent;\n}\n\nexport interface Action< Type = string, ExtraPayload = {} > {\n\ttype: Type;\n\tpayload: EventPayload & ExtraPayload;\n}\n\ninterface ValuePayload {\n\tvalue: string;\n}\n\nexport type ChangeAction = Action< typeof CHANGE, ValuePayload >;\nexport type CommitAction = Action< typeof COMMIT, ValuePayload >;\nexport type ControlAction = Action< typeof CONTROL, ValuePayload >;\nexport type PressUpAction = Action< typeof PRESS_UP >;\nexport type PressDownAction = Action< typeof PRESS_DOWN >;\nexport type PressEnterAction = Action< typeof PRESS_ENTER >;\nexport type DragStartAction = Action< typeof DRAG_START, DragProps >;\nexport type DragEndAction = Action< typeof DRAG_END, DragProps >;\nexport type DragAction = Action< typeof DRAG, DragProps >;\nexport type ResetAction = Action< typeof RESET, Partial< ValuePayload > >;\nexport type InvalidateAction = Action< typeof INVALIDATE, { error: unknown } >;\n\nexport type ChangeEventAction = ChangeAction | ResetAction | CommitAction;\n\nexport type DragEventAction = DragStartAction | DragEndAction | DragAction;\n\nexport type KeyEventAction = PressDownAction | PressUpAction | PressEnterAction;\n\nexport type InputAction =\n\t| ChangeEventAction\n\t| KeyEventAction\n\t| DragEventAction\n\t| InvalidateAction;\n","/**\n * External dependencies\n */\nimport type { SyntheticEvent, ChangeEvent, PointerEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useReducer, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tInputState,\n\tStateReducer,\n\tinitialInputControlState,\n\tinitialStateReducer,\n} from './state';\nimport * as actions from './actions';\nimport type { InputChangeCallback } from '../types';\n\n/**\n * Prepares initialState for the reducer.\n *\n * @param  initialState The initial state.\n * @return Prepared initialState for the reducer\n */\nfunction mergeInitialState(\n\tinitialState: Partial< InputState > = initialInputControlState\n): InputState {\n\tconst { value } = initialState;\n\n\treturn {\n\t\t...initialInputControlState,\n\t\t...initialState,\n\t\tinitialValue: value,\n\t} as InputState;\n}\n\n/**\n * Creates the base reducer which may be coupled to a specializing reducer.\n * As its final step, for all actions other than CONTROL, the base reducer\n * passes the state and action on through the specializing reducer. The\n * exception for CONTROL actions is because they represent controlled updates\n * from props and no case has yet presented for their specialization.\n *\n * @param  composedStateReducers A reducer to specialize state changes.\n * @return The reducer.\n */\nfunction inputControlStateReducer(\n\tcomposedStateReducers: StateReducer\n): StateReducer< actions.ControlAction > {\n\treturn ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\tswitch ( action.type ) {\n\t\t\t/*\n\t\t\t * Controlled updates\n\t\t\t */\n\t\t\tcase actions.CONTROL:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState._event = undefined;\n\t\t\t\t// Returns immediately to avoid invoking additional reducers.\n\t\t\t\treturn nextState;\n\n\t\t\t/**\n\t\t\t * Keyboard events\n\t\t\t */\n\t\t\tcase actions.PRESS_UP:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.PRESS_DOWN:\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Drag events\n\t\t\t */\n\t\t\tcase actions.DRAG_START:\n\t\t\t\tnextState.isDragging = true;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.DRAG_END:\n\t\t\t\tnextState.isDragging = false;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Input events\n\t\t\t */\n\t\t\tcase actions.CHANGE:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.value = action.payload.value;\n\n\t\t\t\tif ( state.isPressEnterToChange ) {\n\t\t\t\t\tnextState.isDirty = true;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase actions.COMMIT:\n\t\t\t\tnextState.value = action.payload.value;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tbreak;\n\n\t\t\tcase actions.RESET:\n\t\t\t\tnextState.error = null;\n\t\t\t\tnextState.isDirty = false;\n\t\t\t\tnextState.value = action.payload.value || state.initialValue;\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * Validation\n\t\t\t */\n\t\t\tcase actions.INVALIDATE:\n\t\t\t\tnextState.error = action.payload.error;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tnextState._event = action.payload.event;\n\n\t\t/**\n\t\t * Send the nextState + action to the composedReducers via\n\t\t * this \"bridge\" mechanism. This allows external stateReducers\n\t\t * to hook into actions, and modify state if needed.\n\t\t */\n\t\treturn composedStateReducers( nextState, action );\n\t};\n}\n\n/**\n * A custom hook that connects and external stateReducer with an internal\n * reducer. This hook manages the internal state of InputControl.\n * However, by connecting an external stateReducer function, other\n * components can react to actions as well as modify state before it is\n * applied.\n *\n * This technique uses the \"stateReducer\" design pattern:\n * https://kentcdodds.com/blog/the-state-reducer-pattern/\n *\n * @param  stateReducer    An external state reducer.\n * @param  initialState    The initial state for the reducer.\n * @param  onChangeHandler A handler for the onChange event.\n * @return State, dispatch, and a collection of actions.\n */\nexport function useInputControlStateReducer(\n\tstateReducer: StateReducer = initialStateReducer,\n\tinitialState: Partial< InputState > = initialInputControlState,\n\tonChangeHandler: InputChangeCallback\n) {\n\tconst [ state, dispatch ] = useReducer(\n\t\tinputControlStateReducer( stateReducer ),\n\t\tmergeInitialState( initialState )\n\t);\n\n\tconst createChangeEvent =\n\t\t( type: actions.ChangeEventAction[ 'type' ] ) =>\n\t\t(\n\t\t\tnextValue: actions.ChangeEventAction[ 'payload' ][ 'value' ],\n\t\t\tevent: actions.ChangeEventAction[ 'payload' ][ 'event' ]\n\t\t) => {\n\t\t\tdispatch( {\n\t\t\t\ttype,\n\t\t\t\tpayload: { value: nextValue, event },\n\t\t\t} as actions.InputAction );\n\t\t};\n\n\tconst createKeyEvent =\n\t\t( type: actions.KeyEventAction[ 'type' ] ) =>\n\t\t( event: actions.KeyEventAction[ 'payload' ][ 'event' ] ) => {\n\t\t\tdispatch( { type, payload: { event } } );\n\t\t};\n\n\tconst createDragEvent =\n\t\t( type: actions.DragEventAction[ 'type' ] ) =>\n\t\t( payload: actions.DragEventAction[ 'payload' ] ) => {\n\t\t\tdispatch( { type, payload } );\n\t\t};\n\n\t/**\n\t * Actions for the reducer\n\t */\n\tconst change = createChangeEvent( actions.CHANGE );\n\tconst invalidate = ( error: unknown, event: SyntheticEvent ) =>\n\t\tdispatch( { type: actions.INVALIDATE, payload: { error, event } } );\n\tconst reset = createChangeEvent( actions.RESET );\n\tconst commit = createChangeEvent( actions.COMMIT );\n\n\tconst dragStart = createDragEvent( actions.DRAG_START );\n\tconst drag = createDragEvent( actions.DRAG );\n\tconst dragEnd = createDragEvent( actions.DRAG_END );\n\n\tconst pressUp = createKeyEvent( actions.PRESS_UP );\n\tconst pressDown = createKeyEvent( actions.PRESS_DOWN );\n\tconst pressEnter = createKeyEvent( actions.PRESS_ENTER );\n\n\tconst currentState = useRef( state );\n\tconst refProps = useRef( { value: initialState.value, onChangeHandler } );\n\n\t// Freshens refs to props and state so that subsequent effects have access\n\t// to their latest values without their changes causing effect runs.\n\tuseLayoutEffect( () => {\n\t\tcurrentState.current = state;\n\t\trefProps.current = { value: initialState.value, onChangeHandler };\n\t} );\n\n\t// Propagates the latest state through onChange.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\tcurrentState.current._event !== undefined &&\n\t\t\tstate.value !== refProps.current.value &&\n\t\t\t! state.isDirty\n\t\t) {\n\t\t\trefProps.current.onChangeHandler( state.value ?? '', {\n\t\t\t\tevent: currentState.current._event as\n\t\t\t\t\t| ChangeEvent< HTMLInputElement >\n\t\t\t\t\t| PointerEvent< HTMLInputElement >,\n\t\t\t} );\n\t\t}\n\t}, [ state.value, state.isDirty ] );\n\n\t// Updates the state from props.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\tinitialState.value !== currentState.current.value &&\n\t\t\t! currentState.current.isDirty\n\t\t) {\n\t\t\tdispatch( {\n\t\t\t\ttype: actions.CONTROL,\n\t\t\t\tpayload: { value: initialState.value ?? '' },\n\t\t\t} );\n\t\t}\n\t}, [ initialState.value ] );\n\n\treturn {\n\t\tchange,\n\t\tcommit,\n\t\tdispatch,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t\tstate,\n\t} as const;\n}\n","/**\n * External dependencies\n */\nimport { useDrag } from '@use-gesture/react';\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tForwardedRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport type { InputFieldProps } from './types';\n\nconst noop = () => {};\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisFocused,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonFocus = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tsetIsFocused,\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t// State.\n\t\tstate,\n\t\t// Actions.\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t} = useInputControlStateReducer(\n\t\tstateReducer,\n\t\t{\n\t\t\tisDragEnabled,\n\t\t\tvalue: valueProp,\n\t\t\tisPressEnterToChange,\n\t\t},\n\t\tonChange\n\t);\n\n\tconst { value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused?.( false );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isDirty || ! event.target.validity.valid ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\thandleOnCommit( event );\n\t\t}\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused?.( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( key ) {\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treset( valueProp, event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event, target } = dragProps;\n\n\t\t\t// The `target` prop always references the `input` element while, by\n\t\t\t// default, the `dragProps.event.target` property would reference the real\n\t\t\t// event target (i.e. any DOM element that the pointer is hovering while\n\t\t\t// dragging). Ensuring that the `target` is always the `input` element\n\t\t\t// allows consumers of `InputControl` (or any higher-level control) to\n\t\t\t// check the input's validity by accessing `event.target.validity.valid`.\n\t\t\tdragProps.event = {\n\t\t\t\t...dragProps.event,\n\t\t\t\ttarget,\n\t\t\t};\n\n\t\t\tif ( ! distance ) return;\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\taxis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t\tpointer: { capture: false },\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\tvalue={ value }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { InputChangeCallback } from './types';\n\n/**\n * Gets a CSS cursor value based on a drag direction.\n *\n * @param  dragDirection The drag direction.\n * @return  The CSS cursor value.\n */\nexport function getDragCursor( dragDirection: string ): string {\n\tlet dragCursor = 'ns-resize';\n\n\tswitch ( dragDirection ) {\n\t\tcase 'n':\n\t\tcase 's':\n\t\t\tdragCursor = 'ns-resize';\n\t\t\tbreak;\n\n\t\tcase 'e':\n\t\tcase 'w':\n\t\t\tdragCursor = 'ew-resize';\n\t\t\tbreak;\n\t}\n\n\treturn dragCursor;\n}\n\n/**\n * Custom hook that renders a drag cursor when dragging.\n *\n * @param {boolean} isDragging    The dragging state.\n * @param {string}  dragDirection The drag direction.\n *\n * @return {string} The CSS cursor value.\n */\nexport function useDragCursor(\n\tisDragging: boolean,\n\tdragDirection: string\n): string {\n\tconst dragCursor = getDragCursor( dragDirection );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tdocument.documentElement.style.cursor = dragCursor;\n\t\t} else {\n\t\t\t// @ts-expect-error\n\t\t\tdocument.documentElement.style.cursor = null;\n\t\t}\n\t}, [ isDragging, dragCursor ] );\n\n\treturn dragCursor;\n}\n\nexport function useDraft( props: {\n\tvalue: string | undefined;\n\tonBlur?: FocusEventHandler;\n\tonChange: InputChangeCallback;\n} ) {\n\tconst refPreviousValue = useRef( props.value );\n\tconst [ draft, setDraft ] = useState< {\n\t\tvalue?: string;\n\t\tisStale?: boolean;\n\t} >( {} );\n\tconst value = draft.value !== undefined ? draft.value : props.value;\n\n\t// Determines when to discard the draft value to restore controlled status.\n\t// To do so, it tracks the previous value and marks the draft value as stale\n\t// after each render.\n\tuseLayoutEffect( () => {\n\t\tconst { current: previousValue } = refPreviousValue;\n\t\trefPreviousValue.current = props.value;\n\t\tif ( draft.value !== undefined && ! draft.isStale )\n\t\t\tsetDraft( { ...draft, isStale: true } );\n\t\telse if ( draft.isStale && props.value !== previousValue )\n\t\t\tsetDraft( {} );\n\t}, [ props.value, draft ] );\n\n\tconst onChange: InputChangeCallback = ( nextValue, extra ) => {\n\t\t// Mutates the draft value to avoid an extra effect run.\n\t\tsetDraft( ( current ) =>\n\t\t\tObject.assign( current, { value: nextValue, isStale: false } )\n\t\t);\n\t\tprops.onChange( nextValue, extra );\n\t};\n\tconst onBlur: FocusEventHandler = ( event ) => {\n\t\tsetDraft( {} );\n\t\tprops.onBlur?.( event );\n\t};\n\n\treturn { value, onBlur, onChange };\n}\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\nimport { space } from '../ui/utils/space';\nimport { useDraft } from './utils';\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function UnforwardedInputControl(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tvalue,\n\t\t...props\n\t}: InputControlProps,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = classNames( 'components-input-control', className );\n\n\tconst draftHookProps = useDraft( {\n\t\tvalue,\n\t\tonBlur: props.onBlur,\n\t\tonChange,\n\t} );\n\n\treturn (\n\t\t<InputBase\n\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tgap={ 3 }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\tisFocused={ isFocused }\n\t\t\tjustify=\"left\"\n\t\t\tlabel={ label }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tprefix={ prefix }\n\t\t\tsize={ size }\n\t\t\tsuffix={ suffix }\n\t\t>\n\t\t\t<InputField\n\t\t\t\t{ ...props }\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tonValidate={ onValidate }\n\t\t\t\tpaddingInlineStart={ prefix ? space( 2 ) : undefined }\n\t\t\t\tpaddingInlineEnd={ suffix ? space( 2 ) : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\tsetIsFocused={ setIsFocused }\n\t\t\t\tsize={ size }\n\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\t{ ...draftHookProps }\n\t\t\t/>\n\t\t</InputBase>\n\t);\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from '@wordpress/compose';\n *\n * const Example = () => {\n *   const [ value, setValue ] = useState( '' );\n *\n *   return (\n *  \t<InputControl\n *  \t\tvalue={ value }\n *  \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n *  \t/>\n *   );\n * };\n * ```\n */\nexport const InputControl = forwardRef( UnforwardedInputControl );\n\nexport default InputControl;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport InputControl from '../../input-control';\n\nconst htmlArrowStyles = ( { hideHTMLArrows } ) => {\n\tif ( ! hideHTMLArrows ) return ``;\n\n\treturn css`\n\t\tinput[type='number']::-webkit-outer-spin-button,\n\t\tinput[type='number']::-webkit-inner-spin-button {\n\t\t\t-webkit-appearance: none !important;\n\t\t\tmargin: 0 !important;\n\t\t}\n\n\t\tinput[type='number'] {\n\t\t\t-moz-appearance: textfield;\n\t\t}\n\t`;\n};\n\nexport const Input = styled( InputControl )`\n\t${ htmlArrowStyles };\n`;\n","/**\n * Parses and retrieves a number value.\n *\n * @param {unknown} value The incoming value.\n *\n * @return {number} The parsed number value.\n */\nexport function getNumber( value ) {\n\tconst number = Number( value );\n\n\treturn isNaN( number ) ? 0 : number;\n}\n\n/**\n * Safely adds 2 values.\n *\n * @param {Array<number|string>} args Values to add together.\n *\n * @return {number} The sum of values.\n */\nexport function add( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(sum:number, arg: number|string) => number} */\n\t\t( sum, arg ) => sum + getNumber( arg ),\n\t\t0\n\t);\n}\n\n/**\n * Safely subtracts 2 values.\n *\n * @param {Array<number|string>} args Values to subtract together.\n *\n * @return {number} The difference of the values.\n */\nexport function subtract( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(diff:number, arg: number|string, index:number) => number} */\n\t\t( diff, arg, index ) => {\n\t\t\tconst value = getNumber( arg );\n\t\t\treturn index === 0 ? value : diff - value;\n\t\t},\n\t\t0\n\t);\n}\n\n/**\n * Determines the decimal position of a number value.\n *\n * @param {number} value The number to evaluate.\n *\n * @return {number} The number of decimal places.\n */\nfunction getPrecision( value ) {\n\tconst split = ( value + '' ).split( '.' );\n\treturn split[ 1 ] !== undefined ? split[ 1 ].length : 0;\n}\n\n/**\n * Clamps a value based on a min/max range.\n *\n * @param {number} value The value.\n * @param {number} min   The minimum range.\n * @param {number} max   The maximum range.\n *\n * @return {number} The clamped value.\n */\nexport function clamp( value, min, max ) {\n\tconst baseValue = getNumber( value );\n\treturn Math.max( min, Math.min( baseValue, max ) );\n}\n\n/**\n * Clamps a value based on a min/max range with rounding\n *\n * @param {number | string} value The value.\n * @param {number}          min   The minimum range.\n * @param {number}          max   The maximum range.\n * @param {number}          step  A multiplier for the value.\n *\n * @return {number} The rounded and clamped value.\n */\nexport function roundClamp(\n\tvalue = 0,\n\tmin = Infinity,\n\tmax = Infinity,\n\tstep = 1\n) {\n\tconst baseValue = getNumber( value );\n\tconst stepValue = getNumber( step );\n\tconst precision = getPrecision( step );\n\tconst rounded = Math.round( baseValue / stepValue ) * stepValue;\n\tconst clampedValue = clamp( rounded, min, max );\n\n\treturn precision\n\t\t? getNumber( clampedValue.toFixed( precision ) )\n\t\t: clampedValue;\n}\n\n/**\n * Clamps a value based on a min/max range with rounding.\n * Returns a string.\n *\n * @param {Parameters<typeof roundClamp>} args Arguments for roundClamp().\n * @return {string} The rounded and clamped value.\n */\nexport function roundClampString( ...args ) {\n\treturn roundClamp( ...args ).toString();\n}\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Input } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type { NumberControlProps } from './types';\n\nfunction UnforwardedNumberControl(\n\t{\n\t\t__unstableStateReducer: stateReducerProp,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\t...props\n\t}: WordPressComponentProps< NumberControlProps, 'input', false >,\n\tref: ForwardedRef< any >\n) {\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : ensureNumber( step );\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = (\n\t\tvalue: number | string,\n\t\tstepOverride?: number\n\t) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it.\n\t\treturn isStepAny\n\t\t\t? Math.min( max, Math.max( min, ensureNumber( value ) ) )\n\t\t\t: roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : undefined;\n\tconst classes = classNames( 'components-number-control', className );\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer: NumberControlProps[ '__unstableStateReducer' ] =\n\t\t( state, action ) => {\n\t\t\tconst nextState = { ...state };\n\n\t\t\tconst { type, payload } = action;\n\t\t\tconst event = payload.event;\n\t\t\tconst currentValue = nextState.value;\n\n\t\t\t/**\n\t\t\t * Handles custom UP and DOWN Keyboard events\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t\t) {\n\t\t\t\tconst enableShift =\n\t\t\t\t\t( event as KeyboardEvent | undefined )?.shiftKey &&\n\t\t\t\t\tisShiftStepEnabled;\n\n\t\t\t\tconst incrementalValue = enableShift\n\t\t\t\t\t? ensureNumber( shiftStep ) * baseStep\n\t\t\t\t\t: baseStep;\n\t\t\t\tlet nextValue = isValueEmpty( currentValue )\n\t\t\t\t\t? baseValue\n\t\t\t\t\t: currentValue;\n\n\t\t\t\tif ( event?.preventDefault ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tif ( type === inputControlActionTypes.PRESS_UP ) {\n\t\t\t\t\tnextValue = add( nextValue, incrementalValue );\n\t\t\t\t}\n\n\t\t\t\tif ( type === inputControlActionTypes.PRESS_DOWN ) {\n\t\t\t\t\tnextValue = subtract( nextValue, incrementalValue );\n\t\t\t\t}\n\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = constrainValue(\n\t\t\t\t\tnextValue,\n\t\t\t\t\tenableShift ? incrementalValue : undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles drag to update events\n\t\t\t */\n\t\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\t\t// @ts-expect-error TODO: See if reducer actions can be typed better\n\t\t\t\tconst [ x, y ] = payload.delta;\n\t\t\t\t// @ts-expect-error TODO: See if reducer actions can be typed better\n\t\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\t\tconst modifier = enableShift\n\t\t\t\t\t? ensureNumber( shiftStep ) * baseStep\n\t\t\t\t\t: baseStep;\n\n\t\t\t\tlet directionModifier;\n\t\t\t\tlet delta;\n\n\t\t\t\tswitch ( dragDirection ) {\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 's':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'w':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( delta !== 0 ) {\n\t\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\t\tnextState.value = constrainValue(\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\t\tenableShift ? modifier : undefined\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles commit (ENTER key press or blur)\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t\t) {\n\t\t\t\tconst applyEmptyValue =\n\t\t\t\t\trequired === false && currentValue === '';\n\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = applyEmptyValue\n\t\t\t\t\t? currentValue\n\t\t\t\t\t: // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t  constrainValue( currentValue );\n\t\t\t}\n\n\t\t\treturn nextState;\n\t\t};\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ hideHTMLArrows }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ ref }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ ( state, action ) => {\n\t\t\t\tconst baseState = numberControlStateReducer( state, action );\n\t\t\t\treturn stateReducerProp?.( baseState, action ) ?? baseState;\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport const NumberControl = forwardRef( UnforwardedNumberControl );\n\nexport default NumberControl;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport { COLORS } from '../../utils';\nimport { space } from '../../ui/utils/space';\nimport CONFIG from '../../utils/config-values';\n\nconst CIRCLE_SIZE = 32;\nconst INNER_CIRCLE_SIZE = 3;\n\nconst deprecatedBottomMargin = ( { __nextHasNoMarginBottom } ) => {\n\treturn ! __nextHasNoMarginBottom\n\t\t? css`\n\t\t\t\tmargin-bottom: ${ space( 2 ) };\n\t\t  `\n\t\t: '';\n};\n\nexport const Root = styled( Flex )`\n\t${ deprecatedBottomMargin }\n`;\n\nexport const CircleRoot = styled.div`\n\tborder-radius: 50%;\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\tbox-sizing: border-box;\n\tcursor: grab;\n\theight: ${ CIRCLE_SIZE }px;\n\toverflow: hidden;\n\twidth: ${ CIRCLE_SIZE }px;\n`;\n\nexport const CircleIndicatorWrapper = styled.div`\n\tbox-sizing: border-box;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n`;\n\nexport const CircleIndicator = styled.div`\n\tbackground: ${ COLORS.ui.theme };\n\tborder-radius: 50%;\n\tborder: ${ INNER_CIRCLE_SIZE }px solid ${ COLORS.ui.theme };\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tdisplay: block;\n\theight: 0px;\n\tleft: 0;\n\tmargin: auto;\n\tposition: absolute;\n\tright: 0;\n\ttop: -${ CIRCLE_SIZE / 2 }px;\n\twidth: 0px;\n`;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __experimentalUseDragging as useDragging } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tCircleRoot,\n\tCircleIndicatorWrapper,\n\tCircleIndicator,\n} from './styles/angle-picker-control-styles';\n\nfunction AngleCircle( { value, onChange, ...props } ) {\n\tconst angleCircleRef = useRef();\n\tconst angleCircleCenter = useRef();\n\tconst previousCursorValue = useRef();\n\n\tconst setAngleCircleCenter = () => {\n\t\tconst rect = angleCircleRef.current.getBoundingClientRect();\n\t\tangleCircleCenter.current = {\n\t\t\tx: rect.x + rect.width / 2,\n\t\t\ty: rect.y + rect.height / 2,\n\t\t};\n\t};\n\n\tconst changeAngleToPosition = ( event ) => {\n\t\tconst { x: centerX, y: centerY } = angleCircleCenter.current;\n\t\t// Prevent (drag) mouse events from selecting and accidentally\n\t\t// triggering actions from other elements.\n\t\tevent.preventDefault();\n\t\t// Input control needs to lose focus and by preventDefault above, it doesn't.\n\t\tevent.target.focus();\n\t\tonChange( getAngle( centerX, centerY, event.clientX, event.clientY ) );\n\t};\n\n\tconst { startDrag, isDragging } = useDragging( {\n\t\tonDragStart: ( event ) => {\n\t\t\tsetAngleCircleCenter();\n\t\t\tchangeAngleToPosition( event );\n\t\t},\n\t\tonDragMove: changeAngleToPosition,\n\t\tonDragEnd: changeAngleToPosition,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isDragging ) {\n\t\t\tif ( previousCursorValue.current === undefined ) {\n\t\t\t\tpreviousCursorValue.current = document.body.style.cursor;\n\t\t\t}\n\t\t\tdocument.body.style.cursor = 'grabbing';\n\t\t} else {\n\t\t\tdocument.body.style.cursor = previousCursorValue.current || null;\n\t\t\tpreviousCursorValue.current = undefined;\n\t\t}\n\t}, [ isDragging ] );\n\n\treturn (\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\t<CircleRoot\n\t\t\tref={ angleCircleRef }\n\t\t\tonMouseDown={ startDrag }\n\t\t\tclassName=\"components-angle-picker-control__angle-circle\"\n\t\t\tstyle={ isDragging ? { cursor: 'grabbing' } : undefined }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<CircleIndicatorWrapper\n\t\t\t\tstyle={\n\t\t\t\t\tvalue ? { transform: `rotate(${ value }deg)` } : undefined\n\t\t\t\t}\n\t\t\t\tclassName=\"components-angle-picker-control__angle-circle-indicator-wrapper\"\n\t\t\t\ttabIndex={ -1 }\n\t\t\t>\n\t\t\t\t<CircleIndicator className=\"components-angle-picker-control__angle-circle-indicator\" />\n\t\t\t</CircleIndicatorWrapper>\n\t\t</CircleRoot>\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t);\n}\n\nfunction getAngle( centerX, centerY, pointX, pointY ) {\n\tconst y = pointY - centerY;\n\tconst x = pointX - centerX;\n\n\tconst angleInRadians = Math.atan2( y, x );\n\tconst angleInDeg = Math.round( angleInRadians * ( 180 / Math.PI ) ) + 90;\n\tif ( angleInDeg < 0 ) {\n\t\treturn 360 + angleInDeg;\n\t}\n\treturn angleInDeg;\n}\n\nexport default AngleCircle;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport { space } from '../ui/utils/space';\nimport { rtl, useCx } from '../utils';\nimport type { SpacerProps } from './types';\n\nconst isDefined = < T >( o: T ): o is Exclude< T, null | undefined > =>\n\ttypeof o !== 'undefined' && o !== null;\n\nexport function useSpacer(\n\tprops: WordPressComponentProps< SpacerProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tmargin,\n\t\tmarginBottom = 2,\n\t\tmarginLeft,\n\t\tmarginRight,\n\t\tmarginTop,\n\t\tmarginX,\n\t\tmarginY,\n\t\tpadding,\n\t\tpaddingBottom,\n\t\tpaddingLeft,\n\t\tpaddingRight,\n\t\tpaddingTop,\n\t\tpaddingX,\n\t\tpaddingY,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Spacer' );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tisDefined( margin ) &&\n\t\t\tcss`\n\t\t\t\tmargin: ${ space( margin ) };\n\t\t\t`,\n\t\tisDefined( marginY ) &&\n\t\t\tcss`\n\t\t\t\tmargin-bottom: ${ space( marginY ) };\n\t\t\t\tmargin-top: ${ space( marginY ) };\n\t\t\t`,\n\t\tisDefined( marginX ) &&\n\t\t\tcss`\n\t\t\t\tmargin-left: ${ space( marginX ) };\n\t\t\t\tmargin-right: ${ space( marginX ) };\n\t\t\t`,\n\t\tisDefined( marginTop ) &&\n\t\t\tcss`\n\t\t\t\tmargin-top: ${ space( marginTop ) };\n\t\t\t`,\n\t\tisDefined( marginBottom ) &&\n\t\t\tcss`\n\t\t\t\tmargin-bottom: ${ space( marginBottom ) };\n\t\t\t`,\n\t\tisDefined( marginLeft ) &&\n\t\t\trtl( {\n\t\t\t\tmarginLeft: space( marginLeft ),\n\t\t\t} )(),\n\t\tisDefined( marginRight ) &&\n\t\t\trtl( {\n\t\t\t\tmarginRight: space( marginRight ),\n\t\t\t} )(),\n\t\tisDefined( padding ) &&\n\t\t\tcss`\n\t\t\t\tpadding: ${ space( padding ) };\n\t\t\t`,\n\t\tisDefined( paddingY ) &&\n\t\t\tcss`\n\t\t\t\tpadding-bottom: ${ space( paddingY ) };\n\t\t\t\tpadding-top: ${ space( paddingY ) };\n\t\t\t`,\n\t\tisDefined( paddingX ) &&\n\t\t\tcss`\n\t\t\t\tpadding-left: ${ space( paddingX ) };\n\t\t\t\tpadding-right: ${ space( paddingX ) };\n\t\t\t`,\n\t\tisDefined( paddingTop ) &&\n\t\t\tcss`\n\t\t\t\tpadding-top: ${ space( paddingTop ) };\n\t\t\t`,\n\t\tisDefined( paddingBottom ) &&\n\t\t\tcss`\n\t\t\t\tpadding-bottom: ${ space( paddingBottom ) };\n\t\t\t`,\n\t\tisDefined( paddingLeft ) &&\n\t\t\trtl( {\n\t\t\t\tpaddingLeft: space( paddingLeft ),\n\t\t\t} )(),\n\t\tisDefined( paddingRight ) &&\n\t\t\trtl( {\n\t\t\t\tpaddingRight: space( paddingRight ),\n\t\t\t} )(),\n\t\tclassName\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useSpacer } from './hook';\nimport type { SpacerProps } from './types';\n\nfunction UnconnectedSpacer(\n\tprops: WordPressComponentProps< SpacerProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst spacerProps = useSpacer( props );\n\n\treturn <View { ...spacerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Spacer` is a primitive layout component that providers inner (`padding`) or outer (`margin`) space in-between components. It can also be used to adaptively provide space within an `HStack` or `VStack`.\n *\n * `Spacer` comes with a bunch of shorthand props to adjust `margin` and `padding`. The values of these props\n * can either be a number (which will act as a multiplier to the library's grid system base of 4px),\n * or a literal CSS value string.\n *\n * ```jsx\n * import { Spacer } from `@wordpress/components`\n *\n * function Example() {\n *   return (\n *     <View>\n *       <Spacer>\n *         <Heading>WordPress.org</Heading>\n *       </Spacer>\n *       <Text>\n *         Code is Poetry\n *       </Text>\n *     </View>\n *   );\n * }\n * ```\n */\nexport const Spacer = contextConnect( UnconnectedSpacer, 'Spacer' );\n\nexport default Spacer;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock, FlexItem } from '../flex';\nimport NumberControl from '../number-control';\nimport AngleCircle from './angle-circle';\nimport { Root } from './styles/angle-picker-control-styles';\nimport { space } from '../ui/utils/space';\nimport { Text } from '../text';\nimport { Spacer } from '../spacer';\n\nexport default function AnglePickerControl( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMarginBottom = false,\n\tclassName,\n\tlabel = __( 'Angle' ),\n\tonChange,\n\tvalue,\n} ) {\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.components.AnglePickerControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst handleOnNumberChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== '' ? parseInt( unprocessedValue, 10 ) : 0;\n\t\tonChange( inputValue );\n\t};\n\n\tconst classes = classnames( 'components-angle-picker-control', className );\n\n\treturn (\n\t\t<Root\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tgap={ 4 }\n\t\t>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tclassName=\"components-angle-picker-control__input-field\"\n\t\t\t\t\tmax={ 360 }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ handleOnNumberChange }\n\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\tstep=\"1\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\thideHTMLArrows\n\t\t\t\t\tsuffix={\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas={ Text }\n\t\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\t\tmarginRight={ space( 3 ) }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tcolor: 'var( --wp-admin-theme-color )',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t°\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t\t<FlexItem\n\t\t\t\tstyle={ {\n\t\t\t\t\tmarginBottom: space( 1 ),\n\t\t\t\t\tmarginTop: 'auto',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AngleCircle\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</FlexItem>\n\t\t</Root>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"richText\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\nconst ALL_UNICODE_DASH_CHARACTERS = new RegExp(\n\t`[${ [\n\t\t// - (hyphen-minus)\n\t\t'\\u002d',\n\t\t// ~ (tilde)\n\t\t'\\u007e',\n\t\t// ­ (soft hyphen)\n\t\t'\\u00ad',\n\t\t// ֊ (armenian hyphen)\n\t\t'\\u058a',\n\t\t// ־ (hebrew punctuation maqaf)\n\t\t'\\u05be',\n\t\t// ᐀ (canadian syllabics hyphen)\n\t\t'\\u1400',\n\t\t// ᠆ (mongolian todo soft hyphen)\n\t\t'\\u1806',\n\t\t// ‐ (hyphen)\n\t\t'\\u2010',\n\t\t// non-breaking hyphen)\n\t\t'\\u2011',\n\t\t// ‒ (figure dash)\n\t\t'\\u2012',\n\t\t// – (en dash)\n\t\t'\\u2013',\n\t\t// — (em dash)\n\t\t'\\u2014',\n\t\t// ― (horizontal bar)\n\t\t'\\u2015',\n\t\t// ⁓ (swung dash)\n\t\t'\\u2053',\n\t\t// superscript minus)\n\t\t'\\u207b',\n\t\t// subscript minus)\n\t\t'\\u208b',\n\t\t// − (minus sign)\n\t\t'\\u2212',\n\t\t// ⸗ (double oblique hyphen)\n\t\t'\\u2e17',\n\t\t// ⸺ (two-em dash)\n\t\t'\\u2e3a',\n\t\t// ⸻ (three-em dash)\n\t\t'\\u2e3b',\n\t\t// 〜 (wave dash)\n\t\t'\\u301c',\n\t\t// 〰 (wavy dash)\n\t\t'\\u3030',\n\t\t// ゠ (katakana-hiragana double hyphen)\n\t\t'\\u30a0',\n\t\t// ︱ (presentation form for vertical em dash)\n\t\t'\\ufe31',\n\t\t// ︲ (presentation form for vertical en dash)\n\t\t'\\ufe32',\n\t\t// ﹘ (small em dash)\n\t\t'\\ufe58',\n\t\t// ﹣ (small hyphen-minus)\n\t\t'\\ufe63',\n\t\t// - (fullwidth hyphen-minus)\n\t\t'\\uff0d',\n\t].join( '' ) }]`,\n\t'g'\n);\n\nexport const normalizeTextString = ( value: string ): string => {\n\treturn removeAccents( value )\n\t\t.toLocaleLowerCase()\n\t\t.replace( ALL_UNICODE_DASH_CHARACTERS, '-' );\n};\n\n/**\n * Escapes the RegExp special characters.\n *\n * @param {string} string Input string.\n *\n * @return {string} Regex-escaped string.\n */\nexport function escapeRegExp( string: string ): string {\n\treturn string.replace( /[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&' );\n}\n","/**\n * External dependencies\n */\nimport { find } from 'lodash';\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseEffect,\n\tuseState,\n\tuseRef,\n\tuseMemo,\n} from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseInstanceId,\n\tuseDebounce,\n\tuseMergeRefs,\n\tuseRefEffect,\n} from '@wordpress/compose';\nimport {\n\tcreate,\n\tslice,\n\tinsert,\n\tisCollapsed,\n\tgetTextContent,\n} from '@wordpress/rich-text';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { getAutoCompleterUI } from './autocompleter-ui';\nimport { escapeRegExp } from '../utils/strings';\n\n/**\n * A raw completer option.\n *\n * @typedef {*} CompleterOption\n */\n\n/**\n * @callback FnGetOptions\n *\n * @return {(CompleterOption[]|Promise.<CompleterOption[]>)} The completer options or a promise for them.\n */\n\n/**\n * @callback FnGetOptionKeywords\n * @param {CompleterOption} option a completer option.\n *\n * @return {string[]} list of key words to search.\n */\n\n/**\n * @callback FnIsOptionDisabled\n * @param {CompleterOption} option a completer option.\n *\n * @return {string[]} whether or not the given option is disabled.\n */\n\n/**\n * @callback FnGetOptionLabel\n * @param {CompleterOption} option a completer option.\n *\n * @return {(string|Array.<(string|WPElement)>)} list of react components to render.\n */\n\n/**\n * @callback FnAllowContext\n * @param {string} before the string before the auto complete trigger and query.\n * @param {string} after  the string after the autocomplete trigger and query.\n *\n * @return {boolean} true if the completer can handle.\n */\n\n/**\n * @typedef {Object} OptionCompletion\n * @property {'insert-at-caret'|'replace'} action the intended placement of the completion.\n * @property {OptionCompletionValue}       value  the completion value.\n */\n\n/**\n * A completion value.\n *\n * @typedef {(string|WPElement|Object)} OptionCompletionValue\n */\n\n/**\n * @callback FnGetOptionCompletion\n * @param {CompleterOption} value the value of the completer option.\n * @param {string}          query the text value of the autocomplete query.\n *\n * @return {(OptionCompletion|OptionCompletionValue)} the completion for the given option. If an\n * \t\t\t\t\t\t\t\t\t\t\t\t\t   OptionCompletionValue is returned, the\n * \t\t\t\t\t\t\t\t\t\t\t\t\t   completion action defaults to `insert-at-caret`.\n */\n\n/**\n * @typedef {Object} WPCompleter\n * @property {string}                           name                a way to identify a completer, useful for selective overriding.\n * @property {?string}                          className           A class to apply to the popup menu.\n * @property {string}                           triggerPrefix       the prefix that will display the menu.\n * @property {(CompleterOption[]|FnGetOptions)} options             the completer options or a function to get them.\n * @property {?FnGetOptionKeywords}             getOptionKeywords   get the keywords for a given option.\n * @property {?FnIsOptionDisabled}              isOptionDisabled    get whether or not the given option is disabled.\n * @property {FnGetOptionLabel}                 getOptionLabel      get the label for a given option.\n * @property {?FnAllowContext}                  allowContext        filter the context under which the autocomplete activates.\n * @property {FnGetOptionCompletion}            getOptionCompletion get the completion associated with a given option.\n */\n\nfunction useAutocomplete( {\n\trecord,\n\tonChange,\n\tonReplace,\n\tcompleters,\n\tcontentRef,\n} ) {\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst instanceId = useInstanceId( useAutocomplete );\n\tconst [ selectedIndex, setSelectedIndex ] = useState( 0 );\n\tconst [ filteredOptions, setFilteredOptions ] = useState( [] );\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ autocompleter, setAutocompleter ] = useState( null );\n\tconst [ AutocompleterUI, setAutocompleterUI ] = useState( null );\n\tconst backspacing = useRef( false );\n\n\tfunction insertCompletion( replacement ) {\n\t\tconst end = record.start;\n\t\tconst start =\n\t\t\tend - autocompleter.triggerPrefix.length - filterValue.length;\n\t\tconst toInsert = create( { html: renderToString( replacement ) } );\n\n\t\tonChange( insert( record, toInsert, start, end ) );\n\t}\n\n\tfunction select( option ) {\n\t\tconst { getOptionCompletion } = autocompleter || {};\n\n\t\tif ( option.isDisabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( getOptionCompletion ) {\n\t\t\tconst completion = getOptionCompletion( option.value, filterValue );\n\n\t\t\tconst { action, value } =\n\t\t\t\tundefined === completion.action ||\n\t\t\t\tundefined === completion.value\n\t\t\t\t\t? { action: 'insert-at-caret', value: completion }\n\t\t\t\t\t: completion;\n\n\t\t\tif ( 'replace' === action ) {\n\t\t\t\tonReplace( [ value ] );\n\t\t\t\t// When replacing, the component will unmount, so don't reset\n\t\t\t\t// state (below) on an unmounted component.\n\t\t\t\treturn;\n\t\t\t} else if ( 'insert-at-caret' === action ) {\n\t\t\t\tinsertCompletion( value );\n\t\t\t}\n\t\t}\n\n\t\t// Reset autocomplete state after insertion rather than before\n\t\t// so insertion events don't cause the completion menu to redisplay.\n\t\treset();\n\t}\n\n\tfunction reset() {\n\t\tsetSelectedIndex( 0 );\n\t\tsetFilteredOptions( [] );\n\t\tsetFilterValue( '' );\n\t\tsetAutocompleter( null );\n\t\tsetAutocompleterUI( null );\n\t}\n\n\tfunction announce( options ) {\n\t\tif ( ! debouncedSpeak ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( !! options.length ) {\n\t\t\tdebouncedSpeak(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\toptions.length\n\t\t\t\t\t),\n\t\t\t\t\toptions.length\n\t\t\t\t),\n\t\t\t\t'assertive'\n\t\t\t);\n\t\t} else {\n\t\t\tdebouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t}\n\t}\n\n\t/**\n\t * Load options for an autocompleter.\n\t *\n\t * @param {Array} options\n\t */\n\tfunction onChangeOptions( options ) {\n\t\tsetSelectedIndex(\n\t\t\toptions.length === filteredOptions.length ? selectedIndex : 0\n\t\t);\n\t\tsetFilteredOptions( options );\n\t\tannounce( options );\n\t}\n\n\tfunction handleKeyDown( event ) {\n\t\tbackspacing.current = event.code === 'Backspace';\n\n\t\tif ( ! autocompleter ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( filteredOptions.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\t\tswitch ( event.code ) {\n\t\t\tcase 'ArrowUp':\n\t\t\t\tsetSelectedIndex(\n\t\t\t\t\t( selectedIndex === 0\n\t\t\t\t\t\t? filteredOptions.length\n\t\t\t\t\t\t: selectedIndex ) - 1\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\tsetSelectedIndex(\n\t\t\t\t\t( selectedIndex + 1 ) % filteredOptions.length\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tsetAutocompleter( null );\n\t\t\t\tsetAutocompleterUI( null );\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tselect( filteredOptions[ selectedIndex ] );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowLeft':\n\t\t\tcase 'ArrowRight':\n\t\t\t\treset();\n\t\t\t\treturn;\n\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Any handled key should prevent original behavior. This relies on\n\t\t// the early return in the default case.\n\t\tevent.preventDefault();\n\t}\n\n\t// textContent is a primitive (string), memoizing is not strictly necessary\n\t// but this is a preemptive performance improvement, since the autocompleter\n\t// is a potential bottleneck for the editor type metric.\n\tconst textContent = useMemo( () => {\n\t\tif ( isCollapsed( record ) ) {\n\t\t\treturn getTextContent( slice( record, 0 ) );\n\t\t}\n\t}, [ record ] );\n\n\tuseEffect( () => {\n\t\tif ( ! textContent ) {\n\t\t\treset();\n\t\t\treturn;\n\t\t}\n\n\t\tconst text = removeAccents( textContent );\n\t\tconst textAfterSelection = getTextContent(\n\t\t\tslice( record, undefined, getTextContent( record ).length )\n\t\t);\n\t\tconst completer = find(\n\t\t\tcompleters,\n\t\t\t( { triggerPrefix, allowContext } ) => {\n\t\t\t\tconst index = text.lastIndexOf( triggerPrefix );\n\n\t\t\t\tif ( index === -1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst textWithoutTrigger = text.slice(\n\t\t\t\t\tindex + triggerPrefix.length\n\t\t\t\t);\n\n\t\t\t\tconst tooDistantFromTrigger = textWithoutTrigger.length > 50; // 50 chars seems to be a good limit.\n\t\t\t\t// This is a final barrier to prevent the effect from completing with\n\t\t\t\t// an extremely long string, which causes the editor to slow-down\n\t\t\t\t// significantly. This could happen, for example, if `matchingWhileBackspacing`\n\t\t\t\t// is true and one of the \"words\" end up being too long. If that's the case,\n\t\t\t\t// it will be caught by this guard.\n\t\t\t\tif ( tooDistantFromTrigger ) return false;\n\n\t\t\t\tconst mismatch = filteredOptions.length === 0;\n\t\t\t\tconst wordsFromTrigger = textWithoutTrigger.split( /\\s/ );\n\t\t\t\t// We need to allow the effect to run when not backspacing and if there\n\t\t\t\t// was a mismatch. i.e when typing a trigger + the match string or when\n\t\t\t\t// clicking in an existing trigger word on the page. We do that if we\n\t\t\t\t// detect that we have one word from trigger in the current textual context.\n\t\t\t\t//\n\t\t\t\t// Ex.: \"Some text @a\" <-- \"@a\" will be detected as the trigger word and\n\t\t\t\t// allow the effect to run. It will run until there's a mismatch.\n\t\t\t\tconst hasOneTriggerWord = wordsFromTrigger.length === 1;\n\t\t\t\t// This is used to allow the effect to run when backspacing and if\n\t\t\t\t// \"touching\" a word that \"belongs\" to a trigger. We consider a \"trigger\n\t\t\t\t// word\" any word up to the limit of 3 from the trigger character.\n\t\t\t\t// Anything beyond that is ignored if there's a mismatch. This allows\n\t\t\t\t// us to \"escape\" a mismatch when backspacing, but still imposing some\n\t\t\t\t// sane limits.\n\t\t\t\t//\n\t\t\t\t// Ex: \"Some text @marcelo sekkkk\" <--- \"kkkk\" caused a mismatch, but\n\t\t\t\t// if the user presses backspace here, it will show the completion popup again.\n\t\t\t\tconst matchingWhileBackspacing =\n\t\t\t\t\tbackspacing.current &&\n\t\t\t\t\ttextWithoutTrigger.split( /\\s/ ).length <= 3;\n\n\t\t\t\tif (\n\t\t\t\t\tmismatch &&\n\t\t\t\t\t! ( matchingWhileBackspacing || hasOneTriggerWord )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tallowContext &&\n\t\t\t\t\t! allowContext( text.slice( 0, index ), textAfterSelection )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t/^\\s/.test( textWithoutTrigger ) ||\n\t\t\t\t\t/\\s\\s+$/.test( textWithoutTrigger )\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn /[\\u0000-\\uFFFF]*$/.test( textWithoutTrigger );\n\t\t\t}\n\t\t);\n\n\t\tif ( ! completer ) {\n\t\t\treset();\n\t\t\treturn;\n\t\t}\n\n\t\tconst safeTrigger = escapeRegExp( completer.triggerPrefix );\n\t\tconst match = text\n\t\t\t.slice( text.lastIndexOf( completer.triggerPrefix ) )\n\t\t\t.match( new RegExp( `${ safeTrigger }([\\u0000-\\uFFFF]*)$` ) );\n\t\tconst query = match && match[ 1 ];\n\n\t\tsetAutocompleter( completer );\n\t\tsetAutocompleterUI( () =>\n\t\t\tcompleter !== autocompleter\n\t\t\t\t? getAutoCompleterUI( completer )\n\t\t\t\t: AutocompleterUI\n\t\t);\n\t\tsetFilterValue( query );\n\t\t// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ textContent ] );\n\n\tconst { key: selectedKey = '' } = filteredOptions[ selectedIndex ] || {};\n\tconst { className } = autocompleter || {};\n\tconst isExpanded = !! autocompleter && filteredOptions.length > 0;\n\tconst listBoxId = isExpanded\n\t\t? `components-autocomplete-listbox-${ instanceId }`\n\t\t: null;\n\tconst activeId = isExpanded\n\t\t? `components-autocomplete-item-${ instanceId }-${ selectedKey }`\n\t\t: null;\n\tconst hasSelection = record.start !== undefined;\n\n\treturn {\n\t\tlistBoxId,\n\t\tactiveId,\n\t\tonKeyDown: handleKeyDown,\n\t\tpopover: hasSelection && AutocompleterUI && (\n\t\t\t<AutocompleterUI\n\t\t\t\tclassName={ className }\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tinstanceId={ instanceId }\n\t\t\t\tlistBoxId={ listBoxId }\n\t\t\t\tselectedIndex={ selectedIndex }\n\t\t\t\tonChangeOptions={ onChangeOptions }\n\t\t\t\tonSelect={ select }\n\t\t\t\tvalue={ record }\n\t\t\t\tcontentRef={ contentRef }\n\t\t\t\treset={ reset }\n\t\t\t/>\n\t\t),\n\t};\n}\n\nexport function useAutocompleteProps( options ) {\n\tconst ref = useRef();\n\tconst onKeyDownRef = useRef();\n\tconst { popover, listBoxId, activeId, onKeyDown } = useAutocomplete( {\n\t\t...options,\n\t\tcontentRef: ref,\n\t} );\n\tonKeyDownRef.current = onKeyDown;\n\treturn {\n\t\tref: useMergeRefs( [\n\t\t\tref,\n\t\t\tuseRefEffect( ( element ) => {\n\t\t\t\tfunction _onKeyDown( event ) {\n\t\t\t\t\tonKeyDownRef.current( event );\n\t\t\t\t}\n\t\t\t\telement.addEventListener( 'keydown', _onKeyDown );\n\t\t\t\treturn () => {\n\t\t\t\t\telement.removeEventListener( 'keydown', _onKeyDown );\n\t\t\t\t};\n\t\t\t}, [] ),\n\t\t] ),\n\t\tchildren: popover,\n\t\t'aria-autocomplete': listBoxId ? 'list' : undefined,\n\t\t'aria-owns': listBoxId,\n\t\t'aria-activedescendant': activeId,\n\t};\n}\n\nexport default function Autocomplete( { children, isSelected, ...options } ) {\n\tconst { popover, ...props } = useAutocomplete( options );\n\treturn (\n\t\t<>\n\t\t\t{ children( props ) }\n\t\t\t{ isSelected && popover }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect } from '@wordpress/element';\nimport { useAnchor } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport getDefaultUseItems from './get-default-use-items';\nimport Button from '../button';\nimport Popover from '../popover';\n\nexport function getAutoCompleterUI( autocompleter ) {\n\tconst useItems = autocompleter.useItems\n\t\t? autocompleter.useItems\n\t\t: getDefaultUseItems( autocompleter );\n\n\tfunction AutocompleterUI( {\n\t\tfilterValue,\n\t\tinstanceId,\n\t\tlistBoxId,\n\t\tclassName,\n\t\tselectedIndex,\n\t\tonChangeOptions,\n\t\tonSelect,\n\t\tonReset,\n\t\tvalue,\n\t\tcontentRef,\n\t} ) {\n\t\tconst [ items ] = useItems( filterValue );\n\t\tconst popoverAnchor = useAnchor( {\n\t\t\teditableContentElement: contentRef.current,\n\t\t\tvalue,\n\t\t} );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tonChangeOptions( items );\n\t\t\t// Temporarily disabling exhaustive-deps to avoid introducing unexpected side effecst.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/41820\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t}, [ items ] );\n\n\t\tif ( ! items.length > 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<Popover\n\t\t\t\tfocusOnMount={ false }\n\t\t\t\tonClose={ onReset }\n\t\t\t\tposition=\"top right\"\n\t\t\t\tclassName=\"components-autocomplete__popover\"\n\t\t\t\tanchor={ popoverAnchor }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tid={ listBoxId }\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tclassName=\"components-autocomplete__results\"\n\t\t\t\t>\n\t\t\t\t\t{ map( items, ( option, index ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ option.key }\n\t\t\t\t\t\t\tid={ `components-autocomplete-item-${ instanceId }-${ option.key }` }\n\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\t\t\tdisabled={ option.isDisabled }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'components-autocomplete__result',\n\t\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-selected': index === selectedIndex,\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={ () => onSelect( option ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t</Popover>\n\t\t);\n\t}\n\n\treturn AutocompleterUI;\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\n\nfunction filterOptions( search, options = [], maxResults = 10 ) {\n\tconst filtered = [];\n\tfor ( let i = 0; i < options.length; i++ ) {\n\t\tconst option = options[ i ];\n\n\t\t// Merge label into keywords.\n\t\tlet { keywords = [] } = option;\n\t\tif ( 'string' === typeof option.label ) {\n\t\t\tkeywords = [ ...keywords, option.label ];\n\t\t}\n\n\t\tconst isMatch = keywords.some( ( keyword ) =>\n\t\t\tsearch.test( removeAccents( keyword ) )\n\t\t);\n\t\tif ( ! isMatch ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfiltered.push( option );\n\n\t\t// Abort early if max reached.\n\t\tif ( filtered.length === maxResults ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn filtered;\n}\n\nexport default function getDefaultUseItems( autocompleter ) {\n\treturn ( filterValue ) => {\n\t\tconst [ items, setItems ] = useState( [] );\n\t\t/*\n\t\t * We support both synchronous and asynchronous retrieval of completer options\n\t\t * but internally treat all as async so we maintain a single, consistent code path.\n\t\t *\n\t\t * Because networks can be slow, and the internet is wonderfully unpredictable,\n\t\t * we don't want two promises updating the state at once. This ensures that only\n\t\t * the most recent promise will act on `optionsData`. This doesn't use the state\n\t\t * because `setState` is batched, and so there's no guarantee that setting\n\t\t * `activePromise` in the state would result in it actually being in `this.state`\n\t\t * before the promise resolves and we check to see if this is the active promise or not.\n\t\t */\n\t\tuseLayoutEffect( () => {\n\t\t\tconst { options, isDebounced } = autocompleter;\n\t\t\tconst loadOptions = debounce(\n\t\t\t\t() => {\n\t\t\t\t\tconst promise = Promise.resolve(\n\t\t\t\t\t\ttypeof options === 'function'\n\t\t\t\t\t\t\t? options( filterValue )\n\t\t\t\t\t\t\t: options\n\t\t\t\t\t).then( ( optionsData ) => {\n\t\t\t\t\t\tif ( promise.canceled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst keyedOptions = optionsData.map(\n\t\t\t\t\t\t\t( optionData, optionIndex ) => ( {\n\t\t\t\t\t\t\t\tkey: `${ autocompleter.name }-${ optionIndex }`,\n\t\t\t\t\t\t\t\tvalue: optionData,\n\t\t\t\t\t\t\t\tlabel: autocompleter.getOptionLabel(\n\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tkeywords: autocompleter.getOptionKeywords\n\t\t\t\t\t\t\t\t\t? autocompleter.getOptionKeywords(\n\t\t\t\t\t\t\t\t\t\t\toptionData\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\tisDisabled: autocompleter.isOptionDisabled\n\t\t\t\t\t\t\t\t\t? autocompleter.isOptionDisabled(\n\t\t\t\t\t\t\t\t\t\t\toptionData\n\t\t\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Create a regular expression to filter the options.\n\t\t\t\t\t\tconst search = new RegExp(\n\t\t\t\t\t\t\t'(?:\\\\b|\\\\s|^)' + escapeRegExp( filterValue ),\n\t\t\t\t\t\t\t'i'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetItems( filterOptions( search, keyedOptions ) );\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn promise;\n\t\t\t\t},\n\t\t\t\tisDebounced ? 250 : 0\n\t\t\t);\n\n\t\t\tconst promise = loadOptions();\n\n\t\t\treturn () => {\n\t\t\t\tloadOptions.cancel();\n\t\t\t\tif ( promise ) {\n\t\t\t\t\tpromise.canceled = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}, [ filterValue ] );\n\n\t\treturn [ items ];\n\t};\n}\n","export default {\n\t'default.fontFamily':\n\t\t\"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif\",\n\t'default.fontSize': '13px',\n\n\t'helpText.fontSize': '12px',\n\n\tmobileTextMinFontSize: '16px',\n};\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport FONT from './font-values';\n\n/**\n *\n * @param {keyof FONT} value Path of value from `FONT`\n * @return {string} Font rule value\n */\nexport function font( value ) {\n\treturn get( FONT, value, '' );\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const boxSizingReset = css`\n\tbox-sizing: border-box;\n\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: inherit;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';\nimport { space } from '../../ui/utils/space';\n\nexport const Wrapper = styled.div`\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: ${ font( 'default.fontSize' ) };\n\n\t${ boxSizingReset }\n`;\n\nconst deprecatedMarginField = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: ${ space( 2 ) };\n\t\t`\n\t);\n};\n\nexport const StyledField = styled.div`\n\t${ deprecatedMarginField }\n\n\t.components-panel__row & {\n\t\tmargin-bottom: inherit;\n\t}\n`;\n\nconst labelStyles = css`\n\t${ baseLabelTypography };\n\n\tdisplay: inline-block;\n\tmargin-bottom: ${ space( 2 ) };\n\t/**\n\t * Removes Chrome/Safari/Firefox user agent stylesheet padding from\n\t * StyledLabel when it is rendered as a legend.\n\t */\n\tpadding: 0;\n`;\n\nexport const StyledLabel = styled.label`\n\t${ labelStyles }\n`;\n\nconst deprecatedMarginHelp = ( { __nextHasNoMarginBottom = false } ) => {\n\treturn (\n\t\t! __nextHasNoMarginBottom &&\n\t\tcss`\n\t\t\tmargin-bottom: revert;\n\t\t`\n\t);\n};\n\nexport const StyledHelp = styled.p`\n\tmargin-top: ${ space( 2 ) };\n\tmargin-bottom: 0;\n\tfont-size: ${ font( 'helpText.fontSize' ) };\n\tfont-style: normal;\n\tcolor: ${ COLORS.gray[ 700 ] };\n\n\t${ deprecatedMarginHelp }\n`;\n\nexport const StyledVisualLabel = styled.span`\n\t${ labelStyles }\n`;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { BaseControlProps, BaseControlVisualLabelProps } from './types';\nimport {\n\tWrapper,\n\tStyledField,\n\tStyledLabel,\n\tStyledHelp,\n\tStyledVisualLabel,\n} from './styles/base-control-styles';\nimport type { WordPressComponentProps } from '../ui/context';\n\n/**\n * `BaseControl` is a component used to generate labels and help text for components handling user inputs.\n *\n * @example\n * // Render a `BaseControl` for a textarea input\n * import { BaseControl } from '@wordpress/components';\n *\n * // The `id` prop is necessary to accessibly associate the label with the textarea\n * const MyBaseControl = () => (\n *   <BaseControl id=\"textarea-1\" label=\"Text\" help=\"Enter some text\" __nextHasNoMarginBottom={ true }>\n *     <textarea id=\"textarea-1\" />\n *   </BaseControl>\n * );\n */\nexport const BaseControl = ( {\n\t__nextHasNoMarginBottom = false,\n\tid,\n\tlabel,\n\thideLabelFromVision = false,\n\thelp,\n\tclassName,\n\tchildren,\n}: BaseControlProps ) => {\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName={ classnames( 'components-base-control', className ) }\n\t\t>\n\t\t\t<StyledField\n\t\t\t\tclassName=\"components-base-control__field\"\n\t\t\t\t// TODO: Official deprecation for this should start after all internal usages have been migrated\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t>\n\t\t\t\t{ label &&\n\t\t\t\t\tid &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\" htmlFor={ id }>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<StyledLabel\n\t\t\t\t\t\t\tclassName=\"components-base-control__label\"\n\t\t\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</StyledLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ label &&\n\t\t\t\t\t! id &&\n\t\t\t\t\t( hideLabelFromVision ? (\n\t\t\t\t\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t) ) }\n\t\t\t\t{ children }\n\t\t\t</StyledField>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\tid={ id ? id + '__help' : undefined }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n};\n\n/**\n * `BaseControl.VisualLabel` is used to render a purely visual label inside a `BaseControl` component.\n *\n * It should only be used in cases where the children being rendered inside `BaseControl` are already accessibly labeled,\n * e.g., a button, but we want an additional visual label for that section equivalent to the labels `BaseControl` would\n * otherwise use if the `label` prop was passed.\n *\n * @example\n * import { BaseControl } from '@wordpress/components';\n *\n * const MyBaseControl = () => (\n * \t<BaseControl help=\"This button is already accessibly labeled.\">\n * \t\t<BaseControl.VisualLabel>Author</BaseControl.VisualLabel>\n * \t\t<Button>Select an author</Button>\n * \t</BaseControl>\n * );\n */\nexport const VisualLabel = ( {\n\tclassName,\n\tchildren,\n\t...props\n}: WordPressComponentProps< BaseControlVisualLabelProps, 'span' > ) => {\n\treturn (\n\t\t<StyledVisualLabel\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-base-control__label',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</StyledVisualLabel>\n\t);\n};\nBaseControl.VisualLabel = VisualLabel;\n\nexport default BaseControl;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst link = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z\" />\n\t</SVG>\n);\n\nexport default link;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst linkOff = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z\" />\n\t</SVG>\n);\n\nexport default linkOff;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, rtl } from '../utils';\nimport { space } from '../ui/utils/space';\n\nimport type { Border } from '../border-control/types';\nimport type { Borders } from './types';\n\nexport const BorderBoxControl = css``;\n\nexport const LinkedBorderControl = css`\n\tflex: 1;\n`;\n\nexport const BorderBoxControlLinkedButton = (\n\t__next36pxDefaultSize?: boolean\n) => {\n\treturn css`\n\t\tflex: 0;\n\t\tflex-basis: 24px;\n\t\tline-height: 0;\n\t\tmargin-top: ${ __next36pxDefaultSize ? '6px' : '3px' };\n\t`;\n};\n\nconst BorderBoxStyleWithFallback = ( border?: Border ) => {\n\tconst {\n\t\tcolor = COLORS.gray[ 200 ],\n\t\tstyle = 'solid',\n\t\twidth = CONFIG.borderWidth,\n\t} = border || {};\n\n\tconst clampedWidth =\n\t\twidth !== CONFIG.borderWidth ? `clamp(1px, ${ width }, 10px)` : width;\n\tconst hasVisibleBorder = ( !! width && width !== '0' ) || !! color;\n\tconst borderStyle = hasVisibleBorder ? style || 'solid' : style;\n\n\treturn `${ color } ${ borderStyle } ${ clampedWidth }`;\n};\n\nexport const borderBoxControlVisualizer = (\n\tborders?: Borders,\n\t__next36pxDefaultSize?: boolean\n) => {\n\treturn css`\n\t\tposition: absolute;\n\t\ttop: ${ __next36pxDefaultSize ? '18px' : '15px' };\n\t\tright: 30px;\n\t\tbottom: ${ __next36pxDefaultSize ? '18px' : '15px' };\n\t\tleft: 30px;\n\t\tborder-top: ${ BorderBoxStyleWithFallback( borders?.top ) };\n\t\tborder-bottom: ${ BorderBoxStyleWithFallback( borders?.bottom ) };\n\t\t${ rtl( {\n\t\t\tborderLeft: BorderBoxStyleWithFallback( borders?.left ),\n\t\t} )() }\n\t\t${ rtl( {\n\t\t\tborderRight: BorderBoxStyleWithFallback( borders?.right ),\n\t\t} )() }\n\t`;\n};\n\nexport const borderBoxControlSplitControls = () => css`\n\tposition: relative;\n\tflex: 1;\n\t${ rtl( { marginRight: space( 3 ) }, { marginLeft: space( 3 ) } )() }\n`;\n\nexport const CenteredBorderControl = css`\n\tgrid-column: span 2;\n\tmargin: 0 auto;\n`;\n\nexport const rightBorderControl = () => css`\n\t${ rtl( { marginLeft: 'auto' }, { marginRight: 'auto' } )() }\n`;\n","/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport Tooltip from '../../tooltip';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlLinkedButton } from './hook';\n\nimport type { LinkedButtonProps } from '../types';\n\nconst BorderBoxControlLinkedButton = (\n\tprops: WordPressComponentProps< LinkedButtonProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { className, isLinked, ...buttonProps } =\n\t\tuseBorderBoxControlLinkedButton( props );\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<View className={ className }>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</Tooltip>\n\t);\n};\n\nconst ConnectedBorderBoxControlLinkedButton = contextConnect(\n\tBorderBoxControlLinkedButton,\n\t'BorderBoxControlLinkedButton'\n);\nexport default ConnectedBorderBoxControlLinkedButton;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { LinkedButtonProps } from '../types';\n\nexport function useBorderBoxControlLinkedButton(\n\tprops: WordPressComponentProps< LinkedButtonProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\t__next36pxDefaultSize = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlLinkedButton' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.BorderBoxControlLinkedButton( __next36pxDefaultSize ),\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, __next36pxDefaultSize ] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlVisualizer } from './hook';\n\nimport type { VisualizerProps } from '../types';\n\nconst BorderBoxControlVisualizer = (\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst { value, ...otherProps } = useBorderBoxControlVisualizer( props );\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n};\n\nconst ConnectedBorderBoxControlVisualizer = contextConnect(\n\tBorderBoxControlVisualizer,\n\t'BorderBoxControlVisualizer'\n);\nexport default ConnectedBorderBoxControlVisualizer;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx, rtl } from '../../utils';\n\nimport type { VisualizerProps } from '../types';\n\nexport function useBorderBoxControlVisualizer(\n\tprops: WordPressComponentProps< VisualizerProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tvalue,\n\t\t__next36pxDefaultSize = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderBoxControlVisualizer' );\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst rtlWatchResult = rtl.watch();\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.borderBoxControlVisualizer( value, __next36pxDefaultSize ),\n\t\t\tclassName\n\t\t);\n\t\t// rtlWatchResult is needed to refresh styles when the writing direction changes\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ cx, className, value, __next36pxDefaultSize, rtlWatchResult ] );\n\n\treturn { ...otherProps, className: classes, value };\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst closeSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z\" />\n\t</SVG>\n);\n\nexport default closeSmall;\n","/**\n * WordPress dependencies\n */\nimport { 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 { Path, SVG } from '@wordpress/primitives';\n\nconst lineDashed = (\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=\"M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lineDashed;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineDotted = (\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=\"M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lineDotted;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, rtl } from '../../utils';\nimport NumberControl from '../../number-control';\nimport { BackdropUI } from '../../input-control/styles/input-control-styles';\nimport type { SelectSize } from '../types';\nimport { space } from '../../ui/utils/space';\n\n// Using `selectSize` instead of `size` to avoid a type conflict with the\n// `size` HTML attribute of the `select` element.\ntype SelectProps = {\n\tselectSize: SelectSize;\n};\n\nexport const Root = styled.div`\n\tbox-sizing: border-box;\n\tposition: relative;\n\n\t/* Target the InputControl's backdrop and make focus styles smoother. */\n\t&&& ${ BackdropUI } {\n\t\ttransition: box-shadow 0.1s linear;\n\t}\n`;\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const ValueInput = styled( NumberControl )`\n\t&&& {\n\t\tinput {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n`;\n\nconst baseUnitLabelStyles = ( { selectSize }: SelectProps ) => {\n\tconst sizes = {\n\t\tdefault: css`\n\t\t\tbox-sizing: border-box;\n\t\t\tpadding: 2px 1px;\n\t\t\twidth: 20px;\n\t\t\tcolor: ${ COLORS.gray[ 800 ] };\n\t\t\tfont-size: 8px;\n\t\t\tline-height: 1;\n\t\t\tletter-spacing: -0.5px;\n\t\t\ttext-transform: uppercase;\n\t\t\ttext-align-last: center;\n\t\t`,\n\t\tlarge: css`\n\t\t\tbox-sizing: border-box;\n\t\t\tmin-width: 24px;\n\t\t\tmax-width: 48px;\n\t\t\theight: 24px;\n\t\t\tmargin-inline-end: ${ space( 2 ) };\n\t\t\tpadding: ${ space( 1 ) };\n\t\t\tcolor: ${ COLORS.ui.theme };\n\t\t\tfont-size: 13px;\n\t\t\tline-height: 1;\n\t\t\ttext-align-last: center;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t`,\n\t};\n\n\treturn selectSize === '__unstable-large' ? sizes.large : sizes.default;\n};\n\nexport const UnitLabel = styled.div< SelectProps >`\n\t&&& {\n\t\tpointer-events: none;\n\n\t\t${ baseUnitLabelStyles };\n\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t}\n`;\n\nconst unitSelectSizes = ( { selectSize = 'default' }: SelectProps ) => {\n\tconst sizes = {\n\t\tdefault: css`\n\t\t\theight: 100%;\n\t\t\tborder: 1px solid transparent;\n\t\t\ttransition: box-shadow 0.1s linear, border 0.1s linear;\n\n\t\t\t${ rtl( { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } )() }\n\n\t\t\t&:not(:disabled):hover {\n\t\t\t\tbackground-color: ${ COLORS.gray[ 100 ] };\n\t\t\t}\n\n\t\t\t&:focus {\n\t\t\t\tborder: 1px solid ${ COLORS.ui.borderFocus };\n\t\t\t\tbox-shadow: inset 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidth + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline-offset: 0;\n\t\t\t\toutline: 2px solid transparent;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\t\t`,\n\t\tlarge: css`\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\n\t\t\t&:hover {\n\t\t\t\tcolor: ${ COLORS.ui.borderFocus };\n\t\t\t\tbox-shadow: inset 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidth + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline: ${ CONFIG.borderWidth } solid transparent; // For High Contrast Mode\n\t\t\t}\n\n\t\t\t&:focus {\n\t\t\t\tbox-shadow: 0 0 0\n\t\t\t\t\t${ CONFIG.borderWidthFocus + ' ' + COLORS.ui.borderFocus };\n\t\t\t\toutline: ${ CONFIG.borderWidthFocus } solid transparent; // For High Contrast Mode\n\t\t\t}\n\t\t`,\n\t};\n\n\treturn selectSize === '__unstable-large' ? sizes.large : sizes.default;\n};\n\nexport const UnitSelect = styled.select< SelectProps >`\n\t// The && counteracts <select> styles in WP forms.css\n\t&& {\n\t\tappearance: none;\n\t\tbackground: transparent;\n\t\tborder-radius: 2px;\n\t\tborder: none;\n\t\tdisplay: block;\n\t\toutline: none;\n\t\t/* Removing margin ensures focus styles neatly overlay the wrapper. */\n\t\tmargin: 0;\n\t\tmin-height: auto;\n\t\tfont-family: inherit;\n\n\t\t&:not( :disabled ) {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t${ baseUnitLabelStyles };\n\t\t${ unitSelectSizes };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';\nimport { space } from '../ui/utils/space';\nimport {\n\tStyledField,\n\tStyledLabel,\n} from '../base-control/styles/base-control-styles';\nimport {\n\tRoot as UnitControlWrapper,\n\tUnitSelect,\n} from '../unit-control/styles/unit-control-styles';\n\nimport type { Border } from './types';\n\nconst labelStyles = css`\n\tfont-weight: 500;\n`;\n\nconst focusBoxShadow = css`\n\tbox-shadow: inset 0 0 0 ${ CONFIG.borderWidth } ${ COLORS.ui.borderFocus };\n`;\n\nexport const borderControl = css`\n\tborder: 0;\n\tpadding: 0;\n\tmargin: 0;\n\t${ boxSizingReset }\n`;\n\nexport const innerWrapper = () => css`\n\t${ UnitControlWrapper } {\n\t\tflex: 1 1 40%;\n\t}\n\t&& ${ UnitSelect } {\n\t\t/* Prevent unit select forcing min height larger than its UnitControl */\n\t\tmin-height: 0;\n\t}\n`;\n\n/*\n * This style is only applied to the UnitControl wrapper when the border width\n * field should be a set width. Omitting this allows the UnitControl &\n * RangeControl to share the available width in a 40/60 split respectively.\n */\nexport const wrapperWidth = css`\n\t${ UnitControlWrapper } {\n\t\t/* Force the UnitControl's set width. */\n\t\tflex: 0 0 auto;\n\t}\n`;\n\n/*\n * When default control height is 36px the following should be removed.\n * See: InputControl and __next36pxDefaultSize.\n */\nexport const wrapperHeight = ( __next36pxDefaultSize?: boolean ) => {\n\treturn css`\n\t\theight: ${ __next36pxDefaultSize ? '36px' : '30px' };\n\t`;\n};\n\nexport const borderControlDropdown = () => css`\n\tbackground: #fff;\n\n\t&& > button {\n\t\t/*\n\t\t * Override button component height and padding to fit within\n\t\t * BorderControl regardless of size.\n\t\t */\n\t\theight: 100%;\n\t\tpadding: ${ space( 0.75 ) };\n\t\t${ rtl(\n\t\t\t{ borderRadius: `2px 0 0 2px` },\n\t\t\t{ borderRadius: `0 2px 2px 0` }\n\t\t)() }\n\t\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };\n\n\t\t&:focus,\n\t\t&:hover:not( :disabled ) {\n\t\t\t${ focusBoxShadow }\n\t\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t}\n\t}\n`;\n\nexport const colorIndicatorBorder = ( border?: Border ) => {\n\tconst { color, style } = border || {};\n\n\tconst fallbackColor =\n\t\t!! style && style !== 'none' ? COLORS.gray[ 300 ] : undefined;\n\n\treturn css`\n\t\tborder-style: ${ style === 'none' ? 'solid' : style };\n\t\tborder-color: ${ color || fallbackColor };\n\t`;\n};\n\nexport const colorIndicatorWrapper = (\n\tborder?: Border,\n\t__next36pxDefaultSize?: boolean\n) => {\n\tconst { style } = border || {};\n\n\treturn css`\n\t\tborder-radius: 9999px;\n\t\tborder: 2px solid transparent;\n\t\t${ style ? colorIndicatorBorder( border ) : undefined }\n\t\twidth: ${ __next36pxDefaultSize ? '28px' : '22px' };\n\t\theight: ${ __next36pxDefaultSize ? '28px' : '22px' };\n\t\tpadding: ${ __next36pxDefaultSize ? '2px' : '1px' };\n\n\t\t/*\n\t\t * ColorIndicator\n\t\t *\n\t\t * The transparent colors used here ensure visibility of the indicator\n\t\t * over the active state of the border control dropdown's toggle button.\n\t\t */\n\t\t& > span {\n\t\t\t${ ! __next36pxDefaultSize\n\t\t\t\t? css`\n\t\t\t\t\t\t/* Dimensions fit in 30px overall control height. */\n\t\t\t\t\t\theight: 16px;\n\t\t\t\t\t\twidth: 16px;\n\t\t\t\t  `\n\t\t\t\t: '' }\n\t\t\tbackground: linear-gradient(\n\t\t\t\t-45deg,\n\t\t\t\ttransparent 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 48%,\n\t\t\t\trgb( 0 0 0 / 20% ) 52%,\n\t\t\t\ttransparent 52%\n\t\t\t);\n\t\t}\n\t`;\n};\n\n// Must equal $color-palette-circle-size from:\n// @wordpress/components/src/circular-option-picker/style.scss\nconst swatchSize = 28;\nconst swatchGap = 12;\n\nexport const borderControlPopoverControls = css`\n\twidth: ${ swatchSize * 6 + swatchGap * 5 }px;\n\n\t> div:first-of-type > ${ StyledLabel } {\n\t\tmargin-bottom: 0;\n\t\t${ labelStyles }\n\t}\n\n\t&& ${ StyledLabel } + button:not( .has-text ) {\n\t\tmin-width: 24px;\n\t\tpadding: 0;\n\t}\n`;\n\nexport const borderControlPopoverContent = css``;\nexport const borderColorIndicator = css``;\n\nexport const resetButton = css`\n\tjustify-content: center;\n\twidth: 100%;\n\n\t/* Override button component styling */\n\t&& {\n\t\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 200 ] };\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t\theight: 46px;\n\t}\n`;\n\nexport const borderControlStylePicker = css`\n\t${ StyledLabel } {\n\t\t${ labelStyles }\n\t}\n`;\n\nexport const borderStyleButton = css`\n\t&&&&& {\n\t\tmin-width: 30px;\n\t\twidth: 30px;\n\t\theight: 30px;\n\t\tpadding: 3px;\n\t}\n`;\n\nexport const borderSlider = () => css`\n\tflex: 1 1 60%;\n\t${ rtl( { marginRight: space( 3 ) } )() }\n\n\t${ StyledField } {\n\t\tmargin-bottom: 0;\n\t\tfont-size: 0;\n\t\tdisplay: flex;\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { Flex } from '../../flex';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlStylePicker } from './hook';\n\nimport type { LabelProps, StylePickerProps } from '../types';\n\nconst BORDER_STYLES = [\n\t{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },\n\t{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },\n\t{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },\n];\n\nconst Label = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst BorderControlStylePicker = (\n\tprops: WordPressComponentProps< StylePickerProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tbuttonClassName,\n\t\thideLabelFromVision,\n\t\tlabel,\n\t\tonChange,\n\t\tvalue,\n\t\t...otherProps\n\t} = useBorderControlStylePicker( props );\n\n\treturn (\n\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t<Label\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<Flex justify=\"flex-start\" gap={ 1 }>\n\t\t\t\t{ BORDER_STYLES.map( ( borderStyle ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ borderStyle.value }\n\t\t\t\t\t\tclassName={ buttonClassName }\n\t\t\t\t\t\ticon={ borderStyle.icon }\n\t\t\t\t\t\tisSmall\n\t\t\t\t\t\tisPressed={ borderStyle.value === value }\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\tborderStyle.value === value\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: borderStyle.value\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ borderStyle.label }\n\t\t\t\t\t\tlabel={ borderStyle.label }\n\t\t\t\t\t\tshowTooltip={ true }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Flex>\n\t\t</View>\n\t);\n};\n\nconst ConnectedBorderControlStylePicker = contextConnect(\n\tBorderControlStylePicker,\n\t'BorderControlStylePicker'\n);\n\nexport default ConnectedBorderControlStylePicker;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { StylePickerProps } from '../types';\n\nexport function useBorderControlStylePicker(\n\tprops: WordPressComponentProps< StylePickerProps, 'div' >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'BorderControlStylePicker'\n\t);\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderControlStylePicker, className );\n\t}, [ className, cx ] );\n\n\tconst buttonClassName = useMemo( () => {\n\t\treturn cx( styles.borderStyleButton );\n\t}, [ cx ] );\n\n\treturn { ...otherProps, className: classes, buttonClassName };\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { ColorIndicatorProps } from './types';\n\nfunction UnforwardedColorIndicator(\n\tprops: WordPressComponentProps< ColorIndicatorProps, 'span', false >,\n\tforwardedRef: ForwardedRef< HTMLSpanElement >\n) {\n\tconst { className, colorValue, ...additionalProps } = props;\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ classnames( 'component-color-indicator', className ) }\n\t\t\tstyle={ { background: colorValue } }\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...additionalProps }\n\t\t/>\n\t);\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef( UnforwardedColorIndicator );\n\nexport default ColorIndicator;\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","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Popover from '../popover';\n\nfunction useObservableState( initialState, onStateChange ) {\n\tconst [ state, setState ] = useState( initialState );\n\treturn [\n\t\tstate,\n\t\t( value ) => {\n\t\t\tsetState( value );\n\t\t\tif ( onStateChange ) {\n\t\t\t\tonStateChange( value );\n\t\t\t}\n\t\t},\n\t];\n}\n\nexport default function Dropdown( props ) {\n\tconst {\n\t\trenderContent,\n\t\trenderToggle,\n\t\tclassName,\n\t\tcontentClassName,\n\t\texpandOnMobile,\n\t\theaderTitle,\n\t\tfocusOnMount,\n\t\tposition,\n\t\tpopoverProps,\n\t\tonClose,\n\t\tonToggle,\n\t\tstyle,\n\t} = props;\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ fallbackPopoverAnchor, setFallbackPopoverAnchor ] =\n\t\tuseState( null );\n\tconst containerRef = useRef();\n\tconst [ isOpen, setIsOpen ] = useObservableState( false, onToggle );\n\n\tuseEffect(\n\t\t() => () => {\n\t\t\tif ( onToggle && isOpen ) {\n\t\t\t\tonToggle( false );\n\t\t\t}\n\t\t},\n\t\t[ onToggle, isOpen ]\n\t);\n\n\tfunction toggle() {\n\t\tsetIsOpen( ! isOpen );\n\t}\n\n\t/**\n\t * Closes the popover when focus leaves it unless the toggle was pressed or\n\t * focus has moved to a separate dialog. The former is to let the toggle\n\t * handle closing the popover and the latter is to preserve presence in\n\t * case a dialog has opened, allowing focus to return when it's dismissed.\n\t */\n\tfunction closeIfFocusOutside() {\n\t\tconst { ownerDocument } = containerRef.current;\n\t\tconst dialog = ownerDocument.activeElement.closest( '[role=\"dialog\"]' );\n\t\tif (\n\t\t\t! containerRef.current.contains( ownerDocument.activeElement ) &&\n\t\t\t( ! dialog || dialog.contains( containerRef.current ) )\n\t\t) {\n\t\t\tclose();\n\t\t}\n\t}\n\n\tfunction close() {\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t\tsetIsOpen( false );\n\t}\n\n\tconst args = { isOpen, onToggle: toggle, onClose: close };\n\tconst popoverPropsHaveAnchor =\n\t\t!! popoverProps?.anchor ||\n\t\t// Note: `anchorRef`, `getAnchorRect` and `anchorRect` are deprecated and\n\t\t// be removed from `Popover` from WordPress 6.3\n\t\t!! popoverProps?.anchorRef ||\n\t\t!! popoverProps?.getAnchorRect ||\n\t\t!! popoverProps?.anchorRect;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'components-dropdown', className ) }\n\t\t\tref={ useMergeRefs( [ setFallbackPopoverAnchor, containerRef ] ) }\n\t\t\t// Some UAs focus the closest focusable parent when the toggle is\n\t\t\t// clicked. Making this div focusable ensures such UAs will focus\n\t\t\t// it and `closeIfFocusOutside` can tell if the toggle was clicked.\n\t\t\ttabIndex=\"-1\"\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t{ renderToggle( args ) }\n\t\t\t{ isOpen && (\n\t\t\t\t<Popover\n\t\t\t\t\tposition={ position }\n\t\t\t\t\tonClose={ close }\n\t\t\t\t\tonFocusOutside={ closeIfFocusOutside }\n\t\t\t\t\texpandOnMobile={ expandOnMobile }\n\t\t\t\t\theaderTitle={ headerTitle }\n\t\t\t\t\tfocusOnMount={ focusOnMount }\n\t\t\t\t\t// This value is used to ensure that the dropdowns\n\t\t\t\t\t// align with the editor header by default.\n\t\t\t\t\toffset={ 13 }\n\t\t\t\t\tanchor={\n\t\t\t\t\t\t! popoverPropsHaveAnchor\n\t\t\t\t\t\t\t? fallbackPopoverAnchor\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\t{ ...popoverProps }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-dropdown__content',\n\t\t\t\t\t\tpopoverProps ? popoverProps.className : undefined,\n\t\t\t\t\t\tcontentClassName\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ renderContent( args ) }\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { Spacer } from '../spacer';\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport type { InputControlSuffixWrapperProps } from './types';\n\nfunction UnconnectedInputControlSuffixWrapper(\n\tprops: WordPressComponentProps< InputControlSuffixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlSuffixWrapper' );\n\n\treturn (\n\t\t<Spacer marginBottom={ 0 } { ...derivedProps } ref={ forwardedRef } />\n\t);\n}\n\n/**\n * A convenience wrapper for the `suffix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n *   __experimentalInputControl as InputControl,\n *   __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n *   suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>}\n * />\n * ```\n */\nexport const InputControlSuffixWrapper = contextConnect(\n\tUnconnectedInputControlSuffixWrapper,\n\t'InputControlSuffixWrapper'\n);\n\nexport default InputControlSuffixWrapper;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, rtl } from '../../utils';\nimport { space } from '../../ui/utils/space';\nimport type { SelectControlProps } from '../types';\nimport InputControlSuffixWrapper from '../../input-control/input-suffix-wrapper';\n\ninterface SelectProps\n\textends Pick< SelectControlProps, '__next36pxDefaultSize' | 'disabled' > {\n\t// Using `selectSize` instead of `size` to avoid a type conflict with the\n\t// `size` HTML attribute of the `select` element.\n\tselectSize?: SelectControlProps[ 'size' ];\n}\n\nconst disabledStyles = ( { disabled }: SelectProps ) => {\n\tif ( ! disabled ) return '';\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nconst fontSizeStyles = ( { selectSize = 'default' }: SelectProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ selectSize ];\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) return '';\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nconst sizeStyles = ( {\n\t__next36pxDefaultSize,\n\tselectSize = 'default',\n}: SelectProps ) => {\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 36,\n\t\t\tminHeight: 36,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tminHeight: 24,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tminHeight: 40,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t},\n\t};\n\n\tif ( ! __next36pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\theight: 30,\n\t\t\tminHeight: 30,\n\t\t\tpaddingTop: 0,\n\t\t\tpaddingBottom: 0,\n\t\t};\n\t}\n\n\tconst style = sizes[ selectSize ] || sizes.default;\n\n\treturn css( style );\n};\n\nexport const chevronIconSize = 18;\n\nconst sizePaddings = ( {\n\t__next36pxDefaultSize,\n\tselectSize = 'default',\n}: SelectProps ) => {\n\tconst iconWidth = chevronIconSize;\n\n\tconst sizes = {\n\t\tdefault: {\n\t\t\tpaddingLeft: 16,\n\t\t\tpaddingRight: 16 + iconWidth,\n\t\t},\n\t\tsmall: {\n\t\t\tpaddingLeft: 8,\n\t\t\tpaddingRight: 8 + iconWidth,\n\t\t},\n\t\t'__unstable-large': {\n\t\t\tpaddingLeft: 16,\n\t\t\tpaddingRight: 16 + iconWidth,\n\t\t},\n\t};\n\n\tif ( ! __next36pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\tpaddingLeft: 8,\n\t\t\tpaddingRight: 8 + iconWidth,\n\t\t};\n\t}\n\n\treturn rtl( sizes[ selectSize ] || sizes.default );\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Select = styled.select< SelectProps >`\n\t&&& {\n\t\tappearance: none;\n\t\tbackground: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\twidth: 100%;\n\t\tmax-width: none;\n\t\tcursor: pointer;\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\n\t\t${ disabledStyles };\n\t\t${ fontSizeStyles };\n\t\t${ sizeStyles };\n\t\t${ sizePaddings };\n\t}\n`;\n\nexport const DownArrowWrapper = styled.div`\n\tmargin-inline-end: ${ space( -1 ) }; // optically adjust the icon\n\tline-height: 0;\n`;\n\nexport const InputControlSuffixWrapperWithClickThrough = styled(\n\tInputControlSuffixWrapper\n)`\n\tposition: absolute;\n\tpointer-events: none;\n\n\t${ rtl( { right: 0 } ) }\n`;\n","/**\n * WordPress dependencies\n */\nimport { cloneElement } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n *                          size is a number specifiying the icon size in pixels\n *                          Other props will be passed to wrapped SVG component\n *\n * @return {JSX.Element}  Icon component\n */\nfunction Icon( { icon, size = 24, ...props } ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t} );\n}\n\nexport default Icon;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronDown = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\" />\n\t</SVG>\n);\n\nexport default chevronDown;\n","/**\n * WordPress dependencies\n */\nimport { chevronDown, Icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tchevronIconSize,\n\tDownArrowWrapper,\n\tInputControlSuffixWrapperWithClickThrough,\n} from './styles/select-control-styles';\n\nconst SelectControlChevronDown = () => {\n\treturn (\n\t\t<InputControlSuffixWrapperWithClickThrough>\n\t\t\t<DownArrowWrapper>\n\t\t\t\t<Icon icon={ chevronDown } size={ chevronIconSize } />\n\t\t\t</DownArrowWrapper>\n\t\t</InputControlSuffixWrapperWithClickThrough>\n\t);\n};\n\nexport default SelectControlChevronDown;\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport InputBase from '../input-control/input-base';\nimport { Select } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction UnforwardedSelectControl(\n\t{\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\t__next36pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t...props\n\t}: WordPressComponentProps< SelectControlProps, 'select', false >,\n\tref: ForwardedRef< HTMLSelectElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) return null;\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLSelectElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLSelectElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLSelectElement > ) => {\n\t\tif ( multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map( ( { value } ) => value );\n\t\t\tonChange( newValues );\n\t\t\treturn;\n\t\t}\n\n\t\tonChange( event.target.value, { event } );\n\t};\n\n\tconst classes = classNames( 'components-select-control', className );\n\n\t/* eslint-disable jsx-a11y/no-onchange */\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t<InputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ suffix || <SelectControlChevronDown /> }\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t>\n\t\t\t\t\t{ children ||\n\t\t\t\t\t\toptions.map( ( option, index ) => {\n\t\t\t\t\t\t\tconst key =\n\t\t\t\t\t\t\t\toption.id ||\n\t\t\t\t\t\t\t\t`${ option.label }-${ option.value }-${ index }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<option\n\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\tdisabled={ option.disabled }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n\t/* eslint-enable jsx-a11y/no-onchange */\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * @example\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n *   const [ size, setSize ] = useState( '50%' );\n *\n *   return (\n *     <SelectControl\n *       label=\"Size\"\n *       value={ size }\n *       options={ [\n *         { label: 'Big', value: '100%' },\n *         { label: 'Medium', value: '50%' },\n *         { label: 'Small', value: '25%' },\n *       ] }\n *       onChange={ setSize }\n *     />\n *   );\n * };\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl );\n\nexport default SelectControl;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { isValueDefined, getDefinedValue } from '../values';\n\n/**\n * @template T\n * @typedef Options\n * @property {T | undefined} initial  Initial value\n * @property {T | \"\"}        fallback Fallback value\n */\n\n/** @type {Readonly<{ initial: undefined, fallback: '' }>} */\nconst defaultOptions = {\n\tinitial: undefined,\n\t/**\n\t * Defaults to empty string, as that is preferred for usage with\n\t * <input />, <textarea />, and <select /> form elements.\n\t */\n\tfallback: '',\n};\n\n/**\n * Custom hooks for \"controlled\" components to track and consolidate internal\n * state and incoming values. This is useful for components that render\n * `input`, `textarea`, or `select` HTML elements.\n *\n * https://reactjs.org/docs/forms.html#controlled-components\n *\n * At first, a component using useControlledState receives an initial prop\n * value, which is used as initial internal state.\n *\n * This internal state can be maintained and updated without\n * relying on new incoming prop values.\n *\n * Unlike the basic useState hook, useControlledState's state can\n * be updated if a new incoming prop value is changed.\n *\n * @template T\n *\n * @param {T | undefined} currentState             The current value.\n * @param {Options<T>}    [options=defaultOptions] Additional options for the hook.\n *\n * @return {[T | \"\", (nextState: T) => void]} The controlled value and the value setter.\n */\nfunction useControlledState( currentState, options = defaultOptions ) {\n\tconst { initial, fallback } = { ...defaultOptions, ...options };\n\n\tconst [ internalState, setInternalState ] = useState( currentState );\n\tconst hasCurrentState = isValueDefined( currentState );\n\n\t/*\n\t * Resets internal state if value every changes from uncontrolled <-> controlled.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasCurrentState && internalState ) {\n\t\t\tsetInternalState( undefined );\n\t\t}\n\t}, [ hasCurrentState, internalState ] );\n\n\tconst state = getDefinedValue(\n\t\t[ currentState, internalState, initial ],\n\t\tfallback\n\t);\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\t/** @type {(nextState: T) => void} */\n\tconst setState = useCallback(\n\t\t( nextState ) => {\n\t\t\tif ( ! hasCurrentState ) {\n\t\t\t\tsetInternalState( nextState );\n\t\t\t}\n\t\t},\n\t\t[ hasCurrentState ]\n\t);\n\t/* eslint-enable jsdoc/no-undefined-types */\n\n\treturn [ state, setState ];\n}\n\nexport default useControlledState;\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useControlledState } from '../utils/hooks';\nimport { clamp } from '../utils/math';\n\nimport type { UseControlledRangeValueArgs } from './types';\n\n/**\n * A float supported clamp function for a specific value.\n *\n * @param  value The value to clamp.\n * @param  min   The minimum value.\n * @param  max   The maximum value.\n *\n * @return A (float) number\n */\nexport function floatClamp( value: number | null, min: number, max: number ) {\n\tif ( typeof value !== 'number' ) {\n\t\treturn null;\n\t}\n\n\treturn parseFloat( `${ clamp( value, min, max ) }` );\n}\n\n/**\n * Hook to store a clamped value, derived from props.\n *\n * @param  settings\n * @return The controlled value and the value setter.\n */\nexport function useControlledRangeValue(\n\tsettings: UseControlledRangeValueArgs\n) {\n\tconst { min, max, value: valueProp, initial } = settings;\n\tconst [ state, setInternalState ] = useControlledState(\n\t\tfloatClamp( valueProp, min, max ),\n\t\t{\n\t\t\tinitial: floatClamp( initial ?? null, min, max ),\n\t\t\tfallback: null,\n\t\t}\n\t);\n\n\tconst setState = useCallback(\n\t\t( nextValue: number | null ) => {\n\t\t\tif ( nextValue === null ) {\n\t\t\t\tsetInternalState( null );\n\t\t\t} else {\n\t\t\t\tsetInternalState( floatClamp( nextValue, min, max ) );\n\t\t\t}\n\t\t},\n\t\t[ min, max, setInternalState ]\n\t);\n\n\t// `state` can't be an empty string because we specified a fallback value of\n\t// `null` in `useControlledState`\n\treturn [ state as Exclude< typeof state, '' >, setState ] as const;\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../../number-control';\nimport { COLORS, reduceMotion, rtl } from '../../utils';\nimport { space } from '../../ui/utils/space';\n\nimport type {\n\tRangeMarkProps,\n\tRailProps,\n\tThumbProps,\n\tTooltipProps,\n\tTrackProps,\n\tWrapperProps,\n} from '../types';\n\nconst rangeHeightValue = 30;\nconst railHeight = 4;\nconst rangeHeight = () =>\n\tcss( { height: rangeHeightValue, minHeight: rangeHeightValue } );\nconst thumbSize = 12;\n\nexport const Root = styled.div`\n\t-webkit-tap-highlight-color: transparent;\n\talign-items: flex-start;\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\tpadding: 0;\n\tposition: relative;\n\ttouch-action: none;\n\twidth: 100%;\n`;\n\nconst wrapperColor = ( { color = COLORS.ui.borderFocus }: WrapperProps ) =>\n\tcss( { color } );\n\nconst wrapperMargin = ( { marks, __nextHasNoMarginBottom }: WrapperProps ) => {\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\treturn css( { marginBottom: marks ? 16 : undefined } );\n\t}\n\treturn '';\n};\n\nexport const Wrapper = styled.div< WrapperProps >`\n\tdisplay: block;\n\tflex: 1;\n\tposition: relative;\n\twidth: 100%;\n\n\t${ wrapperColor };\n\t${ rangeHeight };\n\t${ wrapperMargin };\n`;\n\nexport const BeforeIconWrapper = styled.span`\n\tdisplay: flex; // ensures the height isn't affected by line-height\n\tmargin-top: ${ railHeight }px;\n\n\t${ rtl( { marginRight: 6 } ) }\n`;\n\nexport const AfterIconWrapper = styled.span`\n\tdisplay: flex; // ensures the height isn't affected by line-height\n\tmargin-top: ${ railHeight }px;\n\n\t${ rtl( { marginLeft: 6 } ) }\n`;\n\nconst railBackgroundColor = ( { disabled, railColor }: RailProps ) => {\n\tlet background = railColor || '';\n\n\tif ( disabled ) {\n\t\tbackground = COLORS.ui.backgroundDisabled;\n\t}\n\n\treturn css( { background } );\n};\n\nexport const Rail = styled.span`\n\tbackground-color: ${ COLORS.gray[ 300 ] };\n\tleft: 0;\n\tpointer-events: none;\n\tright: 0;\n\tdisplay: block;\n\theight: ${ railHeight }px;\n\tposition: absolute;\n\tmargin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;\n\ttop: 0;\n\tborder-radius: ${ railHeight }px;\n\n\t${ railBackgroundColor };\n`;\n\nconst trackBackgroundColor = ( { disabled, trackColor }: TrackProps ) => {\n\tlet background = trackColor || 'currentColor';\n\n\tif ( disabled ) {\n\t\tbackground = COLORS.gray[ 400 ];\n\t}\n\n\treturn css( { background } );\n};\n\nexport const Track = styled.span`\n\tbackground-color: currentColor;\n\tborder-radius: ${ railHeight }px;\n\theight: ${ railHeight }px;\n\tpointer-events: none;\n\tdisplay: block;\n\tposition: absolute;\n\tmargin-top: ${ ( rangeHeightValue - railHeight ) / 2 }px;\n\ttop: 0;\n\n\t${ trackBackgroundColor };\n`;\n\nexport const MarksWrapper = styled.span`\n\tdisplay: block;\n\tpointer-events: none;\n\tposition: relative;\n\twidth: 100%;\n\tuser-select: none;\n`;\n\nconst markFill = ( { disabled, isFilled }: RangeMarkProps ) => {\n\tlet backgroundColor = isFilled ? 'currentColor' : COLORS.gray[ 300 ];\n\n\tif ( disabled ) {\n\t\tbackgroundColor = COLORS.gray[ 400 ];\n\t}\n\n\treturn css( {\n\t\tbackgroundColor,\n\t} );\n};\n\nexport const Mark = styled.span`\n\theight: ${ thumbSize }px;\n\tleft: 0;\n\tposition: absolute;\n\ttop: -4px;\n\twidth: 1px;\n\n\t${ markFill };\n`;\n\nconst markLabelFill = ( { isFilled }: RangeMarkProps ) => {\n\treturn css( {\n\t\tcolor: isFilled ? COLORS.gray[ 700 ] : COLORS.gray[ 300 ],\n\t} );\n};\n\nexport const MarkLabel = styled.span`\n\tcolor: ${ COLORS.gray[ 300 ] };\n\tleft: 0;\n\tfont-size: 11px;\n\tposition: absolute;\n\ttop: 12px;\n\ttransform: translateX( -50% );\n\twhite-space: nowrap;\n\n\t${ markLabelFill };\n`;\n\nconst thumbColor = ( { disabled }: ThumbProps ) =>\n\tdisabled\n\t\t? css`\n\t\t\t\tbackground-color: ${ COLORS.gray[ 400 ] };\n\t\t  `\n\t\t: css`\n\t\t\t\tbackground-color: var( --wp-admin-theme-color );\n\t\t  `;\n\nexport const ThumbWrapper = styled.span`\n\talign-items: center;\n\tdisplay: flex;\n\theight: ${ thumbSize }px;\n\tjustify-content: center;\n\tmargin-top: ${ ( rangeHeightValue - thumbSize ) / 2 }px;\n\toutline: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 0;\n\tuser-select: none;\n\twidth: ${ thumbSize }px;\n\tborder-radius: 50%;\n\n\t${ thumbColor };\n\t${ rtl( { marginLeft: -10 } ) };\n\t${ rtl(\n\t\t{ transform: 'translateX( 4.5px )' },\n\t\t{ transform: 'translateX( -4.5px )' }\n\t) };\n`;\n\nconst thumbFocus = ( { isFocused }: ThumbProps ) => {\n\treturn isFocused\n\t\t? css`\n\t\t\t\t&::before {\n\t\t\t\t\tcontent: ' ';\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tbackground-color: var( --wp-admin-theme-color );\n\t\t\t\t\topacity: 0.4;\n\t\t\t\t\tborder-radius: 50%;\n\t\t\t\t\theight: ${ thumbSize + 8 }px;\n\t\t\t\t\twidth: ${ thumbSize + 8 }px;\n\t\t\t\t\ttop: -4px;\n\t\t\t\t\tleft: -4px;\n\t\t\t\t}\n\t\t  `\n\t\t: '';\n};\n\nexport const Thumb = styled.span< ThumbProps >`\n\talign-items: center;\n\tborder-radius: 50%;\n\theight: 100%;\n\toutline: 0;\n\tposition: absolute;\n\tuser-select: none;\n\twidth: 100%;\n\n\t${ thumbColor };\n\t${ thumbFocus };\n`;\n\nexport const InputRange = styled.input`\n\tbox-sizing: border-box;\n\tcursor: pointer;\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tmargin: 0 -${ thumbSize / 2 }px;\n\topacity: 0;\n\toutline: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n\twidth: calc( 100% + ${ thumbSize }px );\n`;\n\nconst tooltipShow = ( { show }: TooltipProps ) => {\n\treturn css( {\n\t\topacity: show ? 1 : 0,\n\t} );\n};\n\nconst tooltipPosition = ( { position }: TooltipProps ) => {\n\tconst isBottom = position === 'bottom';\n\n\tif ( isBottom ) {\n\t\treturn css`\n\t\t\tbottom: -80%;\n\t\t`;\n\t}\n\n\treturn css`\n\t\ttop: -80%;\n\t`;\n};\n\nexport const Tooltip = styled.span< TooltipProps >`\n\tbackground: rgba( 0, 0, 0, 0.8 );\n\tborder-radius: 2px;\n\tcolor: white;\n\tdisplay: inline-block;\n\tfont-size: 12px;\n\tmin-width: 32px;\n\topacity: 0;\n\tpadding: 4px 8px;\n\tpointer-events: none;\n\tposition: absolute;\n\ttext-align: center;\n\ttransition: opacity 120ms ease;\n\tuser-select: none;\n\tline-height: 1.4;\n\n\t${ tooltipShow };\n\t${ tooltipPosition };\n\t${ reduceMotion( 'transition' ) };\n\t${ rtl(\n\t\t{ transform: 'translateX(-50%)' },\n\t\t{ transform: 'translateX(50%)' }\n\t) }\n`;\n\n// @todo: Refactor RangeControl with latest HStack configuration\n// @wordpress/components/ui/hstack.\nexport const InputNumber = styled( NumberControl )`\n\tdisplay: inline-block;\n\tfont-size: 13px;\n\tmargin-top: 0;\n\twidth: ${ space( 16 ) } !important;\n\n\tinput[type='number']& {\n\t\t${ rangeHeight };\n\t}\n\n\t${ rtl( { marginLeft: `${ space( 4 ) } !important` } ) }\n`;\n\nexport const ActionRightWrapper = styled.span`\n\tdisplay: block;\n\tmargin-top: 0;\n\n\tbutton,\n\tbutton.is-small {\n\t\tmargin-left: 0;\n\t\t${ rangeHeight };\n\t}\n\n\t${ rtl( { marginLeft: 8 } ) }\n`;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { InputRange as BaseInputRange } from './styles/range-control-styles';\n\nimport type { InputRangeProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nfunction InputRange(\n\tprops: WordPressComponentProps< InputRangeProps, 'input' >,\n\tref: React.ForwardedRef< HTMLInputElement >\n) {\n\tconst { describedBy, label, value, ...otherProps } = props;\n\n\treturn (\n\t\t<BaseInputRange\n\t\t\t{ ...otherProps }\n\t\t\taria-describedby={ describedBy }\n\t\t\taria-label={ label }\n\t\t\taria-hidden={ false }\n\t\t\tref={ ref }\n\t\t\ttabIndex={ 0 }\n\t\t\ttype=\"range\"\n\t\t\tvalue={ value }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputRange );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = classnames(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = classnames(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tisFilled={ isFilled }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport RangeMark from './mark';\nimport { MarksWrapper, Rail } from './styles/range-control-styles';\n\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tMarksProps,\n\tRangeMarkProps,\n\tRailProps,\n\tUseMarksArgs,\n} from './types';\n\nexport default function RangeRail(\n\tprops: WordPressComponentProps< RailProps, 'span' >\n) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep = 1,\n\t\tvalue = 0,\n\t\t...restProps\n\t} = props;\n\n\treturn (\n\t\t<>\n\t\t\t<Rail disabled={ disabled } { ...restProps } />\n\t\t\t{ marks && (\n\t\t\t\t<Marks\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tmin={ min }\n\t\t\t\t\tmax={ max }\n\t\t\t\t\tstep={ step }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction Marks( props: WordPressComponentProps< MarksProps, 'span' > ) {\n\tconst {\n\t\tdisabled = false,\n\t\tmarks = false,\n\t\tmin = 0,\n\t\tmax = 100,\n\t\tstep: stepProp = 1,\n\t\tvalue = 0,\n\t} = props;\n\n\tconst step = stepProp === 'any' ? 1 : stepProp;\n\tconst marksData = useMarks( { marks, min, max, step, value } );\n\n\treturn (\n\t\t<MarksWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-range-control__marks\"\n\t\t>\n\t\t\t{ marksData.map( ( mark ) => (\n\t\t\t\t<RangeMark\n\t\t\t\t\t{ ...mark }\n\t\t\t\t\tkey={ mark.key }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</MarksWrapper>\n\t);\n}\n\nfunction useMarks( {\n\tmarks,\n\tmin = 0,\n\tmax = 100,\n\tstep = 1,\n\tvalue = 0,\n}: UseMarksArgs ) {\n\tif ( ! marks ) {\n\t\treturn [];\n\t}\n\n\tconst range = max - min;\n\tif ( ! Array.isArray( marks ) ) {\n\t\tmarks = [];\n\t\tconst count = 1 + Math.round( range / step );\n\t\twhile ( count > marks.push( { value: step * marks.length + min } ) );\n\t}\n\n\tconst placedMarks: RangeMarkProps[] = [];\n\tmarks.forEach( ( mark, index ) => {\n\t\tif ( mark.value < min || mark.value > max ) {\n\t\t\treturn;\n\t\t}\n\t\tconst key = `mark-${ index }`;\n\t\tconst isFilled = mark.value <= value;\n\t\tconst offset = `${ ( ( mark.value - min ) / range ) * 100 }%`;\n\n\t\tconst offsetStyle = {\n\t\t\t[ isRTL() ? 'right' : 'left' ]: offset,\n\t\t};\n\n\t\tplacedMarks.push( {\n\t\t\t...mark,\n\t\t\tisFilled,\n\t\t\tkey,\n\t\t\tstyle: offsetStyle,\n\t\t} );\n\t} );\n\n\treturn placedMarks;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Tooltip } from './styles/range-control-styles';\n\nimport type { TooltipProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport default function SimpleTooltip(\n\tprops: WordPressComponentProps< TooltipProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tinputRef,\n\t\ttooltipPosition,\n\t\tshow = false,\n\t\tstyle = {},\n\t\tvalue = 0,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tzIndex = 100,\n\t\t...restProps\n\t} = props;\n\tconst position = useTooltipPosition( { inputRef, tooltipPosition } );\n\tconst classes = classnames( 'components-simple-tooltip', className );\n\tconst styles = {\n\t\t...style,\n\t\tzIndex,\n\t};\n\n\treturn (\n\t\t<Tooltip\n\t\t\t{ ...restProps }\n\t\t\taria-hidden={ show }\n\t\t\tclassName={ classes }\n\t\t\tposition={ position }\n\t\t\tshow={ show }\n\t\t\trole=\"tooltip\"\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ renderTooltipContent( value ) }\n\t\t</Tooltip>\n\t);\n}\n\nfunction useTooltipPosition( { inputRef, tooltipPosition }: TooltipProps ) {\n\tconst [ position, setPosition ] = useState< string >();\n\n\tconst setTooltipPosition = useCallback( () => {\n\t\tif ( inputRef && inputRef.current ) {\n\t\t\tsetPosition( tooltipPosition );\n\t\t}\n\t}, [ tooltipPosition, inputRef ] );\n\n\tuseEffect( () => {\n\t\tsetTooltipPosition();\n\t}, [ setTooltipPosition ] );\n\n\tuseEffect( () => {\n\t\twindow.addEventListener( 'resize', setTooltipPosition );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'resize', setTooltipPosition );\n\t\t};\n\t} );\n\n\treturn position;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nconst noop = () => {};\n\nfunction UnforwardedRangeControl< IconProps = unknown >(\n\tprops: WordPressComponentProps<\n\t\tRangeControlProps< IconProps >,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.ui.theme,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = classnames( 'components-range-control', className );\n\n\tconst wrapperClasses = classnames(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( onChangeResetValue );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root className=\"components-range-control__root\">\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden={ true }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden={ true }\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper style={ offsetStyle } disabled={ disabled }>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden={ true }\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\tdisabled={ disabled || value === undefined }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n *   const [ isChecked, setChecked ] = useState( true );\n *   return (\n *     <RangeControl\n *       help=\"Please select how transparent you would like this.\"\n *       initialPosition={50}\n *       label=\"Opacity\"\n *       max={100}\n *       min={0}\n *       onChange={() => {}}\n *     />\n *   );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n/**\n * Internal dependencies\n */\nimport type { FlexDirection } from '../flex/types';\nimport type { HStackAlignment, AlignmentProps, Alignments } from './types';\nimport { isValueDefined } from '../utils/values';\n\nconst H_ALIGNMENTS: Alignments = {\n\tbottom: { align: 'flex-end', justify: 'center' },\n\tbottomLeft: { align: 'flex-start', justify: 'flex-end' },\n\tbottomRight: { align: 'flex-end', justify: 'flex-end' },\n\tcenter: { align: 'center', justify: 'center' },\n\tedge: { align: 'center', justify: 'space-between' },\n\tleft: { align: 'center', justify: 'flex-start' },\n\tright: { align: 'center', justify: 'flex-end' },\n\tstretch: { align: 'stretch' },\n\ttop: { align: 'flex-start', justify: 'center' },\n\ttopLeft: { align: 'flex-start', justify: 'flex-start' },\n\ttopRight: { align: 'flex-start', justify: 'flex-end' },\n};\n\nconst V_ALIGNMENTS: Alignments = {\n\tbottom: { justify: 'flex-end', align: 'center' },\n\tbottomLeft: { justify: 'flex-start', align: 'flex-end' },\n\tbottomRight: { justify: 'flex-end', align: 'flex-end' },\n\tcenter: { justify: 'center', align: 'center' },\n\tedge: { justify: 'space-between', align: 'center' },\n\tleft: { justify: 'center', align: 'flex-start' },\n\tright: { justify: 'center', align: 'flex-end' },\n\tstretch: { justify: 'stretch' },\n\ttop: { justify: 'flex-start', align: 'center' },\n\ttopLeft: { justify: 'flex-start', align: 'flex-start' },\n\ttopRight: { justify: 'flex-start', align: 'flex-end' },\n};\n\nexport function getAlignmentProps(\n\talignment: HStackAlignment | CSSProperties[ 'alignItems' ],\n\tdirection: FlexDirection = 'row'\n): AlignmentProps {\n\tif ( ! isValueDefined( alignment ) ) {\n\t\treturn {};\n\t}\n\tconst isVertical = direction === 'column';\n\tconst props = isVertical ? V_ALIGNMENTS : H_ALIGNMENTS;\n\n\tconst alignmentProps =\n\t\talignment in props\n\t\t\t? props[ alignment as keyof typeof props ]\n\t\t\t: { align: alignment };\n\n\treturn alignmentProps;\n}\n","/**\n * External dependencies\n */\nimport type { ReactNode, ReactChild, ReactFragment, ReactPortal } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Children, isValidElement } from '@wordpress/element';\n\n/**\n * Gets a collection of available children elements from a React component's children prop.\n *\n * @param  children\n *\n * @return An array of available children.\n */\nexport function getValidChildren(\n\tchildren: ReactNode\n): Array< ReactChild | ReactFragment | ReactPortal > {\n\tif ( typeof children === 'string' ) return [ children ];\n\n\treturn Children.toArray( children ).filter( ( child ) =>\n\t\tisValidElement( child )\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\thasConnectNamespace,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\tconst flexProps = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n","/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHStack } from './hook';\nimport type { Props } from './types';\n\nfunction UnconnectedHStack(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tconst hStackProps = useHStack( props );\n\n\treturn <View { ...hStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `HStack` (Horizontal Stack) arranges child elements in a horizontal line.\n *\n * `HStack` can render anything inside.\n *\n * @example\n * ```jsx\n * import {\n * \t__experimentalHStack as HStack,\n * \t__experimentalText as Text,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<HStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</HStack>\n * \t);\n * }\n * ```\n */\nexport const HStack = contextConnect( UnconnectedHStack, 'HStack' );\n\nexport default HStack;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport NumberControl from '../number-control';\nimport InnerSelectControl from '../select-control';\nimport InnerRangeControl from '../range-control';\nimport { StyledField } from '../base-control/styles/base-control-styles';\nimport { space } from '../ui/utils/space';\nimport { boxSizingReset } from '../utils';\nimport Button from '../button';\nimport { Flex } from '../flex';\nimport { HStack } from '../h-stack';\nimport {\n\tBackdropUI,\n\tContainer as InputControlContainer,\n} from '../input-control/styles/input-control-styles';\nimport CONFIG from '../utils/config-values';\n\nexport const NumberControlWrapper = styled( NumberControl )`\n\t${ InputControlContainer } {\n\t\twidth: ${ space( 24 ) };\n\t}\n`;\n\nexport const SelectControl = styled( InnerSelectControl )`\n\tmargin-left: ${ space( -2 ) };\n\twidth: 5em;\n\t${ BackdropUI } {\n\t\tdisplay: none;\n\t}\n`;\n\nexport const RangeControl = styled( InnerRangeControl )`\n\tflex: 1;\n\tmargin-right: ${ space( 2 ) };\n\n\t${ StyledField } {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\n// Make the Hue circle picker not go out of the bar.\nconst interactiveHueStyles = `\n.react-colorful__interactive {\n\twidth: calc( 100% - ${ space( 2 ) } );\n\tmargin-left: ${ space( 1 ) };\n}`;\n\nexport const AuxiliaryColorArtefactWrapper = styled.div`\n\tpadding-top: ${ space( 2 ) };\n\tpadding-right: 0;\n\tpadding-left: 0;\n\tpadding-bottom: 0;\n`;\n\nexport const AuxiliaryColorArtefactHStackHeader = styled( HStack )`\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 4 ) };\n`;\n\nexport const ColorInputWrapper = styled( Flex )`\n\tpadding-top: ${ space( 4 ) };\n\tpadding-left: ${ space( 4 ) };\n\tpadding-right: ${ space( 3 ) };\n\tpadding-bottom: ${ space( 5 ) };\n`;\n\nexport const ColorfulWrapper = styled.div`\n\t${ boxSizingReset };\n\n\twidth: 216px;\n\n\t.react-colorful {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\twidth: 216px;\n\t\theight: auto;\n\t\toverflow: hidden;\n\t}\n\n\t.react-colorful__saturation {\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\t\theight: 216px;\n\t\tmargin-bottom: ${ space( 4 ) };\n\t\tborder-bottom: none;\n\t}\n\n\t.react-colorful__hue,\n\t.react-colorful__alpha {\n\t\twidth: 184px;\n\t\theight: 16px;\n\t\tborder-radius: 16px;\n\t\tmargin-bottom: ${ space( 2 ) };\n\t}\n\n\t.react-colorful__pointer {\n\t\theight: 16px;\n\t\twidth: 16px;\n\t\tborder: none;\n\t\tbox-shadow: 0 0 2px 0 rgba( 0, 0, 0, 0.25 );\n\n\t\t// Shown instead of box-shadow to Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t}\n\n\t.react-colorful__pointer-fill {\n\t\tbox-shadow: inset 0 0 0 ${ CONFIG.borderWidthFocus } #fff;\n\t}\n\n\t${ interactiveHueStyles }\n\n\t${ StyledField } {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nexport const CopyButton = styled( Button )`\n\t&&&&& {\n\t\tmin-width: ${ space( 6 ) };\n\t\tpadding: 0;\n\n\t\t> svg {\n\t\t\tmargin-right: 0;\n\t\t}\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst copy = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z\" />\n\t</SVG>\n);\n\nexport default copy;\n","export default function getBoundingClientRect(element) {\n  var rect = element.getBoundingClientRect();\n  return {\n    width: rect.width,\n    height: rect.height,\n    top: rect.top,\n    right: rect.right,\n    bottom: rect.bottom,\n    left: rect.left,\n    x: rect.left,\n    y: rect.top\n  };\n}","/*:: import type { Window } from '../types'; */\n\n/*:: declare function getWindow(node: Node | Window): Window; */\nexport default function getWindow(node) {\n  if (node.toString() !== '[object Window]') {\n    var ownerDocument = node.ownerDocument;\n    return ownerDocument ? ownerDocument.defaultView || window : window;\n  }\n\n  return node;\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n  var win = getWindow(node);\n  var scrollLeft = win.pageXOffset;\n  var scrollTop = win.pageYOffset;\n  return {\n    scrollLeft: scrollLeft,\n    scrollTop: scrollTop\n  };\n}","import getWindow from \"./getWindow.js\";\n/*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n  Element); */\n\nfunction isElement(node) {\n  var OwnElement = getWindow(node).Element;\n  return node instanceof OwnElement || node instanceof Element;\n}\n/*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n  HTMLElement); */\n\n\nfunction isHTMLElement(node) {\n  var OwnElement = getWindow(node).HTMLElement;\n  return node instanceof OwnElement || node instanceof HTMLElement;\n}\n/*:: declare function isShadowRoot(node: mixed): boolean %checks(node instanceof\n  ShadowRoot); */\n\n\nfunction isShadowRoot(node) {\n  var OwnElement = getWindow(node).ShadowRoot;\n  return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export default function getNodeName(element) {\n  return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n  // $FlowFixMe[incompatible-return]: assume body is always available\n  return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n  element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n  // If <html> has a CSS width greater than the viewport, then this will be\n  // incorrect for RTL.\n  // Popper 1 is broken in this case and never had a bug report so let's assume\n  // it's not an issue. I don't think anyone ever specifies width on <html>\n  // anyway.\n  // Browsers where the left scrollbar doesn't cause an issue report `0` for\n  // this (e.g. Edge 2019, IE11, Safari)\n  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n  return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n  // Firefox wants us to check `-x` and `-y` variations as well\n  var _getComputedStyle = getComputedStyle(element),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\"; // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n  if (isFixed === void 0) {\n    isFixed = false;\n  }\n\n  var documentElement = getDocumentElement(offsetParent);\n  var rect = getBoundingClientRect(elementOrVirtualElement);\n  var isOffsetParentAnElement = isHTMLElement(offsetParent);\n  var scroll = {\n    scrollLeft: 0,\n    scrollTop: 0\n  };\n  var offsets = {\n    x: 0,\n    y: 0\n  };\n\n  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n    if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n    isScrollParent(documentElement)) {\n      scroll = getNodeScroll(offsetParent);\n    }\n\n    if (isHTMLElement(offsetParent)) {\n      offsets = getBoundingClientRect(offsetParent);\n      offsets.x += offsetParent.clientLeft;\n      offsets.y += offsetParent.clientTop;\n    } else if (documentElement) {\n      offsets.x = getWindowScrollBarX(documentElement);\n    }\n  }\n\n  return {\n    x: rect.left + scroll.scrollLeft - offsets.x,\n    y: rect.top + scroll.scrollTop - offsets.y,\n    width: rect.width,\n    height: rect.height\n  };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n  if (node === getWindow(node) || !isHTMLElement(node)) {\n    return getWindowScroll(node);\n  } else {\n    return getHTMLElementScroll(node);\n  }\n}","export default function getHTMLElementScroll(element) {\n  return {\n    scrollLeft: element.scrollLeft,\n    scrollTop: element.scrollTop\n  };\n}","// Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\nexport default function getLayoutRect(element) {\n  return {\n    x: element.offsetLeft,\n    y: element.offsetTop,\n    width: element.offsetWidth,\n    height: element.offsetHeight\n  };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nexport default function getParentNode(element) {\n  if (getNodeName(element) === 'html') {\n    return element;\n  }\n\n  return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n    // $FlowFixMe[incompatible-return]\n    // $FlowFixMe[prop-missing]\n    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n    element.parentNode || // DOM Element detected\n    // $FlowFixMe[incompatible-return]: need a better way to handle this...\n    element.host || // ShadowRoot detected\n    // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n    getDocumentElement(element) // fallback\n\n  );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n  if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n    // $FlowFixMe[incompatible-return]: assume body is always available\n    return node.ownerDocument.body;\n  }\n\n  if (isHTMLElement(node) && isScrollParent(node)) {\n    return node;\n  }\n\n  return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n  if (list === void 0) {\n    list = [];\n  }\n\n  var scrollParent = getScrollParent(element);\n  var isBody = getNodeName(scrollParent) === 'body';\n  var win = getWindow(scrollParent);\n  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n  var updatedList = list.concat(target);\n  return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n  updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n  return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\n\nfunction getTrueOffsetParent(element) {\n  if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n  getComputedStyle(element).position === 'fixed') {\n    return null;\n  }\n\n  var offsetParent = element.offsetParent;\n\n  if (offsetParent) {\n    var html = getDocumentElement(offsetParent);\n\n    if (getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && getComputedStyle(html).position !== 'static') {\n      return html;\n    }\n  }\n\n  return offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n  var currentNode = getParentNode(element);\n\n  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n    var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n    // create a containing block.\n\n    if (css.transform !== 'none' || css.perspective !== 'none' || css.willChange && css.willChange !== 'auto') {\n      return currentNode;\n    } else {\n      currentNode = currentNode.parentNode;\n    }\n  }\n\n  return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n  var window = getWindow(element);\n  var offsetParent = getTrueOffsetParent(element);\n\n  while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n    offsetParent = getTrueOffsetParent(offsetParent);\n  }\n\n  if (offsetParent && getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static') {\n    return window;\n  }\n\n  return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n  return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n  return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n  var map = new Map();\n  var visited = new Set();\n  var result = [];\n  modifiers.forEach(function (modifier) {\n    map.set(modifier.name, modifier);\n  }); // On visiting object, check for its dependencies and visit them recursively\n\n  function sort(modifier) {\n    visited.add(modifier.name);\n    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n    requires.forEach(function (dep) {\n      if (!visited.has(dep)) {\n        var depModifier = map.get(dep);\n\n        if (depModifier) {\n          sort(depModifier);\n        }\n      }\n    });\n    result.push(modifier);\n  }\n\n  modifiers.forEach(function (modifier) {\n    if (!visited.has(modifier.name)) {\n      // check for visited object\n      sort(modifier);\n    }\n  });\n  return result;\n}\n\nexport default function orderModifiers(modifiers) {\n  // order based on dependencies\n  var orderedModifiers = order(modifiers); // order based on phase\n\n  return modifierPhases.reduce(function (acc, phase) {\n    return acc.concat(orderedModifiers.filter(function (modifier) {\n      return modifier.phase === phase;\n    }));\n  }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n  placement: 'bottom',\n  modifiers: [],\n  strategy: 'absolute'\n};\n\nfunction areValidElements() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return !args.some(function (element) {\n    return !(element && typeof element.getBoundingClientRect === 'function');\n  });\n}\n\nexport function popperGenerator(generatorOptions) {\n  if (generatorOptions === void 0) {\n    generatorOptions = {};\n  }\n\n  var _generatorOptions = generatorOptions,\n      _generatorOptions$def = _generatorOptions.defaultModifiers,\n      defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n      _generatorOptions$def2 = _generatorOptions.defaultOptions,\n      defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n  return function createPopper(reference, popper, options) {\n    if (options === void 0) {\n      options = defaultOptions;\n    }\n\n    var state = {\n      placement: 'bottom',\n      orderedModifiers: [],\n      options: Object.assign(Object.assign({}, DEFAULT_OPTIONS), defaultOptions),\n      modifiersData: {},\n      elements: {\n        reference: reference,\n        popper: popper\n      },\n      attributes: {},\n      styles: {}\n    };\n    var effectCleanupFns = [];\n    var isDestroyed = false;\n    var instance = {\n      state: state,\n      setOptions: function setOptions(options) {\n        cleanupModifierEffects();\n        state.options = Object.assign(Object.assign(Object.assign({}, defaultOptions), state.options), options);\n        state.scrollParents = {\n          reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n          popper: listScrollParents(popper)\n        }; // Orders the modifiers based on their dependencies and `phase`\n        // properties\n\n        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n        state.orderedModifiers = orderedModifiers.filter(function (m) {\n          return m.enabled;\n        }); // Validate the provided modifiers so that the consumer will get warned\n        // if one of the modifiers is invalid for any reason\n\n        if (process.env.NODE_ENV !== \"production\") {\n          var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n            var name = _ref.name;\n            return name;\n          });\n          validateModifiers(modifiers);\n\n          if (getBasePlacement(state.options.placement) === auto) {\n            var flipModifier = state.orderedModifiers.find(function (_ref2) {\n              var name = _ref2.name;\n              return name === 'flip';\n            });\n\n            if (!flipModifier) {\n              console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n            }\n          }\n\n          var _getComputedStyle = getComputedStyle(popper),\n              marginTop = _getComputedStyle.marginTop,\n              marginRight = _getComputedStyle.marginRight,\n              marginBottom = _getComputedStyle.marginBottom,\n              marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n          // cause bugs with positioning, so we'll warn the consumer\n\n\n          if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n            return parseFloat(margin);\n          })) {\n            console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n          }\n        }\n\n        runModifierEffects();\n        return instance.update();\n      },\n      // Sync update – it will always be executed, even if not necessary. This\n      // is useful for low frequency updates where sync behavior simplifies the\n      // logic.\n      // For high frequency updates (e.g. `resize` and `scroll` events), always\n      // prefer the async Popper#update method\n      forceUpdate: function forceUpdate() {\n        if (isDestroyed) {\n          return;\n        }\n\n        var _state$elements = state.elements,\n            reference = _state$elements.reference,\n            popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n        // anymore\n\n        if (!areValidElements(reference, popper)) {\n          if (process.env.NODE_ENV !== \"production\") {\n            console.error(INVALID_ELEMENT_ERROR);\n          }\n\n          return;\n        } // Store the reference and popper rects to be read by modifiers\n\n\n        state.rects = {\n          reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n          popper: getLayoutRect(popper)\n        }; // Modifiers have the ability to reset the current update cycle. The\n        // most common use case for this is the `flip` modifier changing the\n        // placement, which then needs to re-run all the modifiers, because the\n        // logic was previously ran for the previous placement and is therefore\n        // stale/incorrect\n\n        state.reset = false;\n        state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n        // is filled with the initial data specified by the modifier. This means\n        // it doesn't persist and is fresh on each update.\n        // To ensure persistent data, use `${name}#persistent`\n\n        state.orderedModifiers.forEach(function (modifier) {\n          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n        });\n        var __debug_loops__ = 0;\n\n        for (var index = 0; index < state.orderedModifiers.length; index++) {\n          if (process.env.NODE_ENV !== \"production\") {\n            __debug_loops__ += 1;\n\n            if (__debug_loops__ > 100) {\n              console.error(INFINITE_LOOP_ERROR);\n              break;\n            }\n          }\n\n          if (state.reset === true) {\n            state.reset = false;\n            index = -1;\n            continue;\n          }\n\n          var _state$orderedModifie = state.orderedModifiers[index],\n              fn = _state$orderedModifie.fn,\n              _state$orderedModifie2 = _state$orderedModifie.options,\n              _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n              name = _state$orderedModifie.name;\n\n          if (typeof fn === 'function') {\n            state = fn({\n              state: state,\n              options: _options,\n              name: name,\n              instance: instance\n            }) || state;\n          }\n        }\n      },\n      // Async and optimistically optimized update – it will not be executed if\n      // not necessary (debounced to run at most once-per-tick)\n      update: debounce(function () {\n        return new Promise(function (resolve) {\n          instance.forceUpdate();\n          resolve(state);\n        });\n      }),\n      destroy: function destroy() {\n        cleanupModifierEffects();\n        isDestroyed = true;\n      }\n    };\n\n    if (!areValidElements(reference, popper)) {\n      if (process.env.NODE_ENV !== \"production\") {\n        console.error(INVALID_ELEMENT_ERROR);\n      }\n\n      return instance;\n    }\n\n    instance.setOptions(options).then(function (state) {\n      if (!isDestroyed && options.onFirstUpdate) {\n        options.onFirstUpdate(state);\n      }\n    }); // Modifiers have the ability to execute arbitrary code before the first\n    // update cycle runs. They will be executed in the same order as the update\n    // cycle. This is useful when a modifier adds some persistent data that\n    // other modifiers need to use, but the modifier is run after the dependent\n    // one.\n\n    function runModifierEffects() {\n      state.orderedModifiers.forEach(function (_ref3) {\n        var name = _ref3.name,\n            _ref3$options = _ref3.options,\n            options = _ref3$options === void 0 ? {} : _ref3$options,\n            effect = _ref3.effect;\n\n        if (typeof effect === 'function') {\n          var cleanupFn = effect({\n            state: state,\n            name: name,\n            instance: instance,\n            options: options\n          });\n\n          var noopFn = function noopFn() {};\n\n          effectCleanupFns.push(cleanupFn || noopFn);\n        }\n      });\n    }\n\n    function cleanupModifierEffects() {\n      effectCleanupFns.forEach(function (fn) {\n        return fn();\n      });\n      effectCleanupFns = [];\n    }\n\n    return instance;\n  };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n  var pending;\n  return function () {\n    if (!pending) {\n      pending = new Promise(function (resolve) {\n        Promise.resolve().then(function () {\n          pending = undefined;\n          resolve(fn());\n        });\n      });\n    }\n\n    return pending;\n  };\n}","export default function mergeByName(modifiers) {\n  var merged = modifiers.reduce(function (merged, current) {\n    var existing = merged[current.name];\n    merged[current.name] = existing ? Object.assign(Object.assign(Object.assign({}, existing), current), {}, {\n      options: Object.assign(Object.assign({}, existing.options), current.options),\n      data: Object.assign(Object.assign({}, existing.data), current.data)\n    }) : current;\n    return merged;\n  }, {}); // IE11 does not support Object.values\n\n  return Object.keys(merged).map(function (key) {\n    return merged[key];\n  });\n}","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n  passive: true\n};\n\nfunction effect(_ref) {\n  var state = _ref.state,\n      instance = _ref.instance,\n      options = _ref.options;\n  var _options$scroll = options.scroll,\n      scroll = _options$scroll === void 0 ? true : _options$scroll,\n      _options$resize = options.resize,\n      resize = _options$resize === void 0 ? true : _options$resize;\n  var window = getWindow(state.elements.popper);\n  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n  if (scroll) {\n    scrollParents.forEach(function (scrollParent) {\n      scrollParent.addEventListener('scroll', instance.update, passive);\n    });\n  }\n\n  if (resize) {\n    window.addEventListener('resize', instance.update, passive);\n  }\n\n  return function () {\n    if (scroll) {\n      scrollParents.forEach(function (scrollParent) {\n        scrollParent.removeEventListener('scroll', instance.update, passive);\n      });\n    }\n\n    if (resize) {\n      window.removeEventListener('resize', instance.update, passive);\n    }\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'eventListeners',\n  enabled: true,\n  phase: 'write',\n  fn: function fn() {},\n  effect: effect,\n  data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n  return placement.split('-')[0];\n}","export default function getVariation(placement) {\n  return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n  return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n  var reference = _ref.reference,\n      element = _ref.element,\n      placement = _ref.placement;\n  var basePlacement = placement ? getBasePlacement(placement) : null;\n  var variation = placement ? getVariation(placement) : null;\n  var commonX = reference.x + reference.width / 2 - element.width / 2;\n  var commonY = reference.y + reference.height / 2 - element.height / 2;\n  var offsets;\n\n  switch (basePlacement) {\n    case top:\n      offsets = {\n        x: commonX,\n        y: reference.y - element.height\n      };\n      break;\n\n    case bottom:\n      offsets = {\n        x: commonX,\n        y: reference.y + reference.height\n      };\n      break;\n\n    case right:\n      offsets = {\n        x: reference.x + reference.width,\n        y: commonY\n      };\n      break;\n\n    case left:\n      offsets = {\n        x: reference.x - element.width,\n        y: commonY\n      };\n      break;\n\n    default:\n      offsets = {\n        x: reference.x,\n        y: reference.y\n      };\n  }\n\n  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n  if (mainAxis != null) {\n    var len = mainAxis === 'y' ? 'height' : 'width';\n\n    switch (variation) {\n      case start:\n        offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n        break;\n\n      case end:\n        offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n        break;\n\n      default:\n    }\n  }\n\n  return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  // Offsets are the actual position the popper needs to have to be\n  // properly positioned near its reference element\n  // This is the most basic placement, and will be adjusted by\n  // the modifiers in the next step\n  state.modifiersData[name] = computeOffsets({\n    reference: state.rects.reference,\n    element: state.rects.popper,\n    strategy: 'absolute',\n    placement: state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'popperOffsets',\n  enabled: true,\n  phase: 'read',\n  fn: popperOffsets,\n  data: {}\n};","import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n  top: 'auto',\n  right: 'auto',\n  bottom: 'auto',\n  left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n  var x = _ref.x,\n      y = _ref.y;\n  var win = window;\n  var dpr = win.devicePixelRatio || 1;\n  return {\n    x: Math.round(x * dpr) / dpr || 0,\n    y: Math.round(y * dpr) / dpr || 0\n  };\n}\n\nexport function mapToStyles(_ref2) {\n  var _Object$assign2;\n\n  var popper = _ref2.popper,\n      popperRect = _ref2.popperRect,\n      placement = _ref2.placement,\n      offsets = _ref2.offsets,\n      position = _ref2.position,\n      gpuAcceleration = _ref2.gpuAcceleration,\n      adaptive = _ref2.adaptive,\n      roundOffsets = _ref2.roundOffsets;\n\n  var _ref3 = roundOffsets ? roundOffsetsByDPR(offsets) : offsets,\n      _ref3$x = _ref3.x,\n      x = _ref3$x === void 0 ? 0 : _ref3$x,\n      _ref3$y = _ref3.y,\n      y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n  var hasX = offsets.hasOwnProperty('x');\n  var hasY = offsets.hasOwnProperty('y');\n  var sideX = left;\n  var sideY = top;\n  var win = window;\n\n  if (adaptive) {\n    var offsetParent = getOffsetParent(popper);\n\n    if (offsetParent === getWindow(popper)) {\n      offsetParent = getDocumentElement(popper);\n    } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n    /*:: offsetParent = (offsetParent: Element); */\n\n\n    if (placement === top) {\n      sideY = bottom;\n      y -= offsetParent.clientHeight - popperRect.height;\n      y *= gpuAcceleration ? 1 : -1;\n    }\n\n    if (placement === left) {\n      sideX = right;\n      x -= offsetParent.clientWidth - popperRect.width;\n      x *= gpuAcceleration ? 1 : -1;\n    }\n  }\n\n  var commonStyles = Object.assign({\n    position: position\n  }, adaptive && unsetSides);\n\n  if (gpuAcceleration) {\n    var _Object$assign;\n\n    return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n  }\n\n  return Object.assign(Object.assign({}, commonStyles), {}, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n  var state = _ref4.state,\n      options = _ref4.options;\n  var _options$gpuAccelerat = options.gpuAcceleration,\n      gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n      _options$adaptive = options.adaptive,\n      adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n      _options$roundOffsets = options.roundOffsets,\n      roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n  if (process.env.NODE_ENV !== \"production\") {\n    var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n    if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n      return transitionProperty.indexOf(property) >= 0;\n    })) {\n      console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n    }\n  }\n\n  var commonStyles = {\n    placement: getBasePlacement(state.placement),\n    popper: state.elements.popper,\n    popperRect: state.rects.popper,\n    gpuAcceleration: gpuAcceleration\n  };\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n      offsets: state.modifiersData.popperOffsets,\n      position: state.options.strategy,\n      adaptive: adaptive,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  if (state.modifiersData.arrow != null) {\n    state.styles.arrow = Object.assign(Object.assign({}, state.styles.arrow), mapToStyles(Object.assign(Object.assign({}, commonStyles), {}, {\n      offsets: state.modifiersData.arrow,\n      position: 'absolute',\n      adaptive: false,\n      roundOffsets: roundOffsets\n    })));\n  }\n\n  state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n    'data-popper-placement': state.placement\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'computeStyles',\n  enabled: true,\n  phase: 'beforeWrite',\n  fn: computeStyles,\n  data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n  var state = _ref.state;\n  Object.keys(state.elements).forEach(function (name) {\n    var style = state.styles[name] || {};\n    var attributes = state.attributes[name] || {};\n    var element = state.elements[name]; // arrow is optional + virtual elements\n\n    if (!isHTMLElement(element) || !getNodeName(element)) {\n      return;\n    } // Flow doesn't support to extend this property, but it's the most\n    // effective way to apply styles to an HTMLElement\n    // $FlowFixMe[cannot-write]\n\n\n    Object.assign(element.style, style);\n    Object.keys(attributes).forEach(function (name) {\n      var value = attributes[name];\n\n      if (value === false) {\n        element.removeAttribute(name);\n      } else {\n        element.setAttribute(name, value === true ? '' : value);\n      }\n    });\n  });\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state;\n  var initialStyles = {\n    popper: {\n      position: state.options.strategy,\n      left: '0',\n      top: '0',\n      margin: '0'\n    },\n    arrow: {\n      position: 'absolute'\n    },\n    reference: {}\n  };\n  Object.assign(state.elements.popper.style, initialStyles.popper);\n\n  if (state.elements.arrow) {\n    Object.assign(state.elements.arrow.style, initialStyles.arrow);\n  }\n\n  return function () {\n    Object.keys(state.elements).forEach(function (name) {\n      var element = state.elements[name];\n      var attributes = state.attributes[name] || {};\n      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n      var style = styleProperties.reduce(function (style, property) {\n        style[property] = '';\n        return style;\n      }, {}); // arrow is optional + virtual elements\n\n      if (!isHTMLElement(element) || !getNodeName(element)) {\n        return;\n      }\n\n      Object.assign(element.style, style);\n      Object.keys(attributes).forEach(function (attribute) {\n        element.removeAttribute(attribute);\n      });\n    });\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'applyStyles',\n  enabled: true,\n  phase: 'write',\n  fn: applyStyles,\n  effect: effect,\n  requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n  var basePlacement = getBasePlacement(placement);\n  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n  var _ref = typeof offset === 'function' ? offset(Object.assign(Object.assign({}, rects), {}, {\n    placement: placement\n  })) : offset,\n      skidding = _ref[0],\n      distance = _ref[1];\n\n  skidding = skidding || 0;\n  distance = (distance || 0) * invertDistance;\n  return [left, right].indexOf(basePlacement) >= 0 ? {\n    x: distance,\n    y: skidding\n  } : {\n    x: skidding,\n    y: distance\n  };\n}\n\nfunction offset(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$offset = options.offset,\n      offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n  var data = placements.reduce(function (acc, placement) {\n    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n    return acc;\n  }, {});\n  var _data$state$placement = data[state.placement],\n      x = _data$state$placement.x,\n      y = _data$state$placement.y;\n\n  if (state.modifiersData.popperOffsets != null) {\n    state.modifiersData.popperOffsets.x += x;\n    state.modifiersData.popperOffsets.y += y;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'offset',\n  enabled: true,\n  phase: 'main',\n  requires: ['popperOffsets'],\n  fn: offset\n};","var hash = {\n  left: 'right',\n  right: 'left',\n  bottom: 'top',\n  top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n  return placement.replace(/left|right|bottom|top/g, function (matched) {\n    return hash[matched];\n  });\n}","var hash = {\n  start: 'end',\n  end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n  return placement.replace(/start|end/g, function (matched) {\n    return hash[matched];\n  });\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n  var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n  if (parent.contains(child)) {\n    return true;\n  } // then fallback to custom implementation with Shadow DOM support\n  else if (rootNode && isShadowRoot(rootNode)) {\n      var next = child;\n\n      do {\n        if (next && parent.isSameNode(next)) {\n          return true;\n        } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n        next = next.parentNode || next.host;\n      } while (next);\n    } // Give up, the result is false\n\n\n  return false;\n}","export default function rectToClientRect(rect) {\n  return Object.assign(Object.assign({}, rect), {}, {\n    left: rect.x,\n    top: rect.y,\n    right: rect.x + rect.width,\n    bottom: rect.y + rect.height\n  });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\n\nfunction getInnerBoundingClientRect(element) {\n  var rect = getBoundingClientRect(element);\n  rect.top = rect.top + element.clientTop;\n  rect.left = rect.left + element.clientLeft;\n  rect.bottom = rect.top + element.clientHeight;\n  rect.right = rect.left + element.clientWidth;\n  rect.width = element.clientWidth;\n  rect.height = element.clientHeight;\n  rect.x = rect.left;\n  rect.y = rect.top;\n  return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n  return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n  var clippingParents = listScrollParents(getParentNode(element));\n  var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n  var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n  if (!isElement(clipperElement)) {\n    return [];\n  } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n  return clippingParents.filter(function (clippingParent) {\n    return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n  });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n  var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n  var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n  var firstClippingParent = clippingParents[0];\n  var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n    var rect = getClientRectFromMixedType(element, clippingParent);\n    accRect.top = Math.max(rect.top, accRect.top);\n    accRect.right = Math.min(rect.right, accRect.right);\n    accRect.bottom = Math.min(rect.bottom, accRect.bottom);\n    accRect.left = Math.max(rect.left, accRect.left);\n    return accRect;\n  }, getClientRectFromMixedType(element, firstClippingParent));\n  clippingRect.width = clippingRect.right - clippingRect.left;\n  clippingRect.height = clippingRect.bottom - clippingRect.top;\n  clippingRect.x = clippingRect.left;\n  clippingRect.y = clippingRect.top;\n  return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n  var win = getWindow(element);\n  var html = getDocumentElement(element);\n  var visualViewport = win.visualViewport;\n  var width = html.clientWidth;\n  var height = html.clientHeight;\n  var x = 0;\n  var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n  // can be obscured underneath it.\n  // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n  // if it isn't open, so if this isn't available, the popper will be detected\n  // to overflow the bottom of the screen too early.\n\n  if (visualViewport) {\n    width = visualViewport.width;\n    height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n    // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n    // errors due to floating point numbers, so we need to check precision.\n    // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n    // Feature detection fails in mobile emulation mode in Chrome.\n    // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n    // 0.001\n    // Fallback here: \"Not Safari\" userAgent\n\n    if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n      x = visualViewport.offsetLeft;\n      y = visualViewport.offsetTop;\n    }\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x + getWindowScrollBarX(element),\n    y: y\n  };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n  var html = getDocumentElement(element);\n  var winScroll = getWindowScroll(element);\n  var body = element.ownerDocument.body;\n  var width = Math.max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n  var height = Math.max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n  var y = -winScroll.scrollTop;\n\n  if (getComputedStyle(body || html).direction === 'rtl') {\n    x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n  }\n\n  return {\n    width: width,\n    height: height,\n    x: x,\n    y: y\n  };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n  return Object.assign(Object.assign({}, getFreshSideObject()), paddingObject);\n}","export default function getFreshSideObject() {\n  return {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  };\n}","export default function expandToHashMap(value, keys) {\n  return keys.reduce(function (hashMap, key) {\n    hashMap[key] = value;\n    return hashMap;\n  }, {});\n}","import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      _options$placement = _options.placement,\n      placement = _options$placement === void 0 ? state.placement : _options$placement,\n      _options$boundary = _options.boundary,\n      boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n      _options$rootBoundary = _options.rootBoundary,\n      rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n      _options$elementConte = _options.elementContext,\n      elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n      _options$altBoundary = _options.altBoundary,\n      altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n      _options$padding = _options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n  var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n  var altContext = elementContext === popper ? reference : popper;\n  var referenceElement = state.elements.reference;\n  var popperRect = state.rects.popper;\n  var element = state.elements[altBoundary ? altContext : elementContext];\n  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n  var referenceClientRect = getBoundingClientRect(referenceElement);\n  var popperOffsets = computeOffsets({\n    reference: referenceClientRect,\n    element: popperRect,\n    strategy: 'absolute',\n    placement: placement\n  });\n  var popperClientRect = rectToClientRect(Object.assign(Object.assign({}, popperRect), popperOffsets));\n  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n  // 0 or negative = within the clipping rect\n\n  var overflowOffsets = {\n    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n    right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n  };\n  var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n  if (elementContext === popper && offsetData) {\n    var offset = offsetData[placement];\n    Object.keys(overflowOffsets).forEach(function (key) {\n      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n      var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n      overflowOffsets[key] += offset[axis] * multiply;\n    });\n  }\n\n  return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n  if (getBasePlacement(placement) === auto) {\n    return [];\n  }\n\n  var oppositePlacement = getOppositePlacement(placement);\n  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n\n  if (state.modifiersData[name]._skip) {\n    return;\n  }\n\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n      specifiedFallbackPlacements = options.fallbackPlacements,\n      padding = options.padding,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      _options$flipVariatio = options.flipVariations,\n      flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n      allowedAutoPlacements = options.allowedAutoPlacements;\n  var preferredPlacement = state.options.placement;\n  var basePlacement = getBasePlacement(preferredPlacement);\n  var isBasePlacement = basePlacement === preferredPlacement;\n  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n  var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n    return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding,\n      flipVariations: flipVariations,\n      allowedAutoPlacements: allowedAutoPlacements\n    }) : placement);\n  }, []);\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var checksMap = new Map();\n  var makeFallbackChecks = true;\n  var firstFittingPlacement = placements[0];\n\n  for (var i = 0; i < placements.length; i++) {\n    var placement = placements[i];\n\n    var _basePlacement = getBasePlacement(placement);\n\n    var isStartVariation = getVariation(placement) === start;\n    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n    var len = isVertical ? 'width' : 'height';\n    var overflow = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      altBoundary: altBoundary,\n      padding: padding\n    });\n    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n    if (referenceRect[len] > popperRect[len]) {\n      mainVariationSide = getOppositePlacement(mainVariationSide);\n    }\n\n    var altVariationSide = getOppositePlacement(mainVariationSide);\n    var checks = [];\n\n    if (checkMainAxis) {\n      checks.push(overflow[_basePlacement] <= 0);\n    }\n\n    if (checkAltAxis) {\n      checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n    }\n\n    if (checks.every(function (check) {\n      return check;\n    })) {\n      firstFittingPlacement = placement;\n      makeFallbackChecks = false;\n      break;\n    }\n\n    checksMap.set(placement, checks);\n  }\n\n  if (makeFallbackChecks) {\n    // `2` may be desired in some cases – research later\n    var numberOfChecks = flipVariations ? 3 : 1;\n\n    var _loop = function _loop(_i) {\n      var fittingPlacement = placements.find(function (placement) {\n        var checks = checksMap.get(placement);\n\n        if (checks) {\n          return checks.slice(0, _i).every(function (check) {\n            return check;\n          });\n        }\n      });\n\n      if (fittingPlacement) {\n        firstFittingPlacement = fittingPlacement;\n        return \"break\";\n      }\n    };\n\n    for (var _i = numberOfChecks; _i > 0; _i--) {\n      var _ret = _loop(_i);\n\n      if (_ret === \"break\") break;\n    }\n  }\n\n  if (state.placement !== firstFittingPlacement) {\n    state.modifiersData[name]._skip = true;\n    state.placement = firstFittingPlacement;\n    state.reset = true;\n  }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'flip',\n  enabled: true,\n  phase: 'main',\n  fn: flip,\n  requiresIfExists: ['offset'],\n  data: {\n    _skip: false\n  }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\n\n/*:: type OverflowsMap = { [ComputedPlacement]: number }; */\n\n/*;; type OverflowsMap = { [key in ComputedPlacement]: number }; */\nexport default function computeAutoPlacement(state, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var _options = options,\n      placement = _options.placement,\n      boundary = _options.boundary,\n      rootBoundary = _options.rootBoundary,\n      padding = _options.padding,\n      flipVariations = _options.flipVariations,\n      _options$allowedAutoP = _options.allowedAutoPlacements,\n      allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n  var variation = getVariation(placement);\n  var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n    return getVariation(placement) === variation;\n  }) : basePlacements;\n  var allowedPlacements = placements.filter(function (placement) {\n    return allowedAutoPlacements.indexOf(placement) >= 0;\n  });\n\n  if (allowedPlacements.length === 0) {\n    allowedPlacements = placements;\n\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n    }\n  } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n  var overflows = allowedPlacements.reduce(function (acc, placement) {\n    acc[placement] = detectOverflow(state, {\n      placement: placement,\n      boundary: boundary,\n      rootBoundary: rootBoundary,\n      padding: padding\n    })[getBasePlacement(placement)];\n    return acc;\n  }, {});\n  return Object.keys(overflows).sort(function (a, b) {\n    return overflows[a] - overflows[b];\n  });\n}","export default function within(min, value, max) {\n  return Math.max(min, Math.min(value, max));\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\n\nfunction preventOverflow(_ref) {\n  var state = _ref.state,\n      options = _ref.options,\n      name = _ref.name;\n  var _options$mainAxis = options.mainAxis,\n      checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n      _options$altAxis = options.altAxis,\n      checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n      boundary = options.boundary,\n      rootBoundary = options.rootBoundary,\n      altBoundary = options.altBoundary,\n      padding = options.padding,\n      _options$tether = options.tether,\n      tether = _options$tether === void 0 ? true : _options$tether,\n      _options$tetherOffset = options.tetherOffset,\n      tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n  var overflow = detectOverflow(state, {\n    boundary: boundary,\n    rootBoundary: rootBoundary,\n    padding: padding,\n    altBoundary: altBoundary\n  });\n  var basePlacement = getBasePlacement(state.placement);\n  var variation = getVariation(state.placement);\n  var isBasePlacement = !variation;\n  var mainAxis = getMainAxisFromPlacement(basePlacement);\n  var altAxis = getAltAxis(mainAxis);\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign(Object.assign({}, state.rects), {}, {\n    placement: state.placement\n  })) : tetherOffset;\n  var data = {\n    x: 0,\n    y: 0\n  };\n\n  if (!popperOffsets) {\n    return;\n  }\n\n  if (checkMainAxis) {\n    var mainSide = mainAxis === 'y' ? top : left;\n    var altSide = mainAxis === 'y' ? bottom : right;\n    var len = mainAxis === 'y' ? 'height' : 'width';\n    var offset = popperOffsets[mainAxis];\n    var min = popperOffsets[mainAxis] + overflow[mainSide];\n    var max = popperOffsets[mainAxis] - overflow[altSide];\n    var additive = tether ? -popperRect[len] / 2 : 0;\n    var minLen = variation === start ? referenceRect[len] : popperRect[len];\n    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n    // outside the reference bounds\n\n    var arrowElement = state.elements.arrow;\n    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n      width: 0,\n      height: 0\n    };\n    var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n    var arrowPaddingMin = arrowPaddingObject[mainSide];\n    var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n    // to include its full size in the calculation. If the reference is small\n    // and near the edge of a boundary, the popper can overflow even if the\n    // reference is not overflowing as well (e.g. virtual elements with no\n    // width or height)\n\n    var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n    var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n    var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n    var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n    var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n    var preventedOffset = within(tether ? Math.min(min, tetherMin) : min, offset, tether ? Math.max(max, tetherMax) : max);\n    popperOffsets[mainAxis] = preventedOffset;\n    data[mainAxis] = preventedOffset - offset;\n  }\n\n  if (checkAltAxis) {\n    var _mainSide = mainAxis === 'x' ? top : left;\n\n    var _altSide = mainAxis === 'x' ? bottom : right;\n\n    var _offset = popperOffsets[altAxis];\n\n    var _min = _offset + overflow[_mainSide];\n\n    var _max = _offset - overflow[_altSide];\n\n    var _preventedOffset = within(_min, _offset, _max);\n\n    popperOffsets[altAxis] = _preventedOffset;\n    data[altAxis] = _preventedOffset - _offset;\n  }\n\n  state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'preventOverflow',\n  enabled: true,\n  phase: 'main',\n  fn: preventOverflow,\n  requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n  return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction arrow(_ref) {\n  var _state$modifiersData$;\n\n  var state = _ref.state,\n      name = _ref.name;\n  var arrowElement = state.elements.arrow;\n  var popperOffsets = state.modifiersData.popperOffsets;\n  var basePlacement = getBasePlacement(state.placement);\n  var axis = getMainAxisFromPlacement(basePlacement);\n  var isVertical = [left, right].indexOf(basePlacement) >= 0;\n  var len = isVertical ? 'height' : 'width';\n\n  if (!arrowElement || !popperOffsets) {\n    return;\n  }\n\n  var paddingObject = state.modifiersData[name + \"#persistent\"].padding;\n  var arrowRect = getLayoutRect(arrowElement);\n  var minProp = axis === 'y' ? top : left;\n  var maxProp = axis === 'y' ? bottom : right;\n  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n  var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n  var arrowOffsetParent = getOffsetParent(arrowElement);\n  var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n  var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n  // outside of the popper bounds\n\n  var min = paddingObject[minProp];\n  var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n  var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n  var axisProp = axis;\n  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n  var state = _ref2.state,\n      options = _ref2.options,\n      name = _ref2.name;\n  var _options$element = options.element,\n      arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element,\n      _options$padding = options.padding,\n      padding = _options$padding === void 0 ? 0 : _options$padding;\n\n  if (arrowElement == null) {\n    return;\n  } // CSS selector\n\n\n  if (typeof arrowElement === 'string') {\n    arrowElement = state.elements.popper.querySelector(arrowElement);\n\n    if (!arrowElement) {\n      return;\n    }\n  }\n\n  if (process.env.NODE_ENV !== \"production\") {\n    if (!isHTMLElement(arrowElement)) {\n      console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n    }\n  }\n\n  if (!contains(state.elements.popper, arrowElement)) {\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n    }\n\n    return;\n  }\n\n  state.elements.arrow = arrowElement;\n  state.modifiersData[name + \"#persistent\"] = {\n    padding: mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements))\n  };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'arrow',\n  enabled: true,\n  phase: 'main',\n  fn: arrow,\n  effect: effect,\n  requires: ['popperOffsets'],\n  requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n  if (preventedOffsets === void 0) {\n    preventedOffsets = {\n      x: 0,\n      y: 0\n    };\n  }\n\n  return {\n    top: overflow.top - rect.height - preventedOffsets.y,\n    right: overflow.right - rect.width + preventedOffsets.x,\n    bottom: overflow.bottom - rect.height + preventedOffsets.y,\n    left: overflow.left - rect.width - preventedOffsets.x\n  };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n  return [top, right, bottom, left].some(function (side) {\n    return overflow[side] >= 0;\n  });\n}\n\nfunction hide(_ref) {\n  var state = _ref.state,\n      name = _ref.name;\n  var referenceRect = state.rects.reference;\n  var popperRect = state.rects.popper;\n  var preventedOffsets = state.modifiersData.preventOverflow;\n  var referenceOverflow = detectOverflow(state, {\n    elementContext: 'reference'\n  });\n  var popperAltOverflow = detectOverflow(state, {\n    altBoundary: true\n  });\n  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n  state.modifiersData[name] = {\n    referenceClippingOffsets: referenceClippingOffsets,\n    popperEscapeOffsets: popperEscapeOffsets,\n    isReferenceHidden: isReferenceHidden,\n    hasPopperEscaped: hasPopperEscaped\n  };\n  state.attributes.popper = Object.assign(Object.assign({}, state.attributes.popper), {}, {\n    'data-popper-reference-hidden': isReferenceHidden,\n    'data-popper-escaped': hasPopperEscaped\n  });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n  name: 'hide',\n  enabled: true,\n  phase: 'main',\n  requiresIfExists: ['preventOverflow'],\n  fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n  defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { shallowEqual } from 'reakit-utils/shallowEqual';\nimport { useRef, useState, useCallback, useEffect } from 'react';\nimport 'reakit-warning';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport { isUA } from 'reakit-utils/dom';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport '../Id/IdProvider.js';\nimport '../Id/IdState.js';\nimport { createPopper } from '@popperjs/core';\nimport '../Disclosure/DisclosureState.js';\nimport { useDialogState } from '../Dialog/DialogState.js';\n\nvar isSafari = isUA(\"Mac\") && !isUA(\"Chrome\") && isUA(\"Safari\");\n\nfunction applyStyles(styles) {\n  return function (prevStyles) {\n    if (styles && !shallowEqual(prevStyles, styles)) {\n      return styles;\n    }\n\n    return prevStyles;\n  };\n}\n\nfunction usePopoverState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$gutte = _useSealedState.gutter,\n      gutter = _useSealedState$gutte === void 0 ? 12 : _useSealedState$gutte,\n      _useSealedState$place = _useSealedState.placement,\n      sealedPlacement = _useSealedState$place === void 0 ? \"bottom\" : _useSealedState$place,\n      _useSealedState$unsta = _useSealedState.unstable_flip,\n      flip = _useSealedState$unsta === void 0 ? true : _useSealedState$unsta,\n      sealedOffset = _useSealedState.unstable_offset,\n      _useSealedState$unsta2 = _useSealedState.unstable_preventOverflow,\n      preventOverflow = _useSealedState$unsta2 === void 0 ? true : _useSealedState$unsta2,\n      _useSealedState$unsta3 = _useSealedState.unstable_fixed,\n      fixed = _useSealedState$unsta3 === void 0 ? false : _useSealedState$unsta3,\n      _useSealedState$modal = _useSealedState.modal,\n      modal = _useSealedState$modal === void 0 ? false : _useSealedState$modal,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"gutter\", \"placement\", \"unstable_flip\", \"unstable_offset\", \"unstable_preventOverflow\", \"unstable_fixed\", \"modal\"]);\n\n  var popper = useRef(null);\n  var referenceRef = useRef(null);\n  var popoverRef = useRef(null);\n  var arrowRef = useRef(null);\n\n  var _React$useState = useState(sealedPlacement),\n      originalPlacement = _React$useState[0],\n      place = _React$useState[1];\n\n  var _React$useState2 = useState(sealedPlacement),\n      placement = _React$useState2[0],\n      setPlacement = _React$useState2[1];\n\n  var _React$useState3 = useState(sealedOffset || [0, gutter]),\n      offset = _React$useState3[0];\n\n  var _React$useState4 = useState({\n    position: \"fixed\",\n    left: \"100%\",\n    top: \"100%\"\n  }),\n      popoverStyles = _React$useState4[0],\n      setPopoverStyles = _React$useState4[1];\n\n  var _React$useState5 = useState({}),\n      arrowStyles = _React$useState5[0],\n      setArrowStyles = _React$useState5[1];\n\n  var dialog = useDialogState(_objectSpread2({\n    modal: modal\n  }, sealed));\n  var update = useCallback(function () {\n    if (popper.current) {\n      popper.current.forceUpdate();\n      return true;\n    }\n\n    return false;\n  }, []);\n  var updateState = useCallback(function (state) {\n    if (state.placement) {\n      setPlacement(state.placement);\n    }\n\n    if (state.styles) {\n      setPopoverStyles(applyStyles(state.styles.popper));\n\n      if (arrowRef.current) {\n        setArrowStyles(applyStyles(state.styles.arrow));\n      }\n    }\n  }, []);\n  useIsomorphicEffect(function () {\n    if (referenceRef.current && popoverRef.current) {\n      popper.current = createPopper(referenceRef.current, popoverRef.current, {\n        // https://popper.js.org/docs/v2/constructors/#options\n        placement: originalPlacement,\n        strategy: fixed ? \"fixed\" : \"absolute\",\n        // Safari needs styles to be applied in the first render, otherwise\n        // hovering over the popover when it gets visible for the first time\n        // will change its dimensions unexpectedly.\n        onFirstUpdate: isSafari ? updateState : undefined,\n        modifiers: [{\n          // https://popper.js.org/docs/v2/modifiers/event-listeners/\n          name: \"eventListeners\",\n          enabled: dialog.visible\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/apply-styles/\n          name: \"applyStyles\",\n          enabled: false\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/flip/\n          name: \"flip\",\n          enabled: flip,\n          options: {\n            padding: 8\n          }\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/offset/\n          name: \"offset\",\n          options: {\n            offset: offset\n          }\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/prevent-overflow/\n          name: \"preventOverflow\",\n          enabled: preventOverflow,\n          options: {\n            tetherOffset: function tetherOffset() {\n              var _arrowRef$current;\n\n              return ((_arrowRef$current = arrowRef.current) === null || _arrowRef$current === void 0 ? void 0 : _arrowRef$current.clientWidth) || 0;\n            }\n          }\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/arrow/\n          name: \"arrow\",\n          enabled: !!arrowRef.current,\n          options: {\n            element: arrowRef.current\n          }\n        }, {\n          // https://popper.js.org/docs/v2/modifiers/#custom-modifiers\n          name: \"updateState\",\n          phase: \"write\",\n          requires: [\"computeStyles\"],\n          enabled: dialog.visible && process.env.NODE_ENV !== \"test\",\n          fn: function fn(_ref) {\n            var state = _ref.state;\n            return updateState(state);\n          }\n        }]\n      });\n    }\n\n    return function () {\n      if (popper.current) {\n        popper.current.destroy();\n        popper.current = null;\n      }\n    };\n  }, [originalPlacement, fixed, dialog.visible, flip, offset, preventOverflow]); // Ensure that the popover will be correctly positioned with an additional\n  // update.\n\n  useEffect(function () {\n    if (!dialog.visible) return undefined;\n    var id = window.requestAnimationFrame(function () {\n      var _popper$current;\n\n      (_popper$current = popper.current) === null || _popper$current === void 0 ? void 0 : _popper$current.forceUpdate();\n    });\n    return function () {\n      window.cancelAnimationFrame(id);\n    };\n  }, [dialog.visible]);\n  return _objectSpread2(_objectSpread2({}, dialog), {}, {\n    unstable_referenceRef: referenceRef,\n    unstable_popoverRef: popoverRef,\n    unstable_arrowRef: arrowRef,\n    unstable_popoverStyles: popoverStyles,\n    unstable_arrowStyles: arrowStyles,\n    unstable_update: update,\n    unstable_originalPlacement: originalPlacement,\n    placement: placement,\n    place: place\n  });\n}\n\nexport { usePopoverState };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { useState, useRef } from 'react';\nimport 'reakit-warning';\nimport 'reakit-utils/useIsomorphicEffect';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport '../Id/IdProvider.js';\nimport '../Id/IdState.js';\nimport { useDisclosureState } from '../Disclosure/DisclosureState.js';\n\nfunction useDialogState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$modal = _useSealedState.modal,\n      initialModal = _useSealedState$modal === void 0 ? true : _useSealedState$modal,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"modal\"]);\n\n  var disclosure = useDisclosureState(sealed);\n\n  var _React$useState = useState(initialModal),\n      modal = _React$useState[0],\n      setModal = _React$useState[1];\n\n  var disclosureRef = useRef(null);\n  return _objectSpread2(_objectSpread2({}, disclosure), {}, {\n    modal: modal,\n    setModal: setModal,\n    unstable_disclosureRef: disclosureRef\n  });\n}\n\nexport { useDialogState };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { useState, useEffect, useCallback, useRef } from 'react';\nimport { warning } from 'reakit-warning';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport '../Id/IdProvider.js';\nimport { unstable_useIdState } from '../Id/IdState.js';\n\nfunction useLastValue(value) {\n  var lastValue = useRef(null);\n  useIsomorphicEffect(function () {\n    lastValue.current = value;\n  }, [value]);\n  return lastValue;\n}\n\nfunction useDisclosureState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$visib = _useSealedState.visible,\n      initialVisible = _useSealedState$visib === void 0 ? false : _useSealedState$visib,\n      _useSealedState$anima = _useSealedState.animated,\n      initialAnimated = _useSealedState$anima === void 0 ? false : _useSealedState$anima,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"visible\", \"animated\"]);\n\n  var id = unstable_useIdState(sealed);\n\n  var _React$useState = useState(initialVisible),\n      visible = _React$useState[0],\n      setVisible = _React$useState[1];\n\n  var _React$useState2 = useState(initialAnimated),\n      animated = _React$useState2[0],\n      setAnimated = _React$useState2[1];\n\n  var _React$useState3 = useState(false),\n      animating = _React$useState3[0],\n      setAnimating = _React$useState3[1];\n\n  var lastVisible = useLastValue(visible);\n  var visibleHasChanged = lastVisible.current != null && lastVisible.current !== visible;\n\n  if (animated && !animating && visibleHasChanged) {\n    // Sets animating to true when when visible is updated\n    setAnimating(true);\n  }\n\n  useEffect(function () {\n    if (typeof animated === \"number\" && animating) {\n      var timeout = setTimeout(function () {\n        return setAnimating(false);\n      }, animated);\n      return function () {\n        clearTimeout(timeout);\n      };\n    }\n\n    if (animated && animating && process.env.NODE_ENV === \"development\") {\n      var _timeout = setTimeout(function () {\n        process.env.NODE_ENV !== \"production\" ? warning(animating, \"It's been 8 seconds but stopAnimation has not been called. Does the disclousure element have a CSS transition?\") : void 0;\n      }, 8000);\n\n      return function () {\n        clearTimeout(_timeout);\n      };\n    }\n\n    return function () {};\n  }, [animated, animating]);\n  var show = useCallback(function () {\n    return setVisible(true);\n  }, []);\n  var hide = useCallback(function () {\n    return setVisible(false);\n  }, []);\n  var toggle = useCallback(function () {\n    return setVisible(function (v) {\n      return !v;\n    });\n  }, []);\n  var stopAnimation = useCallback(function () {\n    return setAnimating(false);\n  }, []);\n  return _objectSpread2(_objectSpread2({}, id), {}, {\n    visible: visible,\n    animated: animated,\n    animating: animating,\n    show: show,\n    hide: hide,\n    toggle: toggle,\n    setVisible: setVisible,\n    setAnimated: setAnimated,\n    stopAnimation: stopAnimation\n  });\n}\n\nexport { useDisclosureState };\n","var globalState = {\n  currentTooltipId: null,\n  listeners: new Set(),\n  subscribe: function subscribe(listener) {\n    var _this = this;\n\n    this.listeners.add(listener);\n    return function () {\n      _this.listeners.delete(listener);\n    };\n  },\n  show: function show(id) {\n    this.currentTooltipId = id;\n    this.listeners.forEach(function (listener) {\n      return listener(id);\n    });\n  },\n  hide: function hide(id) {\n    if (this.currentTooltipId === id) {\n      this.currentTooltipId = null;\n      this.listeners.forEach(function (listener) {\n        return listener(null);\n      });\n    }\n  }\n};\n\nexport { globalState as g };\n","// Automatically generated\nvar TOOLTIP_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"visible\", \"animated\", \"animating\", \"setBaseId\", \"show\", \"hide\", \"toggle\", \"setVisible\", \"setAnimated\", \"stopAnimation\", \"unstable_disclosureRef\", \"unstable_referenceRef\", \"unstable_popoverRef\", \"unstable_arrowRef\", \"unstable_popoverStyles\", \"unstable_arrowStyles\", \"unstable_originalPlacement\", \"unstable_update\", \"placement\", \"place\", \"unstable_timeout\", \"unstable_setTimeout\"];\nvar TOOLTIP_KEYS = [].concat(TOOLTIP_STATE_KEYS, [\"unstable_portal\"]);\nvar TOOLTIP_ARROW_KEYS = TOOLTIP_STATE_KEYS;\nvar TOOLTIP_REFERENCE_KEYS = TOOLTIP_ARROW_KEYS;\n\nexport { TOOLTIP_KEYS as T, TOOLTIP_ARROW_KEYS as a, TOOLTIP_REFERENCE_KEYS as b };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useCallback } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { useRole } from '../Role/Role.js';\nimport { b as TOOLTIP_REFERENCE_KEYS } from '../__keys-d101cb3b.js';\n\nvar useTooltipReference = createHook({\n  name: \"TooltipReference\",\n  compose: useRole,\n  keys: TOOLTIP_REFERENCE_KEYS,\n  useProps: function useProps(options, _ref) {\n    var htmlRef = _ref.ref,\n        htmlOnFocus = _ref.onFocus,\n        htmlOnBlur = _ref.onBlur,\n        htmlOnMouseEnter = _ref.onMouseEnter,\n        htmlOnMouseLeave = _ref.onMouseLeave,\n        htmlProps = _objectWithoutPropertiesLoose(_ref, [\"ref\", \"onFocus\", \"onBlur\", \"onMouseEnter\", \"onMouseLeave\"]);\n\n    var onFocusRef = useLiveRef(htmlOnFocus);\n    var onBlurRef = useLiveRef(htmlOnBlur);\n    var onMouseEnterRef = useLiveRef(htmlOnMouseEnter);\n    var onMouseLeaveRef = useLiveRef(htmlOnMouseLeave);\n    var onFocus = useCallback(function (event) {\n      var _onFocusRef$current, _options$show;\n\n      (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);\n      if (event.defaultPrevented) return;\n      (_options$show = options.show) === null || _options$show === void 0 ? void 0 : _options$show.call(options);\n    }, [options.show]);\n    var onBlur = useCallback(function (event) {\n      var _onBlurRef$current, _options$hide;\n\n      (_onBlurRef$current = onBlurRef.current) === null || _onBlurRef$current === void 0 ? void 0 : _onBlurRef$current.call(onBlurRef, event);\n      if (event.defaultPrevented) return;\n      (_options$hide = options.hide) === null || _options$hide === void 0 ? void 0 : _options$hide.call(options);\n    }, [options.hide]);\n    var onMouseEnter = useCallback(function (event) {\n      var _onMouseEnterRef$curr, _options$show2;\n\n      (_onMouseEnterRef$curr = onMouseEnterRef.current) === null || _onMouseEnterRef$curr === void 0 ? void 0 : _onMouseEnterRef$curr.call(onMouseEnterRef, event);\n      if (event.defaultPrevented) return;\n      (_options$show2 = options.show) === null || _options$show2 === void 0 ? void 0 : _options$show2.call(options);\n    }, [options.show]);\n    var onMouseLeave = useCallback(function (event) {\n      var _onMouseLeaveRef$curr, _options$hide2;\n\n      (_onMouseLeaveRef$curr = onMouseLeaveRef.current) === null || _onMouseLeaveRef$curr === void 0 ? void 0 : _onMouseLeaveRef$curr.call(onMouseLeaveRef, event);\n      if (event.defaultPrevented) return;\n      (_options$hide2 = options.hide) === null || _options$hide2 === void 0 ? void 0 : _options$hide2.call(options);\n    }, [options.hide]);\n    return _objectSpread2({\n      ref: useForkRef(options.unstable_referenceRef, htmlRef),\n      tabIndex: 0,\n      onFocus: onFocus,\n      onBlur: onBlur,\n      onMouseEnter: onMouseEnter,\n      onMouseLeave: onMouseLeave,\n      \"aria-describedby\": options.baseId\n    }, htmlProps);\n  }\n});\nvar TooltipReference = createComponent({\n  as: \"div\",\n  useHook: useTooltipReference\n});\n\nexport { TooltipReference, useTooltipReference };\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * @type {import('react').Context<{ tooltip?: import('reakit').TooltipState }>}\n */\nexport const TooltipContext = createContext( {} );\nexport const useTooltipContext = () => useContext( TooltipContext );\n","// Automatically generated\nvar DISCLOSURE_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"visible\", \"animated\", \"animating\", \"setBaseId\", \"show\", \"hide\", \"toggle\", \"setVisible\", \"setAnimated\", \"stopAnimation\"];\nvar DISCLOSURE_KEYS = DISCLOSURE_STATE_KEYS;\nvar DISCLOSURE_CONTENT_KEYS = DISCLOSURE_KEYS;\n\nexport { DISCLOSURE_KEYS as D, DISCLOSURE_CONTENT_KEYS as a };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useState, useRef, useEffect, useCallback } from 'react';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport { isSelfTarget } from 'reakit-utils/isSelfTarget';\nimport { useRole } from '../Role/Role.js';\nimport { a as DISCLOSURE_CONTENT_KEYS } from '../__keys-e6a5cfbe.js';\n\nvar useDisclosureContent = createHook({\n  name: \"DisclosureContent\",\n  compose: useRole,\n  keys: DISCLOSURE_CONTENT_KEYS,\n  useProps: function useProps(options, _ref) {\n    var htmlOnTransitionEnd = _ref.onTransitionEnd,\n        htmlOnAnimationEnd = _ref.onAnimationEnd,\n        htmlStyle = _ref.style,\n        htmlProps = _objectWithoutPropertiesLoose(_ref, [\"onTransitionEnd\", \"onAnimationEnd\", \"style\"]);\n\n    var animating = options.animated && options.animating;\n\n    var _React$useState = useState(null),\n        transition = _React$useState[0],\n        setTransition = _React$useState[1];\n\n    var hidden = !options.visible && !animating;\n    var style = hidden ? _objectSpread2({\n      display: \"none\"\n    }, htmlStyle) : htmlStyle;\n    var onTransitionEndRef = useLiveRef(htmlOnTransitionEnd);\n    var onAnimationEndRef = useLiveRef(htmlOnAnimationEnd);\n    var raf = useRef(0);\n    useEffect(function () {\n      if (!options.animated) return undefined; // Double RAF is needed so the browser has enough time to paint the\n      // default styles before processing the `data-enter` attribute. Otherwise\n      // it wouldn't be considered a transition.\n      // See https://github.com/reakit/reakit/issues/643\n\n      raf.current = window.requestAnimationFrame(function () {\n        raf.current = window.requestAnimationFrame(function () {\n          if (options.visible) {\n            setTransition(\"enter\");\n          } else if (animating) {\n            setTransition(\"leave\");\n          } else {\n            setTransition(null);\n          }\n        });\n      });\n      return function () {\n        return window.cancelAnimationFrame(raf.current);\n      };\n    }, [options.animated, options.visible, animating]);\n    var onEnd = useCallback(function (event) {\n      if (!isSelfTarget(event)) return;\n      if (!animating) return; // Ignores number animated\n\n      if (options.animated === true) {\n        var _options$stopAnimatio;\n\n        (_options$stopAnimatio = options.stopAnimation) === null || _options$stopAnimatio === void 0 ? void 0 : _options$stopAnimatio.call(options);\n      }\n    }, [options.animated, animating, options.stopAnimation]);\n    var onTransitionEnd = useCallback(function (event) {\n      var _onTransitionEndRef$c;\n\n      (_onTransitionEndRef$c = onTransitionEndRef.current) === null || _onTransitionEndRef$c === void 0 ? void 0 : _onTransitionEndRef$c.call(onTransitionEndRef, event);\n      onEnd(event);\n    }, [onEnd]);\n    var onAnimationEnd = useCallback(function (event) {\n      var _onAnimationEndRef$cu;\n\n      (_onAnimationEndRef$cu = onAnimationEndRef.current) === null || _onAnimationEndRef$cu === void 0 ? void 0 : _onAnimationEndRef$cu.call(onAnimationEndRef, event);\n      onEnd(event);\n    }, [onEnd]);\n    return _objectSpread2({\n      id: options.baseId,\n      \"data-enter\": transition === \"enter\" ? \"\" : undefined,\n      \"data-leave\": transition === \"leave\" ? \"\" : undefined,\n      onTransitionEnd: onTransitionEnd,\n      onAnimationEnd: onAnimationEnd,\n      hidden: hidden,\n      style: style\n    }, htmlProps);\n  }\n});\nvar DisclosureContent = createComponent({\n  as: \"div\",\n  useHook: useDisclosureContent\n});\n\nexport { DisclosureContent, useDisclosureContent };\n","import { createContext, useContext, useState, createElement } from 'react';\nimport { useIsomorphicEffect } from 'reakit-utils/useIsomorphicEffect';\nimport { canUseDOM } from 'reakit-utils/canUseDOM';\nimport { createPortal } from 'react-dom';\n\nfunction getBodyElement() {\n  return canUseDOM ? document.body : null;\n}\n\nvar PortalContext = /*#__PURE__*/createContext(getBodyElement());\nfunction Portal(_ref) {\n  var children = _ref.children;\n  // if it's a nested portal, context is the parent portal\n  // otherwise it's document.body\n  // https://github.com/reakit/reakit/issues/513\n  var context = useContext(PortalContext) || getBodyElement();\n\n  var _React$useState = useState(function () {\n    if (canUseDOM) {\n      var element = document.createElement(\"div\");\n      element.className = Portal.__className;\n      return element;\n    } // ssr\n\n\n    return null;\n  }),\n      hostNode = _React$useState[0];\n\n  useIsomorphicEffect(function () {\n    if (!hostNode || !context) return undefined;\n    context.appendChild(hostNode);\n    return function () {\n      context.removeChild(hostNode);\n    };\n  }, [hostNode, context]);\n\n  if (hostNode) {\n    return /*#__PURE__*/createPortal( /*#__PURE__*/createElement(PortalContext.Provider, {\n      value: hostNode\n    }, children), hostNode);\n  } // ssr\n\n\n  return null;\n}\nPortal.__className = \"__reakit-portal\";\nPortal.__selector = \".\" + Portal.__className;\n\nexport { Portal, PortalContext };\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useEffect, useCallback, createElement } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport 'reakit-utils/useLiveRef';\nimport 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport '../Role/Role.js';\nimport { getDocument } from 'reakit-utils/getDocument';\nimport 'reakit-utils/canUseDOM';\nimport '../__keys-e6a5cfbe.js';\nimport { useDisclosureContent } from '../Disclosure/DisclosureContent.js';\nimport 'react-dom';\nimport { Portal } from '../Portal/Portal.js';\nimport { T as TOOLTIP_KEYS } from '../__keys-d101cb3b.js';\nimport { g as globalState } from '../__globalState-300469f0.js';\n\nfunction globallyHideTooltipOnEscape(event) {\n  if (event.defaultPrevented) return;\n\n  if (event.key === \"Escape\") {\n    globalState.show(null);\n  }\n}\n\nvar useTooltip = createHook({\n  name: \"Tooltip\",\n  compose: useDisclosureContent,\n  keys: TOOLTIP_KEYS,\n  useOptions: function useOptions(_ref) {\n    var _ref$unstable_portal = _ref.unstable_portal,\n        unstable_portal = _ref$unstable_portal === void 0 ? true : _ref$unstable_portal,\n        options = _objectWithoutPropertiesLoose(_ref, [\"unstable_portal\"]);\n\n    return _objectSpread2({\n      unstable_portal: unstable_portal\n    }, options);\n  },\n  useProps: function useProps(options, _ref2) {\n    var htmlRef = _ref2.ref,\n        htmlStyle = _ref2.style,\n        htmlWrapElement = _ref2.wrapElement,\n        htmlProps = _objectWithoutPropertiesLoose(_ref2, [\"ref\", \"style\", \"wrapElement\"]);\n\n    useEffect(function () {\n      var _options$unstable_pop;\n\n      var document = getDocument((_options$unstable_pop = options.unstable_popoverRef) === null || _options$unstable_pop === void 0 ? void 0 : _options$unstable_pop.current);\n      document.addEventListener(\"keydown\", globallyHideTooltipOnEscape);\n    }, []);\n    var wrapElement = useCallback(function (element) {\n      if (options.unstable_portal) {\n        element = /*#__PURE__*/createElement(Portal, null, element);\n      }\n\n      if (htmlWrapElement) {\n        return htmlWrapElement(element);\n      }\n\n      return element;\n    }, [options.unstable_portal, htmlWrapElement]);\n    return _objectSpread2({\n      ref: useForkRef(options.unstable_popoverRef, htmlRef),\n      role: \"tooltip\",\n      style: _objectSpread2(_objectSpread2({}, options.unstable_popoverStyles), {}, {\n        pointerEvents: \"none\"\n      }, htmlStyle),\n      wrapElement: wrapElement\n    }, htmlProps);\n  }\n});\nvar Tooltip = createComponent({\n  as: \"div\",\n  memo: true,\n  useHook: useTooltip\n});\n\nexport { Tooltip, useTooltip };\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../context';\nimport { View } from '../../view';\n\nexport interface ShortcutDescription {\n\tdisplay: string;\n\tariaLabel: string;\n}\n\nexport interface Props {\n\tshortcut?: ShortcutDescription | string;\n\tclassName?: string;\n}\n\nfunction Shortcut(\n\tprops: WordPressComponentProps< Props, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n): JSX.Element | null {\n\tconst {\n\t\tas: asProp = 'span',\n\t\tshortcut,\n\t\tclassName,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Shortcut' );\n\tif ( ! shortcut ) {\n\t\treturn null;\n\t}\n\n\tlet displayText: string;\n\tlet ariaLabel: string | undefined;\n\n\tif ( typeof shortcut === 'string' ) {\n\t\tdisplayText = shortcut;\n\t} else {\n\t\tdisplayText = shortcut.display;\n\t\tariaLabel = shortcut.ariaLabel;\n\t}\n\n\treturn (\n\t\t<View\n\t\t\tas={ asProp }\n\t\t\tclassName={ className }\n\t\t\taria-label={ ariaLabel }\n\t\t\tref={ forwardedRef }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t{ displayText }\n\t\t</View>\n\t);\n}\n\nconst ConnectedShortcut = contextConnect( Shortcut, 'Shortcut' );\n\nexport default ConnectedShortcut;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Shortcut } from '../shortcut';\nimport * as ZIndex from '../../utils/z-index';\nimport CONFIG from '../../utils/config-values';\nimport { space } from '../utils/space';\nimport { COLORS } from '../../utils/colors-values';\n\nexport const TooltipContent = css`\n\tz-index: ${ ZIndex.Tooltip };\n\tbox-sizing: border-box;\n\topacity: 0;\n\toutline: none;\n\ttransform-origin: top center;\n\ttransition: opacity ${ CONFIG.transitionDurationFastest } ease;\n\tfont-size: ${ CONFIG.fontSize };\n\n\t&[data-enter] {\n\t\topacity: 1;\n\t}\n`;\n\nexport const TooltipPopoverView = styled.div`\n\tbackground: rgba( 0, 0, 0, 0.8 );\n\tborder-radius: 2px;\n\tbox-shadow: 0 0 0 1px rgba( 255, 255, 255, 0.04 );\n\tcolor: ${ COLORS.white };\n\tpadding: 4px 8px;\n`;\n\nexport const noOutline = css`\n\toutline: none;\n`;\n\nexport const TooltipShortcut = styled( Shortcut )`\n\tdisplay: inline-block;\n\tmargin-left: ${ space( 1 ) };\n`;\n","export const Flyout = 10000;\nexport const Tooltip = 1000002;\n","/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Tooltip as ReakitTooltip } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { View } from '../../view';\nimport { useTooltipContext } from './context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nconst { TooltipPopoverView } = styles;\n\n/**\n *\n * @param {import('../context').WordPressComponentProps<import('./types').ContentProps, 'div'>} props\n * @param {import('react').ForwardedRef<any>}                                                   forwardedRef\n */\nfunction TooltipContent( props, forwardedRef ) {\n\tconst { children, className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'TooltipContent'\n\t);\n\tconst { tooltip } = useTooltipContext();\n\tconst cx = useCx();\n\tconst classes = cx( styles.TooltipContent, className );\n\n\treturn (\n\t\t<ReakitTooltip\n\t\t\tas={ View }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...tooltip }\n\t\t\tclassName={ classes }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t<TooltipPopoverView>{ children }</TooltipPopoverView>\n\t\t</ReakitTooltip>\n\t);\n}\n\nexport default contextConnect( TooltipContent, 'TooltipContent' );\n","/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { TooltipReference, useTooltipState } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, cloneElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, useContextSystem } from '../context';\nimport { TooltipContext } from './context';\nimport TooltipContent from './content';\nimport { TooltipShortcut } from './styles';\n\n/**\n * @param {import('../context').WordPressComponentProps<import('./types').Props, 'div'>} props\n * @param {import('react').ForwardedRef<any>}                                            forwardedRef\n */\nfunction Tooltip( props, forwardedRef ) {\n\tconst {\n\t\tanimated = true,\n\t\tanimationDuration = 160,\n\t\tbaseId,\n\t\tchildren,\n\t\tcontent,\n\t\tfocusable = true,\n\t\tgutter = 4,\n\t\tid,\n\t\tmodal = true,\n\t\tplacement,\n\t\tvisible = false,\n\t\tshortcut,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Tooltip' );\n\n\tconst tooltip = useTooltipState( {\n\t\tanimated: animated ? animationDuration : undefined,\n\t\tbaseId: baseId || id,\n\t\tgutter,\n\t\tplacement,\n\t\tvisible,\n\t\t...otherProps,\n\t} );\n\n\tconst contextProps = useMemo(\n\t\t() => ( {\n\t\t\ttooltip,\n\t\t} ),\n\t\t[ tooltip ]\n\t);\n\n\treturn (\n\t\t<TooltipContext.Provider value={ contextProps }>\n\t\t\t{ content && (\n\t\t\t\t<TooltipContent unstable_portal={ modal } ref={ forwardedRef }>\n\t\t\t\t\t{ content }\n\t\t\t\t\t{ shortcut && <TooltipShortcut shortcut={ shortcut } /> }\n\t\t\t\t</TooltipContent>\n\t\t\t) }\n\t\t\t{ children && (\n\t\t\t\t<TooltipReference\n\t\t\t\t\t{ ...tooltip }\n\t\t\t\t\t{ ...children.props }\n\t\t\t\t\t// @ts-ignore If ref doesn't exist that's fine with us, it'll just be undefined, but it can exist on ReactElement and there's no reason to try to scope this (it'll just overcomplicate things)\n\t\t\t\t\tref={ children?.ref }\n\t\t\t\t>\n\t\t\t\t\t{ ( referenceProps ) => {\n\t\t\t\t\t\tif ( ! focusable ) {\n\t\t\t\t\t\t\treferenceProps.tabIndex = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn cloneElement( children, referenceProps );\n\t\t\t\t\t} }\n\t\t\t\t</TooltipReference>\n\t\t\t) }\n\t\t</TooltipContext.Provider>\n\t);\n}\n\n/**\n * `Tooltip` is a component that provides context for a user interface element.\n *\n * @example\n * ```jsx\n * import { Tooltip, Text } from `@wordpress/components/ui`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Tooltip content=\"Code is Poetry\">\n * \t\t\t<Text>WordPress.org</Text>\n * \t\t</Tooltip>\n * \t)\n * }\n * ```\n */\nconst ConnectedTooltip = contextConnect( Tooltip, 'Tooltip' );\n\nexport default ConnectedTooltip;\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport 'reakit-utils/shallowEqual';\nimport { useState, useRef, useCallback, useEffect } from 'react';\nimport 'reakit-warning';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/dom';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport '../Id/IdProvider.js';\nimport '../Id/IdState.js';\nimport '@popperjs/core';\nimport '../Disclosure/DisclosureState.js';\nimport '../Dialog/DialogState.js';\nimport { usePopoverState } from '../Popover/PopoverState.js';\nimport { g as globalState } from '../__globalState-300469f0.js';\n\nfunction useTooltipState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$place = _useSealedState.placement,\n      placement = _useSealedState$place === void 0 ? \"top\" : _useSealedState$place,\n      _useSealedState$unsta = _useSealedState.unstable_timeout,\n      initialTimeout = _useSealedState$unsta === void 0 ? 0 : _useSealedState$unsta,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"placement\", \"unstable_timeout\"]);\n\n  var _React$useState = useState(initialTimeout),\n      timeout = _React$useState[0],\n      setTimeout = _React$useState[1];\n\n  var showTimeout = useRef(null);\n  var hideTimeout = useRef(null);\n\n  var _usePopoverState = usePopoverState(_objectSpread2(_objectSpread2({}, sealed), {}, {\n    placement: placement\n  })),\n      modal = _usePopoverState.modal,\n      setModal = _usePopoverState.setModal,\n      popover = _objectWithoutPropertiesLoose(_usePopoverState, [\"modal\", \"setModal\"]);\n\n  var clearTimeouts = useCallback(function () {\n    if (showTimeout.current !== null) {\n      window.clearTimeout(showTimeout.current);\n    }\n\n    if (hideTimeout.current !== null) {\n      window.clearTimeout(hideTimeout.current);\n    }\n  }, []);\n  var hide = useCallback(function () {\n    clearTimeouts();\n    popover.hide(); // Let's give some time so people can move from a reference to another\n    // and still show tooltips immediately\n\n    hideTimeout.current = window.setTimeout(function () {\n      globalState.hide(popover.baseId);\n    }, timeout);\n  }, [clearTimeouts, popover.hide, timeout, popover.baseId]);\n  var show = useCallback(function () {\n    clearTimeouts();\n\n    if (!timeout || globalState.currentTooltipId) {\n      // If there's no timeout or a tooltip visible already, we can show this\n      // immediately\n      globalState.show(popover.baseId);\n      popover.show();\n    } else {\n      // There may be a reference with focus whose tooltip is still not visible\n      // In this case, we want to update it before it gets shown.\n      globalState.show(null); // Otherwise, wait a little bit to show the tooltip\n\n      showTimeout.current = window.setTimeout(function () {\n        globalState.show(popover.baseId);\n        popover.show();\n      }, timeout);\n    }\n  }, [clearTimeouts, timeout, popover.show, popover.baseId]);\n  useEffect(function () {\n    return globalState.subscribe(function (id) {\n      if (id !== popover.baseId) {\n        clearTimeouts();\n\n        if (popover.visible) {\n          // Make sure there will be only one tooltip visible\n          popover.hide();\n        }\n      }\n    });\n  }, [popover.baseId, clearTimeouts, popover.visible, popover.hide]);\n  useEffect(function () {\n    return function () {\n      clearTimeouts();\n      globalState.hide(popover.baseId);\n    };\n  }, [clearTimeouts, popover.baseId]);\n  return _objectSpread2(_objectSpread2({}, popover), {}, {\n    hide: hide,\n    show: show,\n    unstable_timeout: timeout,\n    unstable_setTimeout: setTimeout\n  });\n}\n\nexport { useTooltipState };\n","/**\n * WordPress dependencies\n */\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { useState, useEffect, useRef } from '@wordpress/element';\nimport { copy } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { CopyButton } from './styles';\nimport { Text } from '../text';\nimport { Tooltip } from '../ui/tooltip';\n\nimport type { ColorCopyButtonProps } from './types';\n\nexport const ColorCopyButton = ( props: ColorCopyButtonProps ) => {\n\tconst { color, colorType } = props;\n\tconst [ copiedColor, setCopiedColor ] = useState< string | null >( null );\n\tconst copyTimer = useRef< ReturnType< typeof setTimeout > | undefined >();\n\tconst copyRef = useCopyToClipboard< HTMLDivElement >(\n\t\t() => {\n\t\t\tswitch ( colorType ) {\n\t\t\t\tcase 'hsl': {\n\t\t\t\t\treturn color.toHslString();\n\t\t\t\t}\n\t\t\t\tcase 'rgb': {\n\t\t\t\t\treturn color.toRgbString();\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\tcase 'hex': {\n\t\t\t\t\treturn color.toHex();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t() => {\n\t\t\tif ( copyTimer.current ) {\n\t\t\t\tclearTimeout( copyTimer.current );\n\t\t\t}\n\t\t\tsetCopiedColor( color.toHex() );\n\t\t\tcopyTimer.current = setTimeout( () => {\n\t\t\t\tsetCopiedColor( null );\n\t\t\t\tcopyTimer.current = undefined;\n\t\t\t}, 3000 );\n\t\t}\n\t);\n\tuseEffect( () => {\n\t\t// Clear copyTimer on component unmount.\n\t\treturn () => {\n\t\t\tif ( copyTimer.current ) {\n\t\t\t\tclearTimeout( copyTimer.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tooltip\n\t\t\tcontent={\n\t\t\t\t<Text color=\"white\">\n\t\t\t\t\t{ copiedColor === color.toHex()\n\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t</Text>\n\t\t\t}\n\t\t\tplacement=\"bottom\"\n\t\t>\n\t\t\t<CopyButton\n\t\t\t\tisSmall\n\t\t\t\tref={ copyRef }\n\t\t\t\ticon={ copy }\n\t\t\t\tshowTooltip={ false }\n\t\t\t/>\n\t\t</Tooltip>\n\t);\n};\n","/**\n * Internal dependencies\n */\nimport { HStack } from '../h-stack';\nimport { Text } from '../text';\nimport { Spacer } from '../spacer';\nimport { space } from '../ui/utils/space';\nimport { RangeControl, NumberControlWrapper } from './styles';\nimport { COLORS } from '../utils/colors-values';\n\ninterface InputWithSliderProps {\n\tmin: number;\n\tmax: number;\n\tvalue: number;\n\tlabel: string;\n\tabbreviation: string;\n\tonChange: ( value: number ) => void;\n}\n\nexport const InputWithSlider = ( {\n\tmin,\n\tmax,\n\tlabel,\n\tabbreviation,\n\tonChange,\n\tvalue,\n}: InputWithSliderProps ) => {\n\treturn (\n\t\t<HStack spacing={ 4 }>\n\t\t\t<NumberControlWrapper\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tvalue={ value }\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy in NumberControl\n\t\t\t\tonChange={ onChange }\n\t\t\t\tprefix={\n\t\t\t\t\t<Spacer\n\t\t\t\t\t\tas={ Text }\n\t\t\t\t\t\tpaddingLeft={ space( 4 ) }\n\t\t\t\t\t\tcolor={ COLORS.ui.theme }\n\t\t\t\t\t\tlineHeight={ 1 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ abbreviation }\n\t\t\t\t\t</Spacer>\n\t\t\t\t}\n\t\t\t\thideHTMLArrows\n\t\t\t\tsize=\"__unstable-large\"\n\t\t\t/>\n\t\t\t<RangeControl\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision\n\t\t\t\tmin={ min }\n\t\t\t\tmax={ max }\n\t\t\t\tvalue={ value }\n\t\t\t\t// @ts-expect-error\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/40535#issuecomment-1172418185\n\t\t\t\tonChange={ onChange }\n\t\t\t\twithInputField={ false }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n","/**\n * External dependencies\n */\nimport { colord, Colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\n\ninterface RgbInputProps {\n\tcolor: Colord;\n\tonChange: ( nextColor: Colord ) => void;\n\tenableAlpha: boolean;\n}\n\nexport const RgbInput = ( { color, onChange, enableAlpha }: RgbInputProps ) => {\n\tconst { r, g, b, a } = color.toRgb();\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Red\"\n\t\t\t\tabbreviation=\"R\"\n\t\t\t\tvalue={ r }\n\t\t\t\tonChange={ ( nextR: number ) =>\n\t\t\t\t\tonChange( colord( { r: nextR, g, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Green\"\n\t\t\t\tabbreviation=\"G\"\n\t\t\t\tvalue={ g }\n\t\t\t\tonChange={ ( nextG: number ) =>\n\t\t\t\t\tonChange( colord( { r, g: nextG, b, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 255 }\n\t\t\t\tlabel=\"Blue\"\n\t\t\t\tabbreviation=\"B\"\n\t\t\t\tvalue={ b }\n\t\t\t\tonChange={ ( nextB: number ) =>\n\t\t\t\t\tonChange( colord( { r, g, b: nextB, a } ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ 100 }\n\t\t\t\t\tlabel=\"Alpha\"\n\t\t\t\t\tabbreviation=\"A\"\n\t\t\t\t\tvalue={ Math.trunc( a * 100 ) }\n\t\t\t\t\tonChange={ ( nextA: number ) =>\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\t\tr,\n\t\t\t\t\t\t\t\tg,\n\t\t\t\t\t\t\t\tb,\n\t\t\t\t\t\t\t\ta: nextA / 100,\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 * External dependencies\n */\nimport { colord, Colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { InputWithSlider } from './input-with-slider';\n\ninterface HslInputProps {\n\tcolor: Colord;\n\tonChange: ( nextColor: Colord ) => void;\n\tenableAlpha: boolean;\n}\n\nexport const HslInput = ( { color, onChange, enableAlpha }: HslInputProps ) => {\n\tconst { h, s, l, a } = color.toHsl();\n\n\treturn (\n\t\t<>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 359 }\n\t\t\t\tlabel=\"Hue\"\n\t\t\t\tabbreviation=\"H\"\n\t\t\t\tvalue={ h }\n\t\t\t\tonChange={ ( nextH: number ) => {\n\t\t\t\t\tonChange( colord( { h: nextH, s, l, a } ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 100 }\n\t\t\t\tlabel=\"Saturation\"\n\t\t\t\tabbreviation=\"S\"\n\t\t\t\tvalue={ s }\n\t\t\t\tonChange={ ( nextS: number ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\th,\n\t\t\t\t\t\t\ts: nextS,\n\t\t\t\t\t\t\tl,\n\t\t\t\t\t\t\ta,\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<InputWithSlider\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 100 }\n\t\t\t\tlabel=\"Lightness\"\n\t\t\t\tabbreviation=\"L\"\n\t\t\t\tvalue={ l }\n\t\t\t\tonChange={ ( nextL: number ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\th,\n\t\t\t\t\t\t\ts,\n\t\t\t\t\t\t\tl: nextL,\n\t\t\t\t\t\t\ta,\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{ enableAlpha && (\n\t\t\t\t<InputWithSlider\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ 100 }\n\t\t\t\t\tlabel=\"Alpha\"\n\t\t\t\t\tabbreviation=\"A\"\n\t\t\t\t\tvalue={ Math.trunc( 100 * a ) }\n\t\t\t\t\tonChange={ ( nextA: number ) => {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tcolord( {\n\t\t\t\t\t\t\t\th,\n\t\t\t\t\t\t\t\ts,\n\t\t\t\t\t\t\t\tl,\n\t\t\t\t\t\t\t\ta: nextA / 100,\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 * External dependencies\n */\nimport { colord, Colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { InputControl } from '../input-control';\nimport { Text } from '../text';\nimport { Spacer } from '../spacer';\nimport { space } from '../ui/utils/space';\nimport { COLORS } from '../utils/colors-values';\nimport type { StateReducer } from '../input-control/reducer/state';\n\ninterface HexInputProps {\n\tcolor: Colord;\n\tonChange: ( nextColor: Colord ) => void;\n\tenableAlpha: boolean;\n}\n\nexport const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {\n\tconst handleChange = ( nextValue: string | undefined ) => {\n\t\tif ( ! nextValue ) return;\n\t\tconst hexValue = nextValue.startsWith( '#' )\n\t\t\t? nextValue\n\t\t\t: '#' + nextValue;\n\n\t\tonChange( colord( hexValue ) );\n\t};\n\n\tconst stateReducer: StateReducer = ( state, action ) => {\n\t\tconst nativeEvent = action.payload?.event?.nativeEvent as InputEvent;\n\n\t\tif ( 'insertFromPaste' !== nativeEvent?.inputType ) {\n\t\t\treturn { ...state };\n\t\t}\n\n\t\tconst value = state.value?.startsWith( '#' )\n\t\t\t? state.value.slice( 1 ).toUpperCase()\n\t\t\t: state.value?.toUpperCase();\n\n\t\treturn { ...state, value };\n\t};\n\n\treturn (\n\t\t<InputControl\n\t\t\tprefix={\n\t\t\t\t<Spacer\n\t\t\t\t\tas={ Text }\n\t\t\t\t\tmarginLeft={ space( 4 ) }\n\t\t\t\t\tcolor={ COLORS.ui.theme }\n\t\t\t\t\tlineHeight={ 1 }\n\t\t\t\t>\n\t\t\t\t\t#\n\t\t\t\t</Spacer>\n\t\t\t}\n\t\t\tvalue={ color.toHex().slice( 1 ).toUpperCase() }\n\t\t\tonChange={ handleChange }\n\t\t\tmaxLength={ enableAlpha ? 9 : 7 }\n\t\t\tlabel={ __( 'Hex color' ) }\n\t\t\thideLabelFromVision\n\t\t\tsize=\"__unstable-large\"\n\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t__unstableInputWidth=\"9em\"\n\t\t/>\n\t);\n};\n","/**\n * External dependencies\n */\nimport type { Colord } from 'colord';\n\n/**\n * Internal dependencies\n */\nimport { RgbInput } from './rgb-input';\nimport { HslInput } from './hsl-input';\nimport { HexInput } from './hex-input';\n\ninterface ColorInputProps {\n\tcolorType: 'hsl' | 'hex' | 'rgb';\n\tcolor: Colord;\n\tonChange: ( nextColor: Colord ) => void;\n\tenableAlpha: boolean;\n}\n\nexport const ColorInput = ( {\n\tcolorType,\n\tcolor,\n\tonChange,\n\tenableAlpha,\n}: ColorInputProps ) => {\n\tconst props = { color, onChange, enableAlpha };\n\tswitch ( colorType ) {\n\t\tcase 'hsl':\n\t\t\treturn <HslInput { ...props } />;\n\t\tcase 'rgb':\n\t\t\treturn <RgbInput { ...props } />;\n\t\tdefault:\n\t\tcase 'hex':\n\t\t\treturn <HexInput { ...props } />;\n\t}\n};\n","import { useRef } from \"react\";\n\n// Saves incoming handler to the ref in order to avoid \"useCallback hell\"\nexport function useEventCallback<T>(handler?: (value: T) => void): (value: T) => void {\n  const callbackRef = useRef(handler);\n  const fn = useRef((value: T) => {\n    callbackRef.current && callbackRef.current(value);\n  });\n  callbackRef.current = handler;\n\n  return fn.current;\n}\n","// Clamps a value between an upper and lower bound.\n// We use ternary operators because it makes the minified code\n// 2 times shorter then `Math.min(Math.max(a,b),c)`\nexport const clamp = (number: number, min = 0, max = 1): number => {\n  return number > max ? max : number < min ? min : number;\n};\n","import React, { useRef, useMemo, useEffect } from \"react\";\n\nimport { useEventCallback } from \"../../hooks/useEventCallback\";\nimport { clamp } from \"../../utils/clamp\";\nexport interface Interaction {\n  left: number;\n  top: number;\n}\n\n// Check if an event was triggered by touch\nconst isTouch = (event: MouseEvent | TouchEvent): event is TouchEvent => \"touches\" in event;\n\n// Returns a relative position of the pointer inside the node's bounding box\nconst getRelativePosition = (node: HTMLDivElement, event: MouseEvent | TouchEvent): Interaction => {\n  const rect = node.getBoundingClientRect();\n\n  // Get user's pointer position from `touches` array if it's a `TouchEvent`\n  const pointer = isTouch(event) ? event.touches[0] : (event as MouseEvent);\n\n  return {\n    left: clamp((pointer.pageX - (rect.left + window.pageXOffset)) / rect.width),\n    top: clamp((pointer.pageY - (rect.top + window.pageYOffset)) / rect.height),\n  };\n};\n\n// Browsers introduced an intervention, making touch events passive by default.\n// This workaround removes `preventDefault` call from the touch handlers.\n// https://github.com/facebook/react/issues/19651\nconst preventDefaultMove = (event: MouseEvent | TouchEvent): void => {\n  !isTouch(event) && event.preventDefault();\n};\n\n// Prevent mobile browsers from handling mouse events (conflicting with touch ones).\n// If we detected a touch interaction before, we prefer reacting to touch events only.\nconst isInvalid = (event: MouseEvent | TouchEvent, hasTouch: boolean): boolean => {\n  return hasTouch && !isTouch(event);\n};\n\ninterface Props {\n  onMove: (interaction: Interaction) => void;\n  onKey: (offset: Interaction) => void;\n  children: React.ReactNode;\n}\n\nconst InteractiveBase = ({ onMove, onKey, ...rest }: Props) => {\n  const container = useRef<HTMLDivElement>(null);\n  const onMoveCallback = useEventCallback<Interaction>(onMove);\n  const onKeyCallback = useEventCallback<Interaction>(onKey);\n  const hasTouch = useRef(false);\n\n  const [handleMoveStart, handleKeyDown, toggleDocumentEvents] = useMemo(() => {\n    const handleMoveStart = ({ nativeEvent }: React.MouseEvent | React.TouchEvent) => {\n      const el = container.current;\n      if (!el) return;\n\n      // Prevent text selection\n      preventDefaultMove(nativeEvent);\n\n      if (isInvalid(nativeEvent, hasTouch.current) || !el) return;\n      hasTouch.current = isTouch(nativeEvent);\n\n      // The node/ref must actually exist when user start an interaction.\n      // We won't suppress the ESLint warning though, as it should probably be something to be aware of.\n      el.focus();\n      onMoveCallback(getRelativePosition(el, nativeEvent));\n      toggleDocumentEvents(true);\n    };\n\n    const handleMove = (event: MouseEvent | TouchEvent) => {\n      // Prevent text selection\n      preventDefaultMove(event);\n\n      // If user moves the pointer outside of the window or iframe bounds and release it there,\n      // `mouseup`/`touchend` won't be fired. In order to stop the picker from following the cursor\n      // after the user has moved the mouse/finger back to the document, we check `event.buttons`\n      // and `event.touches`. It allows us to detect that the user is just moving his pointer\n      // without pressing it down\n      const isDown = isTouch(event) ? event.touches.length > 0 : event.buttons > 0;\n\n      if (isDown && container.current) {\n        onMoveCallback(getRelativePosition(container.current, event));\n      } else {\n        toggleDocumentEvents(false);\n      }\n    };\n\n    const handleMoveEnd = () => toggleDocumentEvents(false);\n\n    const handleKeyDown = (event: React.KeyboardEvent) => {\n      const keyCode = event.which || event.keyCode;\n\n      // Ignore all keys except arrow ones\n      if (keyCode < 37 || keyCode > 40) return;\n      // Do not scroll page by arrow keys when document is focused on the element\n      event.preventDefault();\n      // Send relative offset to the parent component.\n      // We use codes (37←, 38↑, 39→, 40↓) instead of keys ('ArrowRight', 'ArrowDown', etc)\n      // to reduce the size of the library\n      onKeyCallback({\n        left: keyCode === 39 ? 0.05 : keyCode === 37 ? -0.05 : 0,\n        top: keyCode === 40 ? 0.05 : keyCode === 38 ? -0.05 : 0,\n      });\n    };\n\n    function toggleDocumentEvents(state?: boolean) {\n      const touch = hasTouch.current;\n      // add or remove additional pointer event listeners\n      const toggleEvent = state ? self.addEventListener : self.removeEventListener;\n      toggleEvent(touch ? \"touchmove\" : \"mousemove\", handleMove);\n      toggleEvent(touch ? \"touchend\" : \"mouseup\", handleMoveEnd);\n    }\n\n    return [handleMoveStart, handleKeyDown, toggleDocumentEvents];\n  }, [onKeyCallback, onMoveCallback]);\n\n  // Remove window event listeners before unmounting\n  useEffect(() => toggleDocumentEvents, [toggleDocumentEvents]);\n\n  return (\n    <div\n      {...rest}\n      onTouchStart={handleMoveStart}\n      onMouseDown={handleMoveStart}\n      className=\"react-colorful__interactive\"\n      ref={container}\n      onKeyDown={handleKeyDown}\n      tabIndex={0}\n      role=\"slider\"\n    />\n  );\n};\n\nexport const Interactive = React.memo(InteractiveBase);\n","export const formatClassName = (names: unknown[]): string => names.filter(Boolean).join(\" \");\n","import React from \"react\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props {\n  className?: string;\n  top?: number;\n  left: number;\n  color: string;\n}\n\nexport const Pointer = ({ className, color, left, top = 0.5 }: Props): JSX.Element => {\n  const nodeClassName = formatClassName([\"react-colorful__pointer\", className]);\n\n  const style = {\n    top: `${top * 100}%`,\n    left: `${left * 100}%`,\n  };\n\n  return (\n    <div className={nodeClassName} style={style}>\n      <div className=\"react-colorful__pointer-fill\" style={{ backgroundColor: color }} />\n    </div>\n  );\n};\n","export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {\n  return Math.round(base * number) / base;\n};\n","import { round } from \"./round\";\nimport { RgbaColor, RgbColor, HslaColor, HslColor, HsvaColor, HsvColor } from \"../types\";\n\n/**\n * Valid CSS <angle> units.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/angle\n */\nconst angleUnits: Record<string, number> = {\n  grad: 360 / 400,\n  turn: 360,\n  rad: 360 / (Math.PI * 2),\n};\n\nexport const hexToHsva = (hex: string): HsvaColor => rgbaToHsva(hexToRgba(hex));\n\nexport const hexToRgba = (hex: string): RgbaColor => {\n  if (hex[0] === \"#\") hex = hex.substr(1);\n\n  if (hex.length < 6) {\n    return {\n      r: parseInt(hex[0] + hex[0], 16),\n      g: parseInt(hex[1] + hex[1], 16),\n      b: parseInt(hex[2] + hex[2], 16),\n      a: 1,\n    };\n  }\n\n  return {\n    r: parseInt(hex.substr(0, 2), 16),\n    g: parseInt(hex.substr(2, 2), 16),\n    b: parseInt(hex.substr(4, 2), 16),\n    a: 1,\n  };\n};\n\nexport const parseHue = (value: string, unit = \"deg\"): number => {\n  return Number(value) * (angleUnits[unit] || 1);\n};\n\nexport const hslaStringToHsva = (hslString: string): HsvaColor => {\n  const matcher = /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(hslString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return hslaToHsva({\n    h: parseHue(match[1], match[2]),\n    s: Number(match[3]),\n    l: Number(match[4]),\n    a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n  });\n};\n\nexport const hslStringToHsva = hslaStringToHsva;\n\nexport const hslaToHsva = ({ h, s, l, a }: HslaColor): HsvaColor => {\n  s *= (l < 50 ? l : 100 - l) / 100;\n\n  return {\n    h: h,\n    s: s > 0 ? ((2 * s) / (l + s)) * 100 : 0,\n    v: l + s,\n    a,\n  };\n};\n\nexport const hsvaToHex = (hsva: HsvaColor): string => rgbaToHex(hsvaToRgba(hsva));\n\nexport const hsvaToHsla = ({ h, s, v, a }: HsvaColor): HslaColor => {\n  const hh = ((200 - s) * v) / 100;\n\n  return {\n    h: round(h),\n    s: round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n    l: round(hh / 2),\n    a: round(a, 2),\n  };\n};\n\nexport const hsvaToHslString = (hsva: HsvaColor): string => {\n  const { h, s, l } = hsvaToHsla(hsva);\n  return `hsl(${h}, ${s}%, ${l}%)`;\n};\n\nexport const hsvaToHsvString = (hsva: HsvaColor): string => {\n  const { h, s, v } = roundHsva(hsva);\n  return `hsv(${h}, ${s}%, ${v}%)`;\n};\n\nexport const hsvaToHsvaString = (hsva: HsvaColor): string => {\n  const { h, s, v, a } = roundHsva(hsva);\n  return `hsva(${h}, ${s}%, ${v}%, ${a})`;\n};\n\nexport const hsvaToHslaString = (hsva: HsvaColor): string => {\n  const { h, s, l, a } = hsvaToHsla(hsva);\n  return `hsla(${h}, ${s}%, ${l}%, ${a})`;\n};\n\nexport const hsvaToRgba = ({ h, s, v, a }: HsvaColor): RgbaColor => {\n  h = (h / 360) * 6;\n  s = s / 100;\n  v = v / 100;\n\n  const hh = Math.floor(h),\n    b = v * (1 - s),\n    c = v * (1 - (h - hh) * s),\n    d = v * (1 - (1 - h + hh) * s),\n    module = hh % 6;\n\n  return {\n    r: round([v, c, b, b, d, v][module] * 255),\n    g: round([d, v, v, c, b, b][module] * 255),\n    b: round([b, b, d, v, v, c][module] * 255),\n    a: round(a, 2),\n  };\n};\n\nexport const hsvaToRgbString = (hsva: HsvaColor): string => {\n  const { r, g, b } = hsvaToRgba(hsva);\n  return `rgb(${r}, ${g}, ${b})`;\n};\n\nexport const hsvaToRgbaString = (hsva: HsvaColor): string => {\n  const { r, g, b, a } = hsvaToRgba(hsva);\n  return `rgba(${r}, ${g}, ${b}, ${a})`;\n};\n\nexport const hsvaStringToHsva = (hsvString: string): HsvaColor => {\n  const matcher = /hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(hsvString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return roundHsva({\n    h: parseHue(match[1], match[2]),\n    s: Number(match[3]),\n    v: Number(match[4]),\n    a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n  });\n};\n\nexport const hsvStringToHsva = hsvaStringToHsva;\n\nexport const rgbaStringToHsva = (rgbaString: string): HsvaColor => {\n  const matcher = /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n  const match = matcher.exec(rgbaString);\n\n  if (!match) return { h: 0, s: 0, v: 0, a: 1 };\n\n  return rgbaToHsva({\n    r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n    g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n    b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n    a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1),\n  });\n};\n\nexport const rgbStringToHsva = rgbaStringToHsva;\n\nconst format = (number: number) => {\n  const hex = number.toString(16);\n  return hex.length < 2 ? \"0\" + hex : hex;\n};\n\nexport const rgbaToHex = ({ r, g, b }: RgbaColor): string => {\n  return \"#\" + format(r) + format(g) + format(b);\n};\n\nexport const rgbaToHsva = ({ r, g, b, a }: RgbaColor): HsvaColor => {\n  const max = Math.max(r, g, b);\n  const delta = max - Math.min(r, g, b);\n\n  // prettier-ignore\n  const hh = delta\n    ? max === r\n      ? (g - b) / delta\n      : max === g\n        ? 2 + (b - r) / delta\n        : 4 + (r - g) / delta\n    : 0;\n\n  return {\n    h: round(60 * (hh < 0 ? hh + 6 : hh)),\n    s: round(max ? (delta / max) * 100 : 0),\n    v: round((max / 255) * 100),\n    a,\n  };\n};\n\nexport const roundHsva = (hsva: HsvaColor): HsvaColor => ({\n  h: round(hsva.h),\n  s: round(hsva.s),\n  v: round(hsva.v),\n  a: round(hsva.a, 2),\n});\n\nexport const rgbaToRgb = ({ r, g, b }: RgbaColor): RgbColor => ({ r, g, b });\n\nexport const hslaToHsl = ({ h, s, l }: HslaColor): HslColor => ({ h, s, l });\n\nexport const hsvaToHsv = (hsva: HsvaColor): HsvColor => {\n  const { h, s, v } = roundHsva(hsva);\n  return { h, s, v };\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n  className?: string;\n  hue: number;\n  onChange: (newHue: { h: number }) => void;\n}\n\nconst HueBase = ({ className, hue, onChange }: Props) => {\n  const handleMove = (interaction: Interaction) => {\n    onChange({ h: 360 * interaction.left });\n  };\n\n  const handleKey = (offset: Interaction) => {\n    // Hue measured in degrees of the color circle ranging from 0 to 360\n    onChange({\n      h: clamp(hue + offset.left * 360, 0, 360),\n    });\n  };\n\n  const nodeClassName = formatClassName([\"react-colorful__hue\", className]);\n\n  return (\n    <div className={nodeClassName}>\n      <Interactive\n        onMove={handleMove}\n        onKey={handleKey}\n        aria-label=\"Hue\"\n        aria-valuetext={round(hue)}\n      >\n        <Pointer\n          className=\"react-colorful__hue-pointer\"\n          left={hue / 360}\n          color={hsvaToHslString({ h: hue, s: 100, v: 100, a: 1 })}\n        />\n      </Interactive>\n    </div>\n  );\n};\n\nexport const Hue = React.memo(HueBase);\n","import React from \"react\";\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\nimport { HsvaColor } from \"../../types\";\nimport { hsvaToHslString } from \"../../utils/convert\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\n\ninterface Props {\n  hsva: HsvaColor;\n  onChange: (newColor: { s: number; v: number }) => void;\n}\n\nconst SaturationBase = ({ hsva, onChange }: Props) => {\n  const handleMove = (interaction: Interaction) => {\n    onChange({\n      s: interaction.left * 100,\n      v: 100 - interaction.top * 100,\n    });\n  };\n\n  const handleKey = (offset: Interaction) => {\n    // Saturation and brightness always fit into [0, 100] range\n    onChange({\n      s: clamp(hsva.s + offset.left * 100, 0, 100),\n      v: clamp(hsva.v - offset.top * 100, 0, 100),\n    });\n  };\n\n  const containerStyle = {\n    backgroundColor: hsvaToHslString({ h: hsva.h, s: 100, v: 100, a: 1 }),\n  };\n\n  return (\n    <div className=\"react-colorful__saturation\" style={containerStyle}>\n      <Interactive\n        onMove={handleMove}\n        onKey={handleKey}\n        aria-label=\"Color\"\n        aria-valuetext={`Saturation ${round(hsva.s)}%, Brightness ${round(hsva.v)}%`}\n      >\n        <Pointer\n          className=\"react-colorful__saturation-pointer\"\n          top={1 - hsva.v / 100}\n          left={hsva.s / 100}\n          color={hsvaToHslString(hsva)}\n        />\n      </Interactive>\n    </div>\n  );\n};\n\nexport const Saturation = React.memo(SaturationBase);\n","import { hexToRgba } from \"./convert\";\nimport { ObjectColor } from \"../types\";\n\nexport const equalColorObjects = (first: ObjectColor, second: ObjectColor): boolean => {\n  if (first === second) return true;\n\n  for (const prop in first) {\n    // The following allows for a type-safe calling of this function (first & second have to be HSL, HSV, or RGB)\n    // with type-unsafe iterating over object keys. TS does not allow this without an index (`[key: string]: number`)\n    // on an object to define how iteration is normally done. To ensure extra keys are not allowed on our types,\n    // we must cast our object to unknown (as RGB demands `r` be a key, while `Record<string, x>` does not care if\n    // there is or not), and then as a type TS can iterate over.\n    if (\n      ((first as unknown) as Record<string, number>)[prop] !==\n      ((second as unknown) as Record<string, number>)[prop]\n    )\n      return false;\n  }\n\n  return true;\n};\n\nexport const equalColorString = (first: string, second: string): boolean => {\n  return first.replace(/\\s/g, \"\") === second.replace(/\\s/g, \"\");\n};\n\nexport const equalHex = (first: string, second: string): boolean => {\n  if (first.toLowerCase() === second.toLowerCase()) return true;\n\n  // To compare colors like `#FFF` and `ffffff` we convert them into RGB objects\n  return equalColorObjects(hexToRgba(first), hexToRgba(second));\n};\n","import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { ColorModel, AnyColor, HsvaColor } from \"../types\";\nimport { equalColorObjects } from \"../utils/compare\";\nimport { useEventCallback } from \"./useEventCallback\";\n\nexport function useColorManipulation<T extends AnyColor>(\n  colorModel: ColorModel<T>,\n  color: T,\n  onChange?: (color: T) => void\n): [HsvaColor, (color: Partial<HsvaColor>) => void] {\n  // Save onChange callback in the ref for avoiding \"useCallback hell\"\n  const onChangeCallback = useEventCallback<T>(onChange);\n\n  // No matter which color model is used (HEX, RGB(A) or HSL(A)),\n  // all internal calculations are based on HSVA model\n  const [hsva, updateHsva] = useState<HsvaColor>(() => colorModel.toHsva(color));\n\n  // By using this ref we're able to prevent extra updates\n  // and the effects recursion during the color conversion\n  const cache = useRef({ color, hsva });\n\n  // Update local HSVA-value if `color` property value is changed,\n  // but only if that's not the same color that we just sent to the parent\n  useEffect(() => {\n    if (!colorModel.equal(color, cache.current.color)) {\n      const newHsva = colorModel.toHsva(color);\n      cache.current = { hsva: newHsva, color };\n      updateHsva(newHsva);\n    }\n  }, [color, colorModel]);\n\n  // Trigger `onChange` callback only if an updated color is different from cached one;\n  // save the new color to the ref to prevent unnecessary updates\n  useEffect(() => {\n    let newColor;\n    if (\n      !equalColorObjects(hsva, cache.current.hsva) &&\n      !colorModel.equal((newColor = colorModel.fromHsva(hsva)), cache.current.color)\n    ) {\n      cache.current = { hsva, color: newColor };\n      onChangeCallback(newColor);\n    }\n  }, [hsva, colorModel, onChangeCallback]);\n\n  // Merge the current HSVA color object with updated params.\n  // For example, when a child component sends `h` or `s` only\n  const handleChange = useCallback((params: Partial<HsvaColor>) => {\n    updateHsva((current) => Object.assign({}, current, params));\n  }, []);\n\n  return [hsva, handleChange];\n}\n","import { useIsomorphicLayoutEffect } from \"./useIsomorphicLayoutEffect\";\nimport { getNonce } from \"../utils/nonce\";\n\n// Bundler is configured to load this as a processed minified CSS-string\nimport styles from \"../css/styles.css\";\n\nlet styleElement: HTMLStyleElement | undefined;\n\n/**\n * Injects CSS code into the document's <head>\n */\nexport const useStyleSheet = (): void => {\n  useIsomorphicLayoutEffect(() => {\n    if (typeof document !== \"undefined\" && !styleElement) {\n      styleElement = document.createElement(\"style\");\n      styleElement.innerHTML = styles;\n\n      // Conform to CSP rules by setting `nonce` attribute to the inline styles\n      const nonce = getNonce();\n      if (nonce) styleElement.setAttribute(\"nonce\", nonce);\n\n      document.head.appendChild(styleElement);\n    }\n  }, []);\n};\n","import { useLayoutEffect, useEffect } from \"react\";\n\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nexport const useIsomorphicLayoutEffect =\n  typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n","declare const __webpack_nonce__: string | undefined;\nlet nonce: string | undefined;\n\n/**\n * Returns a nonce hash included by Webpack or the one defined manually by developer.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce\n * https://webpack.js.org/guides/csp/\n */\nexport const getNonce = (): string | undefined => {\n  if (nonce) return nonce;\n  if (typeof __webpack_nonce__ !== \"undefined\") return __webpack_nonce__;\n  return undefined;\n};\n\n/**\n * Signs the style tag with a base64-encoded string (nonce) to conforms to Content Security Policies.\n * This function has to be invoked before any picker is rendered if you aren't using Webpack for CSP.\n */\nexport const setNonce = (hash: string): void => {\n  nonce = hash;\n};\n","import React from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n  colorModel: ColorModel<T>;\n}\n\nexport const ColorPicker = <T extends AnyColor>({\n  className,\n  colorModel,\n  color = colorModel.defaultColor,\n  onChange,\n  ...rest\n}: Props<T>): JSX.Element => {\n  useStyleSheet();\n\n  const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n  const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n  return (\n    <div {...rest} className={nodeClassName}>\n      <Saturation hsva={hsva} onChange={updateHsva} />\n      <Hue hue={hsva.h} onChange={updateHsva} className=\"react-colorful__last-control\" />\n    </div>\n  );\n};\n","import React from \"react\";\n\nimport { Interactive, Interaction } from \"./Interactive\";\nimport { Pointer } from \"./Pointer\";\n\nimport { hsvaToHslaString } from \"../../utils/convert\";\nimport { formatClassName } from \"../../utils/format\";\nimport { clamp } from \"../../utils/clamp\";\nimport { round } from \"../../utils/round\";\nimport { HsvaColor } from \"../../types\";\n\ninterface Props {\n  className?: string;\n  hsva: HsvaColor;\n  onChange: (newAlpha: { a: number }) => void;\n}\n\nexport const Alpha = ({ className, hsva, onChange }: Props): JSX.Element => {\n  const handleMove = (interaction: Interaction) => {\n    onChange({ a: interaction.left });\n  };\n\n  const handleKey = (offset: Interaction) => {\n    // Alpha always fit into [0, 1] range\n    onChange({ a: clamp(hsva.a + offset.left) });\n  };\n\n  // We use `Object.assign` instead of the spread operator\n  // to prevent adding the polyfill (about 150 bytes gzipped)\n  const colorFrom = hsvaToHslaString(Object.assign({}, hsva, { a: 0 }));\n  const colorTo = hsvaToHslaString(Object.assign({}, hsva, { a: 1 }));\n\n  const gradientStyle = {\n    backgroundImage: `linear-gradient(90deg, ${colorFrom}, ${colorTo})`,\n  };\n\n  const nodeClassName = formatClassName([\"react-colorful__alpha\", className]);\n\n  return (\n    <div className={nodeClassName}>\n      <div className=\"react-colorful__alpha-gradient\" style={gradientStyle} />\n      <Interactive\n        onMove={handleMove}\n        onKey={handleKey}\n        aria-label=\"Alpha\"\n        aria-valuetext={`${round(hsva.a * 100)}%`}\n      >\n        <Pointer\n          className=\"react-colorful__alpha-pointer\"\n          left={hsva.a}\n          color={hsvaToHslaString(hsva)}\n        />\n      </Interactive>\n    </div>\n  );\n};\n","import React from \"react\";\n\nimport { Hue } from \"./Hue\";\nimport { Saturation } from \"./Saturation\";\nimport { Alpha } from \"./Alpha\";\n\nimport { ColorModel, ColorPickerBaseProps, AnyColor } from \"../../types\";\nimport { useColorManipulation } from \"../../hooks/useColorManipulation\";\nimport { useStyleSheet } from \"../../hooks/useStyleSheet\";\nimport { formatClassName } from \"../../utils/format\";\n\ninterface Props<T extends AnyColor> extends Partial<ColorPickerBaseProps<T>> {\n  colorModel: ColorModel<T>;\n}\n\nexport const AlphaColorPicker = <T extends AnyColor>({\n  className,\n  colorModel,\n  color = colorModel.defaultColor,\n  onChange,\n  ...rest\n}: Props<T>): JSX.Element => {\n  useStyleSheet();\n\n  const [hsva, updateHsva] = useColorManipulation<T>(colorModel, color, onChange);\n\n  const nodeClassName = formatClassName([\"react-colorful\", className]);\n\n  return (\n    <div {...rest} className={nodeClassName}>\n      <Saturation hsva={hsva} onChange={updateHsva} />\n      <Hue hue={hsva.h} onChange={updateHsva} />\n      <Alpha hsva={hsva} onChange={updateHsva} className=\"react-colorful__last-control\" />\n    </div>\n  );\n};\n","import React from \"react\";\n\nimport { AlphaColorPicker } from \"./common/AlphaColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbaStringToHsva, hsvaToRgbaString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n  defaultColor: \"rgba(0, 0, 0, 1)\",\n  toHsva: rgbaStringToHsva,\n  fromHsva: hsvaToRgbaString,\n  equal: equalColorString,\n};\n\nexport const RgbaStringColorPicker = (\n  props: Partial<ColorPickerBaseProps<string>>\n): JSX.Element => <AlphaColorPicker {...props} colorModel={colorModel} />;\n","import React from \"react\";\n\nimport { ColorPicker } from \"./common/ColorPicker\";\nimport { ColorModel, ColorPickerBaseProps } from \"../types\";\nimport { equalColorString } from \"../utils/compare\";\nimport { rgbStringToHsva, hsvaToRgbString } from \"../utils/convert\";\n\nconst colorModel: ColorModel<string> = {\n  defaultColor: \"rgb(0, 0, 0)\",\n  toHsva: rgbStringToHsva,\n  fromHsva: hsvaToRgbString,\n  equal: equalColorString,\n};\n\nexport const RgbStringColorPicker = (props: Partial<ColorPickerBaseProps<string>>): JSX.Element => (\n  <ColorPicker {...props} colorModel={colorModel} />\n);\n","/**\n * External dependencies\n */\nimport { RgbStringColorPicker, RgbaStringColorPicker } from 'react-colorful';\nimport { colord, Colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\ninterface PickerProps {\n\tcolor: Colord;\n\tenableAlpha: boolean;\n\tonChange: ( nextColor: Colord ) => void;\n}\n\nexport const Picker = ( { color, enableAlpha, onChange }: PickerProps ) => {\n\tconst Component = enableAlpha\n\t\t? RgbaStringColorPicker\n\t\t: RgbStringColorPicker;\n\tconst rgbColor = useMemo( () => color.toRgbString(), [ color ] );\n\n\treturn (\n\t\t<Component\n\t\t\tcolor={ rgbColor }\n\t\t\tonChange={ ( nextColor ) => {\n\t\t\t\tonChange( colord( nextColor ) );\n\t\t\t} }\n\t\t/>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\ntype Props< T > = {\n\tdefaultValue?: T;\n\tvalue?: T;\n\tonChange?: ( value: T ) => void;\n};\n\n/**\n * Simplified and improved implementation of useControlledState.\n *\n * @param  props\n * @param  props.defaultValue\n * @param  props.value\n * @param  props.onChange\n * @return The controlled value and the value setter.\n */\nexport function useControlledValue< T >( {\n\tdefaultValue,\n\tonChange,\n\tvalue: valueProp,\n}: Props< T > ): [ T | undefined, ( value: T ) => void ] {\n\tconst hasValue = typeof valueProp !== 'undefined';\n\tconst initialValue = hasValue ? valueProp : defaultValue;\n\tconst [ state, setState ] = useState( initialValue );\n\tconst value = hasValue ? valueProp : state;\n\n\tlet setValue: ( nextValue: T ) => void;\n\tif ( hasValue && typeof onChange === 'function' ) {\n\t\tsetValue = onChange;\n\t} else if ( ! hasValue && typeof onChange === 'function' ) {\n\t\tsetValue = ( nextValue ) => {\n\t\t\tonChange( nextValue );\n\t\t\tsetState( nextValue );\n\t\t};\n\t} else {\n\t\tsetValue = setState;\n\t}\n\n\treturn [ value, setValue ];\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport { colord, extend, Colord } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState, useMemo } from '@wordpress/element';\nimport { useDebounce } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport {\n\tColorfulWrapper,\n\tSelectControl,\n\tAuxiliaryColorArtefactWrapper,\n\tAuxiliaryColorArtefactHStackHeader,\n\tColorInputWrapper,\n} from './styles';\nimport { ColorCopyButton } from './color-copy-button';\nimport { ColorInput } from './color-input';\nimport { Picker } from './picker';\nimport { useControlledValue } from '../utils/hooks';\n\nimport type { ColorType } from './types';\n\nextend( [ namesPlugin ] );\n\nexport interface ColorPickerProps {\n\tenableAlpha?: boolean;\n\tcolor?: string;\n\tonChange?: ( color: string ) => void;\n\tdefaultValue?: string;\n\tcopyFormat?: ColorType;\n}\n\nconst options = [\n\t{ label: 'RGB', value: 'rgb' as const },\n\t{ label: 'HSL', value: 'hsl' as const },\n\t{ label: 'Hex', value: 'hex' as const },\n];\n\nconst ColorPicker = (\n\tprops: WordPressComponentProps< ColorPickerProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tenableAlpha = false,\n\t\tcolor: colorProp,\n\t\tonChange,\n\t\tdefaultValue = '#fff',\n\t\tcopyFormat,\n\t\t...divProps\n\t} = useContextSystem( props, 'ColorPicker' );\n\n\t// Use a safe default value for the color and remove the possibility of `undefined`.\n\tconst [ color, setColor ] = useControlledValue( {\n\t\tonChange,\n\t\tvalue: colorProp,\n\t\tdefaultValue,\n\t} );\n\n\tconst safeColordColor = useMemo( () => {\n\t\treturn colord( color || '' );\n\t}, [ color ] );\n\n\tconst debouncedSetColor = useDebounce( setColor );\n\n\tconst handleChange = useCallback(\n\t\t( nextValue: Colord ) => {\n\t\t\tdebouncedSetColor( nextValue.toHex() );\n\t\t},\n\t\t[ debouncedSetColor ]\n\t);\n\n\tconst [ colorType, setColorType ] = useState< ColorType >(\n\t\tcopyFormat || 'hex'\n\t);\n\n\treturn (\n\t\t<ColorfulWrapper ref={ forwardedRef } { ...divProps }>\n\t\t\t<Picker\n\t\t\t\tonChange={ handleChange }\n\t\t\t\tcolor={ safeColordColor }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t\t<AuxiliaryColorArtefactWrapper>\n\t\t\t\t<AuxiliaryColorArtefactHStackHeader justify=\"space-between\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tvalue={ colorType }\n\t\t\t\t\t\tonChange={ ( nextColorType ) =>\n\t\t\t\t\t\t\tsetColorType( nextColorType as ColorType )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Color format' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t/>\n\t\t\t\t\t<ColorCopyButton\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tcolorType={ copyFormat || colorType }\n\t\t\t\t\t/>\n\t\t\t\t</AuxiliaryColorArtefactHStackHeader>\n\t\t\t\t<ColorInputWrapper direction=\"column\" gap={ 2 }>\n\t\t\t\t\t<ColorInput\n\t\t\t\t\t\tcolorType={ colorType }\n\t\t\t\t\t\tcolor={ safeColordColor }\n\t\t\t\t\t\tonChange={ handleChange }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t</ColorInputWrapper>\n\t\t\t</AuxiliaryColorArtefactWrapper>\n\t\t</ColorfulWrapper>\n\t);\n};\n\nconst ConnectedColorPicker = contextConnect( ColorPicker, 'ColorPicker' );\n\nexport default ConnectedColorPicker;\n","/**\n * External dependencies\n */\nimport {\n\tcolord,\n\tHslColor,\n\tHslaColor,\n\tHsvColor,\n\tHsvaColor,\n\tRgbColor,\n\tRgbaColor,\n} from 'colord';\nimport type { ComponentProps } from 'react';\nimport memoize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type ColorPicker from './component';\n\ntype ColorPickerProps = ComponentProps< typeof ColorPicker >;\n\n/**\n * @deprecated\n */\ntype LegacyColor =\n\t| string\n\t| {\n\t\t\thex: string;\n\t\t\thsl: HslColor | HslaColor;\n\t\t\thsv: HsvColor | HsvaColor;\n\t\t\trgb: RgbColor | RgbaColor;\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t */\n\t\t\toldHue: number;\n\t\t\t/**\n\t\t\t * @deprecated\n\t\t\t */\n\t\t\tsource: 'hex';\n\t  };\n\n/**\n * @deprecated\n */\nexport interface LegacyProps {\n\tcolor?: LegacyColor;\n\t/**\n\t * @deprecated\n\t */\n\tonChangeComplete: ( colors: LegacyColor ) => void;\n\t/**\n\t * @deprecated\n\t */\n\toldHue: string;\n\tclassName: string;\n\t/**\n\t * @deprecated\n\t */\n\tdisableAlpha: boolean;\n}\n\nfunction isLegacyProps( props: any ): props is LegacyProps {\n\treturn (\n\t\ttypeof props.onChangeComplete !== 'undefined' ||\n\t\ttypeof props.disableAlpha !== 'undefined' ||\n\t\ttypeof props.color?.hex === 'string'\n\t);\n}\n\nfunction getColorFromLegacyProps(\n\tcolor: LegacyProps[ 'color' ]\n): string | undefined {\n\tif ( color === undefined ) return;\n\n\tif ( typeof color === 'string' ) return color;\n\n\tif ( color.hex ) return color.hex;\n\n\treturn undefined;\n}\n\nconst transformColorStringToLegacyColor = memoize(\n\t( color: string ): LegacyColor => {\n\t\tconst colordColor = colord( color );\n\t\tconst hex = colordColor.toHex();\n\t\tconst rgb = colordColor.toRgb();\n\t\tconst hsv = colordColor.toHsv();\n\t\tconst hsl = colordColor.toHsl();\n\n\t\treturn {\n\t\t\thex,\n\t\t\trgb,\n\t\t\thsv,\n\t\t\thsl,\n\t\t\tsource: 'hex',\n\t\t\toldHue: hsl.h,\n\t\t};\n\t}\n);\n\nexport function useDeprecatedProps(\n\tprops: LegacyProps | ColorPickerProps\n): ColorPickerProps {\n\tconst { onChangeComplete } = props as LegacyProps;\n\tconst legacyChangeHandler = useCallback(\n\t\t( color: string ) => {\n\t\t\tonChangeComplete( transformColorStringToLegacyColor( color ) );\n\t\t},\n\t\t[ onChangeComplete ]\n\t);\n\tif ( isLegacyProps( props ) ) {\n\t\treturn {\n\t\t\tcolor: getColorFromLegacyProps( props.color ),\n\t\t\tenableAlpha: ! props.disableAlpha,\n\t\t\tonChange: legacyChangeHandler,\n\t\t};\n\t}\n\treturn {\n\t\t...props,\n\t\tcolor: props.color as ColorPickerProps[ 'color' ],\n\t\tenableAlpha: ( props as ColorPickerProps ).enableAlpha,\n\t\tonChange: ( props as ColorPickerProps ).onChange,\n\t};\n}\n","/**\n * Internal dependencies\n */\nimport ColorPicker from './component';\nimport { useDeprecatedProps } from './use-deprecated-props';\n\ntype LegacyAdapterProps = Parameters< typeof useDeprecatedProps >[ 0 ];\n\nexport const LegacyAdapter = ( props: LegacyAdapterProps ) => {\n\treturn <ColorPicker { ...useDeprecatedProps( props ) } />;\n};\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","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Dropdown from '../dropdown';\nimport Tooltip from '../tooltip';\n\nfunction Option( {\n\tclassName,\n\tisSelected,\n\tselectedIconProps,\n\ttooltipText,\n\t...additionalProps\n} ) {\n\tconst optionButton = (\n\t\t<Button\n\t\t\tisPressed={ isSelected }\n\t\t\tclassName=\"components-circular-option-picker__option\"\n\t\t\t{ ...additionalProps }\n\t\t/>\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-circular-option-picker__option-wrapper'\n\t\t\t) }\n\t\t>\n\t\t\t{ tooltipText ? (\n\t\t\t\t<Tooltip text={ tooltipText }>{ optionButton }</Tooltip>\n\t\t\t) : (\n\t\t\t\toptionButton\n\t\t\t) }\n\t\t\t{ isSelected && (\n\t\t\t\t<Icon\n\t\t\t\t\ticon={ check }\n\t\t\t\t\t{ ...( selectedIconProps ? selectedIconProps : {} ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction DropdownLinkAction( {\n\tbuttonProps,\n\tclassName,\n\tdropdownProps,\n\tlinkText,\n} ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker__dropdown-link-action',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t{ ...buttonProps }\n\t\t\t\t>\n\t\t\t\t\t{ linkText }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\t{ ...dropdownProps }\n\t\t/>\n\t);\n}\n\nfunction ButtonAction( { className, children, ...additionalProps } ) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker__clear',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tvariant=\"tertiary\"\n\t\t\t{ ...additionalProps }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function CircularOptionPicker( {\n\tactions,\n\tclassName,\n\toptions,\n\tchildren,\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-circular-option-picker',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<div className=\"components-circular-option-picker__swatches\">\n\t\t\t\t{ options }\n\t\t\t</div>\n\t\t\t{ children }\n\t\t\t{ actions && (\n\t\t\t\t<div className=\"components-circular-option-picker__custom-clear-wrapper\">\n\t\t\t\t\t{ actions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useVStack } from './hook';\nimport type { VStackProps } from './types';\n\nfunction UnconnectedVStack(\n\tprops: WordPressComponentProps< VStackProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst vStackProps = useVStack( props );\n\n\treturn <View { ...vStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `VStack` (or Vertical Stack) is a layout component that arranges child\n * elements in a vertical line.\n *\n * `VStack` can render anything inside.\n *\n * ```jsx\n * import {\n * \t__experimentalText as Text,\n * \t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const VStack = contextConnect( UnconnectedVStack, 'VStack' );\n\nexport default VStack;\n","/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport { useHStack } from '../h-stack';\nimport type { VStackProps } from './types';\n\nexport function useVStack(\n\tprops: WordPressComponentProps< VStackProps, 'div' >\n) {\n\tconst { expanded = false, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'VStack'\n\t);\n\n\tconst hStackProps = useHStack( {\n\t\tdirection: 'column',\n\t\texpanded,\n\t\t...otherProps,\n\t} );\n\n\treturn hStackProps;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport useTruncate from './hook';\nimport type { TruncateProps } from './types';\n\nfunction UnconnectedTruncate(\n\tprops: WordPressComponentProps< TruncateProps, 'span' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst truncateProps = useTruncate( props );\n\n\treturn <View as=\"span\" { ...truncateProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Truncate` is a typography primitive that trims text content.\n * For almost all cases, it is recommended that `Text`, `Heading`, or\n * `Subheading` is used to render text content. However,`Truncate` is\n * available for custom implementations.\n *\n * ```jsx\n * import { __experimentalTruncate as Truncate } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Truncate>\n * \t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ex\n * \t\t\tneque, vulputate a diam et, luctus convallis lacus. Vestibulum ac\n * \t\t\tmollis mi. Morbi id elementum massa.\n * \t\t</Truncate>\n * \t);\n * }\n * ```\n */\nexport const Truncate = contextConnect( UnconnectedTruncate, 'Truncate' );\n\nexport default Truncate;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHeading } from './hook';\nimport type { HeadingProps } from './types';\n\nfunction UnconnectedHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * ```jsx\n * import { __experimentalHeading as Heading } from \"@wordpress/components\";\n *\n * function Example() {\n *   return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nexport const Heading = contextConnect( UnconnectedHeading, 'Heading' );\n\nexport default Heading;\n","/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport { useText } from '../text';\nimport { getHeadingFontSize } from '../ui/utils/font-size';\nimport { CONFIG, COLORS } from '../utils';\nimport type { HeadingProps } from './types';\n\nexport function useHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >\n) {\n\tconst {\n\t\tas: asProp,\n\t\tlevel = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Heading' );\n\n\tconst as = ( asProp || `h${ level }` ) as keyof JSX.IntrinsicElements;\n\n\tconst a11yProps: {\n\t\trole?: string;\n\t\t'aria-level'?: number;\n\t} = {};\n\tif ( typeof as === 'string' && as[ 0 ] !== 'h' ) {\n\t\t// If not a semantic `h` element, add a11y props:\n\t\ta11yProps.role = 'heading';\n\t\ta11yProps[ 'aria-level' ] =\n\t\t\ttypeof level === 'string' ? parseInt( level ) : level;\n\t}\n\n\tconst textProps = useText( {\n\t\tcolor: COLORS.gray[ 900 ],\n\t\tsize: getHeadingFontSize( level ),\n\t\tisBlock: true,\n\t\tweight: CONFIG.fontWeightHeading as import('react').CSSProperties[ 'fontWeight' ],\n\t\t...otherProps,\n\t} );\n\n\treturn { ...textProps, ...a11yProps, as };\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Heading } from '../heading';\n\nexport const ColorHeading = styled( Heading )`\n\ttext-transform: uppercase;\n\tline-height: 24px;\n\tfont-weight: 500;\n\t&&& {\n\t\tfont-size: 11px;\n\t\tmargin-bottom: 0;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../ui/utils/space';\nimport type { DropdownContentWrapperProps } from './types';\n\nconst padding = ( { paddingSize = 'small' }: DropdownContentWrapperProps ) => {\n\tif ( paddingSize === 'none' ) return;\n\n\tconst paddingValues = {\n\t\tsmall: space( 2 ),\n\t\tmedium: space( 4 ),\n\t};\n\n\treturn css`\n\t\tpadding: ${ paddingValues[ paddingSize ] || paddingValues.small };\n\t`;\n};\n\nexport const DropdownContentWrapperDiv = styled.div< DropdownContentWrapperProps >`\n\t// Negative margin to reset (offset) the default padding on .components-popover__content\n\tmargin-left: ${ space( -2 ) };\n\tmargin-right: ${ space( -2 ) };\n\t&:first-of-type {\n\t\tmargin-top: ${ space( -2 ) };\n\t}\n\t&:last-of-type {\n\t\tmargin-bottom: ${ space( -2 ) };\n\t}\n\n\t${ padding };\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport { DropdownContentWrapperDiv } from './styles';\nimport type { DropdownContentWrapperProps } from './types';\n\nfunction UnconnectedDropdownContentWrapper(\n\tprops: WordPressComponentProps< DropdownContentWrapperProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { paddingSize = 'small', ...derivedProps } = useContextSystem(\n\t\tprops,\n\t\t'DropdownContentWrapper'\n\t);\n\n\treturn (\n\t\t<DropdownContentWrapperDiv\n\t\t\t{ ...derivedProps }\n\t\t\tpaddingSize={ paddingSize }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * A convenience wrapper for the `renderContent` when you want to apply\n * different padding. (Default is `paddingSize=\"small\"`).\n *\n * ```jsx\n * import {\n *   Dropdown,\n *   __experimentalDropdownContentWrapper as DropdownContentWrapper,\n * } from '@wordpress/components';\n *\n * <Dropdown\n *   renderContent={ () => (\n *     <DropdownContentWrapper paddingSize=\"medium\">\n *       My dropdown content\n *     </DropdownContentWrapper>\n * ) }\n * />\n * ```\n */\nexport const DropdownContentWrapper = contextConnect(\n\tUnconnectedDropdownContentWrapper,\n\t'DropdownContentWrapper'\n);\n\nexport default DropdownContentWrapper;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Flex, FlexItem } from '../flex';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nfunction SinglePalette( {\n\tclassName,\n\tclearColor,\n\tcolors,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\tconst colorOptions = useMemo( () => {\n\t\treturn colors.map( ( { color, name }, index ) => {\n\t\t\tconst colordColor = colord( color );\n\t\t\tconst isSelected = value === color;\n\n\t\t\treturn (\n\t\t\t\t<CircularOptionPicker.Option\n\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tselectedIconProps={\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\tfill:\n\t\t\t\t\t\t\t\t\t\tcolordColor.contrast() >\n\t\t\t\t\t\t\t\t\t\tcolordColor.contrast( '#000' )\n\t\t\t\t\t\t\t\t\t\t\t? '#fff'\n\t\t\t\t\t\t\t\t\t\t\t: '#000',\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {}\n\t\t\t\t\t}\n\t\t\t\t\ttooltipText={\n\t\t\t\t\t\tname ||\n\t\t\t\t\t\t// translators: %s: color hex code e.g: \"#f00\".\n\t\t\t\t\t\tsprintf( __( 'Color code: %s' ), color )\n\t\t\t\t\t}\n\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n\t\t\t\t\tonClick={\n\t\t\t\t\t\tisSelected ? clearColor : () => onChange( color )\n\t\t\t\t\t}\n\t\t\t\t\taria-label={\n\t\t\t\t\t\tname\n\t\t\t\t\t\t\t? // translators: %s: The name of the color e.g: \"vivid red\".\n\t\t\t\t\t\t\t  sprintf( __( 'Color: %s' ), name )\n\t\t\t\t\t\t\t: // translators: %s: color hex code e.g: \"#f00\".\n\t\t\t\t\t\t\t  sprintf( __( 'Color code: %s' ), color )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\t}, [ colors, value, onChange, clearColor ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ colorOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultiplePalettes( {\n\tclassName,\n\tclearColor,\n\tcolors,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ colors.map( ( { name, colors: colorPalette }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading>{ name }</ColorHeading>\n\t\t\t\t\t\t<SinglePalette\n\t\t\t\t\t\t\tclearColor={ clearColor }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\t\tcolors.length === index + 1 ? actions : 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);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nexport function CustomColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tpopoverProps: receivedPopoverProps,\n\t...props\n} ) {\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\tshift: true,\n\t\t\t...( isRenderedInSidebar\n\t\t\t\t? {\n\t\t\t\t\t\t// When in the sidebar: open to the left (stacking),\n\t\t\t\t\t\t// leaving the same gap as the parent popover.\n\t\t\t\t\t\tplacement: 'left-start',\n\t\t\t\t\t\toffset: 34,\n\t\t\t\t  }\n\t\t\t\t: {\n\t\t\t\t\t\t// Default behavior: open below the anchor\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\toffset: 8,\n\t\t\t\t  } ),\n\t\t\t...receivedPopoverProps,\n\t\t} ),\n\t\t[ isRenderedInSidebar, receivedPopoverProps ]\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"components-color-palette__custom-color-dropdown-content\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport const extractColorNameFromCurrentValue = (\n\tcurrentValue,\n\tcolors = [],\n\tshowMultiplePalettes = false\n) => {\n\tif ( ! currentValue ) {\n\t\treturn '';\n\t}\n\n\tconst currentValueIsCssVariable = /^var\\(/.test( currentValue );\n\tconst normalizedCurrentValue = currentValueIsCssVariable\n\t\t? currentValue\n\t\t: colord( currentValue ).toHex();\n\n\t// Normalize format of `colors` to simplify the following loop\n\tconst colorPalettes = showMultiplePalettes ? colors : [ { colors } ];\n\tfor ( const { colors: paletteColors } of colorPalettes ) {\n\t\tfor ( const { name: colorName, color: colorValue } of paletteColors ) {\n\t\t\tconst normalizedColorValue = currentValueIsCssVariable\n\t\t\t\t? colorValue\n\t\t\t\t: colord( colorValue ).toHex();\n\n\t\t\tif ( normalizedCurrentValue === normalizedColorValue ) {\n\t\t\t\treturn colorName;\n\t\t\t}\n\t\t}\n\t}\n\n\t// translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n\treturn __( 'Custom' );\n};\n\nexport const showTransparentBackground = ( currentValue ) => {\n\tif ( typeof currentValue === 'undefined' ) {\n\t\treturn true;\n\t}\n\treturn colord( currentValue ).alpha() === 0;\n};\n\nexport default function ColorPalette( {\n\tclearable = true,\n\tclassName,\n\tcolors,\n\tdisableCustomColors = false,\n\tenableAlpha,\n\tonChange,\n\tvalue,\n\t__experimentalHasMultipleOrigins = false,\n\t__experimentalIsRenderedInSidebar = false,\n} ) {\n\tconst clearColor = useCallback( () => onChange( undefined ), [ onChange ] );\n\tconst showMultiplePalettes =\n\t\t__experimentalHasMultipleOrigins && colors?.length;\n\tconst Component = showMultiplePalettes ? MultiplePalettes : SinglePalette;\n\n\tconst renderCustomColorPicker = () => (\n\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t<ColorPicker\n\t\t\t\tcolor={ value }\n\t\t\t\tonChange={ ( color ) => onChange( color ) }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t</DropdownContentWrapper>\n\t);\n\n\tconst colordColor = colord( value );\n\n\tconst valueWithoutLeadingHash = value?.startsWith( '#' )\n\t\t? value.substring( 1 )\n\t\t: value ?? '';\n\tconst buttonLabelName = useMemo(\n\t\t() =>\n\t\t\textractColorNameFromCurrentValue(\n\t\t\t\tvalue,\n\t\t\t\tcolors,\n\t\t\t\tshowMultiplePalettes\n\t\t\t),\n\t\t[ value, colors, showMultiplePalettes ]\n\t);\n\n\tconst customColorAccessibleLabel = !! valueWithoutLeadingHash\n\t\t? sprintf(\n\t\t\t\t// translators: %1$s: The name of the color e.g: \"vivid red\". %2$s: The color's hex code e.g: \"#f00\".\n\t\t\t\t__(\n\t\t\t\t\t'Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'\n\t\t\t\t),\n\t\t\t\tbuttonLabelName,\n\t\t\t\tvalueWithoutLeadingHash\n\t\t  )\n\t\t: __( 'Custom color picker.' );\n\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ ! disableCustomColors && (\n\t\t\t\t<CustomColorPickerDropdown\n\t\t\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\t\t\trenderContent={ renderCustomColorPicker }\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tas={ 'button' }\n\t\t\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t\t\t\talign=\"flex-start\"\n\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color\"\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ customColorAccessibleLabel }\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\tshowTransparentBackground( value )\n\t\t\t\t\t\t\t\t\t? { color: '#000' }\n\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\tbackground: value,\n\t\t\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\t\t\tcolordColor.contrast() >\n\t\t\t\t\t\t\t\t\t\t\t\tcolordColor.contrast( '#000' )\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '#fff'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '#000',\n\t\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\tas={ Truncate }\n\t\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color-name\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ buttonLabelName }\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\tas=\"span\"\n\t\t\t\t\t\t\t\tclassName=\"components-color-palette__custom-color-value\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ valueWithoutLeadingHash }\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<Component\n\t\t\t\tclearable={ clearable }\n\t\t\t\tclearColor={ clearColor }\n\t\t\t\tcolors={ colors }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tvalue={ value }\n\t\t\t\tactions={\n\t\t\t\t\t!! clearable && (\n\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\tonClick={ clearColor }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WPUnitControlUnit } from './types';\n\nconst isWeb = Platform.OS === 'web';\n\nconst allUnits: Record< string, WPUnitControlUnit > = {\n\tpx: {\n\t\tvalue: 'px',\n\t\tlabel: isWeb ? 'px' : __( 'Pixels (px)' ),\n\t\ta11yLabel: __( 'Pixels (px)' ),\n\t\tstep: 1,\n\t},\n\t'%': {\n\t\tvalue: '%',\n\t\tlabel: isWeb ? '%' : __( 'Percentage (%)' ),\n\t\ta11yLabel: __( 'Percent (%)' ),\n\t\tstep: 0.1,\n\t},\n\tem: {\n\t\tvalue: 'em',\n\t\tlabel: isWeb ? 'em' : __( 'Relative to parent font size (em)' ),\n\t\ta11yLabel: _x( 'ems', 'Relative to parent font size (em)' ),\n\t\tstep: 0.01,\n\t},\n\trem: {\n\t\tvalue: 'rem',\n\t\tlabel: isWeb ? 'rem' : __( 'Relative to root font size (rem)' ),\n\t\ta11yLabel: _x( 'rems', 'Relative to root font size (rem)' ),\n\t\tstep: 0.01,\n\t},\n\tvw: {\n\t\tvalue: 'vw',\n\t\tlabel: isWeb ? 'vw' : __( 'Viewport width (vw)' ),\n\t\ta11yLabel: __( 'Viewport width (vw)' ),\n\t\tstep: 0.1,\n\t},\n\tvh: {\n\t\tvalue: 'vh',\n\t\tlabel: isWeb ? 'vh' : __( 'Viewport height (vh)' ),\n\t\ta11yLabel: __( 'Viewport height (vh)' ),\n\t\tstep: 0.1,\n\t},\n\tvmin: {\n\t\tvalue: 'vmin',\n\t\tlabel: isWeb ? 'vmin' : __( 'Viewport smallest dimension (vmin)' ),\n\t\ta11yLabel: __( 'Viewport smallest dimension (vmin)' ),\n\t\tstep: 0.1,\n\t},\n\tvmax: {\n\t\tvalue: 'vmax',\n\t\tlabel: isWeb ? 'vmax' : __( 'Viewport largest dimension (vmax)' ),\n\t\ta11yLabel: __( 'Viewport largest dimension (vmax)' ),\n\t\tstep: 0.1,\n\t},\n\tch: {\n\t\tvalue: 'ch',\n\t\tlabel: isWeb ? 'ch' : __( 'Width of the zero (0) character (ch)' ),\n\t\ta11yLabel: __( 'Width of the zero (0) character (ch)' ),\n\t\tstep: 0.01,\n\t},\n\tex: {\n\t\tvalue: 'ex',\n\t\tlabel: isWeb ? 'ex' : __( 'x-height of the font (ex)' ),\n\t\ta11yLabel: __( 'x-height of the font (ex)' ),\n\t\tstep: 0.01,\n\t},\n\tcm: {\n\t\tvalue: 'cm',\n\t\tlabel: isWeb ? 'cm' : __( 'Centimeters (cm)' ),\n\t\ta11yLabel: __( 'Centimeters (cm)' ),\n\t\tstep: 0.001,\n\t},\n\tmm: {\n\t\tvalue: 'mm',\n\t\tlabel: isWeb ? 'mm' : __( 'Millimeters (mm)' ),\n\t\ta11yLabel: __( 'Millimeters (mm)' ),\n\t\tstep: 0.1,\n\t},\n\tin: {\n\t\tvalue: 'in',\n\t\tlabel: isWeb ? 'in' : __( 'Inches (in)' ),\n\t\ta11yLabel: __( 'Inches (in)' ),\n\t\tstep: 0.001,\n\t},\n\tpc: {\n\t\tvalue: 'pc',\n\t\tlabel: isWeb ? 'pc' : __( 'Picas (pc)' ),\n\t\ta11yLabel: __( 'Picas (pc)' ),\n\t\tstep: 1,\n\t},\n\tpt: {\n\t\tvalue: 'pt',\n\t\tlabel: isWeb ? 'pt' : __( 'Points (pt)' ),\n\t\ta11yLabel: __( 'Points (pt)' ),\n\t\tstep: 1,\n\t},\n};\n\n/**\n * An array of all available CSS length units.\n */\nexport const ALL_CSS_UNITS = Object.values( allUnits );\n\n/**\n * Units of measurements. `a11yLabel` is used by screenreaders.\n */\nexport const CSS_UNITS = [\n\tallUnits.px,\n\tallUnits[ '%' ],\n\tallUnits.em,\n\tallUnits.rem,\n\tallUnits.vw,\n\tallUnits.vh,\n];\n\nexport const DEFAULT_UNIT = allUnits.px;\n\n/**\n * Handles legacy value + unit handling.\n * This component use to manage both incoming value and units separately.\n *\n * Moving forward, ideally the value should be a string that contains both\n * the value and unit, example: '10px'\n *\n * @param  rawValue     The raw value as a string (may or may not contain the unit)\n * @param  fallbackUnit The unit used as a fallback, if not unit is detected in the `value`\n * @param  allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parse\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function getParsedQuantityAndUnit(\n\trawValue?: string | number,\n\tfallbackUnit?: string,\n\tallowedUnits?: WPUnitControlUnit[]\n): [ number | undefined, string | undefined ] {\n\tconst initialValue = fallbackUnit\n\t\t? `${ rawValue ?? '' }${ fallbackUnit }`\n\t\t: rawValue;\n\n\treturn parseQuantityAndUnitFromRawValue( initialValue, allowedUnits );\n}\n\n/**\n * Checks if units are defined.\n *\n * @param  units List of units.\n * @return Whether the list actually contains any units.\n */\nexport function hasUnits(\n\tunits?: WPUnitControlUnit[]\n): units is WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( units ) && !! units.length;\n}\n\n/**\n * Parses a quantity and unit from a raw string value, given a list of allowed\n * units and otherwise falling back to the default unit.\n *\n * @param  rawValue     The raw value as a string (may or may not contain the unit)\n * @param  allowedUnits Units to derive from.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly. The unit can be `undefined` in case the unit parsed\n * from the raw value could not be matched against the list of allowed units.\n */\nexport function parseQuantityAndUnitFromRawValue(\n\trawValue?: string | number,\n\tallowedUnits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): [ number | undefined, string | undefined ] {\n\tlet trimmedValue;\n\tlet quantityToReturn;\n\n\tif ( typeof rawValue !== 'undefined' || rawValue === null ) {\n\t\ttrimmedValue = `${ rawValue }`.trim();\n\t\tconst parsedQuantity = parseFloat( trimmedValue );\n\t\tquantityToReturn = ! isFinite( parsedQuantity )\n\t\t\t? undefined\n\t\t\t: parsedQuantity;\n\t}\n\n\tconst unitMatch = trimmedValue?.match( /[\\d.\\-\\+]*\\s*(.*)/ );\n\tconst matchedUnit = unitMatch?.[ 1 ]?.toLowerCase();\n\tlet unitToReturn: string | undefined;\n\tif ( hasUnits( allowedUnits ) ) {\n\t\tconst match = allowedUnits.find(\n\t\t\t( item ) => item.value === matchedUnit\n\t\t);\n\t\tunitToReturn = match?.value;\n\t} else {\n\t\tunitToReturn = DEFAULT_UNIT.value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Parses quantity and unit from a raw value. Validates parsed value, using fallback\n * value if invalid.\n *\n * @param  rawValue         The next value.\n * @param  allowedUnits     Units to derive from.\n * @param  fallbackQuantity The fallback quantity, used in case it's not possible to parse a valid quantity from the raw value.\n * @param  fallbackUnit     The fallback unit, used in case it's not possible to parse a valid unit from the raw value.\n * @return The extracted quantity and unit. The quantity can be `undefined` in case the raw value\n * could not be parsed to a number correctly, and the `fallbackQuantity` was also `undefined`. The\n * unit can be `undefined` only if the unit parsed from the raw value could not be matched against\n * the list of allowed units, the `fallbackQuantity` is also `undefined` and the list of\n * `allowedUnits` is passed empty.\n */\nexport function getValidParsedQuantityAndUnit(\n\trawValue: string | number,\n\tallowedUnits?: WPUnitControlUnit[],\n\tfallbackQuantity?: number,\n\tfallbackUnit?: string\n): [ number | undefined, string | undefined ] {\n\tconst [ parsedQuantity, parsedUnit ] = parseQuantityAndUnitFromRawValue(\n\t\trawValue,\n\t\tallowedUnits\n\t);\n\n\t// The parsed value from `parseQuantityAndUnitFromRawValue` should now be\n\t// either a real number or undefined. If undefined, use the fallback value.\n\tconst quantityToReturn = parsedQuantity ?? fallbackQuantity;\n\n\t// If no unit is parsed from the raw value, or if the fallback unit is not\n\t// defined, use the first value from the list of allowed units as fallback.\n\tlet unitToReturn = parsedUnit || fallbackUnit;\n\n\tif ( ! unitToReturn && hasUnits( allowedUnits ) ) {\n\t\tunitToReturn = allowedUnits[ 0 ].value;\n\t}\n\n\treturn [ quantityToReturn, unitToReturn ];\n}\n\n/**\n * Takes a unit value and finds the matching accessibility label for the\n * unit abbreviation.\n *\n * @param  unit Unit value (example: `px`)\n * @return a11y label for the unit abbreviation\n */\nexport function getAccessibleLabelForUnit( unit: string ): string | undefined {\n\tconst match = ALL_CSS_UNITS.find( ( item ) => item.value === unit );\n\treturn match?.a11yLabel ? match?.a11yLabel : match?.value;\n}\n\n/**\n * Filters available units based on values defined a list of allowed unit values.\n *\n * @param  allowedUnitValues Collection of allowed unit value strings.\n * @param  availableUnits    Collection of available unit objects.\n * @return Filtered units.\n */\nexport function filterUnitsWithSettings(\n\tallowedUnitValues: string[] = [],\n\tavailableUnits: WPUnitControlUnit[]\n): WPUnitControlUnit[] {\n\t// Although the `isArray` check shouldn't be necessary (given the signature of\n\t// this typed function), it's better to stay on the side of caution, since\n\t// this function may be called from un-typed environments.\n\treturn Array.isArray( availableUnits )\n\t\t? availableUnits.filter( ( unit ) =>\n\t\t\t\tallowedUnitValues.includes( unit.value )\n\t\t  )\n\t\t: [];\n}\n\n/**\n * Custom hook to retrieve and consolidate units setting from add_theme_support().\n * TODO: ideally this hook shouldn't be needed\n * https://github.com/WordPress/gutenberg/pull/31822#discussion_r633280823\n *\n * @param  args                An object containing units, settingPath & defaultUnits.\n * @param  args.units          Collection of all potentially available units.\n * @param  args.availableUnits Collection of unit value strings for filtering available units.\n * @param  args.defaultValues  Collection of default values for defined units. Example: `{ px: 350, em: 15 }`.\n *\n * @return Filtered list of units, with their default values updated following the `defaultValues`\n * argument's property.\n */\nexport const useCustomUnits = ( {\n\tunits = ALL_CSS_UNITS,\n\tavailableUnits = [],\n\tdefaultValues,\n}: {\n\tunits?: WPUnitControlUnit[];\n\tavailableUnits?: string[];\n\tdefaultValues?: Record< string, number >;\n} ): WPUnitControlUnit[] => {\n\tconst customUnitsToReturn = filterUnitsWithSettings(\n\t\tavailableUnits,\n\t\tunits\n\t);\n\n\tif ( defaultValues ) {\n\t\tcustomUnitsToReturn.forEach( ( unit, i ) => {\n\t\t\tif ( defaultValues[ unit.value ] ) {\n\t\t\t\tconst [ parsedDefaultValue ] = parseQuantityAndUnitFromRawValue(\n\t\t\t\t\tdefaultValues[ unit.value ]\n\t\t\t\t);\n\n\t\t\t\tcustomUnitsToReturn[ i ].default = parsedDefaultValue;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn customUnitsToReturn;\n};\n\n/**\n * Get available units with the unit for the currently selected value\n * prepended if it is not available in the list of units.\n *\n * This is useful to ensure that the current value's unit is always\n * accurately displayed in the UI, even if the intention is to hide\n * the availability of that unit.\n *\n * @param  rawValue   Selected value to parse.\n * @param  legacyUnit Legacy unit value, if rawValue needs it appended.\n * @param  units      List of available units.\n *\n * @return A collection of units containing the unit for the current value.\n */\nexport function getUnitsWithCurrentUnit(\n\trawValue?: string | number,\n\tlegacyUnit?: string,\n\tunits: WPUnitControlUnit[] = ALL_CSS_UNITS\n): WPUnitControlUnit[] {\n\tconst unitsToReturn = Array.isArray( units ) ? [ ...units ] : [];\n\tconst [ , currentUnit ] = getParsedQuantityAndUnit(\n\t\trawValue,\n\t\tlegacyUnit,\n\t\tALL_CSS_UNITS\n\t);\n\n\tif (\n\t\tcurrentUnit &&\n\t\t! unitsToReturn.some( ( unit ) => unit.value === currentUnit )\n\t) {\n\t\tif ( allUnits[ currentUnit ] ) {\n\t\t\tunitsToReturn.unshift( allUnits[ currentUnit ] );\n\t\t}\n\t}\n\n\treturn unitsToReturn;\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { DropdownProps } from '../types';\n\nexport function useBorderControlDropdown(\n\tprops: WordPressComponentProps< DropdownProps, 'div' >\n) {\n\tconst {\n\t\tborder,\n\t\tclassName,\n\t\tcolors,\n\t\tonChange,\n\t\tpreviousStyleSelection,\n\t\t__next36pxDefaultSize,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderControlDropdown' );\n\n\tconst [ widthValue ] = parseQuantityAndUnitFromRawValue( border?.width );\n\tconst hasZeroWidth = widthValue === 0;\n\n\tconst onColorChange = ( color?: string ) => {\n\t\tconst style =\n\t\t\tborder?.style === 'none' ? previousStyleSelection : border?.style;\n\t\tconst width = hasZeroWidth && !! color ? '1px' : border?.width;\n\n\t\tonChange( { color, style, width } );\n\t};\n\n\tconst onStyleChange = ( style?: string ) => {\n\t\tconst width = hasZeroWidth && !! style ? '1px' : border?.width;\n\t\tonChange( { ...border, style, width } );\n\t};\n\n\tconst onReset = () => {\n\t\tonChange( {\n\t\t\t...border,\n\t\t\tcolor: undefined,\n\t\t\tstyle: undefined,\n\t\t} );\n\t};\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderControlDropdown(), className );\n\t}, [ className, cx ] );\n\n\tconst indicatorClassName = useMemo( () => {\n\t\treturn cx( styles.borderColorIndicator );\n\t}, [ cx ] );\n\n\tconst indicatorWrapperClassName = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.colorIndicatorWrapper( border, __next36pxDefaultSize )\n\t\t);\n\t}, [ border, cx, __next36pxDefaultSize ] );\n\n\tconst popoverControlsClassName = useMemo( () => {\n\t\treturn cx( styles.borderControlPopoverControls );\n\t}, [ cx ] );\n\n\tconst popoverContentClassName = useMemo( () => {\n\t\treturn cx( styles.borderControlPopoverContent );\n\t}, [ cx ] );\n\n\tconst resetButtonClassName = useMemo( () => {\n\t\treturn cx( styles.resetButton );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tborder,\n\t\tclassName: classes,\n\t\tcolors,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tonReset,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BorderControlStylePicker from '../border-control-style-picker';\nimport Button from '../../button';\nimport ColorIndicator from '../../color-indicator';\nimport ColorPalette from '../../color-palette';\nimport Dropdown from '../../dropdown';\nimport { HStack } from '../../h-stack';\nimport { VStack } from '../../v-stack';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControlDropdown } from './hook';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';\n\nimport type { Color, ColorOrigin, Colors, DropdownProps } from '../types';\n\nconst noop = () => undefined;\nconst getColorObject = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolors: Colors | undefined,\n\thasMultipleColorOrigins: boolean\n) => {\n\tif ( ! colorValue || ! colors ) {\n\t\treturn;\n\t}\n\n\tif ( hasMultipleColorOrigins ) {\n\t\tlet matchedColor;\n\n\t\t( colors as ColorOrigin[] ).some( ( origin ) =>\n\t\t\torigin.colors.some( ( color ) => {\n\t\t\t\tif ( color.color === colorValue ) {\n\t\t\t\t\tmatchedColor = color;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t} )\n\t\t);\n\n\t\treturn matchedColor;\n\t}\n\n\treturn ( colors as Color[] ).find(\n\t\t( color ) => color.color === colorValue\n\t);\n};\n\nconst getToggleAriaLabel = (\n\tcolorValue: CSSProperties[ 'borderColor' ],\n\tcolorObject: Color | undefined,\n\tstyle: CSSProperties[ 'borderStyle' ],\n\tisStyleEnabled: boolean\n) => {\n\tif ( isStyleEnabled ) {\n\t\tif ( colorObject ) {\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code e.g.: \"#f00:\". %3$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\". The currently selected style is \"%3$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tcolorObject.color,\n\t\t\t\t\t\tstyle\n\t\t\t\t  )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code e.g.: \"#f00:\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\t\t\t\tcolorObject.name,\n\t\t\t\t\t\tcolorObject.color\n\t\t\t\t  );\n\t\t}\n\n\t\tif ( colorValue ) {\n\t\t\treturn style\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code e.g.: \"#f00:\". %2$s: The current border style selection e.g. \"solid\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\". The currently selected style is \"%2$s\".',\n\t\t\t\t\t\tcolorValue,\n\t\t\t\t\t\tstyle\n\t\t\t\t  )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t// translators: %1$s: The color's hex code e.g.: \"#f00:\".\n\t\t\t\t\t\t'Border color and style picker. The currently selected color has a value of \"%1$s\".',\n\t\t\t\t\t\tcolorValue\n\t\t\t\t  );\n\t\t}\n\n\t\treturn __( 'Border color and style picker.' );\n\t}\n\n\tif ( colorObject ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The name of the color e.g. \"vivid red\". %2$s: The color's hex code e.g.: \"#f00:\".\n\t\t\t'Border color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".',\n\t\t\tcolorObject.name,\n\t\t\tcolorObject.color\n\t\t);\n\t}\n\n\tif ( colorValue ) {\n\t\treturn sprintf(\n\t\t\t// translators: %1$s: The color's hex code e.g.: \"#f00:\".\n\t\t\t'Border color picker. The currently selected color has a value of \"%1$s\".',\n\t\t\tcolorValue\n\t\t);\n\t}\n\n\treturn __( 'Border color picker.' );\n};\n\nconst BorderControlDropdown = (\n\tprops: WordPressComponentProps< DropdownProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\t__experimentalHasMultipleOrigins,\n\t\t__experimentalIsRenderedInSidebar,\n\t\tborder,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tindicatorClassName,\n\t\tindicatorWrapperClassName,\n\t\tonReset,\n\t\tonColorChange,\n\t\tonStyleChange,\n\t\tpopoverContentClassName,\n\t\tpopoverControlsClassName,\n\t\tresetButtonClassName,\n\t\tshowDropdownHeader,\n\t\tenableStyle = true,\n\t\t__unstablePopoverProps,\n\t\t...otherProps\n\t} = useBorderControlDropdown( props );\n\n\tconst { color, style } = border || {};\n\tconst colorObject = getColorObject(\n\t\tcolor,\n\t\tcolors,\n\t\t!! __experimentalHasMultipleOrigins\n\t);\n\n\tconst toggleAriaLabel = getToggleAriaLabel(\n\t\tcolor,\n\t\tcolorObject,\n\t\tstyle,\n\t\tenableStyle\n\t);\n\n\tconst showResetButton = color || ( style && style !== 'none' );\n\tconst dropdownPosition = __experimentalIsRenderedInSidebar\n\t\t? 'bottom left'\n\t\t: undefined;\n\n\tconst renderToggle = ( { onToggle = noop } ) => (\n\t\t<Button\n\t\t\tonClick={ onToggle }\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ toggleAriaLabel }\n\t\t\tposition={ dropdownPosition }\n\t\t\tlabel={ __( 'Border color and style picker' ) }\n\t\t\tshowTooltip={ true }\n\t\t>\n\t\t\t<span className={ indicatorWrapperClassName }>\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tclassName={ indicatorClassName }\n\t\t\t\t\tcolorValue={ color }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Button>\n\t);\n\n\t// TODO: update types once Dropdown component is refactored to TypeScript.\n\tconst renderContent = ( { onClose }: { onClose: () => void } ) => (\n\t\t<>\n\t\t\t<DropdownContentWrapper paddingSize=\"medium\">\n\t\t\t\t<VStack className={ popoverControlsClassName } spacing={ 6 }>\n\t\t\t\t\t{ showDropdownHeader ? (\n\t\t\t\t\t\t<HStack>\n\t\t\t\t\t\t\t<StyledLabel>{ __( 'Border color' ) }</StyledLabel>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\tlabel={ __( 'Close border color' ) }\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) : undefined }\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\tclassName={ popoverContentClassName }\n\t\t\t\t\t\tvalue={ color }\n\t\t\t\t\t\tonChange={ onColorChange }\n\t\t\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t}\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\tclearable={ false }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t/>\n\t\t\t\t\t{ enableStyle && (\n\t\t\t\t\t\t<BorderControlStylePicker\n\t\t\t\t\t\t\tlabel={ __( 'Style' ) }\n\t\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\t\tonChange={ onStyleChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</DropdownContentWrapper>\n\t\t\t{ showResetButton && (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName={ resetButtonClassName }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonReset();\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{ __( 'Reset to default' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ renderToggle }\n\t\t\trenderContent={ renderContent }\n\t\t\tpopoverProps={ {\n\t\t\t\t...__unstablePopoverProps,\n\t\t\t} }\n\t\t\t{ ...otherProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n};\n\nconst ConnectedBorderControlDropdown = contextConnect(\n\tBorderControlDropdown,\n\t'BorderControlDropdown'\n);\n\nexport default ConnectedBorderControlDropdown;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { UnitSelect, UnitLabel } from './styles/unit-control-styles';\nimport { CSS_UNITS, hasUnits } from './utils';\nimport type { UnitSelectControlProps } from './types';\n\nexport default function UnitSelectControl( {\n\tclassName,\n\tisUnitSelectTabbable: isTabbable = true,\n\tonChange,\n\tsize = 'default',\n\tunit = 'px',\n\tunits = CSS_UNITS,\n\t...props\n}: WordPressComponentProps< UnitSelectControlProps, 'select', false > ) {\n\tif ( ! hasUnits( units ) || units?.length === 1 ) {\n\t\treturn (\n\t\t\t<UnitLabel\n\t\t\t\tclassName=\"components-unit-control__unit-label\"\n\t\t\t\tselectSize={ size }\n\t\t\t>\n\t\t\t\t{ unit }\n\t\t\t</UnitLabel>\n\t\t);\n\t}\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLSelectElement > ) => {\n\t\tconst { value: unitValue } = event.target;\n\t\tconst data = units.find( ( option ) => option.value === unitValue );\n\n\t\tonChange?.( unitValue, { event, data } );\n\t};\n\n\tconst classes = classnames( 'components-unit-control__select', className );\n\n\treturn (\n\t\t<UnitSelect\n\t\t\tclassName={ classes }\n\t\t\tonChange={ handleOnChange }\n\t\t\tselectSize={ size }\n\t\t\ttabIndex={ isTabbable ? undefined : -1 }\n\t\t\tvalue={ unit }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ units.map( ( option ) => (\n\t\t\t\t<option value={ option.value } key={ option.value }>\n\t\t\t\t\t{ option.label }\n\t\t\t\t</option>\n\t\t\t) ) }\n\t\t</UnitSelect>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type {\n\tFocusEventHandler,\n\tKeyboardEvent,\n\tForwardedRef,\n\tSyntheticEvent,\n\tChangeEvent,\n\tPointerEvent,\n} from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { Root, ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport type { StateReducer } from '../input-control/reducer/state';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer: stateReducerProp,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonBlur: onBlurProp,\n\t\t...props\n\t} = unitControlProps;\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst units = useMemo(\n\t\t() => getUnitsWithCurrentUnit( nonNullValueProp, unitProp, unitsProp ),\n\t\t[ nonNullValueProp, unitProp, unitsProp ]\n\t);\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\t// Stores parsed value for hand-off in state reducer.\n\tconst refParsedQuantity = useRef< number | undefined >( undefined );\n\n\tconst classes = classnames( 'components-unit-control', className );\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent:\n\t\t\t\t| ChangeEvent< HTMLInputElement >\n\t\t\t\t| PointerEvent< HTMLInputElement >;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tconst mayUpdateUnit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tif ( ! isNaN( Number( event.currentTarget.value ) ) ) {\n\t\t\trefParsedQuantity.current = undefined;\n\t\t\treturn;\n\t\t}\n\t\tconst [ validParsedQuantity, validParsedUnit ] =\n\t\t\tgetValidParsedQuantityAndUnit(\n\t\t\t\tevent.currentTarget.value,\n\t\t\t\tunits,\n\t\t\t\tparsedQuantity,\n\t\t\t\tunit\n\t\t\t);\n\n\t\trefParsedQuantity.current = validParsedQuantity;\n\n\t\tif ( isPressEnterToChange && validParsedUnit !== unit ) {\n\t\t\tconst data = Array.isArray( units )\n\t\t\t\t? units.find( ( option ) => option.value === validParsedUnit )\n\t\t\t\t: undefined;\n\t\t\tconst changeProps = { event, data };\n\n\t\t\t// The `onChange` callback already gets called, no need to call it explicitely.\n\t\t\tonUnitChange?.( validParsedUnit, changeProps );\n\n\t\t\tsetUnit( validParsedUnit );\n\t\t}\n\t};\n\n\tconst handleOnBlur: FocusEventHandler< HTMLInputElement > = ( event ) => {\n\t\tmayUpdateUnit( event );\n\t\tonBlurProp?.( event );\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tif ( key === 'Enter' ) {\n\t\t\tmayUpdateUnit( event );\n\t\t}\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param  state  State from InputControl\n\t * @param  action Action triggering state change\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst unitControlStateReducer: StateReducer = ( state, action ) => {\n\t\tconst nextState = { ...state };\n\n\t\t/*\n\t\t * On commits (when pressing ENTER and on blur if\n\t\t * isPressEnterToChange is true), if a parse has been performed\n\t\t * then use that result to update the state.\n\t\t */\n\t\tif ( action.type === inputControlActionTypes.COMMIT ) {\n\t\t\tif ( refParsedQuantity.current !== undefined ) {\n\t\t\t\tnextState.value = (\n\t\t\t\t\trefParsedQuantity.current ?? ''\n\t\t\t\t).toString();\n\t\t\t\trefParsedQuantity.current = undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn nextState;\n\t};\n\n\tlet stateReducer: StateReducer = unitControlStateReducer;\n\tif ( stateReducerProp ) {\n\t\tstateReducer = ( state, action ) => {\n\t\t\tconst baseState = unitControlStateReducer( state, action );\n\t\t\treturn stateReducerProp( baseState, action );\n\t\t};\n\t}\n\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={ size }\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonBlur={ onBlurProp }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<Root className=\"components-unit-control-wrapper\" style={ style }>\n\t\t\t<ValueInput\n\t\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\t\t{ ...props }\n\t\t\t\tautoComplete={ autoComplete }\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideHTMLArrows\n\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\tlabel={ label }\n\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\t\tonChange={ handleOnQuantityChange }\n\t\t\t\tref={ forwardedRef }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ inputSuffix }\n\t\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\t\tstep={ step }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * @example\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n *   const [ value, setValue ] = useState( '10px' );\n *\n *   return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BorderControlDropdown from '../border-control-dropdown';\nimport UnitControl from '../../unit-control';\nimport RangeControl from '../../range-control';\nimport { HStack } from '../../h-stack';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderControl } from './hook';\n\nimport type { BorderControlProps, LabelProps } from '../types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel as=\"legend\">{ label }</StyledLabel>\n\t);\n};\n\nconst UnconnectedBorderControl = (\n\tprops: WordPressComponentProps< BorderControlProps, 'div', false >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle = true,\n\t\thideLabelFromVision,\n\t\tinnerWrapperClassName,\n\t\tinputWidth,\n\t\tlabel,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tplaceholder,\n\t\t__unstablePopoverProps,\n\t\tpreviousStyleSelection,\n\t\tshowDropdownHeader,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\twithSlider,\n\t\t__experimentalHasMultipleOrigins,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t__next36pxDefaultSize,\n\t\t...otherProps\n\t} = useBorderControl( props );\n\n\treturn (\n\t\t<View as=\"fieldset\" { ...otherProps } ref={ forwardedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<HStack spacing={ 3 } className={ innerWrapperClassName }>\n\t\t\t\t<UnitControl\n\t\t\t\t\tprefix={\n\t\t\t\t\t\t<BorderControlDropdown\n\t\t\t\t\t\t\tborder={ border }\n\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t__unstablePopoverProps={ __unstablePopoverProps }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\t\tonChange={ onBorderChange }\n\t\t\t\t\t\t\tpreviousStyleSelection={ previousStyleSelection }\n\t\t\t\t\t\t\tshowDropdownHeader={ showDropdownHeader }\n\t\t\t\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tonChange={ onWidthChange }\n\t\t\t\t\tvalue={ border?.width || '' }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\t__unstableInputWidth={ inputWidth }\n\t\t\t\t/>\n\t\t\t\t{ withSlider && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Border width' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tclassName={ sliderClassName }\n\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tonChange={ onSliderChange }\n\t\t\t\t\t\tstep={ [ 'px', '%' ].includes( widthUnit ) ? 1 : 0.1 }\n\t\t\t\t\t\tvalue={ widthValue || undefined }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</View>\n\t);\n};\n\n/**\n * The `BorderControl` brings together internal sub-components which allow users to\n * set the various properties of a border. The first sub-component, a\n * `BorderDropdown` contains options representing border color and style. The\n * border width is controlled via a `UnitControl` and an optional `RangeControl`.\n *\n * Border radius is not covered by this control as it may be desired separate to\n * color, style, and width. For example, the border radius may be absorbed under\n * a \"shape\" abstraction.\n *\n * ```jsx\n * import { __experimentalBorderControl as BorderControl } from '@wordpress/components';\n * import { __ } from '@wordpress/i18n';\n *\n * const colors = [\n * \t{ name: 'Blue 20', color: '#72aee6' },\n * \t// ...\n * ];\n *\n * const MyBorderControl = () => {\n * \tconst [ border, setBorder ] = useState();\n * \tconst onChange = ( newBorder ) => setBorder( newBorder );\n *\n * \treturn (\n * \t\t<BorderControl\n * \t\t\tcolors={ colors }\n * \t\t\tlabel={ __( 'Border' ) }\n * \t\t\tonChange={ onChange }\n * \t\t\tvalue={ border }\n * \t\t/>\n * \t);\n * };\n * ```\n */\nexport const BorderControl = contextConnect(\n\tUnconnectedBorderControl,\n\t'BorderControl'\n);\n\nexport default BorderControl;\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { Border, BorderControlProps } from '../types';\n\nconst sanitizeBorder = ( border?: Border ) => {\n\tconst hasNoWidth = border?.width === undefined || border.width === '';\n\tconst hasNoColor = border?.color === undefined;\n\n\t// If width and color are undefined, unset any style selection as well.\n\tif ( hasNoWidth && hasNoColor ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n};\n\nexport function useBorderControl(\n\tprops: WordPressComponentProps< BorderControlProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisCompact,\n\t\tonChange,\n\t\tshouldSanitizeBorder = true,\n\t\tvalue: border,\n\t\twidth,\n\t\t__next36pxDefaultSize = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'BorderControl' );\n\n\tconst [ widthValue, originalWidthUnit ] = parseQuantityAndUnitFromRawValue(\n\t\tborder?.width\n\t);\n\tconst widthUnit = originalWidthUnit || 'px';\n\tconst hadPreviousZeroWidth = widthValue === 0;\n\n\tconst [ colorSelection, setColorSelection ] = useState< string >();\n\tconst [ styleSelection, setStyleSelection ] = useState< string >();\n\n\tconst onBorderChange = useCallback(\n\t\t( newBorder?: Border ) => {\n\t\t\tif ( shouldSanitizeBorder ) {\n\t\t\t\treturn onChange( sanitizeBorder( newBorder ) );\n\t\t\t}\n\n\t\t\tonChange( newBorder );\n\t\t},\n\t\t[ onChange, shouldSanitizeBorder ]\n\t);\n\n\tconst onWidthChange = useCallback(\n\t\t( newWidth?: string ) => {\n\t\t\tconst newWidthValue = newWidth === '' ? undefined : newWidth;\n\t\t\tconst [ parsedValue ] =\n\t\t\t\tparseQuantityAndUnitFromRawValue( newWidth );\n\t\t\tconst hasZeroWidth = parsedValue === 0;\n\n\t\t\tconst updatedBorder = { ...border, width: newWidthValue };\n\n\t\t\t// Setting the border width explicitly to zero will also set the\n\t\t\t// border style to `none` and clear the border color.\n\t\t\tif ( hasZeroWidth && ! hadPreviousZeroWidth ) {\n\t\t\t\t// Before clearing the color and style selections, keep track of\n\t\t\t\t// the current selections so they can be restored when the width\n\t\t\t\t// changes to a non-zero value.\n\t\t\t\tsetColorSelection( border?.color );\n\t\t\t\tsetStyleSelection( border?.style );\n\n\t\t\t\t// Clear the color and style border properties.\n\t\t\t\tupdatedBorder.color = undefined;\n\t\t\t\tupdatedBorder.style = 'none';\n\t\t\t}\n\n\t\t\t// Selection has changed from zero border width to non-zero width.\n\t\t\tif ( ! hasZeroWidth && hadPreviousZeroWidth ) {\n\t\t\t\t// Restore previous border color and style selections if width\n\t\t\t\t// is now not zero.\n\t\t\t\tif ( updatedBorder.color === undefined ) {\n\t\t\t\t\tupdatedBorder.color = colorSelection;\n\t\t\t\t}\n\t\t\t\tif ( updatedBorder.style === 'none' ) {\n\t\t\t\t\tupdatedBorder.style = styleSelection;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tonBorderChange( updatedBorder );\n\t\t},\n\t\t[\n\t\t\tborder,\n\t\t\thadPreviousZeroWidth,\n\t\t\tcolorSelection,\n\t\t\tstyleSelection,\n\t\t\tonBorderChange,\n\t\t]\n\t);\n\n\tconst onSliderChange = useCallback(\n\t\t( value?: number ) => {\n\t\t\tonWidthChange( `${ value }${ widthUnit }` );\n\t\t},\n\t\t[ onWidthChange, widthUnit ]\n\t);\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderControl, className );\n\t}, [ className, cx ] );\n\n\tconst wrapperWidth = isCompact ? '90px' : width;\n\tconst innerWrapperClassName = useMemo( () => {\n\t\tconst widthStyle = !! wrapperWidth && styles.wrapperWidth;\n\t\tconst heightStyle = styles.wrapperHeight( __next36pxDefaultSize );\n\n\t\treturn cx( styles.innerWrapper(), widthStyle, heightStyle );\n\t}, [ wrapperWidth, cx, __next36pxDefaultSize ] );\n\n\tconst sliderClassName = useMemo( () => {\n\t\treturn cx( styles.borderSlider() );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tinnerWrapperClassName,\n\t\tinputWidth: wrapperWidth,\n\t\tonBorderChange,\n\t\tonSliderChange,\n\t\tonWidthChange,\n\t\tpreviousStyleSelection: styleSelection,\n\t\tsliderClassName,\n\t\tvalue: border,\n\t\twidthUnit,\n\t\twidthValue,\n\t\t__next36pxDefaultSize,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\nconst ALIGNMENTS = {\n\tbottom: { alignItems: 'flex-end', justifyContent: 'center' },\n\tbottomLeft: { alignItems: 'flex-start', justifyContent: 'flex-end' },\n\tbottomRight: { alignItems: 'flex-end', justifyContent: 'flex-end' },\n\tcenter: { alignItems: 'center', justifyContent: 'center' },\n\tspaced: { alignItems: 'center', justifyContent: 'space-between' },\n\tleft: { alignItems: 'center', justifyContent: 'flex-start' },\n\tright: { alignItems: 'center', justifyContent: 'flex-end' },\n\tstretch: { alignItems: 'stretch' },\n\ttop: { alignItems: 'flex-start', justifyContent: 'center' },\n\ttopLeft: { alignItems: 'flex-start', justifyContent: 'flex-start' },\n\ttopRight: { alignItems: 'flex-start', justifyContent: 'flex-end' },\n};\n\nexport function getAlignmentProps( alignment?: keyof typeof ALIGNMENTS ): {\n\talignItems?: CSSProperties[ 'alignItems' ];\n\tjustifyContent?: CSSProperties[ 'justifyContent' ];\n} {\n\tconst alignmentProps = alignment ? ALIGNMENTS[ alignment ] : {};\n\n\treturn alignmentProps;\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport useGrid from './hook';\nimport type { GridProps } from './types';\n\nfunction UnconnectedGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst gridProps = useGrid( props );\n\n\treturn <View { ...gridProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Grid` is a primitive layout component that can arrange content in a grid configuration.\n *\n * ```jsx\n * import {\n * \t__experimentalGrid as Grid,\n * \t__experimentalText as Text\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Grid columns={ 3 }>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</Grid>\n * \t);\n * }\n * ```\n */\nexport const Grid = contextConnect( UnconnectedGrid, 'Grid' );\n\nexport default Grid;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport { getAlignmentProps } from './utils';\nimport { useResponsiveValue } from '../ui/utils/use-responsive-value';\nimport CONFIG from '../utils/config-values';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { GridProps } from './types';\n\nexport default function useGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >\n) {\n\tconst {\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcolumns = 2,\n\t\tgap = 3,\n\t\tisInline = false,\n\t\tjustify,\n\t\trowGap,\n\t\trows,\n\t\ttemplateColumns,\n\t\ttemplateRows,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Grid' );\n\n\tconst columnsAsArray = Array.isArray( columns ) ? columns : [ columns ];\n\tconst column = useResponsiveValue( columnsAsArray );\n\tconst rowsAsArray = Array.isArray( rows ) ? rows : [ rows ];\n\tconst row = useResponsiveValue( rowsAsArray );\n\n\tconst gridTemplateColumns =\n\t\ttemplateColumns || ( !! columns && `repeat( ${ column }, 1fr )` );\n\tconst gridTemplateRows =\n\t\ttemplateRows || ( !! rows && `repeat( ${ row }, 1fr )` );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst alignmentProps = getAlignmentProps( alignment );\n\n\t\tconst gridClasses = css( {\n\t\t\talignItems: align,\n\t\t\tdisplay: isInline ? 'inline-grid' : 'grid',\n\t\t\tgap: `calc( ${ CONFIG.gridBase } * ${ gap } )`,\n\t\t\tgridTemplateColumns: gridTemplateColumns || undefined,\n\t\t\tgridTemplateRows: gridTemplateRows || undefined,\n\t\t\tgridRowGap: rowGap,\n\t\t\tgridColumnGap: columnGap,\n\t\t\tjustifyContent: justify,\n\t\t\tverticalAlign: isInline ? 'middle' : undefined,\n\t\t\t...alignmentProps,\n\t\t} );\n\n\t\treturn cx( gridClasses, className );\n\t}, [\n\t\talign,\n\t\talignment,\n\t\tclassName,\n\t\tcolumnGap,\n\t\tcx,\n\t\tgap,\n\t\tgridTemplateColumns,\n\t\tgridTemplateRows,\n\t\tisInline,\n\t\tjustify,\n\t\trowGap,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlVisualizer from '../border-box-control-visualizer';\nimport { BorderControl } from '../../border-control';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControlSplitControls } from './hook';\n\nimport type { BorderControlProps } from '../../border-control/types';\nimport type { SplitControlsProps } from '../types';\n\nconst BorderBoxControlSplitControls = (\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tcenteredClassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tonChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\trightAlignedClassName,\n\t\tvalue,\n\t\t__experimentalHasMultipleOrigins,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t__next36pxDefaultSize,\n\t\t...otherProps\n\t} = useBorderBoxControlSplitControls( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t  }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst sharedBorderControlProps = {\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\tisCompact: true,\n\t\t__experimentalHasMultipleOrigins,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t__next36pxDefaultSize,\n\t};\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<Grid { ...otherProps } ref={ mergedRef } gap={ 4 }>\n\t\t\t<BorderBoxControlVisualizer\n\t\t\t\tvalue={ value }\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Top border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'top' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.top }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Left border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'left' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.left }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ rightAlignedClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Right border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'right' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.right }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t\t<BorderControl\n\t\t\t\tclassName={ centeredClassName }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tlabel={ __( 'Bottom border' ) }\n\t\t\t\tonChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }\n\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\tvalue={ value?.bottom }\n\t\t\t\t{ ...sharedBorderControlProps }\n\t\t\t/>\n\t\t</Grid>\n\t);\n};\n\nconst ConnectedBorderBoxControlSplitControls = contextConnect(\n\tBorderBoxControlSplitControls,\n\t'BorderBoxControlSplitControls'\n);\nexport default ConnectedBorderBoxControlSplitControls;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx, rtl } from '../../utils/';\n\nimport type { SplitControlsProps } from '../types';\n\nexport function useBorderBoxControlSplitControls(\n\tprops: WordPressComponentProps< SplitControlsProps, 'div' >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'BorderBoxControlSplitControls'\n\t);\n\n\t// Generate class names.\n\tconst cx = useCx();\n\tconst rtlWatchResult = rtl.watch();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.borderBoxControlSplitControls(), className );\n\t\t// rtlWatchResult is needed to refresh styles when the writing direction changes\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ cx, className, rtlWatchResult ] );\n\n\tconst centeredClassName = useMemo( () => {\n\t\treturn cx( styles.CenteredBorderControl, className );\n\t}, [ cx, className ] );\n\n\tconst rightAlignedClassName = useMemo( () => {\n\t\treturn cx( styles.rightBorderControl(), className );\n\t\t// rtlWatchResult is needed to refresh styles when the writing direction changes\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ cx, className, rtlWatchResult ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tcenteredClassName,\n\t\tclassName: classes,\n\t\trightAlignedClassName,\n\t};\n}\n","const UNITED_VALUE_REGEX =\n\t/^([\\d.\\-+]*)\\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?$/;\n\n/**\n * Parses a number and unit from a value.\n *\n * @param  toParse Value to parse\n *\n * @return  The extracted number and unit.\n */\nexport function parseCSSUnitValue(\n\ttoParse: string\n): [ number | undefined, string | undefined ] {\n\tconst value = toParse.trim();\n\n\tconst matched = value.match( UNITED_VALUE_REGEX );\n\tif ( ! matched ) {\n\t\treturn [ undefined, undefined ];\n\t}\n\tconst [ , num, unit ] = matched;\n\tlet numParsed: number | undefined = parseFloat( num );\n\tnumParsed = Number.isNaN( numParsed ) ? undefined : numParsed;\n\n\treturn [ numParsed, unit ];\n}\n\n/**\n * Combines a value and a unit into a unit value.\n *\n * @param  value\n * @param  unit\n *\n * @return The unit value.\n */\nexport function createCSSUnitValue(\n\tvalue: string | number,\n\tunit: string\n): string {\n\treturn `${ value }${ unit }`;\n}\n","/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { parseCSSUnitValue } from '../utils/unit-values';\nimport type { Border } from '../border-control/types';\nimport type { AnyBorder, Borders, BorderProp, BorderSide } from './types';\n\nconst sides: BorderSide[] = [ 'top', 'right', 'bottom', 'left' ];\nconst borderProps: BorderProp[] = [ 'color', 'style', 'width' ];\n\nexport const isEmptyBorder = ( border?: Border ) => {\n\tif ( ! border ) {\n\t\treturn true;\n\t}\n\treturn ! borderProps.some( ( prop ) => border[ prop ] !== undefined );\n};\n\nexport const isDefinedBorder = ( border: AnyBorder ) => {\n\t// No border, no worries :)\n\tif ( ! border ) {\n\t\treturn false;\n\t}\n\n\t// If we have individual borders per side within the border object we\n\t// need to check whether any of those side borders have been set.\n\tif ( hasSplitBorders( border ) ) {\n\t\tconst allSidesEmpty = sides.every( ( side ) =>\n\t\t\tisEmptyBorder( ( border as Borders )[ side ] )\n\t\t);\n\n\t\treturn ! allSidesEmpty;\n\t}\n\n\t// If we have a top-level border only, check if that is empty. e.g.\n\t// { color: undefined, style: undefined, width: undefined }\n\t// Border radius can still be set within the border object as it is\n\t// handled separately.\n\treturn ! isEmptyBorder( border as Border );\n};\n\nexport const isCompleteBorder = ( border?: Border ) => {\n\tif ( ! border ) {\n\t\treturn false;\n\t}\n\n\treturn borderProps.every( ( prop ) => border[ prop ] !== undefined );\n};\n\nexport const hasSplitBorders = ( border: AnyBorder = {} ) => {\n\treturn Object.keys( border ).some(\n\t\t( side ) => sides.indexOf( side as BorderSide ) !== -1\n\t);\n};\n\nexport const hasMixedBorders = ( borders: AnyBorder ) => {\n\tif ( ! hasSplitBorders( borders ) ) {\n\t\treturn false;\n\t}\n\n\tconst shorthandBorders = sides.map( ( side: BorderSide ) =>\n\t\tgetShorthandBorderStyle( ( borders as Borders )?.[ side ] )\n\t);\n\n\treturn ! shorthandBorders.every(\n\t\t( border ) => border === shorthandBorders[ 0 ]\n\t);\n};\n\nexport const getSplitBorders = ( border?: Border ) => {\n\tif ( ! border || isEmptyBorder( border ) ) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\ttop: border,\n\t\tright: border,\n\t\tbottom: border,\n\t\tleft: border,\n\t};\n};\n\nexport const getBorderDiff = ( original: Border, updated: Border ) => {\n\tconst diff: Border = {};\n\n\tif ( original.color !== updated.color ) {\n\t\tdiff.color = updated.color;\n\t}\n\n\tif ( original.style !== updated.style ) {\n\t\tdiff.style = updated.style;\n\t}\n\n\tif ( original.width !== updated.width ) {\n\t\tdiff.width = updated.width;\n\t}\n\n\treturn diff;\n};\n\nexport const getCommonBorder = ( borders?: Borders ) => {\n\tif ( ! borders ) {\n\t\treturn undefined;\n\t}\n\n\tconst colors: ( CSSProperties[ 'borderColor' ] | undefined )[] = [];\n\tconst styles: ( CSSProperties[ 'borderStyle' ] | undefined )[] = [];\n\tconst widths: ( CSSProperties[ 'borderWidth' ] | undefined )[] = [];\n\n\tsides.forEach( ( side ) => {\n\t\tcolors.push( borders[ side ]?.color );\n\t\tstyles.push( borders[ side ]?.style );\n\t\twidths.push( borders[ side ]?.width );\n\t} );\n\n\tconst allColorsMatch = colors.every( ( value ) => value === colors[ 0 ] );\n\tconst allStylesMatch = styles.every( ( value ) => value === styles[ 0 ] );\n\tconst allWidthsMatch = widths.every( ( value ) => value === widths[ 0 ] );\n\n\treturn {\n\t\tcolor: allColorsMatch ? colors[ 0 ] : undefined,\n\t\tstyle: allStylesMatch ? styles[ 0 ] : undefined,\n\t\twidth: allWidthsMatch ? widths[ 0 ] : getMostCommonUnit( widths ),\n\t};\n};\n\nexport const getShorthandBorderStyle = (\n\tborder?: Border,\n\tfallbackBorder?: Border\n) => {\n\tif ( isEmptyBorder( border ) ) {\n\t\treturn fallbackBorder;\n\t}\n\n\tconst {\n\t\tcolor: fallbackColor,\n\t\tstyle: fallbackStyle,\n\t\twidth: fallbackWidth,\n\t} = fallbackBorder || {};\n\n\tconst {\n\t\tcolor = fallbackColor,\n\t\tstyle = fallbackStyle,\n\t\twidth = fallbackWidth,\n\t} = border as Border;\n\n\tconst hasVisibleBorder = ( !! width && width !== '0' ) || !! color;\n\tconst borderStyle = hasVisibleBorder ? style || 'solid' : style;\n\n\treturn [ width, borderStyle, color ].filter( Boolean ).join( ' ' );\n};\n\nexport const getMostCommonUnit = (\n\tvalues: Array< string | number | undefined >\n): string | undefined => {\n\t// Collect all the CSS units.\n\tconst units = values.map( ( value ) =>\n\t\tvalue === undefined ? undefined : parseCSSUnitValue( `${ value }` )[ 1 ]\n\t);\n\n\t// Return the most common unit out of only the defined CSS units.\n\tconst filteredUnits = units.filter( ( value ) => value !== undefined );\n\treturn mode( filteredUnits as string[] );\n};\n\n/**\n * Finds the mode value out of the array passed favouring the first value\n * as a tiebreaker.\n *\n * @param  values Values to determine the mode from.\n *\n * @return The mode value.\n */\nfunction mode( values: Array< string > ): string | undefined {\n\tif ( values.length === 0 ) {\n\t\treturn undefined;\n\t}\n\n\tconst map: { [ index: string ]: number } = {};\n\tlet maxCount = 0;\n\tlet currentMode;\n\n\tvalues.forEach( ( value ) => {\n\t\tmap[ value ] = map[ value ] === undefined ? 1 : map[ value ] + 1;\n\n\t\tif ( map[ value ] > maxCount ) {\n\t\t\tcurrentMode = value;\n\t\t\tmaxCount = map[ value ];\n\t\t}\n\t} );\n\n\treturn currentMode;\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport {\n\tgetBorderDiff,\n\tgetCommonBorder,\n\tgetSplitBorders,\n\thasMixedBorders,\n\thasSplitBorders,\n\tisCompleteBorder,\n\tisEmptyBorder,\n} from '../utils';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\n\nimport type { Border } from '../../border-control/types';\nimport type { Borders, BorderSide, BorderBoxControlProps } from '../types';\n\nexport function useBorderBoxControl(\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div' >\n) {\n\tconst { className, onChange, value, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'BorderBoxControl'\n\t);\n\n\tconst mixedBorders = hasMixedBorders( value );\n\tconst splitBorders = hasSplitBorders( value );\n\n\tconst linkedValue = splitBorders\n\t\t? getCommonBorder( value as Borders | undefined )\n\t\t: ( value as Border );\n\n\tconst splitValue = splitBorders\n\t\t? ( value as Borders )\n\t\t: getSplitBorders( value as Border | undefined );\n\n\tconst [ isLinked, setIsLinked ] = useState( ! mixedBorders );\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst onLinkedChange = ( newBorder?: Border ) => {\n\t\tif ( ! newBorder ) {\n\t\t\treturn onChange( undefined );\n\t\t}\n\n\t\t// If we have all props defined on the new border apply it.\n\t\tif ( ! mixedBorders || isCompleteBorder( newBorder ) ) {\n\t\t\treturn onChange(\n\t\t\t\tisEmptyBorder( newBorder ) ? undefined : newBorder\n\t\t\t);\n\t\t}\n\n\t\t// If we had mixed borders we might have had some shared border props\n\t\t// that we need to maintain. For example; we could have mixed borders\n\t\t// with all the same color but different widths. Then from the linked\n\t\t// control we change the color. We should keep the separate  widths.\n\t\tconst changes = getBorderDiff(\n\t\t\tlinkedValue as Border,\n\t\t\tnewBorder as Border\n\t\t);\n\t\tconst updatedBorders = {\n\t\t\ttop: { ...( value as Borders )?.top, ...changes },\n\t\t\tright: { ...( value as Borders )?.right, ...changes },\n\t\t\tbottom: { ...( value as Borders )?.bottom, ...changes },\n\t\t\tleft: { ...( value as Borders )?.left, ...changes },\n\t\t};\n\n\t\tif ( hasMixedBorders( updatedBorders ) ) {\n\t\t\treturn onChange( updatedBorders );\n\t\t}\n\n\t\tconst filteredResult = isEmptyBorder( updatedBorders.top )\n\t\t\t? undefined\n\t\t\t: updatedBorders.top;\n\n\t\tonChange( filteredResult );\n\t};\n\n\tconst onSplitChange = (\n\t\tnewBorder: Border | undefined,\n\t\tside: BorderSide\n\t) => {\n\t\tconst updatedBorders = { ...splitValue, [ side ]: newBorder };\n\n\t\tif ( hasMixedBorders( updatedBorders ) ) {\n\t\t\tonChange( updatedBorders );\n\t\t} else {\n\t\t\tonChange( newBorder );\n\t\t}\n\t};\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.BorderBoxControl, className );\n\t}, [ cx, className ] );\n\n\tconst linkedControlClassName = useMemo( () => {\n\t\treturn cx( styles.LinkedBorderControl );\n\t}, [ cx ] );\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\thasMixedBorders: mixedBorders,\n\t\tisLinked,\n\t\tlinkedControlClassName,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\ttoggleLinked,\n\t\tlinkedValue,\n\t\tsplitValue,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BorderBoxControlLinkedButton from '../border-box-control-linked-button';\nimport BorderBoxControlSplitControls from '../border-box-control-split-controls';\nimport { BorderControl } from '../../border-control';\nimport { HStack } from '../../h-stack';\nimport { StyledLabel } from '../../base-control/styles/base-control-styles';\nimport { View } from '../../view';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useBorderBoxControl } from './hook';\n\nimport type { BorderBoxControlProps } from '../types';\nimport type {\n\tLabelProps,\n\tBorderControlProps,\n} from '../../border-control/types';\n\nconst BorderLabel = ( props: LabelProps ) => {\n\tconst { label, hideLabelFromVision } = props;\n\n\tif ( ! label ) {\n\t\treturn null;\n\t}\n\n\treturn hideLabelFromVision ? (\n\t\t<VisuallyHidden as=\"label\">{ label }</VisuallyHidden>\n\t) : (\n\t\t<StyledLabel>{ label }</StyledLabel>\n\t);\n};\n\nconst BorderBoxControl = (\n\tprops: WordPressComponentProps< BorderBoxControlProps, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) => {\n\tconst {\n\t\tclassName,\n\t\tcolors,\n\t\tdisableCustomColors,\n\t\tenableAlpha,\n\t\tenableStyle,\n\t\thasMixedBorders,\n\t\thideLabelFromVision,\n\t\tisLinked,\n\t\tlabel,\n\t\tlinkedControlClassName,\n\t\tlinkedValue,\n\t\tonLinkedChange,\n\t\tonSplitChange,\n\t\tpopoverPlacement,\n\t\tpopoverOffset,\n\t\tsplitValue,\n\t\ttoggleLinked,\n\t\t__experimentalHasMultipleOrigins,\n\t\t__experimentalIsRenderedInSidebar,\n\t\t__next36pxDefaultSize = false,\n\t\t...otherProps\n\t} = useBorderBoxControl( props );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< Element | null >(\n\t\tnull\n\t);\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps: BorderControlProps[ '__unstablePopoverProps' ] =\n\t\tuseMemo(\n\t\t\t() =>\n\t\t\t\tpopoverPlacement\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tplacement: popoverPlacement,\n\t\t\t\t\t\t\toffset: popoverOffset,\n\t\t\t\t\t\t\tanchor: popoverAnchor,\n\t\t\t\t\t\t\tshift: true,\n\t\t\t\t\t  }\n\t\t\t\t\t: undefined,\n\t\t\t[ popoverPlacement, popoverOffset, popoverAnchor ]\n\t\t);\n\n\tconst mergedRef = useMergeRefs( [ setPopoverAnchor, forwardedRef ] );\n\n\treturn (\n\t\t<View className={ className } { ...otherProps } ref={ mergedRef }>\n\t\t\t<BorderLabel\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t\t<HStack alignment={ 'start' } expanded={ true } spacing={ 0 }>\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<BorderControl\n\t\t\t\t\t\tclassName={ linkedControlClassName }\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onLinkedChange }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\thasMixedBorders ? __( 'Mixed' ) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstablePopoverProps={ popoverProps }\n\t\t\t\t\t\tshouldSanitizeBorder={ false } // This component will handle that.\n\t\t\t\t\t\tvalue={ linkedValue }\n\t\t\t\t\t\twithSlider={ true }\n\t\t\t\t\t\twidth={ '110px' }\n\t\t\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t}\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\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BorderBoxControlSplitControls\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\tenableStyle={ enableStyle }\n\t\t\t\t\t\tonChange={ onSplitChange }\n\t\t\t\t\t\tpopoverPlacement={ popoverPlacement }\n\t\t\t\t\t\tpopoverOffset={ popoverOffset }\n\t\t\t\t\t\tvalue={ splitValue }\n\t\t\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t}\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\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BorderBoxControlLinkedButton\n\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</View>\n\t);\n};\n\nconst ConnectedBorderBoxControl = contextConnect(\n\tBorderBoxControl,\n\t'BorderBoxControl'\n);\n\nexport default ConnectedBorderBoxControl;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport BaseUnitControl from '../../unit-control';\nimport { rtl } from '../../utils';\n\nexport const Root = styled.div`\n\tbox-sizing: border-box;\n\tmax-width: 235px;\n\tpadding-bottom: 12px;\n\twidth: 100%;\n`;\n\nexport const Header = styled( Flex )`\n\tmargin-bottom: 8px;\n`;\n\nexport const HeaderControlWrapper = styled( Flex )`\n\tmin-height: 30px;\n\tgap: 0;\n`;\n\nexport const UnitControlWrapper = styled.div`\n\tbox-sizing: border-box;\n\tmax-width: 80px;\n`;\n\nexport const LayoutContainer = styled( Flex )`\n\tjustify-content: center;\n\tpadding-top: 8px;\n`;\n\nexport const Layout = styled( Flex )`\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\tjustify-content: flex-start;\n`;\n\nconst unitControlBorderRadiusStyles = ( { isFirst, isLast, isOnly } ) => {\n\tif ( isFirst ) {\n\t\treturn rtl( { borderTopRightRadius: 0, borderBottomRightRadius: 0 } )();\n\t}\n\tif ( isLast ) {\n\t\treturn rtl( { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } )();\n\t}\n\tif ( isOnly ) {\n\t\treturn css( { borderRadius: 2 } );\n\t}\n\n\treturn css( {\n\t\tborderRadius: 0,\n\t} );\n};\n\nconst unitControlMarginStyles = ( { isFirst, isOnly } ) => {\n\tconst marginLeft = isFirst || isOnly ? 0 : -1;\n\n\treturn rtl( { marginLeft } )();\n};\n\nexport const UnitControl = styled( BaseUnitControl )`\n\tmax-width: 60px;\n\t${ unitControlBorderRadiusStyles };\n\t${ unitControlMarginStyles };\n`;\n","/**\n * External dependencies\n */\nimport { useHover } from '@use-gesture/react';\n\n/**\n * Internal dependencies\n */\nimport BaseTooltip from '../tooltip';\nimport { UnitControlWrapper, UnitControl } from './styles/box-control-styles';\n\nconst noop = () => {};\n\nexport default function BoxUnitControl( {\n\tisFirst,\n\tisLast,\n\tisOnly,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tlabel,\n\tvalue,\n\t...props\n} ) {\n\tconst bindHoverGesture = useHover( ( { event, ...state } ) => {\n\t\tif ( state.hovering ) {\n\t\t\tonHoverOn( event, state );\n\t\t} else {\n\t\t\tonHoverOff( event, state );\n\t\t}\n\t} );\n\n\treturn (\n\t\t<UnitControlWrapper { ...bindHoverGesture() }>\n\t\t\t<Tooltip text={ label }>\n\t\t\t\t<UnitControl\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tclassName=\"component-box-control__unit-control\"\n\t\t\t\t\tisFirst={ isFirst }\n\t\t\t\t\tisLast={ isLast }\n\t\t\t\t\tisOnly={ isOnly }\n\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\tisResetValueOnUnitChange={ false }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t</UnitControlWrapper>\n\t);\n}\n\nfunction Tooltip( { children, text } ) {\n\tif ( ! text ) return children;\n\n\t/**\n\t * Wrapping the children in a `<div />` as Tooltip as it attempts\n\t * to render the <UnitControl />. Using a plain `<div />` appears to\n\t * resolve this issue.\n\t *\n\t * Originally discovered and referenced here:\n\t * https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\t */\n\treturn (\n\t\t<BaseTooltip text={ text } position=\"top\">\n\t\t\t<div>{ children }</div>\n\t\t</BaseTooltip>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\n\nexport const LABELS = {\n\tall: __( 'All' ),\n\ttop: __( 'Top' ),\n\tbottom: __( 'Bottom' ),\n\tleft: __( 'Left' ),\n\tright: __( 'Right' ),\n\tmixed: __( 'Mixed' ),\n\tvertical: __( 'Vertical' ),\n\thorizontal: __( 'Horizontal' ),\n};\n\nexport const DEFAULT_VALUES = {\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];\n\n/**\n * Gets an items with the most occurrence within an array\n * https://stackoverflow.com/a/20762713\n *\n * @param {Array<any>} arr Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nfunction mode( arr ) {\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tarr.filter( ( v ) => v === a ).length -\n\t\t\t\tarr.filter( ( v ) => v === b ).length\n\t\t)\n\t\t.pop();\n}\n\n/**\n * Gets the 'all' input value and unit from values data.\n *\n * @param {Object} values         Box values.\n * @param {Object} selectedUnits  Box units.\n * @param {Array}  availableSides Available box sides to evaluate.\n *\n * @return {string} A value + unit for the 'all' input.\n */\nexport function getAllValue(\n\tvalues = {},\n\tselectedUnits,\n\tavailableSides = ALL_SIDES\n) {\n\tconst sides = normalizeSides( availableSides );\n\tconst parsedQuantitiesAndUnits = sides.map( ( side ) =>\n\t\tparseQuantityAndUnitFromRawValue( values[ side ] )\n\t);\n\tconst allParsedQuantities = parsedQuantitiesAndUnits.map(\n\t\t( value ) => value[ 0 ] ?? ''\n\t);\n\tconst allParsedUnits = parsedQuantitiesAndUnits.map(\n\t\t( value ) => value[ 1 ]\n\t);\n\n\tconst commonQuantity = allParsedQuantities.every(\n\t\t( v ) => v === allParsedQuantities[ 0 ]\n\t)\n\t\t? allParsedQuantities[ 0 ]\n\t\t: '';\n\n\t/**\n\t * The typeof === 'number' check is important. On reset actions, the incoming value\n\t * may be null or an empty string.\n\t *\n\t * Also, the value may also be zero (0), which is considered a valid unit value.\n\t *\n\t * typeof === 'number' is more specific for these cases, rather than relying on a\n\t * simple truthy check.\n\t */\n\tlet commonUnit;\n\tif ( typeof commonQuantity === 'number' ) {\n\t\tcommonUnit = mode( allParsedUnits );\n\t} else {\n\t\t// Set meaningful unit selection if no commonQuantity and user has previously\n\t\t// selected units without assigning values while controls were unlinked.\n\t\tcommonUnit =\n\t\t\tgetAllUnitFallback( selectedUnits ) ?? mode( allParsedUnits );\n\t}\n\n\treturn [ commonQuantity, commonUnit ].join( '' );\n}\n\n/**\n * Determine the most common unit selection to use as a fallback option.\n *\n * @param {Object} selectedUnits Current unit selections for individual sides.\n * @return {string} Most common unit selection.\n */\nexport function getAllUnitFallback( selectedUnits ) {\n\tif ( ! selectedUnits || typeof selectedUnits !== 'object' ) {\n\t\treturn undefined;\n\t}\n\n\tconst filteredUnits = Object.values( selectedUnits ).filter( Boolean );\n\n\treturn mode( filteredUnits );\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values        Box values.\n * @param {Object} selectedUnits Box units.\n * @param {Array}  sides         Available box sides to evaluate.\n *\n * @return {boolean} Whether values are mixed.\n */\nexport function isValuesMixed( values = {}, selectedUnits, sides = ALL_SIDES ) {\n\tconst allValue = getAllValue( values, selectedUnits, sides );\n\tconst isMixed = isNaN( parseFloat( allValue ) );\n\n\treturn isMixed;\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Box values.\n *\n * @return {boolean} Whether values are mixed.\n */\nexport function isValuesDefined( values ) {\n\treturn (\n\t\tvalues !== undefined &&\n\t\tObject.values( values ).filter(\n\t\t\t// Switching units when input is empty causes values only\n\t\t\t// containing units. This gives false positive on mixed values\n\t\t\t// unless filtered.\n\t\t\t( value ) => !! value && /\\d/.test( value )\n\t\t).length > 0\n\t);\n}\n\n/**\n * Get initial selected side, factoring in whether the sides are linked,\n * and whether the vertical / horizontal directions are grouped via splitOnAxis.\n *\n * @param {boolean} isLinked    Whether the box control's fields are linked.\n * @param {boolean} splitOnAxis Whether splitting by horizontal or vertical axis.\n * @return {string} The initial side.\n */\nexport function getInitialSide( isLinked, splitOnAxis ) {\n\tlet initialSide = 'all';\n\n\tif ( ! isLinked ) {\n\t\tinitialSide = splitOnAxis ? 'vertical' : 'top';\n\t}\n\n\treturn initialSide;\n}\n\n/**\n * Normalizes provided sides configuration to an array containing only top,\n * right, bottom and left. This essentially just maps `horizontal` or `vertical`\n * to their appropriate sides to facilitate correctly determining value for\n * all input control.\n *\n * @param {Array} sides Available sides for box control.\n * @return {Array} Normalized sides configuration.\n */\nexport function normalizeSides( sides ) {\n\tconst filteredSides = [];\n\n\tif ( ! sides?.length ) {\n\t\treturn ALL_SIDES;\n\t}\n\n\tif ( sides.includes( 'vertical' ) ) {\n\t\tfilteredSides.push( ...[ 'top', 'bottom' ] );\n\t} else if ( sides.includes( 'horizontal' ) ) {\n\t\tfilteredSides.push( ...[ 'left', 'right' ] );\n\t} else {\n\t\tconst newSides = ALL_SIDES.filter( ( side ) => sides.includes( side ) );\n\t\tfilteredSides.push( ...newSides );\n\t}\n\n\treturn filteredSides;\n}\n\n/**\n * Applies a value to an object representing top, right, bottom and left sides\n * while taking into account any custom side configuration.\n *\n * @param {Object}        currentValues The current values for each side.\n * @param {string|number} newValue      The value to apply to the sides object.\n * @param {string[]}      sides         Array defining valid sides.\n *\n * @return {Object} Object containing the updated values for each side.\n */\nexport function applyValueToSides( currentValues, newValue, sides ) {\n\tconst newValues = { ...currentValues };\n\n\tif ( sides?.length ) {\n\t\tsides.forEach( ( side ) => {\n\t\t\tif ( side === 'vertical' ) {\n\t\t\t\tnewValues.top = newValue;\n\t\t\t\tnewValues.bottom = newValue;\n\t\t\t} else if ( side === 'horizontal' ) {\n\t\t\t\tnewValues.left = newValue;\n\t\t\t\tnewValues.right = newValue;\n\t\t\t} else {\n\t\t\t\tnewValues[ side ] = newValue;\n\t\t\t}\n\t\t} );\n\t} else {\n\t\tALL_SIDES.forEach( ( side ) => ( newValues[ side ] = newValue ) );\n\t}\n\n\treturn newValues;\n}\n","/**\n * Internal dependencies\n */\nimport UnitControl from './unit-control';\nimport {\n\tLABELS,\n\tapplyValueToSides,\n\tgetAllValue,\n\tisValuesMixed,\n\tisValuesDefined,\n} from './utils';\n\nconst noop = () => {};\n\nexport default function AllInputControl( {\n\tonChange = noop,\n\tonFocus = noop,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tvalues,\n\tsides,\n\tselectedUnits,\n\tsetSelectedUnits,\n\t...props\n} ) {\n\tconst allValue = getAllValue( values, selectedUnits, sides );\n\tconst hasValues = isValuesDefined( values );\n\tconst isMixed = hasValues && isValuesMixed( values, selectedUnits, sides );\n\tconst allPlaceholder = isMixed ? LABELS.mixed : null;\n\n\tconst handleOnFocus = ( event ) => {\n\t\tonFocus( event, { side: 'all' } );\n\t};\n\n\tconst handleOnChange = ( next ) => {\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tconst nextValues = applyValueToSides( values, nextValue, sides );\n\n\t\tonChange( nextValues );\n\t};\n\n\t// Set selected unit so it can be used as fallback by unlinked controls\n\t// when individual sides do not have a value containing a unit.\n\tconst handleOnUnitChange = ( unit ) => {\n\t\tconst newUnits = applyValueToSides( selectedUnits, unit, sides );\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\tconst handleOnHoverOn = () => {\n\t\tonHoverOn( {\n\t\t\ttop: true,\n\t\t\tbottom: true,\n\t\t\tleft: true,\n\t\t\tright: true,\n\t\t} );\n\t};\n\n\tconst handleOnHoverOff = () => {\n\t\tonHoverOff( {\n\t\t\ttop: false,\n\t\t\tbottom: false,\n\t\t\tleft: false,\n\t\t\tright: false,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonHoverOn={ handleOnHoverOn }\n\t\t\tonHoverOff={ handleOnHoverOff }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport UnitControl from './unit-control';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { ALL_SIDES, LABELS } from './utils';\nimport { LayoutContainer, Layout } from './styles/box-control-styles';\n\nconst noop = () => {};\n\nexport default function BoxInputControls( {\n\tonChange = noop,\n\tonFocus = noop,\n\tonHoverOn = noop,\n\tonHoverOff = noop,\n\tvalues,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tsides,\n\t...props\n} ) {\n\tconst createHandleOnFocus = ( side ) => ( event ) => {\n\t\tonFocus( event, { side } );\n\t};\n\n\tconst createHandleOnHoverOn = ( side ) => () => {\n\t\tonHoverOn( { [ side ]: true } );\n\t};\n\n\tconst createHandleOnHoverOff = ( side ) => () => {\n\t\tonHoverOff( { [ side ]: false } );\n\t};\n\n\tconst handleOnChange = ( nextValues ) => {\n\t\tonChange( nextValues );\n\t};\n\n\tconst createHandleOnChange =\n\t\t( side ) =>\n\t\t( next, { event } ) => {\n\t\t\tconst { altKey } = event;\n\t\t\tconst nextValues = { ...values };\n\t\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\t\tconst nextValue = isNumeric ? next : undefined;\n\n\t\t\tnextValues[ side ] = nextValue;\n\n\t\t\t/**\n\t\t\t * Supports changing pair sides. For example, holding the ALT key\n\t\t\t * when changing the TOP will also update BOTTOM.\n\t\t\t */\n\t\t\tif ( altKey ) {\n\t\t\t\tswitch ( side ) {\n\t\t\t\t\tcase 'top':\n\t\t\t\t\t\tnextValues.bottom = nextValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\tnextValues.top = nextValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\t\tnextValues.right = nextValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\tnextValues.left = nextValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\thandleOnChange( nextValues );\n\t\t};\n\n\tconst createHandleOnUnitChange = ( side ) => ( next ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\t\tnewUnits[ side ] = next;\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\t// Filter sides if custom configuration provided, maintaining default order.\n\tconst filteredSides = sides?.length\n\t\t? ALL_SIDES.filter( ( side ) => sides.includes( side ) )\n\t\t: ALL_SIDES;\n\n\tconst first = filteredSides[ 0 ];\n\tconst last = filteredSides[ filteredSides.length - 1 ];\n\tconst only = first === last && first;\n\n\treturn (\n\t\t<LayoutContainer className=\"component-box-control__input-controls-wrapper\">\n\t\t\t<Layout\n\t\t\t\tgap={ 0 }\n\t\t\t\talign=\"top\"\n\t\t\t\tclassName=\"component-box-control__input-controls\"\n\t\t\t>\n\t\t\t\t{ filteredSides.map( ( side ) => {\n\t\t\t\t\tconst [ parsedQuantity, parsedUnit ] =\n\t\t\t\t\t\tparseQuantityAndUnitFromRawValue( values[ side ] );\n\n\t\t\t\t\tconst computedUnit = values[ side ]\n\t\t\t\t\t\t? parsedUnit\n\t\t\t\t\t\t: selectedUnits[ side ];\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\tisFirst={ first === side }\n\t\t\t\t\t\t\tisLast={ last === side }\n\t\t\t\t\t\t\tisOnly={ only === side }\n\t\t\t\t\t\t\tvalue={ [ parsedQuantity, computedUnit ].join(\n\t\t\t\t\t\t\t\t''\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ createHandleOnChange( side ) }\n\t\t\t\t\t\t\tonUnitChange={ createHandleOnUnitChange( side ) }\n\t\t\t\t\t\t\tonFocus={ createHandleOnFocus( side ) }\n\t\t\t\t\t\t\tonHoverOn={ createHandleOnHoverOn( side ) }\n\t\t\t\t\t\t\tonHoverOff={ createHandleOnHoverOff( side ) }\n\t\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\t\tkey={ `box-control-${ side }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Layout>\n\t\t</LayoutContainer>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport UnitControl from './unit-control';\nimport { LABELS } from './utils';\nimport { Layout } from './styles/box-control-styles';\n\nconst groupedSides = [ 'vertical', 'horizontal' ];\n\nexport default function AxialInputControls( {\n\tonChange,\n\tonFocus,\n\tonHoverOn,\n\tonHoverOff,\n\tvalues,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tsides,\n\t...props\n} ) {\n\tconst createHandleOnFocus = ( side ) => ( event ) => {\n\t\tif ( ! onFocus ) {\n\t\t\treturn;\n\t\t}\n\t\tonFocus( event, { side } );\n\t};\n\n\tconst createHandleOnHoverOn = ( side ) => () => {\n\t\tif ( ! onHoverOn ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( side === 'vertical' ) {\n\t\t\tonHoverOn( {\n\t\t\t\ttop: true,\n\t\t\t\tbottom: true,\n\t\t\t} );\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tonHoverOn( {\n\t\t\t\tleft: true,\n\t\t\t\tright: true,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst createHandleOnHoverOff = ( side ) => () => {\n\t\tif ( ! onHoverOff ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( side === 'vertical' ) {\n\t\t\tonHoverOff( {\n\t\t\t\ttop: false,\n\t\t\t\tbottom: false,\n\t\t\t} );\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tonHoverOff( {\n\t\t\t\tleft: false,\n\t\t\t\tright: false,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst createHandleOnChange = ( side ) => ( next ) => {\n\t\tif ( ! onChange ) {\n\t\t\treturn;\n\t\t}\n\t\tconst nextValues = { ...values };\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\n\t\tif ( side === 'vertical' ) {\n\t\t\tnextValues.top = nextValue;\n\t\t\tnextValues.bottom = nextValue;\n\t\t}\n\n\t\tif ( side === 'horizontal' ) {\n\t\t\tnextValues.left = nextValue;\n\t\t\tnextValues.right = nextValue;\n\t\t}\n\n\t\tonChange( nextValues );\n\t};\n\n\tconst createHandleOnUnitChange = ( side ) => ( next ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\n\t\tif ( side === 'vertical' ) {\n\t\t\tnewUnits.top = next;\n\t\t\tnewUnits.bottom = next;\n\t\t}\n\n\t\tif ( side === 'horizontal' ) {\n\t\t\tnewUnits.left = next;\n\t\t\tnewUnits.right = next;\n\t\t}\n\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\t// Filter sides if custom configuration provided, maintaining default order.\n\tconst filteredSides = sides?.length\n\t\t? groupedSides.filter( ( side ) => sides.includes( side ) )\n\t\t: groupedSides;\n\n\tconst first = filteredSides[ 0 ];\n\tconst last = filteredSides[ filteredSides.length - 1 ];\n\tconst only = first === last && first;\n\n\treturn (\n\t\t<Layout\n\t\t\tgap={ 0 }\n\t\t\talign=\"top\"\n\t\t\tclassName=\"component-box-control__vertical-horizontal-input-controls\"\n\t\t>\n\t\t\t{ filteredSides.map( ( side ) => {\n\t\t\t\tconst [ parsedQuantity, parsedUnit ] =\n\t\t\t\t\tparseQuantityAndUnitFromRawValue(\n\t\t\t\t\t\tside === 'vertical' ? values.top : values.left\n\t\t\t\t\t);\n\t\t\t\tconst selectedUnit =\n\t\t\t\t\tside === 'vertical'\n\t\t\t\t\t\t? selectedUnits.top\n\t\t\t\t\t\t: selectedUnits.left;\n\t\t\t\treturn (\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\tisFirst={ first === side }\n\t\t\t\t\t\tisLast={ last === side }\n\t\t\t\t\t\tisOnly={ only === side }\n\t\t\t\t\t\tvalue={ [\n\t\t\t\t\t\t\tparsedQuantity,\n\t\t\t\t\t\t\tselectedUnit ?? parsedUnit,\n\t\t\t\t\t\t].join( '' ) }\n\t\t\t\t\t\tonChange={ createHandleOnChange( side ) }\n\t\t\t\t\t\tonUnitChange={ createHandleOnUnitChange( side ) }\n\t\t\t\t\t\tonFocus={ createHandleOnFocus( side ) }\n\t\t\t\t\t\tonHoverOn={ createHandleOnHoverOn( side ) }\n\t\t\t\t\t\tonHoverOff={ createHandleOnHoverOff( side ) }\n\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\tkey={ side }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Layout>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\nexport const Root = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\twidth: 24px;\n\theight: 24px;\n\tposition: relative;\n\tpadding: 4px;\n`;\n\nexport const Viewbox = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n`;\n\nconst strokeFocus = ( { isFocused } ) => {\n\treturn css( {\n\t\tbackgroundColor: 'currentColor',\n\t\topacity: isFocused ? 1 : 0.3,\n\t} );\n};\n\nconst Stroke = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\tpointer-events: none;\n\tposition: absolute;\n\t${ strokeFocus };\n`;\n\nconst VerticalStroke = styled( Stroke )`\n\tbottom: 3px;\n\ttop: 3px;\n\twidth: 2px;\n`;\n\nconst HorizontalStroke = styled( Stroke )`\n\theight: 2px;\n\tleft: 3px;\n\tright: 3px;\n`;\n\nexport const TopStroke = styled( HorizontalStroke )`\n\ttop: 0;\n`;\n\nexport const RightStroke = styled( VerticalStroke )`\n\tright: 0;\n`;\n\nexport const BottomStroke = styled( HorizontalStroke )`\n\tbottom: 0;\n`;\n\nexport const LeftStroke = styled( VerticalStroke )`\n\tleft: 0;\n`;\n","/**\n * Internal dependencies\n */\nimport {\n\tRoot,\n\tViewbox,\n\tTopStroke,\n\tRightStroke,\n\tBottomStroke,\n\tLeftStroke,\n} from './styles/box-control-icon-styles';\n\nconst BASE_ICON_SIZE = 24;\n\nexport default function BoxControlIcon( {\n\tsize = 24,\n\tside = 'all',\n\tsides,\n\t...props\n} ) {\n\tconst isSideDisabled = ( value ) =>\n\t\tsides?.length && ! sides.includes( value );\n\n\tconst hasSide = ( value ) => {\n\t\tif ( isSideDisabled( value ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn side === 'all' || side === value;\n\t};\n\n\tconst top = hasSide( 'top' ) || hasSide( 'vertical' );\n\tconst right = hasSide( 'right' ) || hasSide( 'horizontal' );\n\tconst bottom = hasSide( 'bottom' ) || hasSide( 'vertical' );\n\tconst left = hasSide( 'left' ) || hasSide( 'horizontal' );\n\n\t// Simulates SVG Icon scaling.\n\tconst scale = size / BASE_ICON_SIZE;\n\n\treturn (\n\t\t<Root style={ { transform: `scale(${ scale })` } } { ...props }>\n\t\t\t<Viewbox>\n\t\t\t\t<TopStroke isFocused={ top } />\n\t\t\t\t<RightStroke isFocused={ right } />\n\t\t\t\t<BottomStroke isFocused={ bottom } />\n\t\t\t\t<LeftStroke isFocused={ left } />\n\t\t\t</Viewbox>\n\t\t</Root>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Tooltip from '../tooltip';\n\nexport default function LinkedButton( { isLinked, ...props } ) {\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\t// TODO: Remove span after merging https://github.com/WordPress/gutenberg/pull/44198\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<span>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tclassName=\"component-box-control__linked-button\"\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Tooltip>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport Button from '../button';\nimport { FlexItem, FlexBlock } from '../flex';\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport AxialInputControls from './axial-input-controls';\nimport BoxControlIcon from './icon';\nimport LinkedButton from './linked-button';\nimport {\n\tRoot,\n\tHeader,\n\tHeaderControlWrapper,\n} from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport {\n\tDEFAULT_VALUES,\n\tgetInitialSide,\n\tisValuesMixed,\n\tisValuesDefined,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\n\nconst defaultInputProps = {\n\tmin: 0,\n};\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp ) {\n\tconst instanceId = useInstanceId( BoxControl, 'inspector-box-control' );\n\n\treturn idProp || instanceId;\n}\nexport default function BoxControl( {\n\tid: idProp,\n\tinputProps = defaultInputProps,\n\tonChange = noop,\n\tlabel = __( 'Box Control' ),\n\tvalues: valuesProp,\n\tunits,\n\tsides,\n\tsplitOnAxis = false,\n\tallowReset = true,\n\tresetValues = DEFAULT_VALUES,\n} ) {\n\tconst [ values, setValues ] = useControlledState( valuesProp, {\n\t\tfallback: DEFAULT_VALUES,\n\t} );\n\tconst inputValues = values || DEFAULT_VALUES;\n\tconst hasInitialValue = isValuesDefined( valuesProp );\n\tconst hasOneSide = sides?.length === 1;\n\n\tconst [ isDirty, setIsDirty ] = useState( hasInitialValue );\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasInitialValue || ! isValuesMixed( inputValues ) || hasOneSide\n\t);\n\n\tconst [ side, setSide ] = useState(\n\t\tgetInitialSide( isLinked, splitOnAxis )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\ttop: parseQuantityAndUnitFromRawValue( valuesProp?.top )[ 1 ],\n\t\tright: parseQuantityAndUnitFromRawValue( valuesProp?.right )[ 1 ],\n\t\tbottom: parseQuantityAndUnitFromRawValue( valuesProp?.bottom )[ 1 ],\n\t\tleft: parseQuantityAndUnitFromRawValue( valuesProp?.left )[ 1 ],\n\t} );\n\n\tconst id = useUniqueId( idProp );\n\tconst headingId = `${ id }-heading`;\n\n\tconst toggleLinked = () => {\n\t\tsetIsLinked( ! isLinked );\n\t\tsetSide( getInitialSide( ! isLinked, splitOnAxis ) );\n\t};\n\n\tconst handleOnFocus = ( event, { side: nextSide } ) => {\n\t\tsetSide( nextSide );\n\t};\n\n\tconst handleOnChange = ( nextValues ) => {\n\t\tonChange( nextValues );\n\t\tsetValues( nextValues );\n\t\tsetIsDirty( true );\n\t};\n\n\tconst handleOnReset = () => {\n\t\tonChange( resetValues );\n\t\tsetValues( resetValues );\n\t\tsetSelectedUnits( resetValues );\n\t\tsetIsDirty( false );\n\t};\n\n\tconst inputControlProps = {\n\t\t...inputProps,\n\t\tonChange: handleOnChange,\n\t\tonFocus: handleOnFocus,\n\t\tisLinked,\n\t\tunits,\n\t\tselectedUnits,\n\t\tsetSelectedUnits,\n\t\tsides,\n\t\tvalues: inputValues,\n\t};\n\n\treturn (\n\t\t<Root id={ id } role=\"group\" aria-labelledby={ headingId }>\n\t\t\t<Header className=\"component-box-control__header\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BaseControl.VisualLabel id={ headingId }>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t</FlexItem>\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"component-box-control__reset-button\"\n\t\t\t\t\t\t\tisSecondary\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\tdisabled={ ! isDirty }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</Header>\n\t\t\t<HeaderControlWrapper className=\"component-box-control__header-control-wrapper\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BoxControlIcon side={ side } sides={ sides } />\n\t\t\t\t</FlexItem>\n\t\t\t\t{ isLinked && (\n\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\t\t{ ...inputControlProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t) }\n\t\t\t\t{ ! isLinked && splitOnAxis && (\n\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t<AxialInputControls { ...inputControlProps } />\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t) }\n\t\t\t\t{ ! hasOneSide && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<LinkedButton\n\t\t\t\t\t\t\tonClick={ toggleLinked }\n\t\t\t\t\t\t\tisLinked={ isLinked }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HeaderControlWrapper>\n\t\t\t{ ! isLinked && ! splitOnAxis && (\n\t\t\t\t<InputControls { ...inputControlProps } />\n\t\t\t) }\n\t\t</Root>\n\t);\n}\n\nexport { applyValueToSides } from './utils';\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ButtonGroupProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nfunction UnforwardedButtonGroup(\n\tprops: WordPressComponentProps< ButtonGroupProps, 'div', false >,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst { className, ...restProps } = props;\n\tconst classes = classnames( 'components-button-group', className );\n\n\treturn (\n\t\t<div ref={ ref } role=\"group\" className={ classes } { ...restProps } />\n\t);\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n *   <ButtonGroup>\n *     <Button variant=\"primary\">Button 1</Button>\n *     <Button variant=\"primary\">Button 2</Button>\n *   </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef( UnforwardedButtonGroup );\n\nexport default ButtonGroup;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const Elevation = css`\n\tbackground: transparent;\n\tdisplay: block;\n\tmargin: 0 !important;\n\tpointer-events: none;\n\tposition: absolute;\n\twill-change: box-shadow;\n`;\n","/**\n * External dependencies\n */\nimport { css, SerializedStyles } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport * as styles from './styles';\nimport { CONFIG, reduceMotion } from '../utils';\nimport { useCx } from '../utils/hooks/use-cx';\nimport { isValueDefined } from '../utils/values';\nimport type { ElevationProps } from './types';\n\nexport function getBoxShadow( value: number ) {\n\tconst boxShadowColor = `rgba(0, 0, 0, ${ value / 20 })`;\n\tconst boxShadow = `0 ${ value }px ${ value * 2 }px 0\n\t${ boxShadowColor }`;\n\n\treturn boxShadow;\n}\n\nexport function useElevation(\n\tprops: WordPressComponentProps< ElevationProps, 'div' >\n) {\n\tconst {\n\t\tactive,\n\t\tborderRadius = 'inherit',\n\t\tclassName,\n\t\tfocus,\n\t\thover,\n\t\tisInteractive = false,\n\t\toffset = 0,\n\t\tvalue = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Elevation' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tlet hoverValue: number | undefined = isValueDefined( hover )\n\t\t\t? hover\n\t\t\t: value * 2;\n\t\tlet activeValue: number | undefined = isValueDefined( active )\n\t\t\t? active\n\t\t\t: value / 2;\n\n\t\tif ( ! isInteractive ) {\n\t\t\thoverValue = isValueDefined( hover ) ? hover : undefined;\n\t\t\tactiveValue = isValueDefined( active ) ? active : undefined;\n\t\t}\n\n\t\tconst transition = `box-shadow ${ CONFIG.transitionDuration } ${ CONFIG.transitionTimingFunction }`;\n\n\t\tconst sx: {\n\t\t\tBase?: SerializedStyles;\n\t\t\thover?: SerializedStyles;\n\t\t\tactive?: SerializedStyles;\n\t\t\tfocus?: SerializedStyles;\n\t\t} = {};\n\n\t\tsx.Base = css(\n\t\t\t{\n\t\t\t\tborderRadius,\n\t\t\t\tbottom: offset,\n\t\t\t\tboxShadow: getBoxShadow( value ),\n\t\t\t\topacity: CONFIG.elevationIntensity,\n\t\t\t\tleft: offset,\n\t\t\t\tright: offset,\n\t\t\t\ttop: offset,\n\t\t\t\ttransition,\n\t\t\t},\n\t\t\treduceMotion( 'transition' )\n\t\t);\n\n\t\tif ( isValueDefined( hoverValue ) ) {\n\t\t\tsx.hover = css`\n\t\t\t\t*:hover > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( hoverValue ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\tif ( isValueDefined( activeValue ) ) {\n\t\t\tsx.active = css`\n\t\t\t\t*:active > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( activeValue ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\tif ( isValueDefined( focus ) ) {\n\t\t\tsx.focus = css`\n\t\t\t\t*:focus > & {\n\t\t\t\t\tbox-shadow: ${ getBoxShadow( focus ) };\n\t\t\t\t}\n\t\t\t`;\n\t\t}\n\n\t\treturn cx(\n\t\t\tstyles.Elevation,\n\t\t\tsx.Base,\n\t\t\tsx.hover,\n\t\t\tsx.focus,\n\t\t\tsx.active,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tactive,\n\t\tborderRadius,\n\t\tclassName,\n\t\tcx,\n\t\tfocus,\n\t\thover,\n\t\tisInteractive,\n\t\toffset,\n\t\tvalue,\n\t] );\n\n\treturn { ...otherProps, className: classes, 'aria-hidden': true };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useElevation } from './hook';\nimport type { ElevationProps } from './types';\n\nfunction UnconnectedElevation(\n\tprops: WordPressComponentProps< ElevationProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst elevationProps = useElevation( props );\n\n\treturn <View { ...elevationProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Elevation` is a core component that renders shadow, using the component\n * system's shadow system.\n *\n * The shadow effect is generated using the `value` prop.\n *\n * ```jsx\n * import {\n *\t__experimentalElevation as Elevation,\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <Surface>\n *       <Text>Code is Poetry</Text>\n *       <Elevation value={ 5 } />\n *     </Surface>\n *   );\n * }\n * ```\n */\nexport const Elevation = contextConnect( UnconnectedElevation, 'Elevation' );\n\nexport default Elevation;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\n// Since the border for `Card` is rendered via the `box-shadow` property\n// (as opposed to the `border` property), the value of the border radius needs\n// to be adjusted by removing 1px (this is because the `box-shadow` renders\n// as an \"outer radius\").\nconst adjustedBorderRadius = `calc(${ CONFIG.cardBorderRadius } - 1px)`;\n\nexport const Card = css`\n\tbox-shadow: 0 0 0 1px ${ CONFIG.surfaceBorderColor };\n\toutline: none;\n`;\n\nexport const Header = css`\n\tborder-bottom: 1px solid;\n\tbox-sizing: border-box;\n\n\t&:last-child {\n\t\tborder-bottom: none;\n\t}\n`;\n\nexport const Footer = css`\n\tborder-top: 1px solid;\n\tbox-sizing: border-box;\n\n\t&:first-of-type {\n\t\tborder-top: none;\n\t}\n`;\n\nexport const Content = css`\n\theight: 100%;\n`;\n\nexport const Body = css`\n\tbox-sizing: border-box;\n\theight: auto;\n\tmax-height: 100%;\n`;\n\nexport const Media = css`\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\n\t& > img,\n\t& > iframe {\n\t\tdisplay: block;\n\t\theight: auto;\n\t\tmax-width: 100%;\n\t\twidth: 100%;\n\t}\n`;\n\nexport const Divider = css`\n\tbox-sizing: border-box;\n\tdisplay: block;\n\twidth: 100%;\n`;\n\nexport const borderRadius = css`\n\t&:first-of-type {\n\t\tborder-top-left-radius: ${ adjustedBorderRadius };\n\t\tborder-top-right-radius: ${ adjustedBorderRadius };\n\t}\n\n\t&:last-of-type {\n\t\tborder-bottom-left-radius: ${ adjustedBorderRadius };\n\t\tborder-bottom-right-radius: ${ adjustedBorderRadius };\n\t}\n`;\n\nexport const borderColor = css`\n\tborder-color: ${ CONFIG.colorDivider };\n`;\n\nexport const boxShadowless = css`\n\tbox-shadow: none;\n`;\n\nexport const borderless = css`\n\tborder: none;\n`;\n\nexport const rounded = css`\n\tborder-radius: ${ adjustedBorderRadius };\n`;\n\nconst xSmallCardPadding = css`\n\tpadding: ${ CONFIG.cardPaddingXSmall };\n`;\n\nexport const cardPaddings = {\n\tlarge: css`\n\t\tpadding: ${ CONFIG.cardPaddingLarge };\n\t`,\n\tmedium: css`\n\t\tpadding: ${ CONFIG.cardPaddingMedium };\n\t`,\n\tsmall: css`\n\t\tpadding: ${ CONFIG.cardPaddingSmall };\n\t`,\n\txSmall: xSmallCardPadding,\n\t// The `extraSmall` size is not officially documented, but the following styles\n\t// are kept for legacy reasons to support older values of the `size` prop.\n\textraSmall: xSmallCardPadding,\n};\n\nexport const shady = css`\n\tbackground-color: ${ COLORS.ui.backgroundDisabled };\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../utils';\nimport type { SurfaceVariant, SurfaceProps } from './types';\n\nexport const Surface = css`\n\tbackground-color: ${ CONFIG.surfaceColor };\n\tcolor: ${ COLORS.gray[ 900 ] };\n\tposition: relative;\n`;\n\nexport const background = css`\n\tbackground-color: ${ CONFIG.surfaceBackgroundColor };\n`;\n\nexport function getBorders( {\n\tborderBottom,\n\tborderLeft,\n\tborderRight,\n\tborderTop,\n}: Pick<\n\tSurfaceProps,\n\t'borderBottom' | 'borderLeft' | 'borderRight' | 'borderTop'\n> ) {\n\tconst borderStyle = `1px solid ${ CONFIG.surfaceBorderColor }`;\n\n\treturn css( {\n\t\tborderBottom: borderBottom ? borderStyle : undefined,\n\t\tborderLeft: borderLeft ? borderStyle : undefined,\n\t\tborderRight: borderRight ? borderStyle : undefined,\n\t\tborderTop: borderTop ? borderStyle : undefined,\n\t} );\n}\n\nexport const primary = css``;\n\nexport const secondary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTintColor };\n`;\n\nexport const tertiary = css`\n\tbackground: ${ CONFIG.surfaceBackgroundTertiaryColor };\n`;\n\nconst customBackgroundSize = ( surfaceBackgroundSize: string ) =>\n\t[ surfaceBackgroundSize, surfaceBackgroundSize ].join( ' ' );\n\nconst dottedBackground1 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t'90deg',\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackground2 = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t[ CONFIG.surfaceBackgroundColor, surfaceBackgroundSizeDotted ].join(\n\t\t\t' '\n\t\t),\n\t\t'transparent 1%',\n\t].join( ',' );\n\nconst dottedBackgroundCombined = ( surfaceBackgroundSizeDotted: string ) =>\n\t[\n\t\t`linear-gradient( ${ dottedBackground1(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\t`linear-gradient( ${ dottedBackground2(\n\t\t\tsurfaceBackgroundSizeDotted\n\t\t) } ) center`,\n\t\tCONFIG.surfaceBorderBoldColor,\n\t].join( ',' );\n\nexport const getDotted = (\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => css`\n\tbackground: ${ dottedBackgroundCombined( surfaceBackgroundSizeDotted ) };\n\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n`;\n\nconst gridBackground1 = [\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackground2 = [\n\t'90deg',\n\t`${ CONFIG.surfaceBorderSubtleColor } 1px`,\n\t'transparent 1px',\n].join( ',' );\n\nconst gridBackgroundCombined = [\n\t`linear-gradient( ${ gridBackground1 } )`,\n\t`linear-gradient( ${ gridBackground2 } )`,\n].join( ',' );\n\nexport const getGrid = ( surfaceBackgroundSize: string ) => {\n\treturn css`\n\t\tbackground: ${ CONFIG.surfaceBackgroundColor };\n\t\tbackground-image: ${ gridBackgroundCombined };\n\t\tbackground-size: ${ customBackgroundSize( surfaceBackgroundSize ) };\n\t`;\n};\n\nexport const getVariant = (\n\tvariant: SurfaceVariant,\n\tsurfaceBackgroundSize: string,\n\tsurfaceBackgroundSizeDotted: string\n) => {\n\tswitch ( variant ) {\n\t\tcase 'dotted': {\n\t\t\treturn getDotted(\n\t\t\t\tsurfaceBackgroundSize,\n\t\t\t\tsurfaceBackgroundSizeDotted\n\t\t\t);\n\t\t}\n\t\tcase 'grid': {\n\t\t\treturn getGrid( surfaceBackgroundSize );\n\t\t}\n\t\tcase 'primary': {\n\t\t\treturn primary;\n\t\t}\n\t\tcase 'secondary': {\n\t\t\treturn secondary;\n\t\t}\n\t\tcase 'tertiary': {\n\t\t\treturn tertiary;\n\t\t}\n\t}\n};\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem } from '../ui/context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport function useSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >\n) {\n\tconst {\n\t\tbackgroundSize = 12,\n\t\tborderBottom = false,\n\t\tborderLeft = false,\n\t\tborderRight = false,\n\t\tborderTop = false,\n\t\tclassName,\n\t\tvariant = 'primary',\n\t\t...otherProps\n\t} = useContextSystem( props, 'Surface' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\tconst sx = {\n\t\t\tborders: styles.getBorders( {\n\t\t\t\tborderBottom,\n\t\t\t\tborderLeft,\n\t\t\t\tborderRight,\n\t\t\t\tborderTop,\n\t\t\t} ),\n\t\t};\n\n\t\treturn cx(\n\t\t\tstyles.Surface,\n\t\t\tsx.borders,\n\t\t\tstyles.getVariant(\n\t\t\t\tvariant,\n\t\t\t\t`${ backgroundSize }px`,\n\t\t\t\t`${ backgroundSize - 1 }px`\n\t\t\t),\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tbackgroundSize,\n\t\tborderBottom,\n\t\tborderLeft,\n\t\tborderRight,\n\t\tborderTop,\n\t\tclassName,\n\t\tcx,\n\t\tvariant,\n\t] );\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tContextSystemProvider,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { Elevation } from '../../elevation';\nimport { View } from '../../view';\nimport * as styles from '../styles';\nimport { useCard } from './hook';\nimport CONFIG from '../../utils/config-values';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\nfunction UnconnectedCard(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t\t...otherProps\n\t} = useCard( props );\n\tconst elevationBorderRadius = isRounded ? CONFIG.cardBorderRadius : 0;\n\n\tconst cx = useCx();\n\n\tconst elevationClassName = useMemo(\n\t\t() => cx( css( { borderRadius: elevationBorderRadius } ) ),\n\t\t[ cx, elevationBorderRadius ]\n\t);\n\n\tconst contextProviderValue = useMemo( () => {\n\t\tconst contextProps = {\n\t\t\tsize,\n\t\t\tisBorderless,\n\t\t};\n\t\treturn {\n\t\t\tCardBody: contextProps,\n\t\t\tCardHeader: contextProps,\n\t\t\tCardFooter: contextProps,\n\t\t};\n\t}, [ isBorderless, size ] );\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextProviderValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef }>\n\t\t\t\t<View className={ cx( styles.Content ) }>{ children }</View>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation ? 1 : 0 }\n\t\t\t\t/>\n\t\t\t\t<Elevation\n\t\t\t\t\tclassName={ elevationClassName }\n\t\t\t\t\tisInteractive={ false }\n\t\t\t\t\tvalue={ elevation }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * `Card` provides a flexible and extensible content container.\n * `Card` also provides a convenient set of sub-components such as `CardBody`,\n * `CardHeader`, `CardFooter`, and more.\n *\n * ```jsx\n * import {\n *   Card,\n *   CardHeader,\n *   CardBody,\n *   CardFooter,\n *   Text,\n *   Heading,\n * } from `@wordpress/components`;\n *\n * function Example() {\n *   return (\n *     <Card>\n *       <CardHeader>\n *         <Heading size={ 4 }>Card Title</Heading>\n *       </CardHeader>\n *       <CardBody>\n *         <Text>Card Content</Text>\n *       </CardBody>\n *       <CardFooter>\n *         <Text>Card Footer</Text>\n *       </CardFooter>\n *     </Card>\n *   );\n * }\n * ```\n */\nexport const Card = contextConnect( UnconnectedCard, 'Card' );\n\nexport default Card;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { Props } from '../types';\n\ntype CardProps = WordPressComponentProps< Props, 'div' >;\n\nfunction useDeprecatedProps( {\n\televation,\n\tisElevated,\n\t...otherProps\n}: CardProps ) {\n\tconst propsToReturn: Omit< CardProps, 'isElevated' > = {\n\t\t...otherProps,\n\t};\n\tlet computedElevation = elevation;\n\n\tif ( isElevated ) {\n\t\tdeprecated( 'Card isElevated prop', {\n\t\t\tsince: '5.9',\n\t\t\talternative: 'elevation',\n\t\t} );\n\t\tcomputedElevation ??= 2;\n\t}\n\n\t// The `elevation` prop should only be passed when it's not `undefined`,\n\t// otherwise it will override the value that gets derived from `useContextSystem`.\n\tif ( typeof computedElevation !== 'undefined' ) {\n\t\tpropsToReturn.elevation = computedElevation;\n\t}\n\n\treturn propsToReturn;\n}\n\nexport function useCard( props: CardProps ) {\n\tconst {\n\t\tclassName,\n\t\televation = 0,\n\t\tisBorderless = false,\n\t\tisRounded = true,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( useDeprecatedProps( props ), 'Card' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo( () => {\n\t\treturn cx(\n\t\t\tstyles.Card,\n\t\t\tisBorderless && styles.boxShadowless,\n\t\t\tisRounded && styles.rounded,\n\t\t\tclassName\n\t\t);\n\t}, [ className, cx, isBorderless, isRounded ] );\n\n\tconst surfaceProps = useSurface( { ...otherProps, className: classes } );\n\n\treturn {\n\t\t...surfaceProps,\n\t\televation,\n\t\tisBorderless,\n\t\tisRounded,\n\t\tsize,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\n\nexport const scrollableScrollbar = css`\n\t@media only screen and ( min-device-width: 40em ) {\n\t\t&::-webkit-scrollbar {\n\t\t\theight: 12px;\n\t\t\twidth: 12px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground: ${ CONFIG.colorScrollbarTrack };\n\t\t\tborder-radius: 8px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-thumb {\n\t\t\tbackground-clip: padding-box;\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumb };\n\t\t\tborder: 2px solid rgba( 0, 0, 0, 0 );\n\t\t\tborder-radius: 7px;\n\t\t}\n\n\t\t&:hover::-webkit-scrollbar-thumb {\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumbHover };\n\t\t}\n\t}\n`;\n\nexport const Scrollable = css`\n\theight: 100%;\n`;\n\nexport const Content = css`\n\tposition: relative;\n`;\n\nexport const smoothScroll = css`\n\tscroll-behavior: smooth;\n`;\n\nexport const scrollX = css`\n\toverflow-x: auto;\n\toverflow-y: hidden;\n`;\n\nexport const scrollY = css`\n\toverflow-x: hidden;\n\toverflow-y: auto;\n`;\n\nexport const scrollAuto = css`\n\toverflow-y: auto;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useScrollable } from './hook';\nimport type { ScrollableProps } from './types';\n\nfunction UnconnectedScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst scrollableProps = useScrollable( props );\n\n\treturn <View { ...scrollableProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Scrollable` is a layout component that content in a scrollable container.\n *\n * ```jsx\n * import { __experimentalScrollable as Scrollable } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Scrollable style={ { maxHeight: 200 } }>\n * \t\t\t<div style={ { height: 500 } }>...</div>\n * \t\t</Scrollable>\n * \t);\n * }\n * ```\n */\nexport const Scrollable = contextConnect( UnconnectedScrollable, 'Scrollable' );\n\nexport default Scrollable;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../ui/context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { ScrollableProps } from './types';\n\nexport function useScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tscrollDirection = 'y',\n\t\tsmoothScroll = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Scrollable' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Scrollable,\n\t\t\t\tstyles.scrollableScrollbar,\n\t\t\t\tsmoothScroll && styles.smoothScroll,\n\t\t\t\tscrollDirection === 'x' && styles.scrollX,\n\t\t\t\tscrollDirection === 'y' && styles.scrollY,\n\t\t\t\tscrollDirection === 'auto' && styles.scrollAuto,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, scrollDirection, smoothScroll ]\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Scrollable } from '../../scrollable';\nimport { View } from '../../view';\nimport { useCardBody } from './hook';\nimport type { BodyProps } from '../types';\n\nfunction UnconnectedCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { isScrollable, ...otherProps } = useCardBody( props );\n\n\tif ( isScrollable ) {\n\t\treturn <Scrollable { ...otherProps } ref={ forwardedRef } />;\n\t}\n\n\treturn <View { ...otherProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardBody` renders an optional content area for a `Card`.\n * Multiple `CardBody` components can be used within `Card` if needed.\n *\n * ```jsx\n * import { Card, CardBody } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>\n * \t\t...\n * \t</CardBody>\n * </Card>\n * ```\n */\nexport const CardBody = contextConnect( UnconnectedCardBody, 'CardBody' );\n\nexport default CardBody;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { BodyProps } from '../types';\n\nexport function useCardBody(\n\tprops: WordPressComponentProps< BodyProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisScrollable = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardBody' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Body,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__body',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tisScrollable,\n\t};\n}\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRole } from '../Role/Role.js';\n\n// Automatically generated\nvar SEPARATOR_KEYS = [\"orientation\"];\n\nvar useSeparator = createHook({\n  name: \"Separator\",\n  compose: useRole,\n  keys: SEPARATOR_KEYS,\n  useOptions: function useOptions(_ref) {\n    var _ref$orientation = _ref.orientation,\n        orientation = _ref$orientation === void 0 ? \"horizontal\" : _ref$orientation,\n        options = _objectWithoutPropertiesLoose(_ref, [\"orientation\"]);\n\n    return _objectSpread2({\n      orientation: orientation\n    }, options);\n  },\n  useProps: function useProps(options, htmlProps) {\n    return _objectSpread2({\n      role: \"separator\",\n      \"aria-orientation\": options.orientation\n    }, htmlProps);\n  }\n});\nvar Separator = createComponent({\n  as: \"hr\",\n  memo: true,\n  useHook: useSeparator\n});\n\nexport { Separator, useSeparator };\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { space } from '../ui/utils/space';\nimport { rtl } from '../utils';\nimport type { DividerProps } from './types';\n\nconst MARGIN_DIRECTIONS: Record<\n\tNonNullable< DividerProps[ 'orientation' ] >,\n\tRecord< 'start' | 'end', string >\n> = {\n\tvertical: {\n\t\tstart: 'marginLeft',\n\t\tend: 'marginRight',\n\t},\n\thorizontal: {\n\t\tstart: 'marginTop',\n\t\tend: 'marginBottom',\n\t},\n};\n\n// Renders the correct margins given the Divider's `orientation` and the writing direction.\n// When both the generic `margin` and the specific `marginStart|marginEnd` props are defined,\n// the latter will take priority.\nconst renderMargin = ( {\n\t'aria-orientation': orientation = 'horizontal',\n\tmargin,\n\tmarginStart,\n\tmarginEnd,\n}: DividerProps ) =>\n\tcss(\n\t\trtl( {\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].start ]: space(\n\t\t\t\tmarginStart ?? margin\n\t\t\t),\n\t\t\t[ MARGIN_DIRECTIONS[ orientation ].end ]: space(\n\t\t\t\tmarginEnd ?? margin\n\t\t\t),\n\t\t} )()\n\t);\n\nconst renderDisplay = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn orientation === 'vertical'\n\t\t? css( { display: 'inline' } )\n\t\t: undefined;\n};\n\nconst renderBorder = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) => {\n\treturn css( {\n\t\t[ orientation === 'vertical' ? 'borderRight' : 'borderBottom' ]:\n\t\t\t'1px solid currentColor',\n\t} );\n};\n\nconst renderSize = ( {\n\t'aria-orientation': orientation = 'horizontal',\n}: DividerProps ) =>\n\tcss( {\n\t\theight: orientation === 'vertical' ? 'auto' : 0,\n\t\twidth: orientation === 'vertical' ? 0 : 'auto',\n\t} );\n\nexport const DividerView = styled.hr< DividerProps >`\n\tborder: 0;\n\tmargin: 0;\n\n\t${ renderDisplay }\n\t${ renderBorder }\n\t${ renderSize }\n\t${ renderMargin }\n`;\n","/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport { Separator } from 'reakit';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { DividerView } from './styles';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst contextProps = useContextSystem( props, 'Divider' );\n\n\treturn (\n\t\t<Separator\n\t\t\tas={ DividerView }\n\t\t\t{ ...contextProps }\n\t\t\tref={ forwardedRef }\n\t\t/>\n\t);\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * ```js\n * import {\n * \t\t__experimentalDivider as Divider,\n * \t\t__experimentalText as Text,\n * \t\t__experimentalVStack as VStack,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<VStack spacing={4}>\n * \t\t\t<Text>Some text here</Text>\n * \t\t\t<Divider />\n * \t\t\t<Text>Some more text here</Text>\n * \t\t</VStack>\n * \t);\n * }\n * ```\n */\nexport const Divider = contextConnect( UnconnectedDivider, 'Divider' );\n\nexport default Divider;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Divider, DividerProps } from '../../divider';\nimport { useCardDivider } from './hook';\n\nfunction UnconnectedCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst dividerProps = useCardDivider( props );\n\n\treturn <Divider { ...dividerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardDivider` renders an optional divider within a `Card`.\n * It is typically used to divide multiple `CardBody` components from each other.\n *\n * ```jsx\n * import { Card, CardBody, CardDivider } from `@wordpress/components`;\n *\n * <Card>\n *  <CardBody>...</CardBody>\n *  <CardDivider />\n *  <CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardDivider = contextConnect(\n\tUnconnectedCardDivider,\n\t'CardDivider'\n);\n\nexport default CardDivider;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { DividerProps } from '../../divider';\n\nexport function useCardDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'CardDivider'\n\t);\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Divider,\n\t\t\t\tstyles.borderColor,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__divider',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Flex } from '../../flex';\nimport { useCardFooter } from './hook';\nimport type { FooterProps } from '../types';\n\nfunction UnconnectedCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst footerProps = useCardFooter( props );\n\n\treturn <Flex { ...footerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardFooter` renders an optional footer within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardFooter } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardBody>...</CardBody>\n * \t<CardFooter>...</CardFooter>\n * </Card>\n * ```\n */\nexport const CardFooter = contextConnect( UnconnectedCardFooter, 'CardFooter' );\n\nexport default CardFooter;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { FooterProps } from '../types';\n\nexport function useCardFooter(\n\tprops: WordPressComponentProps< FooterProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tjustify,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardFooter' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Footer,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__footer',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t\tjustify,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { Flex } from '../../flex';\nimport { useCardHeader } from './hook';\nimport type { HeaderProps } from '../types';\n\nfunction UnconnectedCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useCardHeader( props );\n\n\treturn <Flex { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardHeader` renders an optional header within a `Card`.\n *\n * ```jsx\n * import { Card, CardBody, CardHeader } from `@wordpress/components`;\n *\n * <Card>\n * \t<CardHeader>...</CardHeader>\n * \t<CardBody>...</CardBody>\n * </Card>\n * ```\n */\nexport const CardHeader = contextConnect( UnconnectedCardHeader, 'CardHeader' );\n\nexport default CardHeader;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { HeaderProps } from '../types';\n\nexport function useCardHeader(\n\tprops: WordPressComponentProps< HeaderProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisBorderless = false,\n\t\tisShady = false,\n\t\tsize = 'medium',\n\t\t...otherProps\n\t} = useContextSystem( props, 'CardHeader' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Header,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\tstyles.borderColor,\n\t\t\t\tstyles.cardPaddings[ size ],\n\t\t\t\tisBorderless && styles.borderless,\n\t\t\t\tisShady && styles.shady,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__header',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBorderless, isShady, size ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useCardMedia } from './hook';\nimport type { MediaProps } from '../types';\n\nfunction UnconnectedCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst cardMediaProps = useCardMedia( props );\n\n\treturn <View { ...cardMediaProps } ref={ forwardedRef } />;\n}\n\n/**\n * `CardMedia` provides a container for media elements within a `Card`.\n *\n * @example\n * ```jsx\n * import { Card, CardBody, CardMedia } from '@wordpress/components';\n *\n * const Example = () => (\n *  <Card>\n *\t  <CardMedia>\n *\t\t  <img src=\"...\" />\n *    </CardMedia>\n *    <CardBody>...</CardBody>\n *  </Card>\n * );\n * ```\n */\nexport const CardMedia = contextConnect( UnconnectedCardMedia, 'CardMedia' );\n\nexport default CardMedia;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { MediaProps } from '../types';\n\nexport function useCardMedia(\n\tprops: WordPressComponentProps< MediaProps, 'div' >\n) {\n\tconst { className, ...otherProps } = useContextSystem( props, 'CardMedia' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Media,\n\t\t\t\tstyles.borderRadius,\n\t\t\t\t// This classname is added for legacy compatibility reasons.\n\t\t\t\t'components-card__media',\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tclassName: classes,\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 * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useInstanceId, useRefEffect } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\nimport { Icon, check, reset } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { CheckboxControlProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\n/**\n * Checkboxes allow the user to select one or more items from a set.\n *\n * ```jsx\n * import { CheckboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyCheckboxControl = () => {\n *   const [ isChecked, setChecked ] = useState( true );\n *   return (\n *     <CheckboxControl\n *       label=\"Is author\"\n *       help=\"Is the user a author or not?\"\n *       checked={ isChecked }\n *       onChange={ setChecked }\n *     />\n *   );\n * };\n * ```\n */\nexport function CheckboxControl(\n\tprops: WordPressComponentProps< CheckboxControlProps, 'input', false >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tclassName,\n\t\theading,\n\t\tchecked,\n\t\tindeterminate,\n\t\thelp,\n\t\tonChange,\n\t\t...additionalProps\n\t} = props;\n\n\tif ( heading ) {\n\t\tdeprecated( '`heading` prop in `CheckboxControl`', {\n\t\t\talternative: 'a separate element to implement a heading',\n\t\t\tsince: '5.8',\n\t\t} );\n\t}\n\n\tconst [ showCheckedIcon, setShowCheckedIcon ] = useState( false );\n\tconst [ showIndeterminateIcon, setShowIndeterminateIcon ] =\n\t\tuseState( false );\n\n\t// Run the following callback every time the `ref` (and the additional\n\t// dependencies) change.\n\tconst ref = useRefEffect< HTMLInputElement >(\n\t\t( node ) => {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// It cannot be set using an HTML attribute.\n\t\t\tnode.indeterminate = !! indeterminate;\n\n\t\t\tsetShowCheckedIcon( node.matches( ':checked' ) );\n\t\t\tsetShowIndeterminateIcon( node.matches( ':indeterminate' ) );\n\t\t},\n\t\t[ checked, indeterminate ]\n\t);\n\tconst instanceId = useInstanceId( CheckboxControl );\n\tconst id = `inspector-checkbox-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.checked );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ heading }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( 'components-checkbox-control', className ) }\n\t\t>\n\t\t\t<span className=\"components-checkbox-control__input-container\">\n\t\t\t\t<input\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tclassName=\"components-checkbox-control__input\"\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\tvalue=\"1\"\n\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t/>\n\t\t\t\t{ showIndeterminateIcon ? (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\tclassName=\"components-checkbox-control__indeterminate\"\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t/>\n\t\t\t\t) : null }\n\t\t\t\t{ showCheckedIcon ? (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\tclassName=\"components-checkbox-control__checked\"\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t/>\n\t\t\t\t) : null }\n\t\t\t</span>\n\t\t\t<label\n\t\t\t\tclassName=\"components-checkbox-control__label\"\n\t\t\t\thtmlFor={ id }\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</label>\n\t\t</BaseControl>\n\t);\n}\n\nexport default CheckboxControl;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\n\nconst TIMEOUT = 4000;\n\n/**\n * @param {Object}                    props\n * @param {string}                    [props.className]\n * @param {import('react').ReactNode} props.children\n * @param {() => void}                props.onCopy\n * @param {() => void}                [props.onFinishCopy]\n * @param {string}                    props.text\n */\nexport default function ClipboardButton( {\n\tclassName,\n\tchildren,\n\tonCopy,\n\tonFinishCopy,\n\ttext,\n\t...buttonProps\n} ) {\n\tdeprecated( 'wp.components.ClipboardButton', {\n\t\tsince: '5.8',\n\t\talternative: 'wp.compose.useCopyToClipboard',\n\t} );\n\n\t/** @type {import('react').MutableRefObject<ReturnType<setTimeout> | undefined>} */\n\tconst timeoutId = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tonCopy();\n\t\t// @ts-expect-error: Should check if .current is defined, but not changing because this component is deprecated.\n\t\tclearTimeout( timeoutId.current );\n\n\t\tif ( onFinishCopy ) {\n\t\t\ttimeoutId.current = setTimeout( () => onFinishCopy(), TIMEOUT );\n\t\t}\n\t} );\n\n\tuseEffect( () => {\n\t\t// @ts-expect-error: Should check if .current is defined, but not changing because this component is deprecated.\n\t\tclearTimeout( timeoutId.current );\n\t}, [] );\n\n\tconst classes = classnames( 'components-clipboard-button', className );\n\n\t// Workaround for inconsistent behavior in Safari, where <textarea> is not\n\t// the document.activeElement at the moment when the copy event fires.\n\t// This causes documentHasSelection() in the copy-handler component to\n\t// mistakenly override the ClipboardButton, and copy a serialized string\n\t// of the current block instead.\n\t/** @type {import('react').ClipboardEventHandler<HTMLButtonElement>} */\n\tconst focusOnCopyEventTarget = ( event ) => {\n\t\t// @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n\t\tevent.target.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...buttonProps }\n\t\t\tclassName={ classes }\n\t\t\tref={ ref }\n\t\t\tonCopy={ focusOnCopyEventTarget }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { 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 * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS } from '../utils';\n\nexport const unstyledButton = css`\n\tappearance: none;\n\tborder: 1px solid transparent;\n\tcursor: pointer;\n\tbackground: none;\n\ttext-align: left;\n\n\t&:hover {\n\t\tcolor: ${ COLORS.ui.theme };\n\t}\n\n\t&:focus {\n\t\tbackground-color: transparent;\n\t\tcolor: ${ COLORS.ui.theme };\n\t\tborder-color: ${ COLORS.ui.theme };\n\t\toutline: 3px solid transparent;\n\t}\n`;\n\nexport const itemWrapper = css`\n\twidth: 100%;\n\tdisplay: block;\n`;\n\nexport const item = css`\n\twidth: 100%;\n\tdisplay: block;\n\tmargin: 0;\n\tcolor: inherit;\n`;\n\nexport const bordered = css`\n\tborder: 1px solid ${ CONFIG.surfaceBorderColor };\n`;\n\nexport const separated = css`\n\t> *:not( marquee ) > * {\n\t\tborder-bottom: 1px solid ${ CONFIG.surfaceBorderColor };\n\t}\n\n\t> *:last-of-type > *:not( :focus ) {\n\t\tborder-bottom-color: transparent;\n\t}\n`;\n\nconst borderRadius = CONFIG.controlBorderRadius;\n\nexport const spacedAround = css`\n\tborder-radius: ${ borderRadius };\n`;\n\nexport const rounded = css`\n\tborder-radius: ${ borderRadius };\n\n\t> *:first-of-type > * {\n\t\tborder-top-left-radius: ${ borderRadius };\n\t\tborder-top-right-radius: ${ borderRadius };\n\t}\n\n\t> *:last-of-type > * {\n\t\tborder-bottom-left-radius: ${ borderRadius };\n\t\tborder-bottom-right-radius: ${ borderRadius };\n\t}\n`;\n\nconst baseFontHeight = `calc(${ CONFIG.fontSize } * ${ CONFIG.fontLineHeightBase })`;\n\n/*\n * Math:\n * - Use the desired height as the base value\n * - Subtract the computed height of (default) text\n * - Subtract the effects of border\n * - Divide the calculated number by 2, in order to get an individual top/bottom padding\n */\nconst paddingY = `calc((${ CONFIG.controlHeight } - ${ baseFontHeight } - 2px) / 2)`;\nconst paddingYSmall = `calc((${ CONFIG.controlHeightSmall } - ${ baseFontHeight } - 2px) / 2)`;\nconst paddingYLarge = `calc((${ CONFIG.controlHeightLarge } - ${ baseFontHeight } - 2px) / 2)`;\n\nexport const itemSizes = {\n\tsmall: css`\n\t\tpadding: ${ paddingYSmall } ${ CONFIG.controlPaddingXSmall };\n\t`,\n\tmedium: css`\n\t\tpadding: ${ paddingY } ${ CONFIG.controlPaddingX };\n\t`,\n\tlarge: css`\n\t\tpadding: ${ paddingYLarge } ${ CONFIG.controlPaddingXLarge };\n\t`,\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ItemGroupContext as Context } from './types';\n\nexport const ItemGroupContext = createContext( {\n\tsize: 'medium',\n} as Context );\n\nexport const useItemGroupContext = () => useContext( ItemGroupContext );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useItemGroup } from './hook';\nimport { ItemGroupContext, useItemGroupContext } from '../context';\nimport { View } from '../../view';\nimport type { ItemGroupProps } from '../types';\n\nfunction ItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tisBordered,\n\t\tisSeparated,\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useItemGroup( props );\n\n\tconst { size: contextSize } = useItemGroupContext();\n\n\tconst spacedAround = ! isBordered && ! isSeparated;\n\tconst size = sizeProp || contextSize;\n\n\tconst contextValue = {\n\t\tspacedAround,\n\t\tsize,\n\t};\n\n\treturn (\n\t\t<ItemGroupContext.Provider value={ contextValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</ItemGroupContext.Provider>\n\t);\n}\n\nexport default contextConnect( ItemGroup, 'ItemGroup' );\n","/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemGroupProps } from '../types';\n\nexport function useItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisBordered = false,\n\t\tisRounded = true,\n\t\tisSeparated = false,\n\t\trole = 'list',\n\t\t...otherProps\n\t} = useContextSystem( props, 'ItemGroup' );\n\n\tconst cx = useCx();\n\n\tconst classes = cx(\n\t\tisBordered && styles.bordered,\n\t\tisSeparated && styles.separated,\n\t\tisRounded && styles.rounded,\n\t\tclassName\n\t);\n\n\treturn {\n\t\tisBordered,\n\t\tclassName: classes,\n\t\trole,\n\t\tisSeparated,\n\t\t...otherProps,\n\t};\n}\n","/**\n * Internal dependencies\n */\nimport { MINIMUM_DISTANCE_BETWEEN_POINTS } from './constants';\n\n/**\n * Control point for the gradient bar.\n *\n * @typedef {Object} ControlPoint\n * @property {string} color    Color of the control point.\n * @property {number} position Integer position of the control point as a percentage.\n */\n\n/**\n * Color as parsed from the gradient by gradient-parser.\n *\n * @typedef {Object} Color\n * @property {string} r   Red component.\n * @property {string} g   Green component.\n * @property {string} b   Green component.\n * @property {string} [a] Optional alpha component.\n */\n\n/**\n * Clamps a number between 0 and 100.\n *\n * @param {number} value Value to clamp.\n *\n * @return {number} Value clamped between 0 and 100.\n */\nexport function clampPercent( value ) {\n\treturn Math.max( 0, Math.min( 100, value ) );\n}\n\n/**\n * Check if a control point is overlapping with another.\n *\n * @param {ControlPoint[]} value        Array of control points.\n * @param {number}         initialIndex Index of the position to test.\n * @param {number}         newPosition  New position of the control point.\n * @param {number}         minDistance  Distance considered to be overlapping.\n *\n * @return {boolean} True if the point is overlapping.\n */\nexport function isOverlapping(\n\tvalue,\n\tinitialIndex,\n\tnewPosition,\n\tminDistance = MINIMUM_DISTANCE_BETWEEN_POINTS\n) {\n\tconst initialPosition = value[ initialIndex ].position;\n\tconst minPosition = Math.min( initialPosition, newPosition );\n\tconst maxPosition = Math.max( initialPosition, newPosition );\n\n\treturn value.some( ( { position }, index ) => {\n\t\treturn (\n\t\t\tindex !== initialIndex &&\n\t\t\t( Math.abs( position - newPosition ) < minDistance ||\n\t\t\t\t( minPosition < position && position < maxPosition ) )\n\t\t);\n\t} );\n}\n\n/**\n * Adds a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points   Array of control points.\n * @param {number}         position Position to insert the new point.\n * @param {Color}          color    Color to update the control point at index.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function addControlPoint( points, position, color ) {\n\tconst nextIndex = points.findIndex(\n\t\t( point ) => point.position > position\n\t);\n\tconst newPoint = { color, position };\n\tconst newPoints = points.slice();\n\tnewPoints.splice( nextIndex - 1, 0, newPoint );\n\treturn newPoints;\n}\n\n/**\n * Removes a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points Array of control points.\n * @param {number}         index  Index to remove.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function removeControlPoint( points, index ) {\n\treturn points.filter( ( point, pointIndex ) => {\n\t\treturn pointIndex !== index;\n\t} );\n}\n\n/**\n * Updates a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points   Array of control points.\n * @param {number}         index    Index to update.\n * @param {ControlPoint[]} newPoint New control point to replace the index.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function updateControlPoint( points, index, newPoint ) {\n\tconst newValue = points.slice();\n\tnewValue[ index ] = newPoint;\n\treturn newValue;\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points      Array of control points.\n * @param {number}         index       Index to update.\n * @param {number}         newPosition Position to move the control point at index.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function updateControlPointPosition( points, index, newPosition ) {\n\tif ( isOverlapping( points, index, newPosition ) ) {\n\t\treturn points;\n\t}\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tposition: newPosition,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points   Array of control points.\n * @param {number}         index    Index to update.\n * @param {Color}          newColor Color to update the control point at index.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function updateControlPointColor( points, index, newColor ) {\n\tconst newPoint = {\n\t\t...points[ index ],\n\t\tcolor: newColor,\n\t};\n\treturn updateControlPoint( points, index, newPoint );\n}\n\n/**\n * Updates the position of a control point from an array and returns the new array.\n *\n * @param {ControlPoint[]} points   Array of control points.\n * @param {number}         position Position of the color stop.\n * @param {string}         newColor Color to update the control point at index.\n *\n * @return {ControlPoint[]} New array of control points.\n */\nexport function updateControlPointColorByPosition(\n\tpoints,\n\tposition,\n\tnewColor\n) {\n\tconst index = points.findIndex( ( point ) => point.position === position );\n\treturn updateControlPointColor( points, index, newColor );\n}\n\n/**\n * Gets the horizontal coordinate when dragging a control point with the mouse.\n *\n * @param {number}  mouseXCoordinate Horizontal coordinate of the mouse position.\n * @param {Element} containerElement Container for the gradient picker.\n *\n * @return {number} Whole number percentage from the left.\n */\nexport function getHorizontalRelativeGradientPosition(\n\tmouseXCoordinate,\n\tcontainerElement\n) {\n\tif ( ! containerElement ) {\n\t\treturn;\n\t}\n\tconst { x, width } = containerElement.getBoundingClientRect();\n\tconst absolutePositionValue = mouseXCoordinate - x;\n\treturn Math.round(\n\t\tclampPercent( ( absolutePositionValue * 100 ) / width )\n\t);\n}\n","export const GRADIENT_MARKERS_WIDTH = 16;\nexport const INSERT_POINT_WIDTH = 16;\nexport const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT = 10;\nexport const MINIMUM_DISTANCE_BETWEEN_POINTS = 0;\nexport const MINIMUM_SIGNIFICANT_MOVE = 5;\n\nexport const KEYBOARD_CONTROL_POINT_VARIATION =\n\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT;\nexport const MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_MARKER =\n\t( INSERT_POINT_WIDTH + GRADIENT_MARKERS_WIDTH ) / 2;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { colord } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect, useRef, useState, useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { HStack } from '../../h-stack';\nimport { ColorPicker } from '../../color-picker';\nimport { VisuallyHidden } from '../../visually-hidden';\nimport { CustomColorPickerDropdown } from '../../color-palette';\n\nimport {\n\taddControlPoint,\n\tclampPercent,\n\tremoveControlPoint,\n\tupdateControlPointColor,\n\tupdateControlPointColorByPosition,\n\tupdateControlPointPosition,\n\tgetHorizontalRelativeGradientPosition,\n} from './utils';\nimport {\n\tMINIMUM_SIGNIFICANT_MOVE,\n\tKEYBOARD_CONTROL_POINT_VARIATION,\n} from './constants';\n\nfunction ControlPointButton( { isOpen, position, color, ...additionalProps } ) {\n\tconst instanceId = useInstanceId( ControlPointButton );\n\tconst descriptionId = `components-custom-gradient-picker__control-point-button-description-${ instanceId }`;\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t// translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151).\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Gradient control point at position %1$s%% with color code %2$s.'\n\t\t\t\t\t),\n\t\t\t\t\tposition,\n\t\t\t\t\tcolor\n\t\t\t\t) }\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\taria-haspopup=\"true\"\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-custom-gradient-picker__control-point-button',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isOpen,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t{ __(\n\t\t\t\t\t'Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.'\n\t\t\t\t) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n\nfunction GradientColorPickerDropdown( {\n\tisRenderedInSidebar,\n\tclassName,\n\t...props\n} ) {\n\t// Open the popover below the gradient control/insertion point\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\tplacement: 'bottom',\n\t\t\toffset: 8,\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst mergedClassName = classnames(\n\t\t'components-custom-gradient-picker__control-point-dropdown',\n\t\tclassName\n\t);\n\n\treturn (\n\t\t<CustomColorPickerDropdown\n\t\t\tisRenderedInSidebar={ isRenderedInSidebar }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName={ mergedClassName }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction ControlPoints( {\n\tdisableRemove,\n\tdisableAlpha,\n\tgradientPickerDomRef,\n\tignoreMarkerPosition,\n\tvalue: controlPoints,\n\tonChange,\n\tonStartControlPointChange,\n\tonStopControlPointChange,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst controlPointMoveState = useRef();\n\n\tconst onMouseMove = ( event ) => {\n\t\tconst relativePosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientPickerDomRef.current\n\t\t);\n\t\tconst { initialPosition, index, significantMoveHappened } =\n\t\t\tcontrolPointMoveState.current;\n\t\tif (\n\t\t\t! significantMoveHappened &&\n\t\t\tMath.abs( initialPosition - relativePosition ) >=\n\t\t\t\tMINIMUM_SIGNIFICANT_MOVE\n\t\t) {\n\t\t\tcontrolPointMoveState.current.significantMoveHappened = true;\n\t\t}\n\n\t\tonChange(\n\t\t\tupdateControlPointPosition( controlPoints, index, relativePosition )\n\t\t);\n\t};\n\n\tconst cleanEventListeners = () => {\n\t\tif (\n\t\t\twindow &&\n\t\t\twindow.removeEventListener &&\n\t\t\tcontrolPointMoveState.current &&\n\t\t\tcontrolPointMoveState.current.listenersActivated\n\t\t) {\n\t\t\twindow.removeEventListener( 'mousemove', onMouseMove );\n\t\t\twindow.removeEventListener( 'mouseup', cleanEventListeners );\n\t\t\tonStopControlPointChange();\n\t\t\tcontrolPointMoveState.current.listenersActivated = false;\n\t\t}\n\t};\n\n\t// Adding `cleanEventListeners` to the dependency array below requires the function itself to be wrapped in a `useCallback`\n\t// This memoization would prevent the event listeners from being properly cleaned.\n\t// Instead, we'll pass a ref to the function in our `useEffect` so `cleanEventListeners` itself is no longer a dependency.\n\tconst cleanEventListenersRef = useRef();\n\tcleanEventListenersRef.current = cleanEventListeners;\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tcleanEventListenersRef.current();\n\t\t};\n\t}, [] );\n\n\treturn controlPoints.map( ( point, index ) => {\n\t\tconst initialPosition = point?.position;\n\t\treturn (\n\t\t\tignoreMarkerPosition !== initialPosition && (\n\t\t\t\t<GradientColorPickerDropdown\n\t\t\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\t\t\tkey={ index }\n\t\t\t\t\tonClose={ onStopControlPointChange }\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<ControlPointButton\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current &&\n\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current\n\t\t\t\t\t\t\t\t\t\t.significantMoveHappened\n\t\t\t\t\t\t\t\t) {\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\tif ( isOpen ) {\n\t\t\t\t\t\t\t\t\tonStopControlPointChange();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseDown={ () => {\n\t\t\t\t\t\t\t\tif ( window && window.addEventListener ) {\n\t\t\t\t\t\t\t\t\tcontrolPointMoveState.current = {\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\tsignificantMoveHappened: false,\n\t\t\t\t\t\t\t\t\t\tlistenersActivated: true,\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tonStartControlPointChange();\n\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t'mousemove',\n\t\t\t\t\t\t\t\t\t\tonMouseMove\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\twindow.addEventListener(\n\t\t\t\t\t\t\t\t\t\t'mouseup',\n\t\t\t\t\t\t\t\t\t\tcleanEventListeners\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\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\tpoint.position -\n\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\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} else if ( event.code === 'ArrowRight' ) {\n\t\t\t\t\t\t\t\t\t// Stop propagation of the key press event to avoid focus moving\n\t\t\t\t\t\t\t\t\t// to another editor area.\n\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\tupdateControlPointPosition(\n\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\tclampPercent(\n\t\t\t\t\t\t\t\t\t\t\t\tpoint.position +\n\t\t\t\t\t\t\t\t\t\t\t\t\tKEYBOARD_CONTROL_POINT_VARIATION\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\tisOpen={ isOpen }\n\t\t\t\t\t\t\tposition={ point.position }\n\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\t\t\t\tcolor={ point.color }\n\t\t\t\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\tupdateControlPointColor(\n\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\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{ ! disableRemove && controlPoints.length > 2 && (\n\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-gradient-picker__remove-control-point-wrapper\"\n\t\t\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\t\t\t\tremoveControlPoint(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex\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\tonClose();\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Remove Control Point' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</HStack>\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\tstyle={ {\n\t\t\t\t\t\tleft: `${ point.position }%`,\n\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t)\n\t\t);\n\t} );\n}\n\nfunction InsertPoint( {\n\tvalue: controlPoints,\n\tonChange,\n\tonOpenInserter,\n\tonCloseInserter,\n\tinsertPosition,\n\tdisableAlpha,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst [ alreadyInsertedPoint, setAlreadyInsertedPoint ] = useState( false );\n\treturn (\n\t\t<GradientColorPickerDropdown\n\t\t\tisRenderedInSidebar={ __experimentalIsRenderedInSidebar }\n\t\t\tclassName=\"components-custom-gradient-picker__inserter\"\n\t\t\tonClose={ () => {\n\t\t\t\tonCloseInserter();\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tif ( isOpen ) {\n\t\t\t\t\t\t\tonCloseInserter();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetAlreadyInsertedPoint( false );\n\t\t\t\t\t\t\tonOpenInserter();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t} }\n\t\t\t\t\tclassName=\"components-custom-gradient-picker__insert-point-dropdown\"\n\t\t\t\t\ticon={ plus }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<ColorPicker\n\t\t\t\t\tenableAlpha={ ! disableAlpha }\n\t\t\t\t\tonChange={ ( color ) => {\n\t\t\t\t\t\tif ( ! alreadyInsertedPoint ) {\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\taddControlPoint(\n\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tsetAlreadyInsertedPoint( true );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\tupdateControlPointColorByPosition(\n\t\t\t\t\t\t\t\t\tcontrolPoints,\n\t\t\t\t\t\t\t\t\tinsertPosition,\n\t\t\t\t\t\t\t\t\tcolord( color ).toRgbString()\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\tstyle={\n\t\t\t\tinsertPosition !== null\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tleft: `${ insertPosition }%`,\n\t\t\t\t\t\t\ttransform: 'translateX( -50% )',\n\t\t\t\t\t  }\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\nControlPoints.InsertPoint = InsertPoint;\n\nexport default ControlPoints;\n","/**\n * External dependencies\n */\n\nimport { some } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useReducer } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ControlPoints from './control-points';\nimport { getHorizontalRelativeGradientPosition } from './utils';\nimport { MINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT } from './constants';\n\nfunction customGradientBarReducer( state, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'MOVE_INSERTER':\n\t\t\tif ( state.id === 'IDLE' || state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_INSERTER',\n\t\t\t\t\tinsertPosition: action.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_INSERTER_MOVE':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'OPEN_INSERTER':\n\t\t\tif ( state.id === 'MOVING_INSERTER' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'INSERTING_CONTROL_POINT',\n\t\t\t\t\tinsertPosition: state.insertPosition,\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'CLOSE_INSERTER':\n\t\t\tif ( state.id === 'INSERTING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'START_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'IDLE' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'MOVING_CONTROL_POINT',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'STOP_CONTROL_CHANGE':\n\t\t\tif ( state.id === 'MOVING_CONTROL_POINT' ) {\n\t\t\t\treturn {\n\t\t\t\t\tid: 'IDLE',\n\t\t\t\t};\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn state;\n}\nconst customGradientBarReducerInitialState = { id: 'IDLE' };\n\nexport default function CustomGradientBar( {\n\tbackground,\n\thasGradient,\n\tvalue: controlPoints,\n\tonChange,\n\tdisableInserter = false,\n\tdisableAlpha = false,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst gradientMarkersContainerDomRef = useRef();\n\n\tconst [ gradientBarState, gradientBarStateDispatch ] = useReducer(\n\t\tcustomGradientBarReducer,\n\t\tcustomGradientBarReducerInitialState\n\t);\n\tconst onMouseEnterAndMove = ( event ) => {\n\t\tconst insertPosition = getHorizontalRelativeGradientPosition(\n\t\t\tevent.clientX,\n\t\t\tgradientMarkersContainerDomRef.current\n\t\t);\n\n\t\t// If the insert point is close to an existing control point don't show it.\n\t\tif (\n\t\t\tsome( controlPoints, ( { position } ) => {\n\t\t\t\treturn (\n\t\t\t\t\tMath.abs( insertPosition - position ) <\n\t\t\t\t\tMINIMUM_DISTANCE_BETWEEN_INSERTER_AND_POINT\n\t\t\t\t);\n\t\t\t} )\n\t\t) {\n\t\t\tif ( gradientBarState.id === 'MOVING_INSERTER' ) {\n\t\t\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tgradientBarStateDispatch( { type: 'MOVE_INSERTER', insertPosition } );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tgradientBarStateDispatch( { type: 'STOP_INSERTER_MOVE' } );\n\t};\n\n\tconst isMovingInserter = gradientBarState.id === 'MOVING_INSERTER';\n\tconst isInsertingControlPoint =\n\t\tgradientBarState.id === 'INSERTING_CONTROL_POINT';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-gradient-picker__gradient-bar',\n\t\t\t\t{ 'has-gradient': hasGradient }\n\t\t\t) }\n\t\t\tonMouseEnter={ onMouseEnterAndMove }\n\t\t\tonMouseMove={ onMouseEnterAndMove }\n\t\t\tstyle={ { background } }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t>\n\t\t\t<div\n\t\t\t\tref={ gradientMarkersContainerDomRef }\n\t\t\t\tclassName=\"components-custom-gradient-picker__markers-container\"\n\t\t\t>\n\t\t\t\t{ ! disableInserter &&\n\t\t\t\t\t( isMovingInserter || isInsertingControlPoint ) && (\n\t\t\t\t\t\t<ControlPoints.InsertPoint\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\t\t\tinsertPosition={ gradientBarState.insertPosition }\n\t\t\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonOpenInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'OPEN_INSERTER',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCloseInserter={ () => {\n\t\t\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\t\t\ttype: 'CLOSE_INSERTER',\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<ControlPoints\n\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t}\n\t\t\t\t\tdisableAlpha={ disableAlpha }\n\t\t\t\t\tdisableRemove={ disableInserter }\n\t\t\t\t\tgradientPickerDomRef={ gradientMarkersContainerDomRef }\n\t\t\t\t\tignoreMarkerPosition={\n\t\t\t\t\t\tisInsertingControlPoint\n\t\t\t\t\t\t\t? gradientBarState.insertPosition\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ controlPoints }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tonStartControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'START_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tonStopControlPointChange={ () => {\n\t\t\t\t\t\tgradientBarStateDispatch( {\n\t\t\t\t\t\t\ttype: 'STOP_CONTROL_CHANGE',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const DEFAULT_GRADIENT =\n\t'linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%)';\n\nexport const DEFAULT_LINEAR_GRADIENT_ANGLE = 180;\n\nexport const HORIZONTAL_GRADIENT_ORIENTATION = {\n\ttype: 'angular',\n\tvalue: 90,\n};\n\nexport const GRADIENT_OPTIONS = [\n\t{ value: 'linear-gradient', label: __( 'Linear' ) },\n\t{ value: 'radial-gradient', label: __( 'Radial' ) },\n];\n\nexport const DIRECTIONAL_ORIENTATION_ANGLE_MAP = {\n\ttop: 0,\n\t'top right': 45,\n\t'right top': 45,\n\tright: 90,\n\t'right bottom': 135,\n\t'bottom right': 135,\n\tbottom: 180,\n\t'bottom left': 225,\n\t'left bottom': 225,\n\tleft: 270,\n\t'top left': 315,\n\t'left top': 315,\n};\n","export function serializeGradientColor( { type, value } ) {\n\tif ( type === 'literal' ) {\n\t\treturn value;\n\t}\n\tif ( type === 'hex' ) {\n\t\treturn `#${ value }`;\n\t}\n\treturn `${ type }(${ value.join( ',' ) })`;\n}\n\nexport function serializeGradientPosition( position ) {\n\tif ( ! position ) {\n\t\treturn '';\n\t}\n\tconst { value, type } = position;\n\treturn `${ value }${ type }`;\n}\n\nexport function serializeGradientColorStop( { type, value, length } ) {\n\treturn `${ serializeGradientColor( {\n\t\ttype,\n\t\tvalue,\n\t} ) } ${ serializeGradientPosition( length ) }`;\n}\n\nexport function serializeGradientOrientation( orientation ) {\n\tif ( ! orientation || orientation.type !== 'angular' ) {\n\t\treturn;\n\t}\n\treturn `${ orientation.value }deg`;\n}\n\nexport function serializeGradient( { type, orientation, colorStops } ) {\n\tconst serializedOrientation = serializeGradientOrientation( orientation );\n\tconst serializedColorStops = colorStops\n\t\t.sort( ( colorStop1, colorStop2 ) => {\n\t\t\treturn (\n\t\t\t\t( colorStop1?.length?.value ?? 0 ) -\n\t\t\t\t( colorStop2?.length?.value ?? 0 )\n\t\t\t);\n\t\t} )\n\t\t.map( serializeGradientColorStop );\n\treturn `${ type }(${ [ serializedOrientation, ...serializedColorStops ]\n\t\t.filter( Boolean )\n\t\t.join( ',' ) })`;\n}\n","/**\n * External dependencies\n */\nimport gradientParser from 'gradient-parser';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * Internal dependencies\n */\nimport {\n\tDEFAULT_GRADIENT,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tDIRECTIONAL_ORIENTATION_ANGLE_MAP,\n} from './constants';\nimport { serializeGradient } from './serializer';\n\nextend( [ namesPlugin ] );\n\nexport function getLinearGradientRepresentation( gradientAST ) {\n\treturn serializeGradient( {\n\t\ttype: 'linear-gradient',\n\t\torientation: HORIZONTAL_GRADIENT_ORIENTATION,\n\t\tcolorStops: gradientAST.colorStops,\n\t} );\n}\n\nfunction hasUnsupportedLength( item ) {\n\treturn item.length === undefined || item.length.type !== '%';\n}\n\nexport function getGradientAstWithDefault( value ) {\n\t// gradientAST will contain the gradient AST as parsed by gradient-parser npm module.\n\t// More information of its structure available at https://www.npmjs.com/package/gradient-parser#ast.\n\tlet gradientAST;\n\n\ttry {\n\t\tgradientAST = gradientParser.parse( value )[ 0 ];\n\t\tgradientAST.value = value;\n\t} catch ( error ) {\n\t\tgradientAST = gradientParser.parse( DEFAULT_GRADIENT )[ 0 ];\n\t\tgradientAST.value = DEFAULT_GRADIENT;\n\t}\n\n\tif ( gradientAST.orientation?.type === 'directional' ) {\n\t\tgradientAST.orientation.type = 'angular';\n\t\tgradientAST.orientation.value =\n\t\t\tDIRECTIONAL_ORIENTATION_ANGLE_MAP[\n\t\t\t\tgradientAST.orientation.value\n\t\t\t].toString();\n\t}\n\n\tif ( gradientAST.colorStops.some( hasUnsupportedLength ) ) {\n\t\tconst { colorStops } = gradientAST;\n\t\tconst step = 100 / ( colorStops.length - 1 );\n\t\tcolorStops.forEach( ( stop, index ) => {\n\t\t\tstop.length = {\n\t\t\t\tvalue: step * index,\n\t\t\t\ttype: '%',\n\t\t\t};\n\t\t} );\n\t\tgradientAST.value = serializeGradient( gradientAST );\n\t}\n\n\treturn gradientAST;\n}\n\nexport function getGradientAstWithControlPoints(\n\tgradientAST,\n\tnewControlPoints\n) {\n\treturn {\n\t\t...gradientAST,\n\t\tcolorStops: newControlPoints.map( ( { position, color } ) => {\n\t\t\tconst { r, g, b, a } = colord( color ).toRgb();\n\t\t\treturn {\n\t\t\t\tlength: {\n\t\t\t\t\ttype: '%',\n\t\t\t\t\tvalue: position?.toString(),\n\t\t\t\t},\n\t\t\t\ttype: a < 1 ? 'rgba' : 'rgb',\n\t\t\t\tvalue: a < 1 ? [ r, g, b, a ] : [ r, g, b ],\n\t\t\t};\n\t\t} ),\n\t};\n}\n\nexport function getStopCssColor( colorStop ) {\n\tswitch ( colorStop.type ) {\n\t\tcase 'hex':\n\t\t\treturn `#${ colorStop.value }`;\n\t\tcase 'literal':\n\t\t\treturn colorStop.value;\n\t\tcase 'rgb':\n\t\tcase 'rgba':\n\t\t\treturn `${ colorStop.type }(${ colorStop.value.join( ',' ) })`;\n\t\tdefault:\n\t\t\t// Should be unreachable if passing an AST from gradient-parser.\n\t\t\t// See https://github.com/rafaelcaricio/gradient-parser#ast.\n\t\t\treturn 'transparent';\n\t}\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../../flex';\n\nexport const SelectWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n\nexport const AccessoryWrapper = styled( FlexBlock )`\n\tflex-grow: 5;\n`;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AnglePickerControl from '../angle-picker-control';\nimport CustomGradientBar from './gradient-bar';\nimport { Flex } from '../flex';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport {\n\tgetGradientAstWithDefault,\n\tgetLinearGradientRepresentation,\n\tgetGradientAstWithControlPoints,\n\tgetStopCssColor,\n} from './utils';\nimport { serializeGradient } from './serializer';\nimport {\n\tDEFAULT_LINEAR_GRADIENT_ANGLE,\n\tHORIZONTAL_GRADIENT_ORIENTATION,\n\tGRADIENT_OPTIONS,\n\tDEFAULT_GRADIENT,\n} from './constants';\nimport {\n\tAccessoryWrapper,\n\tSelectWrapper,\n} from './styles/custom-gradient-picker-styles';\n\nconst GradientAnglePicker = ( { gradientAST, hasGradient, onChange } ) => {\n\tconst angle =\n\t\tgradientAST?.orientation?.value ?? DEFAULT_LINEAR_GRADIENT_ANGLE;\n\tconst onAngleChange = ( newAngle ) => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\torientation: {\n\t\t\t\t\ttype: 'angular',\n\t\t\t\t\tvalue: newAngle,\n\t\t\t\t},\n\t\t\t} )\n\t\t);\n\t};\n\treturn (\n\t\t<AnglePickerControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tonChange={ onAngleChange }\n\t\t\tlabelPosition=\"top\"\n\t\t\tvalue={ hasGradient ? angle : '' }\n\t\t/>\n\t);\n};\n\nconst GradientTypePicker = ( { gradientAST, hasGradient, onChange } ) => {\n\tconst { type } = gradientAST;\n\tconst onSetLinearGradient = () => {\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...gradientAST,\n\t\t\t\t...( gradientAST.orientation\n\t\t\t\t\t? {}\n\t\t\t\t\t: { orientation: HORIZONTAL_GRADIENT_ORIENTATION } ),\n\t\t\t\ttype: 'linear-gradient',\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst onSetRadialGradient = () => {\n\t\tconst { orientation, ...restGradientAST } = gradientAST;\n\t\tonChange(\n\t\t\tserializeGradient( {\n\t\t\t\t...restGradientAST,\n\t\t\t\ttype: 'radial-gradient',\n\t\t\t} )\n\t\t);\n\t};\n\n\tconst handleOnChange = ( next ) => {\n\t\tif ( next === 'linear-gradient' ) {\n\t\t\tonSetLinearGradient();\n\t\t}\n\t\tif ( next === 'radial-gradient' ) {\n\t\t\tonSetRadialGradient();\n\t\t}\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"components-custom-gradient-picker__type-picker\"\n\t\t\tlabel={ __( 'Type' ) }\n\t\t\tlabelPosition=\"top\"\n\t\t\tonChange={ handleOnChange }\n\t\t\toptions={ GRADIENT_OPTIONS }\n\t\t\tsize=\"__unstable-large\"\n\t\t\tvalue={ hasGradient && type }\n\t\t/>\n\t);\n};\n\nexport default function CustomGradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tvalue,\n\tonChange,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst gradientAST = getGradientAstWithDefault( value );\n\t// On radial gradients the bar should display a linear gradient.\n\t// On radial gradients the bar represents a slice of the gradient from the center until the outside.\n\t// On liner gradients the bar represents the color stops from left to right independently of the angle.\n\tconst background = getLinearGradientRepresentation( gradientAST );\n\tconst hasGradient = gradientAST.value !== DEFAULT_GRADIENT;\n\t// Control points color option may be hex from presets, custom colors will be rgb.\n\t// The position should always be a percentage.\n\tconst controlPoints = gradientAST.colorStops.map( ( colorStop ) => ( {\n\t\tcolor: getStopCssColor( colorStop ),\n\t\tposition: parseInt( colorStop.length.value ),\n\t} ) );\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated(\n\t\t\t'Outer margin styles for wp.components.CustomGradientPicker',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName={ classnames( 'components-custom-gradient-picker', {\n\t\t\t\t'is-next-has-no-margin': __nextHasNoMargin,\n\t\t\t} ) }\n\t\t>\n\t\t\t<CustomGradientBar\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tbackground={ background }\n\t\t\t\thasGradient={ hasGradient }\n\t\t\t\tvalue={ controlPoints }\n\t\t\t\tonChange={ ( newControlPoints ) => {\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tserializeGradient(\n\t\t\t\t\t\t\tgetGradientAstWithControlPoints(\n\t\t\t\t\t\t\t\tgradientAST,\n\t\t\t\t\t\t\t\tnewControlPoints\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\t<Flex\n\t\t\t\tgap={ 3 }\n\t\t\t\tclassName=\"components-custom-gradient-picker__ui-line\"\n\t\t\t>\n\t\t\t\t<SelectWrapper>\n\t\t\t\t\t<GradientTypePicker\n\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</SelectWrapper>\n\t\t\t\t<AccessoryWrapper>\n\t\t\t\t\t{ gradientAST.type === 'linear-gradient' && (\n\t\t\t\t\t\t<GradientAnglePicker\n\t\t\t\t\t\t\tgradientAST={ gradientAST }\n\t\t\t\t\t\t\thasGradient={ hasGradient }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</AccessoryWrapper>\n\t\t\t</Flex>\n\t\t</VStack>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport { Spacer } from '../spacer';\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn map( gradients, ( { gradient, name } ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ gradient }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t  sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t  sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n} ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading>{ name }</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t{ ...( gradients.length === index + 1\n\t\t\t\t\t\t\t\t? { actions }\n\t\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);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nexport default function GradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tclassName,\n\tgradients,\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tdisableCustomGradients = false,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n} ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\tconst Component =\n\t\t__experimentalHasMultipleOrigins && gradients?.length\n\t\t\t? MultipleOrigin\n\t\t\t: SingleOrigin;\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated( 'Outer margin styles for wp.components.GradientPicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t} );\n\t}\n\n\tconst deprecatedMarginSpacerProps = ! __nextHasNoMargin\n\t\t? {\n\t\t\t\tmarginTop: ! gradients?.length ? 3 : undefined,\n\t\t\t\tmarginBottom: ! clearable ? 6 : 0,\n\t\t  }\n\t\t: {};\n\n\treturn (\n\t\t// Outmost Spacer wrapper can be removed when deprecation period is over\n\t\t<Spacer marginBottom={ 0 } { ...deprecatedMarginSpacerProps }>\n\t\t\t<VStack spacing={ gradients?.length ? 4 : 0 }>\n\t\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__nextHasNoMargin\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={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( gradients?.length || clearable ) && (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tclearable={ clearable }\n\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\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</VStack>\n\t\t</Spacer>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst menu = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z\" />\n\t</SVG>\n);\n\nexport default menu;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value, total, offset ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.addEventListener( 'focus', this.onFocus );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.removeEventListener( 'focus', this.onFocus );\n\t}\n\n\tbindContainer( ref ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target ) {\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables, target ) {\n\t\tconst directIndex = focusables.indexOf( target );\n\t\tif ( directIndex !== -1 ) {\n\t\t\treturn directIndex;\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = event.target.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\tMENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tconst isTab = event.code === 'Tab';\n\n\t\t\tif ( targetHasMenuItemRole || isTab ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext(\n\t\t\tevent.target.ownerDocument.activeElement\n\t\t);\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = ( props, ref ) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n","// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function NavigableMenu(\n\t{ role = 'menu', orientation = 'vertical', ...rest },\n\tref\n) {\n\tconst eventToOffset = ( evt ) => {\n\t\tconst { code } = evt;\n\n\t\tlet next = [ 'ArrowDown' ];\n\t\tlet previous = [ 'ArrowUp' ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ 'ArrowRight' ];\n\t\t\tprevious = [ 'ArrowLeft' ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ 'ArrowRight', 'ArrowDown' ];\n\t\t\tprevious = [ 'ArrowLeft', 'ArrowUp' ];\n\t\t}\n\n\t\tif ( next.includes( code ) ) {\n\t\t\treturn 1;\n\t\t} else if ( previous.includes( code ) ) {\n\t\t\treturn -1;\n\t\t} else if (\n\t\t\t[ 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\t// Key press should be handled, e.g. have event propagation and\n\t\t\t// default behavior handled by NavigableContainer but not result\n\t\t\t// in an offset.\n\t\t\treturn 0;\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={ role === 'presentation' ? null : orientation }\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( NavigableMenu );\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { menu } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Dropdown from '../dropdown';\nimport { NavigableMenu } from '../navigable-container';\n\nfunction mergeProps( defaultProps = {}, props = {} ) {\n\tconst mergedProps = {\n\t\t...defaultProps,\n\t\t...props,\n\t};\n\n\tif ( props.className && defaultProps.className ) {\n\t\tmergedProps.className = classnames(\n\t\t\tprops.className,\n\t\t\tdefaultProps.className\n\t\t);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Whether the argument is a function.\n *\n * @param {*} maybeFunc The argument to check.\n * @return {boolean} True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc ) {\n\treturn typeof maybeFunc === 'function';\n}\n\nfunction DropdownMenu( dropdownMenuProps ) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcontrols,\n\t\ticon = menu,\n\t\tlabel,\n\t\tpopoverProps,\n\t\ttoggleProps,\n\t\tmenuProps,\n\t\tdisableOpenOnArrowDown = false,\n\t\ttext,\n\t\tnoIcons,\n\t} = dropdownMenuProps;\n\n\tif ( ! controls?.length && ! isFunction( children ) ) {\n\t\treturn null;\n\t}\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets;\n\tif ( controls?.length ) {\n\t\tcontrolSets = controls;\n\t\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\t\tcontrolSets = [ controlSets ];\n\t\t}\n\t}\n\tconst mergedPopoverProps = mergeProps(\n\t\t{\n\t\t\tclassName: 'components-dropdown-menu__popover',\n\t\t},\n\t\tpopoverProps\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\tclassName={ classnames( 'components-dropdown-menu', className ) }\n\t\t\tpopoverProps={ mergedPopoverProps }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\tif ( disableOpenOnArrowDown ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! isOpen && event.code === 'ArrowDown' ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst mergedToggleProps = mergeProps(\n\t\t\t\t\t{\n\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t'components-dropdown-menu__toggle',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-opened': isOpen,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\ttoggleProps\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t{ ...mergedToggleProps }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tonToggle( event );\n\t\t\t\t\t\t\tif ( mergedToggleProps.onClick ) {\n\t\t\t\t\t\t\t\tmergedToggleProps.onClick( event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\topenOnArrowDown( event );\n\t\t\t\t\t\t\tif ( mergedToggleProps.onKeyDown ) {\n\t\t\t\t\t\t\t\tmergedToggleProps.onKeyDown( event );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ttext={ text }\n\t\t\t\t\t\tshowTooltip={ toggleProps?.showTooltip ?? true }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ mergedToggleProps.children }\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ ( props ) => {\n\t\t\t\tconst mergedMenuProps = mergeProps(\n\t\t\t\t\t{\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t'components-dropdown-menu__menu',\n\t\t\t\t\t\t\t{ 'no-icons': noIcons }\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tmenuProps\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<NavigableMenu { ...mergedMenuProps } role=\"menu\">\n\t\t\t\t\t\t{ isFunction( children ) ? children( props ) : null }\n\t\t\t\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={ [\n\t\t\t\t\t\t\t\t\t\tindexOfSet,\n\t\t\t\t\t\t\t\t\t\tindexOfControl,\n\t\t\t\t\t\t\t\t\t].join() }\n\t\t\t\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\tprops.onClose();\n\t\t\t\t\t\t\t\t\t\tif ( control.onClick ) {\n\t\t\t\t\t\t\t\t\t\t\tcontrol.onClick();\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\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'components-dropdown-menu__menu-item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'has-separator':\n\t\t\t\t\t\t\t\t\t\t\t\tindexOfSet > 0 &&\n\t\t\t\t\t\t\t\t\t\t\t\tindexOfControl === 0,\n\t\t\t\t\t\t\t\t\t\t\t'is-active': control.isActive,\n\t\t\t\t\t\t\t\t\t\t\t'is-icon-only': ! control.title,\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\ticon={ control.icon }\n\t\t\t\t\t\t\t\t\tlabel={ control.label }\n\t\t\t\t\t\t\t\t\taria-checked={\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemcheckbox' ||\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemradio'\n\t\t\t\t\t\t\t\t\t\t\t? control.isActive\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\trole={\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemcheckbox' ||\n\t\t\t\t\t\t\t\t\t\tcontrol.role === 'menuitemradio'\n\t\t\t\t\t\t\t\t\t\t\t? control.role\n\t\t\t\t\t\t\t\t\t\t\t: 'menuitem'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdisabled={ control.isDisabled }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ control.title }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) )\n\t\t\t\t\t\t) }\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default DropdownMenu;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { Heading } from '../heading';\nimport { HStack } from '../h-stack';\nimport { space } from '../ui/utils/space';\nimport { COLORS, CONFIG } from '../utils';\nimport { View } from '../view';\nimport InputControl from '../input-control';\nimport {\n\tContainer as InputControlContainer,\n\tInput,\n\tBackdropUI as InputBackdropUI,\n} from '../input-control/styles/input-control-styles';\nimport CircularOptionPicker from '../circular-option-picker';\n\nexport const IndicatorStyled = styled( CircularOptionPicker.Option )`\n\twidth: ${ space( 6 ) };\n\theight: ${ space( 6 ) };\n\tpointer-events: none;\n`;\n\nexport const NameInputControl = styled( InputControl )`\n\t${ InputControlContainer } {\n\t\tbackground: ${ COLORS.gray[ 100 ] };\n\t\tborder-radius: ${ CONFIG.controlBorderRadius };\n\t\t${ Input }${ Input }${ Input }${ Input } {\n\t\t\theight: ${ space( 8 ) };\n\t\t}\n\t\t${ InputBackdropUI }${ InputBackdropUI }${ InputBackdropUI } {\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n`;\n\nexport const PaletteItem = styled( View )`\n\tpadding: 3px 0 3px ${ space( 3 ) };\n\theight: calc( 40px - ${ CONFIG.borderWidth } );\n\tborder: 1px solid ${ CONFIG.surfaceBorderColor };\n\tborder-bottom-color: transparent;\n\t&:first-of-type {\n\t\tborder-top-left-radius: ${ CONFIG.controlBorderRadius };\n\t\tborder-top-right-radius: ${ CONFIG.controlBorderRadius };\n\t}\n\t&:last-of-type {\n\t\tborder-bottom-left-radius: ${ CONFIG.controlBorderRadius };\n\t\tborder-bottom-right-radius: ${ CONFIG.controlBorderRadius };\n\t\tborder-bottom-color: ${ CONFIG.surfaceBorderColor };\n\t}\n\t&.is-selected + & {\n\t\tborder-top-color: transparent;\n\t}\n\t&.is-selected {\n\t\tborder-color: ${ COLORS.ui.theme };\n\t}\n`;\n\nexport const NameContainer = styled.div`\n\tline-height: ${ space( 8 ) };\n\tmargin-left: ${ space( 2 ) };\n\tmargin-right: ${ space( 2 ) };\n\twhite-space: nowrap;\n\toverflow: hidden;\n\t${ PaletteItem }:hover & {\n\t\tcolor: ${ COLORS.ui.theme };\n\t}\n`;\n\nexport const PaletteHeading = styled( Heading )`\n\ttext-transform: uppercase;\n\tline-height: ${ space( 6 ) };\n\tfont-weight: 500;\n\t&&& {\n\t\tfont-size: 11px;\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nexport const PaletteActionsContainer = styled( View )`\n\theight: ${ space( 6 ) };\n\tdisplay: flex;\n`;\n\nexport const PaletteHStackHeader = styled( HStack )`\n\tmargin-bottom: ${ space( 2 ) };\n`;\n\nexport const PaletteEditStyles = styled( View )`\n\t&&& {\n\t\t.components-button.has-icon {\n\t\t\tmin-width: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t}\n`;\n\nexport const DoneButton = styled( Button )`\n\t&& {\n\t\tcolor: ${ COLORS.ui.theme };\n\t}\n`;\n\nexport const RemoveButton = styled( Button )`\n\t&& {\n\t\tmargin-top: ${ space( 1 ) };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useRef, useEffect } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { lineSolid, moreVertical, plus } from '@wordpress/icons';\nimport {\n\t__experimentalUseFocusOutside as useFocusOutside,\n\tuseDebounce,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { ColorPicker } from '../color-picker';\nimport { FlexItem } from '../flex';\nimport { HStack } from '../h-stack';\nimport { ItemGroup } from '../item-group';\nimport { VStack } from '../v-stack';\nimport GradientPicker from '../gradient-picker';\nimport ColorPalette from '../color-palette';\nimport DropdownMenu from '../dropdown-menu';\nimport Popover from '../popover';\nimport {\n\tPaletteActionsContainer,\n\tPaletteEditStyles,\n\tPaletteHeading,\n\tPaletteHStackHeader,\n\tIndicatorStyled,\n\tPaletteItem,\n\tNameContainer,\n\tNameInputControl,\n\tDoneButton,\n\tRemoveButton,\n} from './styles';\nimport { NavigableMenu } from '../navigable-container';\nimport { DEFAULT_GRADIENT } from '../custom-gradient-picker/constants';\nimport CustomGradientPicker from '../custom-gradient-picker';\n\nconst DEFAULT_COLOR = '#000';\n\nfunction NameInput( { value, onChange, label } ) {\n\treturn (\n\t\t<NameInputControl\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\n/**\n * Returns a temporary name for a palette item in the format \"Color + id\".\n * To ensure there are no duplicate ids, this function checks all slugs for temporary names.\n * It expects slugs to be in the format: slugPrefix + color- + number.\n * It then sets the id component of the new name based on the incremented id of the highest existing slug id.\n *\n * @param {string} elements   An array of color palette items.\n * @param {string} slugPrefix The slug prefix used to match the element slug.\n *\n * @return {string} A unique name for a palette item.\n */\nexport function getNameForPosition( elements, slugPrefix ) {\n\tconst temporaryNameRegex = new RegExp( `^${ slugPrefix }color-([\\\\d]+)$` );\n\tconst position = elements.reduce( ( previousValue, currentValue ) => {\n\t\tif ( typeof currentValue?.slug === 'string' ) {\n\t\t\tconst matches = currentValue?.slug.match( temporaryNameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id >= previousValue ) {\n\t\t\t\t\treturn id + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn previousValue;\n\t}, 1 );\n\n\treturn sprintf(\n\t\t/* translators: %s: is a temporary id for a custom color */\n\t\t__( 'Color %s' ),\n\t\tposition\n\t);\n}\n\nfunction Option( {\n\tcanOnlyChangeValues,\n\telement,\n\tonChange,\n\tisEditing,\n\tonStartEditing,\n\tonRemove,\n\tonStopEditing,\n\tslugPrefix,\n\tisGradient,\n} ) {\n\tconst focusOutsideProps = useFocusOutside( onStopEditing );\n\tconst value = isGradient ? element.gradient : element.color;\n\n\treturn (\n\t\t<PaletteItem\n\t\t\tclassName={ isEditing ? 'is-selected' : undefined }\n\t\t\tas=\"div\"\n\t\t\tonClick={ onStartEditing }\n\t\t\t{ ...( isEditing\n\t\t\t\t? { ...focusOutsideProps }\n\t\t\t\t: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t},\n\t\t\t\t  } ) }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<IndicatorStyled\n\t\t\t\t\t\tstyle={ { background: value, color: 'transparent' } }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t{ isEditing && ! canOnlyChangeValues ? (\n\t\t\t\t\t\t<NameInput\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t? __( 'Gradient name' )\n\t\t\t\t\t\t\t\t\t: __( 'Color name' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ element.name }\n\t\t\t\t\t\t\tonChange={ ( nextName ) =>\n\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\t\t\tname: nextName,\n\t\t\t\t\t\t\t\t\tslug: slugPrefix + kebabCase( nextName ),\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<NameContainer>{ element.name }</NameContainer>\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t\t{ isEditing && ! canOnlyChangeValues && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<RemoveButton\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\ticon={ lineSolid }\n\t\t\t\t\t\t\tlabel={ __( 'Remove color' ) }\n\t\t\t\t\t\t\tonClick={ onRemove }\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{ isEditing && (\n\t\t\t\t<Popover\n\t\t\t\t\tplacement=\"left-start\"\n\t\t\t\t\toffset={ 20 }\n\t\t\t\t\tclassName=\"components-palette-edit__popover\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isGradient && (\n\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\tcolor={ value }\n\t\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t\tonChange={ ( newColor ) =>\n\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\t\t\tcolor: newColor,\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{ isGradient && (\n\t\t\t\t\t\t<div className=\"components-palette-edit__popover-gradient-picker\">\n\t\t\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\tonChange={ ( newGradient ) =>\n\t\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t\t...element,\n\t\t\t\t\t\t\t\t\t\tgradient: newGradient,\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</div>\n\t\t\t\t\t) }\n\t\t\t\t</Popover>\n\t\t\t) }\n\t\t</PaletteItem>\n\t);\n}\n\nfunction isTemporaryElement( slugPrefix, { slug, color, gradient } ) {\n\tconst regex = new RegExp( `^${ slugPrefix }color-([\\\\d]+)$` );\n\treturn (\n\t\tregex.test( slug ) &&\n\t\t( ( !! color && color === DEFAULT_COLOR ) ||\n\t\t\t( !! gradient && gradient === DEFAULT_GRADIENT ) )\n\t);\n}\n\nfunction PaletteEditListView( {\n\telements,\n\tonChange,\n\teditingElement,\n\tsetEditingElement,\n\tcanOnlyChangeValues,\n\tslugPrefix,\n\tisGradient,\n} ) {\n\t// When unmounting the component if there are empty elements (the user did not complete the insertion) clean them.\n\tconst elementsReference = useRef();\n\tuseEffect( () => {\n\t\telementsReference.current = elements;\n\t}, [ elements ] );\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\telementsReference.current.some( ( element, index ) =>\n\t\t\t\t\tisTemporaryElement( slugPrefix, element, index )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tconst newElements = elementsReference.current.filter(\n\t\t\t\t\t( element ) => ! isTemporaryElement( slugPrefix, element )\n\t\t\t\t);\n\t\t\t\tonChange( newElements.length ? newElements : undefined );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tconst debounceOnChange = useDebounce( onChange, 100 );\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<ItemGroup isRounded>\n\t\t\t\t{ elements.map( ( element, index ) => (\n\t\t\t\t\t<Option\n\t\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\t\tcanOnlyChangeValues={ canOnlyChangeValues }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\telement={ element }\n\t\t\t\t\t\tonStartEditing={ () => {\n\t\t\t\t\t\t\tif ( editingElement !== index ) {\n\t\t\t\t\t\t\t\tsetEditingElement( index );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonChange={ ( newElement ) => {\n\t\t\t\t\t\t\tdebounceOnChange(\n\t\t\t\t\t\t\t\telements.map(\n\t\t\t\t\t\t\t\t\t( currentElement, currentIndex ) => {\n\t\t\t\t\t\t\t\t\t\tif ( currentIndex === index ) {\n\t\t\t\t\t\t\t\t\t\t\treturn newElement;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn currentElement;\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\tonRemove={ () => {\n\t\t\t\t\t\t\tsetEditingElement( null );\n\t\t\t\t\t\t\tconst newElements = elements.filter(\n\t\t\t\t\t\t\t\t( _currentElement, currentIndex ) => {\n\t\t\t\t\t\t\t\t\tif ( currentIndex === index ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn 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\tonChange(\n\t\t\t\t\t\t\t\tnewElements.length ? newElements : undefined\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisEditing={ index === editingElement }\n\t\t\t\t\t\tonStopEditing={ () => {\n\t\t\t\t\t\t\tif ( index === editingElement ) {\n\t\t\t\t\t\t\t\tsetEditingElement( null );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tslugPrefix={ slugPrefix }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nconst EMPTY_ARRAY = [];\n\nexport default function PaletteEdit( {\n\tgradients,\n\tcolors = EMPTY_ARRAY,\n\tonChange,\n\tpaletteLabel,\n\temptyMessage,\n\tcanOnlyChangeValues,\n\tcanReset,\n\tslugPrefix = '',\n} ) {\n\tconst isGradient = !! gradients;\n\tconst elements = isGradient ? gradients : colors;\n\tconst [ isEditing, setIsEditing ] = useState( false );\n\tconst [ editingElement, setEditingElement ] = useState( null );\n\tconst isAdding =\n\t\tisEditing &&\n\t\teditingElement &&\n\t\telements[ editingElement ] &&\n\t\t! elements[ editingElement ].slug;\n\tconst elementsLength = elements.length;\n\tconst hasElements = elementsLength > 0;\n\n\treturn (\n\t\t<PaletteEditStyles>\n\t\t\t<PaletteHStackHeader>\n\t\t\t\t<PaletteHeading>{ paletteLabel }</PaletteHeading>\n\t\t\t\t<PaletteActionsContainer>\n\t\t\t\t\t{ hasElements && isEditing && (\n\t\t\t\t\t\t<DoneButton\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetIsEditing( false );\n\t\t\t\t\t\t\t\tsetEditingElement( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Done' ) }\n\t\t\t\t\t\t</DoneButton>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canOnlyChangeValues && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\tisPressed={ isAdding }\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t? __( 'Add gradient' )\n\t\t\t\t\t\t\t\t\t: __( 'Add color' )\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 tempOptionName = getNameForPosition(\n\t\t\t\t\t\t\t\t\telements,\n\t\t\t\t\t\t\t\t\tslugPrefix\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tonChange( [\n\t\t\t\t\t\t\t\t\t...elements,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t...( isGradient\n\t\t\t\t\t\t\t\t\t\t\t? { gradient: DEFAULT_GRADIENT }\n\t\t\t\t\t\t\t\t\t\t\t: { color: DEFAULT_COLOR } ),\n\t\t\t\t\t\t\t\t\t\tname: tempOptionName,\n\t\t\t\t\t\t\t\t\t\tslug:\n\t\t\t\t\t\t\t\t\t\t\tslugPrefix +\n\t\t\t\t\t\t\t\t\t\t\tkebabCase( tempOptionName ),\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\tsetIsEditing( true );\n\t\t\t\t\t\t\t\tsetEditingElement( elements.length );\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{ hasElements &&\n\t\t\t\t\t\t( ! isEditing ||\n\t\t\t\t\t\t\t! canOnlyChangeValues ||\n\t\t\t\t\t\t\tcanReset ) && (\n\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisGradient\n\t\t\t\t\t\t\t\t\t\t? __( 'Gradient options' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Color options' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\t\tisSmall: 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\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<NavigableMenu role=\"menu\">\n\t\t\t\t\t\t\t\t\t\t\t{ ! isEditing && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\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\tsetIsEditing( true );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-palette-edit__menu-button\"\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{ isGradient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Edit gradients' )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Edit colors' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t{ ! canOnlyChangeValues && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\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\tsetEditingElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnull\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\tsetIsEditing( false );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\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\tclassName=\"components-palette-edit__menu-button\"\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{ isGradient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove all gradients'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Remove all colors'\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</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t{ canReset && (\n\t\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\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\tsetEditingElement(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ isGradient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Reset gradient' )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Reset colors' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</NavigableMenu>\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</DropdownMenu>\n\t\t\t\t\t\t) }\n\t\t\t\t</PaletteActionsContainer>\n\t\t\t</PaletteHStackHeader>\n\t\t\t{ hasElements && (\n\t\t\t\t<>\n\t\t\t\t\t{ isEditing && (\n\t\t\t\t\t\t<PaletteEditListView\n\t\t\t\t\t\t\tcanOnlyChangeValues={ canOnlyChangeValues }\n\t\t\t\t\t\t\telements={ elements }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\teditingElement={ editingElement }\n\t\t\t\t\t\t\tsetEditingElement={ setEditingElement }\n\t\t\t\t\t\t\tslugPrefix={ slugPrefix }\n\t\t\t\t\t\t\tisGradient={ isGradient }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditing &&\n\t\t\t\t\t\t( isGradient ? (\n\t\t\t\t\t\t\t<GradientPicker\n\t\t\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\t\t\tonChange={ () => {} }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t\tdisableCustomGradients={ true }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t\t\tonChange={ () => {} }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! hasElements && emptyMessage }\n\t\t</PaletteEditStyles>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../flex';\nimport { space } from '../ui/utils/space';\n\nconst deprecatedDefaultSize = ( { __next36pxDefaultSize } ) =>\n\t! __next36pxDefaultSize &&\n\tcss`\n\t\theight: 28px; // 30px - 2px vertical borders on parent container\n\t\tpadding-left: ${ space( 1 ) };\n\t\tpadding-right: ${ space( 1 ) };\n\t`;\n\nexport const InputWrapperFlex = styled( Flex )`\n\theight: 34px; // 36px - 2px vertical borders on parent container\n\tpadding-left: ${ space( 2 ) };\n\tpadding-right: ${ space( 2 ) };\n\n\t${ deprecatedDefaultSize }\n`;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, ForwardedRef, FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { TokenInputProps } from './types';\n\nexport function UnForwardedTokenInput(\n\tprops: WordPressComponentProps< TokenInputProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tvalue,\n\t\tisExpanded,\n\t\tinstanceId,\n\t\tselectedSuggestionIndex,\n\t\tclassName,\n\t\tonChange,\n\t\tonFocus,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst [ hasFocus, setHasFocus ] = useState( false );\n\n\tconst size = value ? value.length + 1 : 0;\n\n\tconst onChangeHandler = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tif ( onChange ) {\n\t\t\tonChange( {\n\t\t\t\tvalue: event.target.value,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst onFocusHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( true );\n\t\tonFocus?.( e );\n\t};\n\n\tconst onBlurHandler: React.FocusEventHandler< HTMLInputElement > = (\n\t\te\n\t) => {\n\t\tsetHasFocus( false );\n\t\tonBlur?.( e );\n\t};\n\n\treturn (\n\t\t<input\n\t\t\tref={ ref }\n\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\ttype=\"text\"\n\t\t\t{ ...restProps }\n\t\t\tvalue={ value || '' }\n\t\t\tonChange={ onChangeHandler }\n\t\t\tonFocus={ onFocusHandler }\n\t\t\tonBlur={ onBlurHandler }\n\t\t\tsize={ size }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-form-token-field__input'\n\t\t\t) }\n\t\t\tautoComplete=\"off\"\n\t\t\trole=\"combobox\"\n\t\t\taria-expanded={ isExpanded }\n\t\t\taria-autocomplete=\"list\"\n\t\t\taria-owns={\n\t\t\t\tisExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-activedescendant={\n\t\t\t\t// Only add the `aria-activedescendant` attribute when:\n\t\t\t\t// - the user is actively interacting with the input (`hasFocus`)\n\t\t\t\t// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n\t\t\t\t// - the list of suggestions are rendered in the DOM (`isExpanded`)\n\t\t\t\thasFocus && selectedSuggestionIndex !== -1 && isExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }-${ selectedSuggestionIndex }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-describedby={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t/>\n\t);\n}\n\nexport const TokenInput = forwardRef( UnForwardedTokenInput );\n\nexport default TokenInput;\n","/**\n * External dependencies\n */\nimport scrollView from 'dom-scroll-into-view';\nimport classnames from 'classnames';\nimport type { MouseEventHandler, ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SuggestionsListProps } from './types';\n\nconst handleMouseDown: MouseEventHandler = ( e ) => {\n\t// By preventing default here, we will not lose focus of <input> when clicking a suggestion.\n\te.preventDefault();\n};\n\nexport function SuggestionsList< T extends string | { value: string } >( {\n\tselectedIndex,\n\tscrollIntoView,\n\tmatch,\n\tonHover,\n\tonSelect,\n\tsuggestions = [],\n\tdisplayTransform,\n\tinstanceId,\n\t__experimentalRenderItem,\n}: SuggestionsListProps< T > ) {\n\tconst [ scrollingIntoView, setScrollingIntoView ] = useState( false );\n\n\tconst listRef = useRefEffect< HTMLUListElement >(\n\t\t( listNode ) => {\n\t\t\t// only have to worry about scrolling selected suggestion into view\n\t\t\t// when already expanded.\n\t\t\tlet id: number;\n\t\t\tif (\n\t\t\t\tselectedIndex > -1 &&\n\t\t\t\tscrollIntoView &&\n\t\t\t\tlistNode.children[ selectedIndex ]\n\t\t\t) {\n\t\t\t\tsetScrollingIntoView( true );\n\t\t\t\tscrollView(\n\t\t\t\t\tlistNode.children[ selectedIndex ] as HTMLLIElement,\n\t\t\t\t\tlistNode,\n\t\t\t\t\t{\n\t\t\t\t\t\tonlyScrollIfNeeded: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tid = window.setTimeout( () => {\n\t\t\t\t\tsetScrollingIntoView( false );\n\t\t\t\t}, 100 );\n\t\t\t}\n\n\t\t\treturn () => {\n\t\t\t\tif ( id !== undefined ) {\n\t\t\t\t\twindow.clearTimeout( id );\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\t[ selectedIndex, scrollIntoView ]\n\t);\n\n\tconst handleHover = ( suggestion: T ) => {\n\t\treturn () => {\n\t\t\tif ( ! scrollingIntoView ) {\n\t\t\t\tonHover?.( suggestion );\n\t\t\t}\n\t\t};\n\t};\n\n\tconst handleClick = ( suggestion: T ) => {\n\t\treturn () => {\n\t\t\tonSelect?.( suggestion );\n\t\t};\n\t};\n\n\tconst computeSuggestionMatch = ( suggestion: T ) => {\n\t\tconst matchText = displayTransform( match ).toLocaleLowerCase();\n\t\tif ( matchText.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst transformedSuggestion = displayTransform( suggestion );\n\t\tconst indexOfMatch = transformedSuggestion\n\t\t\t.toLocaleLowerCase()\n\t\t\t.indexOf( matchText );\n\n\t\treturn {\n\t\t\tsuggestionBeforeMatch: transformedSuggestion.substring(\n\t\t\t\t0,\n\t\t\t\tindexOfMatch\n\t\t\t),\n\t\t\tsuggestionMatch: transformedSuggestion.substring(\n\t\t\t\tindexOfMatch,\n\t\t\t\tindexOfMatch + matchText.length\n\t\t\t),\n\t\t\tsuggestionAfterMatch: transformedSuggestion.substring(\n\t\t\t\tindexOfMatch + matchText.length\n\t\t\t),\n\t\t};\n\t};\n\n\treturn (\n\t\t<ul\n\t\t\tref={ listRef }\n\t\t\tclassName=\"components-form-token-field__suggestions-list\"\n\t\t\tid={ `components-form-token-suggestions-${ instanceId }` }\n\t\t\trole=\"listbox\"\n\t\t>\n\t\t\t{ suggestions.map( ( suggestion, index ) => {\n\t\t\t\tconst matchText = computeSuggestionMatch( suggestion );\n\t\t\t\tconst className = classnames(\n\t\t\t\t\t'components-form-token-field__suggestion',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-selected': index === selectedIndex,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tlet output: ReactNode;\n\n\t\t\t\tif ( typeof __experimentalRenderItem === 'function' ) {\n\t\t\t\t\toutput = __experimentalRenderItem( { item: suggestion } );\n\t\t\t\t} else if ( matchText ) {\n\t\t\t\t\toutput = (\n\t\t\t\t\t\t<span aria-label={ displayTransform( suggestion ) }>\n\t\t\t\t\t\t\t{ matchText.suggestionBeforeMatch }\n\t\t\t\t\t\t\t<strong className=\"components-form-token-field__suggestion-match\">\n\t\t\t\t\t\t\t\t{ matchText.suggestionMatch }\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{ matchText.suggestionAfterMatch }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\toutput = displayTransform( suggestion );\n\t\t\t\t}\n\n\t\t\t\t/* eslint-disable jsx-a11y/click-events-have-key-events */\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tid={ `components-form-token-suggestions-${ instanceId }-${ index }` }\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tkey={\n\t\t\t\t\t\t\ttypeof suggestion === 'object' &&\n\t\t\t\t\t\t\t'value' in suggestion\n\t\t\t\t\t\t\t\t? suggestion?.value\n\t\t\t\t\t\t\t\t: displayTransform( suggestion )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonMouseDown={ handleMouseDown }\n\t\t\t\t\t\tonClick={ handleClick( suggestion ) }\n\t\t\t\t\t\tonMouseEnter={ handleHover( suggestion ) }\n\t\t\t\t\t\taria-selected={ index === selectedIndex }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ output }\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t\t/* eslint-enable jsx-a11y/click-events-have-key-events */\n\t\t\t} ) }\n\t\t</ul>\n\t);\n}\n\nexport default SuggestionsList;\n","//@ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\t__experimentalUseFocusOutside as useFocusOutside,\n} from '@wordpress/compose';\n\nexport default createHigherOrderComponent(\n\t( WrappedComponent ) => ( props ) => {\n\t\tconst [ handleFocusOutside, setHandleFocusOutside ] = useState();\n\t\tconst bindFocusOutsideHandler = useCallback(\n\t\t\t( node ) =>\n\t\t\t\tsetHandleFocusOutside( () =>\n\t\t\t\t\tnode?.handleFocusOutside\n\t\t\t\t\t\t? node.handleFocusOutside.bind( node )\n\t\t\t\t\t\t: undefined\n\t\t\t\t),\n\t\t\t[]\n\t\t);\n\n\t\treturn (\n\t\t\t<div { ...useFocusOutside( handleFocusOutside ) }>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\tref={ bindFocusOutsideHandler }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tComponent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock, FlexItem } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\n\nconst noop = () => {};\n\nconst DetectOutside = withFocusOutside(\n\tclass extends Component {\n\t\thandleFocusOutside( event ) {\n\t\t\tthis.props.onFocusOutside( event );\n\t\t}\n\n\t\trender() {\n\t\t\treturn this.props.children;\n\t\t}\n\t}\n);\n\nfunction ComboboxControl( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMarginBottom = false,\n\t__next36pxDefaultSize,\n\tvalue: valueProp,\n\tlabel,\n\toptions,\n\tonChange: onChangeProp,\n\tonFilterValueChange = noop,\n\thideLabelFromVision,\n\thelp,\n\tallowReset = true,\n\tclassName,\n\tmessages = {\n\t\tselected: __( 'Item selected.' ),\n\t},\n\t__experimentalRenderItem,\n} ) {\n\tconst [ value, setValue ] = useControlledValue( {\n\t\tvalue: valueProp,\n\t\tonChange: onChangeProp,\n\t} );\n\n\tconst currentOption = options.find( ( option ) => option.value === value );\n\tconst currentLabel = currentOption?.label ?? '';\n\t// Use a custom prefix when generating the `instanceId` to avoid having\n\t// duplicate input IDs when rendering this component and `FormTokenField`\n\t// in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n\tconst instanceId = useInstanceId( ComboboxControl, 'combobox-control' );\n\tconst [ selectedSuggestion, setSelectedSuggestion ] = useState(\n\t\tcurrentOption || null\n\t);\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ inputHasFocus, setInputHasFocus ] = useState( false );\n\tconst [ inputValue, setInputValue ] = useState( '' );\n\tconst inputContainer = useRef();\n\n\tconst matchingSuggestions = useMemo( () => {\n\t\tconst startsWithMatch = [];\n\t\tconst containsMatch = [];\n\t\tconst match = normalizeTextString( inputValue );\n\t\toptions.forEach( ( option ) => {\n\t\t\tconst index = normalizeTextString( option.label ).indexOf( match );\n\t\t\tif ( index === 0 ) {\n\t\t\t\tstartsWithMatch.push( option );\n\t\t\t} else if ( index > 0 ) {\n\t\t\t\tcontainsMatch.push( option );\n\t\t\t}\n\t\t} );\n\n\t\treturn startsWithMatch.concat( containsMatch );\n\t}, [ inputValue, options ] );\n\n\tconst onSuggestionSelected = ( newSelectedSuggestion ) => {\n\t\tsetValue( newSelectedSuggestion.value );\n\t\tspeak( messages.selected, 'assertive' );\n\t\tsetSelectedSuggestion( newSelectedSuggestion );\n\t\tsetInputValue( '' );\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst handleArrowNavigation = ( offset = 1 ) => {\n\t\tconst index = matchingSuggestions.indexOf( selectedSuggestion );\n\t\tlet nextIndex = index + offset;\n\t\tif ( nextIndex < 0 ) {\n\t\t\tnextIndex = matchingSuggestions.length - 1;\n\t\t} else if ( nextIndex >= matchingSuggestions.length ) {\n\t\t\tnextIndex = 0;\n\t\t}\n\t\tsetSelectedSuggestion( matchingSuggestions[ nextIndex ] );\n\t\tsetIsExpanded( true );\n\t};\n\n\tconst onKeyDown = ( event ) => {\n\t\tlet preventDefault = false;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.code ) {\n\t\t\tcase 'Enter':\n\t\t\t\tif ( selectedSuggestion ) {\n\t\t\t\t\tonSuggestionSelected( selectedSuggestion );\n\t\t\t\t\tpreventDefault = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\thandleArrowNavigation( -1 );\n\t\t\t\tpreventDefault = true;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowDown':\n\t\t\t\thandleArrowNavigation( 1 );\n\t\t\t\tpreventDefault = true;\n\t\t\t\tbreak;\n\t\t\tcase 'Escape':\n\t\t\t\tsetIsExpanded( false );\n\t\t\t\tsetSelectedSuggestion( null );\n\t\t\t\tpreventDefault = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst onBlur = () => {\n\t\tsetInputHasFocus( false );\n\t};\n\n\tconst onFocus = () => {\n\t\tsetInputHasFocus( true );\n\t\tsetIsExpanded( true );\n\t\tonFilterValueChange( '' );\n\t\tsetInputValue( '' );\n\t};\n\n\tconst onFocusOutside = () => {\n\t\tsetIsExpanded( false );\n\t};\n\n\tconst onInputChange = ( event ) => {\n\t\tconst text = event.value;\n\t\tsetInputValue( text );\n\t\tonFilterValueChange( text );\n\t\tif ( inputHasFocus ) {\n\t\t\tsetIsExpanded( true );\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\tsetValue( null );\n\t\tinputContainer.current.focus();\n\t};\n\n\t// Update current selections when the filter input changes.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tconst hasSelectedMatchingSuggestions =\n\t\t\tmatchingSuggestions.indexOf( selectedSuggestion ) > 0;\n\n\t\tif ( hasMatchingSuggestions && ! hasSelectedMatchingSuggestions ) {\n\t\t\t// If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n\t\t\tsetSelectedSuggestion( matchingSuggestions[ 0 ] );\n\t\t}\n\t}, [ matchingSuggestions, selectedSuggestion ] );\n\n\t// Announcements.\n\tuseEffect( () => {\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\t\tif ( isExpanded ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t  )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tspeak( message, 'polite' );\n\t\t}\n\t}, [ matchingSuggestions, isExpanded ] );\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<DetectOutside onFocusOutside={ onFocusOutside }>\n\t\t\t<BaseControl\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\tclassName,\n\t\t\t\t\t'components-combobox-control'\n\t\t\t\t) }\n\t\t\t\ttabIndex=\"-1\"\n\t\t\t\tlabel={ label }\n\t\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\thelp={ help }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-combobox-control__suggestions-container\"\n\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<InputWrapperFlex\n\t\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexBlock>\n\t\t\t\t\t\t\t<TokenInput\n\t\t\t\t\t\t\t\tclassName=\"components-combobox-control__input\"\n\t\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\t\tref={ inputContainer }\n\t\t\t\t\t\t\t\tvalue={ isExpanded ? inputValue : currentLabel }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t\tselectedSuggestionIndex={ matchingSuggestions.indexOf(\n\t\t\t\t\t\t\t\t\tselectedSuggestion\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t\t{ allowReset && (\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\tclassName=\"components-combobox-control__reset\"\n\t\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\t\tdisabled={ ! value }\n\t\t\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Reset' ) }\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</InputWrapperFlex>\n\t\t\t\t\t{ isExpanded && (\n\t\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\t\tmatch={ { label: inputValue } }\n\t\t\t\t\t\t\tdisplayTransform={ ( suggestion ) =>\n\t\t\t\t\t\t\t\tsuggestion.label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\t\tselectedIndex={ matchingSuggestions.indexOf(\n\t\t\t\t\t\t\t\tselectedSuggestion\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonHover={ setSelectedSuggestion }\n\t\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t\tscrollIntoView\n\t\t\t\t\t\t\t__experimentalRenderItem={\n\t\t\t\t\t\t\t\t__experimentalRenderItem\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</BaseControl>\n\t\t</DetectOutside>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default ComboboxControl;\n","// @ts-nocheck\n\nconst LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nlet hiddenElements = [],\n\tisHidden = false;\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param {Element} unhiddenElement The element that should not be hidden.\n */\nexport function hideApp( unhiddenElement ) {\n\tif ( isHidden ) {\n\t\treturn;\n\t}\n\tconst elements = Array.from( document.body.children );\n\telements.forEach( ( element ) => {\n\t\tif ( element === unhiddenElement ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t} );\n\tisHidden = true;\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param {HTMLElement} element The element that should be checked.\n *\n * @return {boolean} Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\tLIVE_REGION_ARIA_ROLES.has( role )\n\t);\n}\n\n/**\n * Makes all elements in the body that have been hidden by `hideApp`\n * visible again to screen-readers.\n */\nexport function showApp() {\n\tif ( ! isHidden ) {\n\t\treturn;\n\t}\n\thiddenElements.forEach( ( element ) => {\n\t\telement.removeAttribute( 'aria-hidden' );\n\t} );\n\thiddenElements = [];\n\tisHidden = false;\n}\n","// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\t__experimentalUseFocusOutside as useFocusOutside,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\n\n// Used to count the number of open modals.\nlet openModalCount = 0;\n\nfunction Modal( props, forwardedRef ) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: null,\n\t\t\tdescribedby: null,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef();\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\tconst focusOnMountRef = useFocusOnMount( focusOnMount );\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst focusOutsideProps = useFocusOutside( onRequestClose );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\n\tuseEffect( () => {\n\t\topenModalCount++;\n\n\t\tif ( openModalCount === 1 ) {\n\t\t\tariaHelper.hideApp( ref.current );\n\t\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\t}\n\n\t\treturn () => {\n\t\t\topenModalCount--;\n\n\t\t\tif ( openModalCount === 0 ) {\n\t\t\t\tdocument.body.classList.remove( bodyOpenClassName );\n\t\t\t\tariaHelper.showApp();\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\tfunction handleEscapeKeyDown( event ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\tevent.code === 'Escape' &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e ) => {\n\t\t\tconst scrollY = e?.target?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\treturn createPortal(\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ handleEscapeKeyDown }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-full-screen': isFullScreen,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMountRef,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? null : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t{ ...( shouldCloseOnClickOutside\n\t\t\t\t\t\t? focusOutsideProps\n\t\t\t\t\t\t: {} ) }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\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{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\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\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel ||\n\t\t\t\t\t\t\t\t\t\t\t__( 'Close dialog' )\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</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>,\n\t\tdocument.body\n\t);\n}\n\nexport default forwardRef( Modal );\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * The z-index for ConfirmDialog is being set here instead of in\n * packages/base-styles/_z-index.scss, because this component uses\n * emotion instead of sass.\n *\n * ConfirmDialog needs this higher z-index to ensure it renders on top of\n * any parent Popover component.\n */\nexport const wrapper = css`\n\t&& {\n\t\tz-index: 1000001;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport type { OwnProps, DialogInputEvent } from './types';\nimport {\n\tuseContextSystem,\n\tcontextConnect,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { Flex } from '../flex';\nimport Button from '../button';\nimport { Text } from '../text';\nimport { VStack } from '../v-stack';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\n\nfunction ConfirmDialog(\n\tprops: WordPressComponentProps< OwnProps, 'div', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tisOpen: isOpenProp,\n\t\tonConfirm,\n\t\tonCancel,\n\t\tchildren,\n\t\tconfirmButtonText,\n\t\tcancelButtonText,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ConfirmDialog' );\n\n\tconst cx = useCx();\n\tconst wrapperClassName = cx( styles.wrapper );\n\n\tconst [ isOpen, setIsOpen ] = useState< boolean >();\n\tconst [ shouldSelfClose, setShouldSelfClose ] = useState< boolean >();\n\n\tuseEffect( () => {\n\t\t// We only allow the dialog to close itself if `isOpenProp` is *not* set.\n\t\t// If `isOpenProp` is set, then it (probably) means it's controlled by a\n\t\t// parent component. In that case, `shouldSelfClose` might do more harm than\n\t\t// good, so we disable it.\n\t\tconst isIsOpenSet = typeof isOpenProp !== 'undefined';\n\t\tsetIsOpen( isIsOpenSet ? isOpenProp : true );\n\t\tsetShouldSelfClose( ! isIsOpenSet );\n\t}, [ isOpenProp ] );\n\n\tconst handleEvent = useCallback(\n\t\t( callback?: ( event: DialogInputEvent ) => void ) =>\n\t\t\t( event: DialogInputEvent ) => {\n\t\t\t\tcallback?.( event );\n\t\t\t\tif ( shouldSelfClose ) {\n\t\t\t\t\tsetIsOpen( false );\n\t\t\t\t}\n\t\t\t},\n\t\t[ shouldSelfClose, setIsOpen ]\n\t);\n\n\tconst handleEnter = useCallback(\n\t\t( event: KeyboardEvent< HTMLDivElement > ) => {\n\t\t\tif ( event.key === 'Enter' ) {\n\t\t\t\thandleEvent( onConfirm )( event );\n\t\t\t}\n\t\t},\n\t\t[ handleEvent, onConfirm ]\n\t);\n\n\tconst cancelLabel = cancelButtonText ?? __( 'Cancel' );\n\tconst confirmLabel = confirmButtonText ?? __( 'OK' );\n\n\treturn (\n\t\t<>\n\t\t\t{ isOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\tonRequestClose={ handleEvent( onCancel ) }\n\t\t\t\t\tonKeyDown={ handleEnter }\n\t\t\t\t\tcloseButtonLabel={ cancelLabel }\n\t\t\t\t\tisDismissible={ true }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\toverlayClassName={ wrapperClassName }\n\t\t\t\t\t__experimentalHideHeader\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t<Text>{ children }</Text>\n\t\t\t\t\t\t<Flex direction=\"row\" justify=\"flex-end\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleEvent( onCancel ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ cancelLabel }\n\t\t\t\t\t\t\t</Button>\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={ handleEvent( onConfirm ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default contextConnect( ConfirmDialog, 'ConfirmDialog' );\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}","// Compute what scrolling needs to be done on required scrolling boxes for target to be in view\n\n// The type names here are named after the spec to make it easier to find more information around what they mean:\n// To reduce churn and reduce things that need be maintained things from the official TS DOM library is used here\n// https://drafts.csswg.org/cssom-view/\n\n// For a definition on what is \"block flow direction\" exactly, check this: https://drafts.csswg.org/css-writing-modes-4/#block-flow-direction\n\n// add support for visualViewport object currently implemented in chrome\ninterface visualViewport {\n  height: number\n  width: number\n}\n\ntype ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest'\n// This new option is tracked in this PR, which is the most likely candidate at the time: https://github.com/w3c/csswg-drafts/pull/1805\ntype ScrollMode = 'always' | 'if-needed'\n// New option that skips auto-scrolling all nodes with overflow: hidden set\n// See FF implementation: https://hg.mozilla.org/integration/fx-team/rev/c48c3ec05012#l7.18\ntype SkipOverflowHiddenElements = boolean\n\ninterface Options {\n  block?: ScrollLogicalPosition\n  inline?: ScrollLogicalPosition\n  scrollMode?: ScrollMode\n  boundary?: CustomScrollBoundary\n  skipOverflowHiddenElements?: SkipOverflowHiddenElements\n}\n\n// Custom behavior, not in any spec\ntype CustomScrollBoundaryCallback = (parent: Element) => boolean\ntype CustomScrollBoundary = Element | CustomScrollBoundaryCallback | null\ninterface CustomScrollAction {\n  el: Element\n  top: number\n  left: number\n}\n\n// @TODO better shadowdom test, 11 = document fragment\nfunction isElement(el: any) {\n  return el != null && typeof el === 'object' && el.nodeType === 1\n}\n\nfunction canOverflow(\n  overflow: string | null,\n  skipOverflowHiddenElements?: boolean\n) {\n  if (skipOverflowHiddenElements && overflow === 'hidden') {\n    return false\n  }\n\n  return overflow !== 'visible' && overflow !== 'clip'\n}\n\nfunction getFrameElement(el: Element) {\n  if (!el.ownerDocument || !el.ownerDocument.defaultView) {\n    return null\n  }\n\n  try {\n    return el.ownerDocument.defaultView.frameElement\n  } catch (e) {\n    return null\n  }\n}\n\nfunction isHiddenByFrame(el: Element): boolean {\n  const frame = getFrameElement(el)\n  if (!frame) {\n    return false\n  }\n\n  return (\n    frame.clientHeight < el.scrollHeight || frame.clientWidth < el.scrollWidth\n  )\n}\n\nfunction isScrollable(el: Element, skipOverflowHiddenElements?: boolean) {\n  if (el.clientHeight < el.scrollHeight || el.clientWidth < el.scrollWidth) {\n    const style = getComputedStyle(el, null)\n    return (\n      canOverflow(style.overflowY, skipOverflowHiddenElements) ||\n      canOverflow(style.overflowX, skipOverflowHiddenElements) ||\n      isHiddenByFrame(el)\n    )\n  }\n\n  return false\n}\n/**\n * Find out which edge to align against when logical scroll position is \"nearest\"\n * Interesting fact: \"nearest\" works similarily to \"if-needed\", if the element is fully visible it will not scroll it\n *\n * Legends:\n * ┌────────┐ ┏ ━ ━ ━ ┓\n * │ target │   frame\n * └────────┘ ┗ ━ ━ ━ ┛\n */\nfunction alignNearest(\n  scrollingEdgeStart: number,\n  scrollingEdgeEnd: number,\n  scrollingSize: number,\n  scrollingBorderStart: number,\n  scrollingBorderEnd: number,\n  elementEdgeStart: number,\n  elementEdgeEnd: number,\n  elementSize: number\n) {\n  /**\n   * If element edge A and element edge B are both outside scrolling box edge A and scrolling box edge B\n   *\n   *          ┌──┐\n   *        ┏━│━━│━┓\n   *          │  │\n   *        ┃ │  │ ┃        do nothing\n   *          │  │\n   *        ┗━│━━│━┛\n   *          └──┘\n   *\n   *  If element edge C and element edge D are both outside scrolling box edge C and scrolling box edge D\n   *\n   *    ┏ ━ ━ ━ ━ ┓\n   *   ┌───────────┐\n   *   │┃         ┃│        do nothing\n   *   └───────────┘\n   *    ┗ ━ ━ ━ ━ ┛\n   */\n  if (\n    (elementEdgeStart < scrollingEdgeStart &&\n      elementEdgeEnd > scrollingEdgeEnd) ||\n    (elementEdgeStart > scrollingEdgeStart && elementEdgeEnd < scrollingEdgeEnd)\n  ) {\n    return 0\n  }\n\n  /**\n   * If element edge A is outside scrolling box edge A and element height is less than scrolling box height\n   *\n   *          ┌──┐\n   *        ┏━│━━│━┓         ┏━┌━━┐━┓\n   *          └──┘             │  │\n   *  from  ┃      ┃     to  ┃ └──┘ ┃\n   *\n   *        ┗━ ━━ ━┛         ┗━ ━━ ━┛\n   *\n   * If element edge B is outside scrolling box edge B and element height is greater than scrolling box height\n   *\n   *        ┏━ ━━ ━┓         ┏━┌━━┐━┓\n   *                           │  │\n   *  from  ┃ ┌──┐ ┃     to  ┃ │  │ ┃\n   *          │  │             │  │\n   *        ┗━│━━│━┛         ┗━│━━│━┛\n   *          │  │             └──┘\n   *          │  │\n   *          └──┘\n   *\n   * If element edge C is outside scrolling box edge C and element width is less than scrolling box width\n   *\n   *       from                 to\n   *    ┏ ━ ━ ━ ━ ┓         ┏ ━ ━ ━ ━ ┓\n   *  ┌───┐                 ┌───┐\n   *  │ ┃ │       ┃         ┃   │     ┃\n   *  └───┘                 └───┘\n   *    ┗ ━ ━ ━ ━ ┛         ┗ ━ ━ ━ ━ ┛\n   *\n   * If element edge D is outside scrolling box edge D and element width is greater than scrolling box width\n   *\n   *       from                 to\n   *    ┏ ━ ━ ━ ━ ┓         ┏ ━ ━ ━ ━ ┓\n   *        ┌───────────┐   ┌───────────┐\n   *    ┃   │     ┃     │   ┃         ┃ │\n   *        └───────────┘   └───────────┘\n   *    ┗ ━ ━ ━ ━ ┛         ┗ ━ ━ ━ ━ ┛\n   */\n  if (\n    (elementEdgeStart <= scrollingEdgeStart && elementSize <= scrollingSize) ||\n    (elementEdgeEnd >= scrollingEdgeEnd && elementSize >= scrollingSize)\n  ) {\n    return elementEdgeStart - scrollingEdgeStart - scrollingBorderStart\n  }\n\n  /**\n   * If element edge B is outside scrolling box edge B and element height is less than scrolling box height\n   *\n   *        ┏━ ━━ ━┓         ┏━ ━━ ━┓\n   *\n   *  from  ┃      ┃     to  ┃ ┌──┐ ┃\n   *          ┌──┐             │  │\n   *        ┗━│━━│━┛         ┗━└━━┘━┛\n   *          └──┘\n   *\n   * If element edge A is outside scrolling box edge A and element height is greater than scrolling box height\n   *\n   *          ┌──┐\n   *          │  │\n   *          │  │             ┌──┐\n   *        ┏━│━━│━┓         ┏━│━━│━┓\n   *          │  │             │  │\n   *  from  ┃ └──┘ ┃     to  ┃ │  │ ┃\n   *                           │  │\n   *        ┗━ ━━ ━┛         ┗━└━━┘━┛\n   *\n   * If element edge C is outside scrolling box edge C and element width is greater than scrolling box width\n   *\n   *           from                 to\n   *        ┏ ━ ━ ━ ━ ┓         ┏ ━ ━ ━ ━ ┓\n   *  ┌───────────┐           ┌───────────┐\n   *  │     ┃     │   ┃       │ ┃         ┃\n   *  └───────────┘           └───────────┘\n   *        ┗ ━ ━ ━ ━ ┛         ┗ ━ ━ ━ ━ ┛\n   *\n   * If element edge D is outside scrolling box edge D and element width is less than scrolling box width\n   *\n   *           from                 to\n   *        ┏ ━ ━ ━ ━ ┓         ┏ ━ ━ ━ ━ ┓\n   *                ┌───┐             ┌───┐\n   *        ┃       │ ┃ │       ┃     │   ┃\n   *                └───┘             └───┘\n   *        ┗ ━ ━ ━ ━ ┛         ┗ ━ ━ ━ ━ ┛\n   *\n   */\n  if (\n    (elementEdgeEnd > scrollingEdgeEnd && elementSize < scrollingSize) ||\n    (elementEdgeStart < scrollingEdgeStart && elementSize > scrollingSize)\n  ) {\n    return elementEdgeEnd - scrollingEdgeEnd + scrollingBorderEnd\n  }\n\n  return 0\n}\n\nexport default (target: Element, options: Options): CustomScrollAction[] => {\n  //TODO: remove this hack when microbundle will support typescript >= 4.0\n  const windowWithViewport = (window as unknown) as Window & {\n    visualViewport: visualViewport\n  }\n\n  const {\n    scrollMode,\n    block,\n    inline,\n    boundary,\n    skipOverflowHiddenElements,\n  } = options\n  // Allow using a callback to check the boundary\n  // The default behavior is to check if the current target matches the boundary element or not\n  // If undefined it'll check that target is never undefined (can happen as we recurse up the tree)\n  const checkBoundary =\n    typeof boundary === 'function' ? boundary : (node: any) => node !== boundary\n\n  if (!isElement(target)) {\n    throw new TypeError('Invalid target')\n  }\n\n  // Used to handle the top most element that can be scrolled\n  const scrollingElement = document.scrollingElement || document.documentElement\n\n  // Collect all the scrolling boxes, as defined in the spec: https://drafts.csswg.org/cssom-view/#scrolling-box\n  const frames: Element[] = []\n  let cursor = target\n  while (isElement(cursor) && checkBoundary(cursor)) {\n    // Move cursor to parent\n    cursor = cursor.parentNode as Element\n\n    // Stop when we reach the viewport\n    if (cursor === scrollingElement) {\n      frames.push(cursor)\n      break\n    }\n\n    // Skip document.body if it's not the scrollingElement and documentElement isn't independently scrollable\n    if (\n      cursor === document.body &&\n      isScrollable(cursor) &&\n      !isScrollable(document.documentElement as HTMLElement)\n    ) {\n      continue\n    }\n\n    // Now we check if the element is scrollable, this code only runs if the loop haven't already hit the viewport or a custom boundary\n    if (isScrollable(cursor, skipOverflowHiddenElements)) {\n      frames.push(cursor)\n    }\n  }\n\n  // Support pinch-zooming properly, making sure elements scroll into the visual viewport\n  // Browsers that don't support visualViewport will report the layout viewport dimensions on document.documentElement.clientWidth/Height\n  // and viewport dimensions on window.innerWidth/Height\n  // https://www.quirksmode.org/mobile/viewports2.html\n  // https://bokand.github.io/viewport/index.html\n  const viewportWidth = windowWithViewport.visualViewport\n    ? windowWithViewport.visualViewport.width\n    : innerWidth\n  const viewportHeight = windowWithViewport.visualViewport\n    ? windowWithViewport.visualViewport.height\n    : innerHeight\n\n  // Newer browsers supports scroll[X|Y], page[X|Y]Offset is\n  const viewportX = window.scrollX || pageXOffset\n  const viewportY = window.scrollY || pageYOffset\n\n  const {\n    height: targetHeight,\n    width: targetWidth,\n    top: targetTop,\n    right: targetRight,\n    bottom: targetBottom,\n    left: targetLeft,\n  } = target.getBoundingClientRect()\n\n  // These values mutate as we loop through and generate scroll coordinates\n  let targetBlock: number =\n    block === 'start' || block === 'nearest'\n      ? targetTop\n      : block === 'end'\n      ? targetBottom\n      : targetTop + targetHeight / 2 // block === 'center\n  let targetInline: number =\n    inline === 'center'\n      ? targetLeft + targetWidth / 2\n      : inline === 'end'\n      ? targetRight\n      : targetLeft // inline === 'start || inline === 'nearest\n\n  // Collect new scroll positions\n  const computations: CustomScrollAction[] = []\n  // In chrome there's no longer a difference between caching the `frames.length` to a var or not, so we don't in this case (size > speed anyways)\n  for (let index = 0; index < frames.length; index++) {\n    const frame = frames[index]\n\n    // @TODO add a shouldScroll hook here that allows userland code to take control\n\n    const {\n      height,\n      width,\n      top,\n      right,\n      bottom,\n      left,\n    } = frame.getBoundingClientRect()\n\n    // If the element is already visible we can end it here\n    // @TODO targetBlock and targetInline should be taken into account to be compliant with https://github.com/w3c/csswg-drafts/pull/1805/files#diff-3c17f0e43c20f8ecf89419d49e7ef5e0R1333\n    if (\n      scrollMode === 'if-needed' &&\n      targetTop >= 0 &&\n      targetLeft >= 0 &&\n      targetBottom <= viewportHeight &&\n      targetRight <= viewportWidth &&\n      targetTop >= top &&\n      targetBottom <= bottom &&\n      targetLeft >= left &&\n      targetRight <= right\n    ) {\n      // Break the loop and return the computations for things that are not fully visible\n      return computations\n    }\n\n    const frameStyle = getComputedStyle(frame)\n    const borderLeft = parseInt(frameStyle.borderLeftWidth as string, 10)\n    const borderTop = parseInt(frameStyle.borderTopWidth as string, 10)\n    const borderRight = parseInt(frameStyle.borderRightWidth as string, 10)\n    const borderBottom = parseInt(frameStyle.borderBottomWidth as string, 10)\n\n    let blockScroll: number = 0\n    let inlineScroll: number = 0\n\n    // The property existance checks for offfset[Width|Height] is because only HTMLElement objects have them, but any Element might pass by here\n    // @TODO find out if the \"as HTMLElement\" overrides can be dropped\n    const scrollbarWidth =\n      'offsetWidth' in frame\n        ? (frame as HTMLElement).offsetWidth -\n          (frame as HTMLElement).clientWidth -\n          borderLeft -\n          borderRight\n        : 0\n    const scrollbarHeight =\n      'offsetHeight' in frame\n        ? (frame as HTMLElement).offsetHeight -\n          (frame as HTMLElement).clientHeight -\n          borderTop -\n          borderBottom\n        : 0\n\n    if (scrollingElement === frame) {\n      // Handle viewport logic (document.documentElement or document.body)\n\n      if (block === 'start') {\n        blockScroll = targetBlock\n      } else if (block === 'end') {\n        blockScroll = targetBlock - viewportHeight\n      } else if (block === 'nearest') {\n        blockScroll = alignNearest(\n          viewportY,\n          viewportY + viewportHeight,\n          viewportHeight,\n          borderTop,\n          borderBottom,\n          viewportY + targetBlock,\n          viewportY + targetBlock + targetHeight,\n          targetHeight\n        )\n      } else {\n        // block === 'center' is the default\n        blockScroll = targetBlock - viewportHeight / 2\n      }\n\n      if (inline === 'start') {\n        inlineScroll = targetInline\n      } else if (inline === 'center') {\n        inlineScroll = targetInline - viewportWidth / 2\n      } else if (inline === 'end') {\n        inlineScroll = targetInline - viewportWidth\n      } else {\n        // inline === 'nearest' is the default\n        inlineScroll = alignNearest(\n          viewportX,\n          viewportX + viewportWidth,\n          viewportWidth,\n          borderLeft,\n          borderRight,\n          viewportX + targetInline,\n          viewportX + targetInline + targetWidth,\n          targetWidth\n        )\n      }\n\n      // Apply scroll position offsets and ensure they are within bounds\n      // @TODO add more test cases to cover this 100%\n      blockScroll = Math.max(0, blockScroll + viewportY)\n      inlineScroll = Math.max(0, inlineScroll + viewportX)\n    } else {\n      // Handle each scrolling frame that might exist between the target and the viewport\n\n      if (block === 'start') {\n        blockScroll = targetBlock - top - borderTop\n      } else if (block === 'end') {\n        blockScroll = targetBlock - bottom + borderBottom + scrollbarHeight\n      } else if (block === 'nearest') {\n        blockScroll = alignNearest(\n          top,\n          bottom,\n          height,\n          borderTop,\n          borderBottom + scrollbarHeight,\n          targetBlock,\n          targetBlock + targetHeight,\n          targetHeight\n        )\n      } else {\n        // block === 'center' is the default\n        blockScroll = targetBlock - (top + height / 2) + scrollbarHeight / 2\n      }\n\n      if (inline === 'start') {\n        inlineScroll = targetInline - left - borderLeft\n      } else if (inline === 'center') {\n        inlineScroll = targetInline - (left + width / 2) + scrollbarWidth / 2\n      } else if (inline === 'end') {\n        inlineScroll = targetInline - right + borderRight + scrollbarWidth\n      } else {\n        // inline === 'nearest' is the default\n        inlineScroll = alignNearest(\n          left,\n          right,\n          width,\n          borderLeft,\n          borderRight + scrollbarWidth,\n          targetInline,\n          targetInline + targetWidth,\n          targetWidth\n        )\n      }\n\n      const { scrollLeft, scrollTop } = frame\n      // Ensure scroll coordinates are not out of bounds while applying scroll offsets\n      blockScroll = Math.max(\n        0,\n        Math.min(\n          scrollTop + blockScroll,\n          frame.scrollHeight - height + scrollbarHeight\n        )\n      )\n      inlineScroll = Math.max(\n        0,\n        Math.min(\n          scrollLeft + inlineScroll,\n          frame.scrollWidth - width + scrollbarWidth\n        )\n      )\n\n      // Cache the offset so that parent frames can scroll this into view correctly\n      targetBlock += scrollTop - blockScroll\n      targetInline += scrollLeft - inlineScroll\n    }\n\n    computations.push({ el: frame, top: blockScroll, left: inlineScroll })\n  }\n\n  return computations\n}\n","import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport PropTypes from 'prop-types';\nimport { cloneElement, Component, useRef, useEffect, useLayoutEffect, useCallback, useReducer, useMemo } from 'react';\nimport { isForwardRef } from 'react-is';\nimport computeScrollIntoView from 'compute-scroll-into-view';\n\nvar idCounter = 0;\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\n\nfunction cbToCb(cb) {\n  return typeof cb === 'function' ? cb : noop;\n}\n\nfunction noop() {}\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node the element that should scroll into view\n * @param {HTMLElement} menuNode the menu element of the component\n */\n\n\nfunction scrollIntoView(node, menuNode) {\n  if (!node) {\n    return;\n  }\n\n  var actions = computeScrollIntoView(node, {\n    boundary: menuNode,\n    block: 'nearest',\n    scrollMode: 'if-needed'\n  });\n  actions.forEach(function (_ref) {\n    var el = _ref.el,\n        top = _ref.top,\n        left = _ref.left;\n    el.scrollTop = top;\n    el.scrollLeft = left;\n  });\n}\n/**\n * @param {HTMLElement} parent the parent node\n * @param {HTMLElement} child the child node\n * @return {Boolean} whether the parent is the child or the child is in the parent\n */\n\n\nfunction isOrContainsNode(parent, child) {\n  return parent === child || child instanceof Node && parent.contains && parent.contains(child);\n}\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n * @return {Function} the debounced function\n */\n\n\nfunction debounce(fn, time) {\n  var timeoutId;\n\n  function cancel() {\n    if (timeoutId) {\n      clearTimeout(timeoutId);\n    }\n  }\n\n  function wrapper() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    cancel();\n    timeoutId = setTimeout(function () {\n      timeoutId = null;\n      fn.apply(void 0, args);\n    }, time);\n  }\n\n  wrapper.cancel = cancel;\n  return wrapper;\n}\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param {...Function} fns the event handler functions\n * @return {Function} the event handler to add to an element\n */\n\n\nfunction callAllEventHandlers() {\n  for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    fns[_key2] = arguments[_key2];\n  }\n\n  return function (event) {\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      args[_key3 - 1] = arguments[_key3];\n    }\n\n    return fns.some(function (fn) {\n      if (fn) {\n        fn.apply(void 0, [event].concat(args));\n      }\n\n      return event.preventDownshiftDefault || event.hasOwnProperty('nativeEvent') && event.nativeEvent.preventDownshiftDefault;\n    });\n  };\n}\n\nfunction handleRefs() {\n  for (var _len4 = arguments.length, refs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n    refs[_key4] = arguments[_key4];\n  }\n\n  return function (node) {\n    refs.forEach(function (ref) {\n      if (typeof ref === 'function') {\n        ref(node);\n      } else if (ref) {\n        ref.current = node;\n      }\n    });\n  };\n}\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {String} the unique ID\n */\n\n\nfunction generateId() {\n  return String(idCounter++);\n}\n/**\n * Resets idCounter to 0. Used for SSR.\n */\n\n\nfunction resetIdCounter() {\n  idCounter = 0;\n}\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\n\n\nfunction getA11yStatusMessage(_ref2) {\n  var isOpen = _ref2.isOpen,\n      resultCount = _ref2.resultCount,\n      previousResultCount = _ref2.previousResultCount;\n\n  if (!isOpen) {\n    return '';\n  }\n\n  if (!resultCount) {\n    return 'No results are available.';\n  }\n\n  if (resultCount !== previousResultCount) {\n    return resultCount + \" result\" + (resultCount === 1 ? ' is' : 's are') + \" available, use up and down arrow keys to navigate. Press Enter key to select.\";\n  }\n\n  return '';\n}\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\n\n\nfunction unwrapArray(arg, defaultValue) {\n  arg = Array.isArray(arg) ?\n  /* istanbul ignore next (preact) */\n  arg[0] : arg;\n\n  if (!arg && defaultValue) {\n    return defaultValue;\n  } else {\n    return arg;\n  }\n}\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\n\n\nfunction isDOMElement(element) {\n\n\n  return typeof element.type === 'string';\n}\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\n\n\nfunction getElementProps(element) {\n\n  return element.props;\n}\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\n\n\nfunction requiredProp(fnName, propName) {\n  // eslint-disable-next-line no-console\n  console.error(\"The property \\\"\" + propName + \"\\\" is required in \\\"\" + fnName + \"\\\"\");\n}\n\nvar stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type'];\n/**\n * @param {Object} state the state object\n * @return {Object} state that is relevant to downshift\n */\n\nfunction pickState(state) {\n  if (state === void 0) {\n    state = {};\n  }\n\n  var result = {};\n  stateKeys.forEach(function (k) {\n    if (state.hasOwnProperty(k)) {\n      result[k] = state[k];\n    }\n  });\n  return result;\n}\n/**\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param {Object} state The state of the component/hook.\n * @param {Object} props The props that may contain controlled values.\n * @returns {Object} The merged controlled state.\n */\n\n\nfunction getState(state, props) {\n  return Object.keys(state).reduce(function (prevState, key) {\n    prevState[key] = isControlledProp(props, key) ? props[key] : state[key];\n    return prevState;\n  }, {});\n}\n/**\n * This determines whether a prop is a \"controlled prop\" meaning it is\n * state which is controlled by the outside of this component rather\n * than within this component.\n *\n * @param {Object} props The props that may contain controlled values.\n * @param {String} key the key to check\n * @return {Boolean} whether it is a controlled controlled prop\n */\n\n\nfunction isControlledProp(props, key) {\n  return props[key] !== undefined;\n}\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param {Object} event a keyboardEvent object\n * @return {String} keyboard key\n */\n\n\nfunction normalizeArrowKey(event) {\n  var key = event.key,\n      keyCode = event.keyCode;\n  /* istanbul ignore next (ie) */\n\n  if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) {\n    return \"Arrow\" + key;\n  }\n\n  return key;\n}\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\n\n\nfunction isPlainObject(obj) {\n  return Object.prototype.toString.call(obj) === '[object Object]';\n}\n/**\n * Returns the new index in the list, in a circular way. If next value is out of bonds from the total,\n * it will wrap to either 0 or itemCount - 1.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index after the move.\n */\n\n\nfunction getNextWrappingIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n  if (circular === void 0) {\n    circular = true;\n  }\n\n  if (itemCount === 0) {\n    return -1;\n  }\n\n  var itemsLastIndex = itemCount - 1;\n\n  if (typeof baseIndex !== 'number' || baseIndex < 0 || baseIndex >= itemCount) {\n    baseIndex = moveAmount > 0 ? -1 : itemsLastIndex + 1;\n  }\n\n  var newIndex = baseIndex + moveAmount;\n\n  if (newIndex < 0) {\n    newIndex = circular ? itemsLastIndex : 0;\n  } else if (newIndex > itemsLastIndex) {\n    newIndex = circular ? 0 : itemsLastIndex;\n  }\n\n  var nonDisabledNewIndex = getNextNonDisabledIndex(moveAmount, newIndex, itemCount, getItemNodeFromIndex, circular);\n\n  if (nonDisabledNewIndex === -1) {\n    return baseIndex >= itemCount ? -1 : baseIndex;\n  }\n\n  return nonDisabledNewIndex;\n}\n/**\n * Returns the next index in the list of an item that is not disabled.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index. Returns baseIndex if item is not disabled. Returns next non-disabled item otherwise. If no non-disabled found it will return -1.\n */\n\n\nfunction getNextNonDisabledIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n  var currentElementNode = getItemNodeFromIndex(baseIndex);\n\n  if (!currentElementNode || !currentElementNode.hasAttribute('disabled')) {\n    return baseIndex;\n  }\n\n  if (moveAmount > 0) {\n    for (var index = baseIndex + 1; index < itemCount; index++) {\n      if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n        return index;\n      }\n    }\n  } else {\n    for (var _index = baseIndex - 1; _index >= 0; _index--) {\n      if (!getItemNodeFromIndex(_index).hasAttribute('disabled')) {\n        return _index;\n      }\n    }\n  }\n\n  if (circular) {\n    return moveAmount > 0 ? getNextNonDisabledIndex(1, 0, itemCount, getItemNodeFromIndex, false) : getNextNonDisabledIndex(-1, itemCount - 1, itemCount, getItemNodeFromIndex, false);\n  }\n\n  return -1;\n}\n/**\n * Checks if event target is within the downshift elements.\n *\n * @param {EventTarget} target Target to check.\n * @param {HTMLElement[]} downshiftElements The elements that form downshift (list, toggle button etc).\n * @param {Document} document The document.\n * @param {boolean} checkActiveElement Whether to also check activeElement.\n *\n * @returns {boolean} Whether or not the target is within downshift elements.\n */\n\n\nfunction targetWithinDownshift(target, downshiftElements, document, checkActiveElement) {\n  if (checkActiveElement === void 0) {\n    checkActiveElement = true;\n  }\n\n  return downshiftElements.some(function (contextNode) {\n    return contextNode && (isOrContainsNode(contextNode, target) || checkActiveElement && isOrContainsNode(contextNode, document.activeElement));\n  });\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar validateControlledUnchanged = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n  validateControlledUnchanged = function validateControlledUnchanged(state, prevProps, nextProps) {\n    var warningDescription = \"This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props\";\n    Object.keys(state).forEach(function (propKey) {\n      if (prevProps[propKey] !== undefined && nextProps[propKey] === undefined) {\n        // eslint-disable-next-line no-console\n        console.error(\"downshift: A component has changed the controlled prop \\\"\" + propKey + \"\\\" to be uncontrolled. \" + warningDescription);\n      } else if (prevProps[propKey] === undefined && nextProps[propKey] !== undefined) {\n        // eslint-disable-next-line no-console\n        console.error(\"downshift: A component has changed the uncontrolled prop \\\"\" + propKey + \"\\\" to be controlled. \" + warningDescription);\n      }\n    });\n  };\n}\n\nvar cleanupStatus = debounce(function (documentProp) {\n  getStatusDiv(documentProp).textContent = '';\n}, 500);\n/**\n * @param {String} status the status message\n * @param {Object} documentProp document passed by the user.\n */\n\nfunction setStatus(status, documentProp) {\n  var div = getStatusDiv(documentProp);\n\n  if (!status) {\n    return;\n  }\n\n  div.textContent = status;\n  cleanupStatus(documentProp);\n}\n/**\n * Get the status node or create it if it does not already exist.\n * @param {Object} documentProp document passed by the user.\n * @return {HTMLElement} the status node.\n */\n\n\nfunction getStatusDiv(documentProp) {\n  if (documentProp === void 0) {\n    documentProp = document;\n  }\n\n  var statusDiv = documentProp.getElementById('a11y-status-message');\n\n  if (statusDiv) {\n    return statusDiv;\n  }\n\n  statusDiv = documentProp.createElement('div');\n  statusDiv.setAttribute('id', 'a11y-status-message');\n  statusDiv.setAttribute('role', 'status');\n  statusDiv.setAttribute('aria-live', 'polite');\n  statusDiv.setAttribute('aria-relevant', 'additions text');\n  Object.assign(statusDiv.style, {\n    border: '0',\n    clip: 'rect(0 0 0 0)',\n    height: '1px',\n    margin: '-1px',\n    overflow: 'hidden',\n    padding: '0',\n    position: 'absolute',\n    width: '1px'\n  });\n  documentProp.body.appendChild(statusDiv);\n  return statusDiv;\n}\n\nvar unknown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_unknown__' : 0;\nvar mouseUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_mouseup__' : 1;\nvar itemMouseEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_item_mouseenter__' : 2;\nvar keyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_up__' : 3;\nvar keyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_down__' : 4;\nvar keyDownEscape = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_escape__' : 5;\nvar keyDownEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_enter__' : 6;\nvar keyDownHome = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_home__' : 7;\nvar keyDownEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_end__' : 8;\nvar clickItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_item__' : 9;\nvar blurInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_input__' : 10;\nvar changeInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_change_input__' : 11;\nvar keyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_space_button__' : 12;\nvar clickButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_button__' : 13;\nvar blurButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_button__' : 14;\nvar controlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_controlled_prop_updated_selected_item__' : 15;\nvar touchEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_touchend__' : 16;\n\nvar stateChangeTypes = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  unknown: unknown,\n  mouseUp: mouseUp,\n  itemMouseEnter: itemMouseEnter,\n  keyDownArrowUp: keyDownArrowUp,\n  keyDownArrowDown: keyDownArrowDown,\n  keyDownEscape: keyDownEscape,\n  keyDownEnter: keyDownEnter,\n  keyDownHome: keyDownHome,\n  keyDownEnd: keyDownEnd,\n  clickItem: clickItem,\n  blurInput: blurInput,\n  changeInput: changeInput,\n  keyDownSpaceButton: keyDownSpaceButton,\n  clickButton: clickButton,\n  blurButton: blurButton,\n  controlledPropUpdatedSelectedItem: controlledPropUpdatedSelectedItem,\n  touchEnd: touchEnd\n});\n\nvar Downshift = /*#__PURE__*/function () {\n  var Downshift = /*#__PURE__*/function (_Component) {\n    _inheritsLoose(Downshift, _Component);\n\n    function Downshift(_props) {\n      var _this;\n\n      _this = _Component.call(this, _props) || this; // fancy destructuring + defaults + aliases\n      // this basically says each value of state should either be set to\n      // the initial value or the default value if the initial value is not provided\n\n      _this.id = _this.props.id || \"downshift-\" + generateId();\n      _this.menuId = _this.props.menuId || _this.id + \"-menu\";\n      _this.labelId = _this.props.labelId || _this.id + \"-label\";\n      _this.inputId = _this.props.inputId || _this.id + \"-input\";\n\n      _this.getItemId = _this.props.getItemId || function (index) {\n        return _this.id + \"-item-\" + index;\n      };\n\n      _this.input = null;\n      _this.items = [];\n      _this.itemCount = null;\n      _this.previousResultCount = 0;\n      _this.timeoutIds = [];\n\n      _this.internalSetTimeout = function (fn, time) {\n        var id = setTimeout(function () {\n          _this.timeoutIds = _this.timeoutIds.filter(function (i) {\n            return i !== id;\n          });\n          fn();\n        }, time);\n\n        _this.timeoutIds.push(id);\n      };\n\n      _this.setItemCount = function (count) {\n        _this.itemCount = count;\n      };\n\n      _this.unsetItemCount = function () {\n        _this.itemCount = null;\n      };\n\n      _this.setHighlightedIndex = function (highlightedIndex, otherStateToSet) {\n        if (highlightedIndex === void 0) {\n          highlightedIndex = _this.props.defaultHighlightedIndex;\n        }\n\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n\n        otherStateToSet = pickState(otherStateToSet);\n\n        _this.internalSetState(_extends({\n          highlightedIndex: highlightedIndex\n        }, otherStateToSet));\n      };\n\n      _this.clearSelection = function (cb) {\n        _this.internalSetState({\n          selectedItem: null,\n          inputValue: '',\n          highlightedIndex: _this.props.defaultHighlightedIndex,\n          isOpen: _this.props.defaultIsOpen\n        }, cb);\n      };\n\n      _this.selectItem = function (item, otherStateToSet, cb) {\n        otherStateToSet = pickState(otherStateToSet);\n\n        _this.internalSetState(_extends({\n          isOpen: _this.props.defaultIsOpen,\n          highlightedIndex: _this.props.defaultHighlightedIndex,\n          selectedItem: item,\n          inputValue: _this.props.itemToString(item)\n        }, otherStateToSet), cb);\n      };\n\n      _this.selectItemAtIndex = function (itemIndex, otherStateToSet, cb) {\n        var item = _this.items[itemIndex];\n\n        if (item == null) {\n          return;\n        }\n\n        _this.selectItem(item, otherStateToSet, cb);\n      };\n\n      _this.selectHighlightedItem = function (otherStateToSet, cb) {\n        return _this.selectItemAtIndex(_this.getState().highlightedIndex, otherStateToSet, cb);\n      };\n\n      _this.internalSetState = function (stateToSet, cb) {\n        var isItemSelected, onChangeArg;\n        var onStateChangeArg = {};\n        var isStateToSetFunction = typeof stateToSet === 'function'; // we want to call `onInputValueChange` before the `setState` call\n        // so someone controlling the `inputValue` state gets notified of\n        // the input change as soon as possible. This avoids issues with\n        // preserving the cursor position.\n        // See https://github.com/downshift-js/downshift/issues/217 for more info.\n\n        if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n          _this.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), stateToSet));\n        }\n\n        return _this.setState(function (state) {\n          state = _this.getState(state);\n          var newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet; // Your own function that could modify the state that will be set.\n\n          newStateToSet = _this.props.stateReducer(state, newStateToSet); // checks if an item is selected, regardless of if it's different from\n          // what was selected before\n          // used to determine if onSelect and onChange callbacks should be called\n\n          isItemSelected = newStateToSet.hasOwnProperty('selectedItem'); // this keeps track of the object we want to call with setState\n\n          var nextState = {}; // this is just used to tell whether the state changed\n          // and we're trying to update that state. OR if the selection has changed and we're\n          // trying to update the selection\n\n          if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {\n            onChangeArg = newStateToSet.selectedItem;\n          }\n\n          newStateToSet.type = newStateToSet.type || unknown;\n          Object.keys(newStateToSet).forEach(function (key) {\n            // onStateChangeArg should only have the state that is\n            // actually changing\n            if (state[key] !== newStateToSet[key]) {\n              onStateChangeArg[key] = newStateToSet[key];\n            } // the type is useful for the onStateChangeArg\n            // but we don't actually want to set it in internal state.\n            // this is an undocumented feature for now... Not all internalSetState\n            // calls support it and I'm not certain we want them to yet.\n            // But it enables users controlling the isOpen state to know when\n            // the isOpen state changes due to mouseup events which is quite handy.\n\n\n            if (key === 'type') {\n              return;\n            }\n\n            newStateToSet[key]; // if it's coming from props, then we don't care to set it internally\n\n            if (!isControlledProp(_this.props, key)) {\n              nextState[key] = newStateToSet[key];\n            }\n          }); // if stateToSet is a function, then we weren't able to call onInputValueChange\n          // earlier, so we'll call it now that we know what the inputValue state will be.\n\n          if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {\n            _this.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), newStateToSet));\n          }\n\n          return nextState;\n        }, function () {\n          // call the provided callback if it's a function\n          cbToCb(cb)(); // only call the onStateChange and onChange callbacks if\n          // we have relevant information to pass them.\n\n          var hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;\n\n          if (hasMoreStateThanType) {\n            _this.props.onStateChange(onStateChangeArg, _this.getStateAndHelpers());\n          }\n\n          if (isItemSelected) {\n            _this.props.onSelect(stateToSet.selectedItem, _this.getStateAndHelpers());\n          }\n\n          if (onChangeArg !== undefined) {\n            _this.props.onChange(onChangeArg, _this.getStateAndHelpers());\n          } // this is currently undocumented and therefore subject to change\n          // We'll try to not break it, but just be warned.\n\n\n          _this.props.onUserAction(onStateChangeArg, _this.getStateAndHelpers());\n        });\n      };\n\n      _this.rootRef = function (node) {\n        return _this._rootNode = node;\n      };\n\n      _this.getRootProps = function (_temp, _temp2) {\n        var _extends2;\n\n        var _ref = _temp === void 0 ? {} : _temp,\n            _ref$refKey = _ref.refKey,\n            refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n            ref = _ref.ref,\n            rest = _objectWithoutPropertiesLoose(_ref, [\"refKey\", \"ref\"]);\n\n        var _ref2 = _temp2 === void 0 ? {} : _temp2,\n            _ref2$suppressRefErro = _ref2.suppressRefError,\n            suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n        // this is used in the render to know whether the user has called getRootProps.\n        // It uses that to know whether to apply the props automatically\n        _this.getRootProps.called = true;\n        _this.getRootProps.refKey = refKey;\n        _this.getRootProps.suppressRefError = suppressRefError;\n\n        var _this$getState = _this.getState(),\n            isOpen = _this$getState.isOpen;\n\n        return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, _this.rootRef), _extends2.role = 'combobox', _extends2['aria-expanded'] = isOpen, _extends2['aria-haspopup'] = 'listbox', _extends2['aria-owns'] = isOpen ? _this.menuId : null, _extends2['aria-labelledby'] = _this.labelId, _extends2), rest);\n      };\n\n      _this.keyDownHandlers = {\n        ArrowDown: function ArrowDown(event) {\n          var _this2 = this;\n\n          event.preventDefault();\n\n          if (this.getState().isOpen) {\n            var amount = event.shiftKey ? 5 : 1;\n            this.moveHighlightedIndex(amount, {\n              type: keyDownArrowDown\n            });\n          } else {\n            this.internalSetState({\n              isOpen: true,\n              type: keyDownArrowDown\n            }, function () {\n              var itemCount = _this2.getItemCount();\n\n              if (itemCount > 0) {\n                var _this2$getState = _this2.getState(),\n                    highlightedIndex = _this2$getState.highlightedIndex;\n\n                var nextHighlightedIndex = getNextWrappingIndex(1, highlightedIndex, itemCount, function (index) {\n                  return _this2.getItemNodeFromIndex(index);\n                });\n\n                _this2.setHighlightedIndex(nextHighlightedIndex, {\n                  type: keyDownArrowDown\n                });\n              }\n            });\n          }\n        },\n        ArrowUp: function ArrowUp(event) {\n          var _this3 = this;\n\n          event.preventDefault();\n\n          if (this.getState().isOpen) {\n            var amount = event.shiftKey ? -5 : -1;\n            this.moveHighlightedIndex(amount, {\n              type: keyDownArrowUp\n            });\n          } else {\n            this.internalSetState({\n              isOpen: true,\n              type: keyDownArrowUp\n            }, function () {\n              var itemCount = _this3.getItemCount();\n\n              if (itemCount > 0) {\n                var _this3$getState = _this3.getState(),\n                    highlightedIndex = _this3$getState.highlightedIndex;\n\n                var nextHighlightedIndex = getNextWrappingIndex(-1, highlightedIndex, itemCount, function (index) {\n                  return _this3.getItemNodeFromIndex(index);\n                });\n\n                _this3.setHighlightedIndex(nextHighlightedIndex, {\n                  type: keyDownArrowUp\n                });\n              }\n            });\n          }\n        },\n        Enter: function Enter(event) {\n          if (event.which === 229) {\n            return;\n          }\n\n          var _this$getState2 = this.getState(),\n              isOpen = _this$getState2.isOpen,\n              highlightedIndex = _this$getState2.highlightedIndex;\n\n          if (isOpen && highlightedIndex != null) {\n            event.preventDefault();\n            var item = this.items[highlightedIndex];\n            var itemNode = this.getItemNodeFromIndex(highlightedIndex);\n\n            if (item == null || itemNode && itemNode.hasAttribute('disabled')) {\n              return;\n            }\n\n            this.selectHighlightedItem({\n              type: keyDownEnter\n            });\n          }\n        },\n        Escape: function Escape(event) {\n          event.preventDefault();\n          this.reset(_extends({\n            type: keyDownEscape\n          }, !this.state.isOpen && {\n            selectedItem: null,\n            inputValue: ''\n          }));\n        }\n      };\n      _this.buttonKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n        ' ': function _(event) {\n          event.preventDefault();\n          this.toggleMenu({\n            type: keyDownSpaceButton\n          });\n        }\n      });\n      _this.inputKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n        Home: function Home(event) {\n          var _this4 = this;\n\n          var _this$getState3 = this.getState(),\n              isOpen = _this$getState3.isOpen;\n\n          if (!isOpen) {\n            return;\n          }\n\n          event.preventDefault();\n          var itemCount = this.getItemCount();\n\n          if (itemCount <= 0 || !isOpen) {\n            return;\n          } // get next non-disabled starting downwards from 0 if that's disabled.\n\n\n          var newHighlightedIndex = getNextNonDisabledIndex(1, 0, itemCount, function (index) {\n            return _this4.getItemNodeFromIndex(index);\n          }, false);\n          this.setHighlightedIndex(newHighlightedIndex, {\n            type: keyDownHome\n          });\n        },\n        End: function End(event) {\n          var _this5 = this;\n\n          var _this$getState4 = this.getState(),\n              isOpen = _this$getState4.isOpen;\n\n          if (!isOpen) {\n            return;\n          }\n\n          event.preventDefault();\n          var itemCount = this.getItemCount();\n\n          if (itemCount <= 0 || !isOpen) {\n            return;\n          } // get next non-disabled starting upwards from last index if that's disabled.\n\n\n          var newHighlightedIndex = getNextNonDisabledIndex(-1, itemCount - 1, itemCount, function (index) {\n            return _this5.getItemNodeFromIndex(index);\n          }, false);\n          this.setHighlightedIndex(newHighlightedIndex, {\n            type: keyDownEnd\n          });\n        }\n      });\n\n      _this.getToggleButtonProps = function (_temp3) {\n        var _ref3 = _temp3 === void 0 ? {} : _temp3,\n            onClick = _ref3.onClick,\n            onPress = _ref3.onPress,\n            onKeyDown = _ref3.onKeyDown,\n            onKeyUp = _ref3.onKeyUp,\n            onBlur = _ref3.onBlur,\n            rest = _objectWithoutPropertiesLoose(_ref3, [\"onClick\", \"onPress\", \"onKeyDown\", \"onKeyUp\", \"onBlur\"]);\n\n        var _this$getState5 = _this.getState(),\n            isOpen = _this$getState5.isOpen;\n\n        var enabledEventHandlers =  {\n          onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),\n          onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),\n          onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),\n          onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)\n        };\n        var eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n        return _extends({\n          type: 'button',\n          role: 'button',\n          'aria-label': isOpen ? 'close menu' : 'open menu',\n          'aria-haspopup': true,\n          'data-toggle': true\n        }, eventHandlers, rest);\n      };\n\n      _this.buttonHandleKeyUp = function (event) {\n        // Prevent click event from emitting in Firefox\n        event.preventDefault();\n      };\n\n      _this.buttonHandleKeyDown = function (event) {\n        var key = normalizeArrowKey(event);\n\n        if (_this.buttonKeyDownHandlers[key]) {\n          _this.buttonKeyDownHandlers[key].call(_assertThisInitialized(_this), event);\n        }\n      };\n\n      _this.buttonHandleClick = function (event) {\n        event.preventDefault(); // handle odd case for Safari and Firefox which\n        // don't give the button the focus properly.\n\n        /* istanbul ignore if (can't reasonably test this) */\n\n        if ( _this.props.environment.document.activeElement === _this.props.environment.document.body) {\n          event.target.focus();\n        } // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n        // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n        // when building for production and should therefore have no impact on production code.\n\n\n        if (process.env.NODE_ENV === 'test') {\n          _this.toggleMenu({\n            type: clickButton\n          });\n        } else {\n          // Ensure that toggle of menu occurs after the potential blur event in iOS\n          _this.internalSetTimeout(function () {\n            return _this.toggleMenu({\n              type: clickButton\n            });\n          });\n        }\n      };\n\n      _this.buttonHandleBlur = function (event) {\n        var blurTarget = event.target; // Save blur target for comparison with activeElement later\n        // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n\n        _this.internalSetTimeout(function () {\n          if (!_this.isMouseDown && (_this.props.environment.document.activeElement == null || _this.props.environment.document.activeElement.id !== _this.inputId) && _this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n          ) {\n              _this.reset({\n                type: blurButton\n              });\n            }\n        });\n      };\n\n      _this.getLabelProps = function (props) {\n        return _extends({\n          htmlFor: _this.inputId,\n          id: _this.labelId\n        }, props);\n      };\n\n      _this.getInputProps = function (_temp4) {\n        var _ref4 = _temp4 === void 0 ? {} : _temp4,\n            onKeyDown = _ref4.onKeyDown,\n            onBlur = _ref4.onBlur,\n            onChange = _ref4.onChange,\n            onInput = _ref4.onInput,\n            onChangeText = _ref4.onChangeText,\n            rest = _objectWithoutPropertiesLoose(_ref4, [\"onKeyDown\", \"onBlur\", \"onChange\", \"onInput\", \"onChangeText\"]);\n\n        var onChangeKey;\n        var eventHandlers = {};\n        /* istanbul ignore next (preact) */\n\n        {\n          onChangeKey = 'onChange';\n        }\n\n        var _this$getState6 = _this.getState(),\n            inputValue = _this$getState6.inputValue,\n            isOpen = _this$getState6.isOpen,\n            highlightedIndex = _this$getState6.highlightedIndex;\n\n        if (!rest.disabled) {\n          var _eventHandlers;\n\n          eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, _this.inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, _this.inputHandleBlur), _eventHandlers);\n        }\n\n        return _extends({\n          'aria-autocomplete': 'list',\n          'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : null,\n          'aria-controls': isOpen ? _this.menuId : null,\n          'aria-labelledby': _this.labelId,\n          // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n          // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n          autoComplete: 'off',\n          value: inputValue,\n          id: _this.inputId\n        }, eventHandlers, rest);\n      };\n\n      _this.inputHandleKeyDown = function (event) {\n        var key = normalizeArrowKey(event);\n\n        if (key && _this.inputKeyDownHandlers[key]) {\n          _this.inputKeyDownHandlers[key].call(_assertThisInitialized(_this), event);\n        }\n      };\n\n      _this.inputHandleChange = function (event) {\n        _this.internalSetState({\n          type: changeInput,\n          isOpen: true,\n          inputValue:  event.target.value,\n          highlightedIndex: _this.props.defaultHighlightedIndex\n        });\n      };\n\n      _this.inputHandleBlur = function () {\n        // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n        _this.internalSetTimeout(function () {\n          var downshiftButtonIsActive = _this.props.environment.document && !!_this.props.environment.document.activeElement && !!_this.props.environment.document.activeElement.dataset && _this.props.environment.document.activeElement.dataset.toggle && _this._rootNode && _this._rootNode.contains(_this.props.environment.document.activeElement);\n\n          if (!_this.isMouseDown && !downshiftButtonIsActive) {\n            _this.reset({\n              type: blurInput\n            });\n          }\n        });\n      };\n\n      _this.menuRef = function (node) {\n        _this._menuNode = node;\n      };\n\n      _this.getMenuProps = function (_temp5, _temp6) {\n        var _extends3;\n\n        var _ref5 = _temp5 === void 0 ? {} : _temp5,\n            _ref5$refKey = _ref5.refKey,\n            refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n            ref = _ref5.ref,\n            props = _objectWithoutPropertiesLoose(_ref5, [\"refKey\", \"ref\"]);\n\n        var _ref6 = _temp6 === void 0 ? {} : _temp6,\n            _ref6$suppressRefErro = _ref6.suppressRefError,\n            suppressRefError = _ref6$suppressRefErro === void 0 ? false : _ref6$suppressRefErro;\n\n        _this.getMenuProps.called = true;\n        _this.getMenuProps.refKey = refKey;\n        _this.getMenuProps.suppressRefError = suppressRefError;\n        return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, _this.menuRef), _extends3.role = 'listbox', _extends3['aria-labelledby'] = props && props['aria-label'] ? null : _this.labelId, _extends3.id = _this.menuId, _extends3), props);\n      };\n\n      _this.getItemProps = function (_temp7) {\n        var _enabledEventHandlers;\n\n        var _ref7 = _temp7 === void 0 ? {} : _temp7,\n            onMouseMove = _ref7.onMouseMove,\n            onMouseDown = _ref7.onMouseDown,\n            onClick = _ref7.onClick,\n            onPress = _ref7.onPress,\n            index = _ref7.index,\n            _ref7$item = _ref7.item,\n            item = _ref7$item === void 0 ? process.env.NODE_ENV === 'production' ?\n        /* istanbul ignore next */\n        undefined : requiredProp('getItemProps', 'item') : _ref7$item,\n            rest = _objectWithoutPropertiesLoose(_ref7, [\"onMouseMove\", \"onMouseDown\", \"onClick\", \"onPress\", \"index\", \"item\"]);\n\n        if (index === undefined) {\n          _this.items.push(item);\n\n          index = _this.items.indexOf(item);\n        } else {\n          _this.items[index] = item;\n        }\n\n        var onSelectKey =  'onClick';\n        var customClickHandler =  onClick;\n        var enabledEventHandlers = (_enabledEventHandlers = {\n          // onMouseMove is used over onMouseEnter here. onMouseMove\n          // is only triggered on actual mouse movement while onMouseEnter\n          // can fire on DOM changes, interrupting keyboard navigation\n          onMouseMove: callAllEventHandlers(onMouseMove, function () {\n            if (index === _this.getState().highlightedIndex) {\n              return;\n            }\n\n            _this.setHighlightedIndex(index, {\n              type: itemMouseEnter\n            }); // We never want to manually scroll when changing state based\n            // on `onMouseMove` because we will be moving the element out\n            // from under the user which is currently scrolling/moving the\n            // cursor\n\n\n            _this.avoidScrolling = true;\n\n            _this.internalSetTimeout(function () {\n              return _this.avoidScrolling = false;\n            }, 250);\n          }),\n          onMouseDown: callAllEventHandlers(onMouseDown, function (event) {\n            // This prevents the activeElement from being changed\n            // to the item so it can remain with the current activeElement\n            // which is a more common use case.\n            event.preventDefault();\n          })\n        }, _enabledEventHandlers[onSelectKey] = callAllEventHandlers(customClickHandler, function () {\n          _this.selectItemAtIndex(index, {\n            type: clickItem\n          });\n        }), _enabledEventHandlers); // Passing down the onMouseDown handler to prevent redirect\n        // of the activeElement if clicking on disabled items\n\n        var eventHandlers = rest.disabled ? {\n          onMouseDown: enabledEventHandlers.onMouseDown\n        } : enabledEventHandlers;\n        return _extends({\n          id: _this.getItemId(index),\n          role: 'option',\n          'aria-selected': _this.getState().highlightedIndex === index\n        }, eventHandlers, rest);\n      };\n\n      _this.clearItems = function () {\n        _this.items = [];\n      };\n\n      _this.reset = function (otherStateToSet, cb) {\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n\n        otherStateToSet = pickState(otherStateToSet);\n\n        _this.internalSetState(function (_ref8) {\n          var selectedItem = _ref8.selectedItem;\n          return _extends({\n            isOpen: _this.props.defaultIsOpen,\n            highlightedIndex: _this.props.defaultHighlightedIndex,\n            inputValue: _this.props.itemToString(selectedItem)\n          }, otherStateToSet);\n        }, cb);\n      };\n\n      _this.toggleMenu = function (otherStateToSet, cb) {\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n\n        otherStateToSet = pickState(otherStateToSet);\n\n        _this.internalSetState(function (_ref9) {\n          var isOpen = _ref9.isOpen;\n          return _extends({\n            isOpen: !isOpen\n          }, isOpen && {\n            highlightedIndex: _this.props.defaultHighlightedIndex\n          }, otherStateToSet);\n        }, function () {\n          var _this$getState7 = _this.getState(),\n              isOpen = _this$getState7.isOpen,\n              highlightedIndex = _this$getState7.highlightedIndex;\n\n          if (isOpen) {\n            if (_this.getItemCount() > 0 && typeof highlightedIndex === 'number') {\n              _this.setHighlightedIndex(highlightedIndex, otherStateToSet);\n            }\n          }\n\n          cbToCb(cb)();\n        });\n      };\n\n      _this.openMenu = function (cb) {\n        _this.internalSetState({\n          isOpen: true\n        }, cb);\n      };\n\n      _this.closeMenu = function (cb) {\n        _this.internalSetState({\n          isOpen: false\n        }, cb);\n      };\n\n      _this.updateStatus = debounce(function () {\n        var state = _this.getState();\n\n        var item = _this.items[state.highlightedIndex];\n\n        var resultCount = _this.getItemCount();\n\n        var status = _this.props.getA11yStatusMessage(_extends({\n          itemToString: _this.props.itemToString,\n          previousResultCount: _this.previousResultCount,\n          resultCount: resultCount,\n          highlightedItem: item\n        }, state));\n\n        _this.previousResultCount = resultCount;\n        setStatus(status, _this.props.environment.document);\n      }, 200);\n\n      var _this$props = _this.props,\n          defaultHighlightedIndex = _this$props.defaultHighlightedIndex,\n          _this$props$initialHi = _this$props.initialHighlightedIndex,\n          _highlightedIndex = _this$props$initialHi === void 0 ? defaultHighlightedIndex : _this$props$initialHi,\n          defaultIsOpen = _this$props.defaultIsOpen,\n          _this$props$initialIs = _this$props.initialIsOpen,\n          _isOpen = _this$props$initialIs === void 0 ? defaultIsOpen : _this$props$initialIs,\n          _this$props$initialIn = _this$props.initialInputValue,\n          _inputValue = _this$props$initialIn === void 0 ? '' : _this$props$initialIn,\n          _this$props$initialSe = _this$props.initialSelectedItem,\n          _selectedItem = _this$props$initialSe === void 0 ? null : _this$props$initialSe;\n\n      var _state = _this.getState({\n        highlightedIndex: _highlightedIndex,\n        isOpen: _isOpen,\n        inputValue: _inputValue,\n        selectedItem: _selectedItem\n      });\n\n      if (_state.selectedItem != null && _this.props.initialInputValue === undefined) {\n        _state.inputValue = _this.props.itemToString(_state.selectedItem);\n      }\n\n      _this.state = _state;\n      return _this;\n    }\n\n    var _proto = Downshift.prototype;\n\n    /**\n     * Clear all running timeouts\n     */\n    _proto.internalClearTimeouts = function internalClearTimeouts() {\n      this.timeoutIds.forEach(function (id) {\n        clearTimeout(id);\n      });\n      this.timeoutIds = [];\n    }\n    /**\n     * Gets the state based on internal state or props\n     * If a state value is passed via props, then that\n     * is the value given, otherwise it's retrieved from\n     * stateToMerge\n     *\n     * @param {Object} stateToMerge defaults to this.state\n     * @return {Object} the state\n     */\n    ;\n\n    _proto.getState = function getState$1(stateToMerge) {\n      if (stateToMerge === void 0) {\n        stateToMerge = this.state;\n      }\n\n      return getState(stateToMerge, this.props);\n    };\n\n    _proto.getItemCount = function getItemCount() {\n      // things read better this way. They're in priority order:\n      // 1. `this.itemCount`\n      // 2. `this.props.itemCount`\n      // 3. `this.items.length`\n      var itemCount = this.items.length;\n\n      if (this.itemCount != null) {\n        itemCount = this.itemCount;\n      } else if (this.props.itemCount !== undefined) {\n        itemCount = this.props.itemCount;\n      }\n\n      return itemCount;\n    };\n\n    _proto.getItemNodeFromIndex = function getItemNodeFromIndex(index) {\n      return this.props.environment.document.getElementById(this.getItemId(index));\n    };\n\n    _proto.scrollHighlightedItemIntoView = function scrollHighlightedItemIntoView() {\n      /* istanbul ignore else (react-native) */\n      {\n        var node = this.getItemNodeFromIndex(this.getState().highlightedIndex);\n        this.props.scrollIntoView(node, this._menuNode);\n      }\n    };\n\n    _proto.moveHighlightedIndex = function moveHighlightedIndex(amount, otherStateToSet) {\n      var _this6 = this;\n\n      var itemCount = this.getItemCount();\n\n      var _this$getState8 = this.getState(),\n          highlightedIndex = _this$getState8.highlightedIndex;\n\n      if (itemCount > 0) {\n        var nextHighlightedIndex = getNextWrappingIndex(amount, highlightedIndex, itemCount, function (index) {\n          return _this6.getItemNodeFromIndex(index);\n        });\n        this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet);\n      }\n    };\n\n    _proto.getStateAndHelpers = function getStateAndHelpers() {\n      var _this$getState9 = this.getState(),\n          highlightedIndex = _this$getState9.highlightedIndex,\n          inputValue = _this$getState9.inputValue,\n          selectedItem = _this$getState9.selectedItem,\n          isOpen = _this$getState9.isOpen;\n\n      var itemToString = this.props.itemToString;\n      var id = this.id;\n      var getRootProps = this.getRootProps,\n          getToggleButtonProps = this.getToggleButtonProps,\n          getLabelProps = this.getLabelProps,\n          getMenuProps = this.getMenuProps,\n          getInputProps = this.getInputProps,\n          getItemProps = this.getItemProps,\n          openMenu = this.openMenu,\n          closeMenu = this.closeMenu,\n          toggleMenu = this.toggleMenu,\n          selectItem = this.selectItem,\n          selectItemAtIndex = this.selectItemAtIndex,\n          selectHighlightedItem = this.selectHighlightedItem,\n          setHighlightedIndex = this.setHighlightedIndex,\n          clearSelection = this.clearSelection,\n          clearItems = this.clearItems,\n          reset = this.reset,\n          setItemCount = this.setItemCount,\n          unsetItemCount = this.unsetItemCount,\n          setState = this.internalSetState;\n      return {\n        // prop getters\n        getRootProps: getRootProps,\n        getToggleButtonProps: getToggleButtonProps,\n        getLabelProps: getLabelProps,\n        getMenuProps: getMenuProps,\n        getInputProps: getInputProps,\n        getItemProps: getItemProps,\n        // actions\n        reset: reset,\n        openMenu: openMenu,\n        closeMenu: closeMenu,\n        toggleMenu: toggleMenu,\n        selectItem: selectItem,\n        selectItemAtIndex: selectItemAtIndex,\n        selectHighlightedItem: selectHighlightedItem,\n        setHighlightedIndex: setHighlightedIndex,\n        clearSelection: clearSelection,\n        clearItems: clearItems,\n        setItemCount: setItemCount,\n        unsetItemCount: unsetItemCount,\n        setState: setState,\n        // props\n        itemToString: itemToString,\n        // derived\n        id: id,\n        // state\n        highlightedIndex: highlightedIndex,\n        inputValue: inputValue,\n        isOpen: isOpen,\n        selectedItem: selectedItem\n      };\n    } //////////////////////////// ROOT\n    ;\n\n    _proto.componentDidMount = function componentDidMount() {\n      var _this7 = this;\n\n      /* istanbul ignore if (react-native) */\n      if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n        validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n      }\n      /* istanbul ignore if (react-native) */\n\n\n      {\n        // this.isMouseDown helps us track whether the mouse is currently held down.\n        // This is useful when the user clicks on an item in the list, but holds the mouse\n        // down long enough for the list to disappear (because the blur event fires on the input)\n        // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n        // trigger hiding the menu.\n        var onMouseDown = function onMouseDown() {\n          _this7.isMouseDown = true;\n        };\n\n        var onMouseUp = function onMouseUp(event) {\n          _this7.isMouseDown = false; // if the target element or the activeElement is within a downshift node\n          // then we don't want to reset downshift\n\n          var contextWithinDownshift = targetWithinDownshift(event.target, [_this7._rootNode, _this7._menuNode], _this7.props.environment.document);\n\n          if (!contextWithinDownshift && _this7.getState().isOpen) {\n            _this7.reset({\n              type: mouseUp\n            }, function () {\n              return _this7.props.onOuterClick(_this7.getStateAndHelpers());\n            });\n          }\n        }; // Touching an element in iOS gives focus and hover states, but touching out of\n        // the element will remove hover, and persist the focus state, resulting in the\n        // blur event not being triggered.\n        // this.isTouchMove helps us track whether the user is tapping or swiping on a touch screen.\n        // If the user taps outside of Downshift, the component should be reset,\n        // but not if the user is swiping\n\n\n        var onTouchStart = function onTouchStart() {\n          _this7.isTouchMove = false;\n        };\n\n        var onTouchMove = function onTouchMove() {\n          _this7.isTouchMove = true;\n        };\n\n        var onTouchEnd = function onTouchEnd(event) {\n          var contextWithinDownshift = targetWithinDownshift(event.target, [_this7._rootNode, _this7._menuNode], _this7.props.environment.document, false);\n\n          if (!_this7.isTouchMove && !contextWithinDownshift && _this7.getState().isOpen) {\n            _this7.reset({\n              type: touchEnd\n            }, function () {\n              return _this7.props.onOuterClick(_this7.getStateAndHelpers());\n            });\n          }\n        };\n\n        var environment = this.props.environment;\n        environment.addEventListener('mousedown', onMouseDown);\n        environment.addEventListener('mouseup', onMouseUp);\n        environment.addEventListener('touchstart', onTouchStart);\n        environment.addEventListener('touchmove', onTouchMove);\n        environment.addEventListener('touchend', onTouchEnd);\n\n        this.cleanup = function () {\n          _this7.internalClearTimeouts();\n\n          _this7.updateStatus.cancel();\n\n          environment.removeEventListener('mousedown', onMouseDown);\n          environment.removeEventListener('mouseup', onMouseUp);\n          environment.removeEventListener('touchstart', onTouchStart);\n          environment.removeEventListener('touchmove', onTouchMove);\n          environment.removeEventListener('touchend', onTouchEnd);\n        };\n      }\n    };\n\n    _proto.shouldScroll = function shouldScroll(prevState, prevProps) {\n      var _ref10 = this.props.highlightedIndex === undefined ? this.getState() : this.props,\n          currentHighlightedIndex = _ref10.highlightedIndex;\n\n      var _ref11 = prevProps.highlightedIndex === undefined ? prevState : prevProps,\n          prevHighlightedIndex = _ref11.highlightedIndex;\n\n      var scrollWhenOpen = currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen;\n      var scrollWhenNavigating = currentHighlightedIndex !== prevHighlightedIndex;\n      return scrollWhenOpen || scrollWhenNavigating;\n    };\n\n    _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n      if (process.env.NODE_ENV !== 'production') {\n        validateControlledUnchanged(this.state, prevProps, this.props);\n        /* istanbul ignore if (react-native) */\n\n        if ( this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n          validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n        }\n      }\n\n      if (isControlledProp(this.props, 'selectedItem') && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) {\n        this.internalSetState({\n          type: controlledPropUpdatedSelectedItem,\n          inputValue: this.props.itemToString(this.props.selectedItem)\n        });\n      }\n\n      if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) {\n        this.scrollHighlightedItemIntoView();\n      }\n      /* istanbul ignore else (react-native) */\n\n\n      {\n        this.updateStatus();\n      }\n    };\n\n    _proto.componentWillUnmount = function componentWillUnmount() {\n      this.cleanup(); // avoids memory leak\n    };\n\n    _proto.render = function render() {\n      var children = unwrapArray(this.props.children, noop); // because the items are rerendered every time we call the children\n      // we clear this out each render and it will be populated again as\n      // getItemProps is called.\n\n      this.clearItems(); // we reset this so we know whether the user calls getRootProps during\n      // this render. If they do then we don't need to do anything,\n      // if they don't then we need to clone the element they return and\n      // apply the props for them.\n\n      this.getRootProps.called = false;\n      this.getRootProps.refKey = undefined;\n      this.getRootProps.suppressRefError = undefined; // we do something similar for getMenuProps\n\n      this.getMenuProps.called = false;\n      this.getMenuProps.refKey = undefined;\n      this.getMenuProps.suppressRefError = undefined; // we do something similar for getLabelProps\n\n      this.getLabelProps.called = false; // and something similar for getInputProps\n\n      this.getInputProps.called = false;\n      var element = unwrapArray(children(this.getStateAndHelpers()));\n\n      if (!element) {\n        return null;\n      }\n\n      if (this.getRootProps.called || this.props.suppressRefError) {\n        if (process.env.NODE_ENV !== 'production' && !this.getRootProps.suppressRefError && !this.props.suppressRefError) {\n          validateGetRootPropsCalledCorrectly(element, this.getRootProps);\n        }\n\n        return element;\n      } else if (isDOMElement(element)) {\n        // they didn't apply the root props, but we can clone\n        // this and apply the props ourselves\n        return /*#__PURE__*/cloneElement(element, this.getRootProps(getElementProps(element)));\n      }\n      /* istanbul ignore else */\n\n\n      if (process.env.NODE_ENV !== 'production') {\n        // they didn't apply the root props, but they need to\n        // otherwise we can't query around the autocomplete\n        throw new Error('downshift: If you return a non-DOM element, you must apply the getRootProps function');\n      }\n      /* istanbul ignore next */\n\n\n      return undefined;\n    };\n\n    return Downshift;\n  }(Component);\n\n  Downshift.defaultProps = {\n    defaultHighlightedIndex: null,\n    defaultIsOpen: false,\n    getA11yStatusMessage: getA11yStatusMessage,\n    itemToString: function itemToString(i) {\n      if (i == null) {\n        return '';\n      }\n\n      if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) {\n        // eslint-disable-next-line no-console\n        console.warn('downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.', 'The object that was passed:', i);\n      }\n\n      return String(i);\n    },\n    onStateChange: noop,\n    onInputValueChange: noop,\n    onUserAction: noop,\n    onChange: noop,\n    onSelect: noop,\n    onOuterClick: noop,\n    selectedItemChanged: function selectedItemChanged(prevItem, item) {\n      return prevItem !== item;\n    },\n    environment: typeof window === 'undefined'\n    /* istanbul ignore next (ssr) */\n    ? {} : window,\n    stateReducer: function stateReducer(state, stateToSet) {\n      return stateToSet;\n    },\n    suppressRefError: false,\n    scrollIntoView: scrollIntoView\n  };\n  Downshift.stateChangeTypes = stateChangeTypes;\n  return Downshift;\n}();\n\nprocess.env.NODE_ENV !== \"production\" ? Downshift.propTypes = {\n  children: PropTypes.func,\n  defaultHighlightedIndex: PropTypes.number,\n  defaultIsOpen: PropTypes.bool,\n  initialHighlightedIndex: PropTypes.number,\n  initialSelectedItem: PropTypes.any,\n  initialInputValue: PropTypes.string,\n  initialIsOpen: PropTypes.bool,\n  getA11yStatusMessage: PropTypes.func,\n  itemToString: PropTypes.func,\n  onChange: PropTypes.func,\n  onSelect: PropTypes.func,\n  onStateChange: PropTypes.func,\n  onInputValueChange: PropTypes.func,\n  onUserAction: PropTypes.func,\n  onOuterClick: PropTypes.func,\n  selectedItemChanged: PropTypes.func,\n  stateReducer: PropTypes.func,\n  itemCount: PropTypes.number,\n  id: PropTypes.string,\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func,\n    removeEventListener: PropTypes.func,\n    document: PropTypes.shape({\n      getElementById: PropTypes.func,\n      activeElement: PropTypes.any,\n      body: PropTypes.any\n    })\n  }),\n  suppressRefError: PropTypes.bool,\n  scrollIntoView: PropTypes.func,\n  // things we keep in state for uncontrolled components\n  // but can accept as props for controlled components\n\n  /* eslint-disable react/no-unused-prop-types */\n  selectedItem: PropTypes.any,\n  isOpen: PropTypes.bool,\n  inputValue: PropTypes.string,\n  highlightedIndex: PropTypes.number,\n  labelId: PropTypes.string,\n  inputId: PropTypes.string,\n  menuId: PropTypes.string,\n  getItemId: PropTypes.func\n  /* eslint-enable react/no-unused-prop-types */\n\n} : void 0;\n\nfunction validateGetMenuPropsCalledCorrectly(node, _ref12) {\n  var refKey = _ref12.refKey;\n\n  if (!node) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from getMenuProps was not applied correctly on your menu element.\");\n  }\n}\n\nfunction validateGetRootPropsCalledCorrectly(element, _ref13) {\n  var refKey = _ref13.refKey;\n  var refKeySpecified = refKey !== 'ref';\n  var isComposite = !isDOMElement(element);\n\n  if (isComposite && !refKeySpecified && !isForwardRef(element)) {\n    // eslint-disable-next-line no-console\n    console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');\n  } else if (!isComposite && refKeySpecified) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \\\"\" + refKey + \"\\\"\");\n  }\n\n  if (!isForwardRef(element) && !getElementProps(element)[refKey]) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: You must apply the ref prop \\\"\" + refKey + \"\\\" from getRootProps onto your root element.\");\n  }\n}\n\nvar dropdownDefaultStateValues = {\n  highlightedIndex: -1,\n  isOpen: false,\n  selectedItem: null,\n  inputValue: ''\n};\n\nfunction callOnChangeProps(action, state, newState) {\n  var props = action.props,\n      type = action.type;\n  var changes = {};\n  Object.keys(state).forEach(function (key) {\n    invokeOnChangeHandler(key, action, state, newState);\n\n    if (newState[key] !== state[key]) {\n      changes[key] = newState[key];\n    }\n  });\n\n  if (props.onStateChange && Object.keys(changes).length) {\n    props.onStateChange(_extends({\n      type: type\n    }, changes));\n  }\n}\n\nfunction invokeOnChangeHandler(key, action, state, newState) {\n  var props = action.props,\n      type = action.type;\n  var handler = \"on\" + capitalizeString(key) + \"Change\";\n\n  if (props[handler] && newState[key] !== undefined && newState[key] !== state[key]) {\n    props[handler](_extends({\n      type: type\n    }, newState));\n  }\n}\n/**\n * Default state reducer that returns the changes.\n *\n * @param {Object} s state.\n * @param {Object} a action with changes.\n * @returns {Object} changes.\n */\n\n\nfunction stateReducer(s, a) {\n  return a.changes;\n}\n/**\n * Returns a message to be added to aria-live region when item is selected.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\n\n\nfunction getA11ySelectionMessage(selectionParameters) {\n  var selectedItem = selectionParameters.selectedItem,\n      itemToStringLocal = selectionParameters.itemToString;\n  return selectedItem ? itemToStringLocal(selectedItem) + \" has been selected.\" : '';\n}\n/**\n * Debounced call for updating the a11y message.\n */\n\n\nvar updateA11yStatus = debounce(function (getA11yMessage, document) {\n  setStatus(getA11yMessage(), document);\n}, 200); // istanbul ignore next\n\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\n\nfunction useElementIds(_ref) {\n  var _ref$id = _ref.id,\n      id = _ref$id === void 0 ? \"downshift-\" + generateId() : _ref$id,\n      labelId = _ref.labelId,\n      menuId = _ref.menuId,\n      getItemId = _ref.getItemId,\n      toggleButtonId = _ref.toggleButtonId,\n      inputId = _ref.inputId;\n  var elementIdsRef = useRef({\n    labelId: labelId || id + \"-label\",\n    menuId: menuId || id + \"-menu\",\n    getItemId: getItemId || function (index) {\n      return id + \"-item-\" + index;\n    },\n    toggleButtonId: toggleButtonId || id + \"-toggle-button\",\n    inputId: inputId || id + \"-input\"\n  });\n  return elementIdsRef.current;\n}\n\nfunction getItemIndex(index, item, items) {\n  if (index !== undefined) {\n    return index;\n  }\n\n  if (items.length === 0) {\n    return -1;\n  }\n\n  return items.indexOf(item);\n}\n\nfunction itemToString(item) {\n  return item ? String(item) : '';\n}\n\nfunction isAcceptedCharacterKey(key) {\n  return /^\\S{1}$/.test(key);\n}\n\nfunction capitalizeString(string) {\n  return \"\" + string.slice(0, 1).toUpperCase() + string.slice(1);\n}\n\nfunction useLatestRef(val) {\n  var ref = useRef(val); // technically this is not \"concurrent mode safe\" because we're manipulating\n  // the value during render (so it's not idempotent). However, the places this\n  // hook is used is to support memoizing callbacks which will be called\n  // *during* render, so we need the latest values *during* render.\n  // If not for this, then we'd probably want to use useLayoutEffect instead.\n\n  ref.current = val;\n  return ref;\n}\n/**\n * Computes the controlled state using a the previous state, props,\n * two reducers, one from downshift and an optional one from the user.\n * Also calls the onChange handlers for state values that have changed.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\n\nfunction useEnhancedReducer(reducer, initialState, props) {\n  var prevStateRef = useRef();\n  var actionRef = useRef();\n  var enhancedReducer = useCallback(function (state, action) {\n    actionRef.current = action;\n    state = getState(state, action.props);\n    var changes = reducer(state, action);\n    var newState = action.props.stateReducer(state, _extends({}, action, {\n      changes: changes\n    }));\n    return newState;\n  }, [reducer]);\n\n  var _useReducer = useReducer(enhancedReducer, initialState),\n      state = _useReducer[0],\n      dispatch = _useReducer[1];\n\n  var propsRef = useLatestRef(props);\n  var dispatchWithProps = useCallback(function (action) {\n    return dispatch(_extends({\n      props: propsRef.current\n    }, action));\n  }, [propsRef]);\n  var action = actionRef.current;\n  useEffect(function () {\n    if (action && prevStateRef.current && prevStateRef.current !== state) {\n      callOnChangeProps(action, getState(prevStateRef.current, action.props), state);\n    }\n\n    prevStateRef.current = state;\n  }, [state, props, action]);\n  return [state, dispatchWithProps];\n}\n/**\n * Wraps the useEnhancedReducer and applies the controlled prop values before\n * returning the new state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\n\nfunction useControlledReducer(reducer, initialState, props) {\n  var _useEnhancedReducer = useEnhancedReducer(reducer, initialState, props),\n      state = _useEnhancedReducer[0],\n      dispatch = _useEnhancedReducer[1];\n\n  return [getState(state, props), dispatch];\n}\n\nvar defaultProps = {\n  itemToString: itemToString,\n  stateReducer: stateReducer,\n  getA11ySelectionMessage: getA11ySelectionMessage,\n  scrollIntoView: scrollIntoView,\n  circularNavigation: false,\n  environment: typeof window === 'undefined'\n  /* istanbul ignore next (ssr) */\n  ? {} : window\n};\n\nfunction getDefaultValue(props, propKey, defaultStateValues) {\n  if (defaultStateValues === void 0) {\n    defaultStateValues = dropdownDefaultStateValues;\n  }\n\n  var defaultPropKey = \"default\" + capitalizeString(propKey);\n\n  if (defaultPropKey in props) {\n    return props[defaultPropKey];\n  }\n\n  return defaultStateValues[propKey];\n}\n\nfunction getInitialValue(props, propKey, defaultStateValues) {\n  if (defaultStateValues === void 0) {\n    defaultStateValues = dropdownDefaultStateValues;\n  }\n\n  if (propKey in props) {\n    return props[propKey];\n  }\n\n  var initialPropKey = \"initial\" + capitalizeString(propKey);\n\n  if (initialPropKey in props) {\n    return props[initialPropKey];\n  }\n\n  return getDefaultValue(props, propKey, defaultStateValues);\n}\n\nfunction getInitialState(props) {\n  var selectedItem = getInitialValue(props, 'selectedItem');\n  var isOpen = getInitialValue(props, 'isOpen');\n  var highlightedIndex = getInitialValue(props, 'highlightedIndex');\n  var inputValue = getInitialValue(props, 'inputValue');\n  return {\n    highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.indexOf(selectedItem) : highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\nfunction getHighlightedIndexOnOpen(props, state, offset, getItemNodeFromIndex) {\n  var items = props.items,\n      initialHighlightedIndex = props.initialHighlightedIndex,\n      defaultHighlightedIndex = props.defaultHighlightedIndex;\n  var selectedItem = state.selectedItem,\n      highlightedIndex = state.highlightedIndex;\n\n  if (items.length === 0) {\n    return -1;\n  } // initialHighlightedIndex will give value to highlightedIndex on initial state only.\n\n\n  if (initialHighlightedIndex !== undefined && highlightedIndex === initialHighlightedIndex) {\n    return initialHighlightedIndex;\n  }\n\n  if (defaultHighlightedIndex !== undefined) {\n    return defaultHighlightedIndex;\n  }\n\n  if (selectedItem) {\n    if (offset === 0) {\n      return items.indexOf(selectedItem);\n    }\n\n    return getNextWrappingIndex(offset, items.indexOf(selectedItem), items.length, getItemNodeFromIndex, false);\n  }\n\n  if (offset === 0) {\n    return -1;\n  }\n\n  return offset < 0 ? items.length - 1 : 0;\n}\n/**\n * Reuse the movement tracking of mouse and touch events.\n *\n * @param {boolean} isOpen Whether the dropdown is open or not.\n * @param {Array<Object>} downshiftElementRefs Downshift element refs to track movement (toggleButton, menu etc.)\n * @param {Object} environment Environment where component/hook exists.\n * @param {Function} handleBlur Handler on blur from mouse or touch.\n * @returns {Object} Ref containing whether mouseDown or touchMove event is happening\n */\n\n\nfunction useMouseAndTouchTracker(isOpen, downshiftElementRefs, environment, handleBlur) {\n  var mouseAndTouchTrackersRef = useRef({\n    isMouseDown: false,\n    isTouchMove: false\n  });\n  useEffect(function () {\n    // The same strategy for checking if a click occurred inside or outside downsift\n    // as in downshift.js.\n    var onMouseDown = function onMouseDown() {\n      mouseAndTouchTrackersRef.current.isMouseDown = true;\n    };\n\n    var onMouseUp = function onMouseUp(event) {\n      mouseAndTouchTrackersRef.current.isMouseDown = false;\n\n      if (isOpen && !targetWithinDownshift(event.target, downshiftElementRefs.map(function (ref) {\n        return ref.current;\n      }), environment.document)) {\n        handleBlur();\n      }\n    };\n\n    var onTouchStart = function onTouchStart() {\n      mouseAndTouchTrackersRef.current.isTouchMove = false;\n    };\n\n    var onTouchMove = function onTouchMove() {\n      mouseAndTouchTrackersRef.current.isTouchMove = true;\n    };\n\n    var onTouchEnd = function onTouchEnd(event) {\n      if (isOpen && !mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElementRefs.map(function (ref) {\n        return ref.current;\n      }), environment.document, false)) {\n        handleBlur();\n      }\n    };\n\n    environment.addEventListener('mousedown', onMouseDown);\n    environment.addEventListener('mouseup', onMouseUp);\n    environment.addEventListener('touchstart', onTouchStart);\n    environment.addEventListener('touchmove', onTouchMove);\n    environment.addEventListener('touchend', onTouchEnd);\n    return function cleanup() {\n      environment.removeEventListener('mousedown', onMouseDown);\n      environment.removeEventListener('mouseup', onMouseUp);\n      environment.removeEventListener('touchstart', onTouchStart);\n      environment.removeEventListener('touchmove', onTouchMove);\n      environment.removeEventListener('touchend', onTouchEnd);\n    }; // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [isOpen, environment]);\n  return mouseAndTouchTrackersRef;\n}\n/* istanbul ignore next */\n// eslint-disable-next-line import/no-mutable-exports\n\n\nvar useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n  return noop;\n};\n/**\n * Custom hook that checks if getter props are called correctly.\n *\n * @param  {...any} propKeys Getter prop names to be handled.\n * @returns {Function} Setter function called inside getter props to set call information.\n */\n\n/* istanbul ignore next */\n\n\nif (process.env.NODE_ENV !== 'production') {\n  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n    var isInitialMountRef = useRef(true);\n\n    for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {\n      propKeys[_key] = arguments[_key];\n    }\n\n    var getterPropsCalledRef = useRef(propKeys.reduce(function (acc, propKey) {\n      acc[propKey] = {};\n      return acc;\n    }, {}));\n    useEffect(function () {\n      Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {\n        var propCallInfo = getterPropsCalledRef.current[propKey];\n\n        if (isInitialMountRef.current) {\n          if (!Object.keys(propCallInfo).length) {\n            // eslint-disable-next-line no-console\n            console.error(\"downshift: You forgot to call the \" + propKey + \" getter function on your component / element.\");\n            return;\n          }\n        }\n\n        var suppressRefError = propCallInfo.suppressRefError,\n            refKey = propCallInfo.refKey,\n            elementRef = propCallInfo.elementRef;\n\n        if ((!elementRef || !elementRef.current) && !suppressRefError) {\n          // eslint-disable-next-line no-console\n          console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from \" + propKey + \" was not applied correctly on your element.\");\n        }\n      });\n      isInitialMountRef.current = false;\n    });\n    var setGetterPropCallInfo = useCallback(function (propKey, suppressRefError, refKey, elementRef) {\n      getterPropsCalledRef.current[propKey] = {\n        suppressRefError: suppressRefError,\n        refKey: refKey,\n        elementRef: elementRef\n      };\n    }, []);\n    return setGetterPropCallInfo;\n  };\n}\n\nfunction useA11yMessageSetter(getA11yMessage, dependencyArray, _ref2) {\n  var isInitialMount = _ref2.isInitialMount,\n      highlightedIndex = _ref2.highlightedIndex,\n      items = _ref2.items,\n      environment = _ref2.environment,\n      rest = _objectWithoutPropertiesLoose(_ref2, [\"isInitialMount\", \"highlightedIndex\", \"items\", \"environment\"]);\n\n  // Sets a11y status message on changes in state.\n  useEffect(function () {\n    if (isInitialMount) {\n      return;\n    }\n\n    updateA11yStatus(function () {\n      return getA11yMessage(_extends({\n        highlightedIndex: highlightedIndex,\n        highlightedItem: items[highlightedIndex],\n        resultCount: items.length\n      }, rest));\n    }, environment.document); // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencyArray);\n}\n\nfunction useScrollIntoView(_ref3) {\n  var highlightedIndex = _ref3.highlightedIndex,\n      isOpen = _ref3.isOpen,\n      itemRefs = _ref3.itemRefs,\n      getItemNodeFromIndex = _ref3.getItemNodeFromIndex,\n      menuElement = _ref3.menuElement,\n      scrollIntoViewProp = _ref3.scrollIntoView;\n  // used not to scroll on highlight by mouse.\n  var shouldScrollRef = useRef(true); // Scroll on highlighted item if change comes from keyboard.\n\n  useIsomorphicLayoutEffect(function () {\n    if (highlightedIndex < 0 || !isOpen || !Object.keys(itemRefs.current).length) {\n      return;\n    }\n\n    if (shouldScrollRef.current === false) {\n      shouldScrollRef.current = true;\n    } else {\n      scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement);\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  }, [highlightedIndex]);\n  return shouldScrollRef;\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar useControlPropsValidator = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n  useControlPropsValidator = function useControlPropsValidator(_ref4) {\n    var isInitialMount = _ref4.isInitialMount,\n        props = _ref4.props,\n        state = _ref4.state;\n    // used for checking when props are moving from controlled to uncontrolled.\n    var prevPropsRef = useRef(props);\n    useEffect(function () {\n      if (isInitialMount) {\n        return;\n      }\n\n      validateControlledUnchanged(state, prevPropsRef.current, props);\n      prevPropsRef.current = props;\n    }, [state, props, isInitialMount]);\n  };\n}\n\n/* eslint-disable complexity */\n\nfunction downshiftCommonReducer(state, action, stateChangeTypes) {\n  var type = action.type,\n      props = action.props;\n  var changes;\n\n  switch (type) {\n    case stateChangeTypes.ItemMouseMove:\n      changes = {\n        highlightedIndex: action.index\n      };\n      break;\n\n    case stateChangeTypes.MenuMouseLeave:\n      changes = {\n        highlightedIndex: -1\n      };\n      break;\n\n    case stateChangeTypes.ToggleButtonClick:\n    case stateChangeTypes.FunctionToggleMenu:\n      changes = {\n        isOpen: !state.isOpen,\n        highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props, state, 0)\n      };\n      break;\n\n    case stateChangeTypes.FunctionOpenMenu:\n      changes = {\n        isOpen: true,\n        highlightedIndex: getHighlightedIndexOnOpen(props, state, 0)\n      };\n      break;\n\n    case stateChangeTypes.FunctionCloseMenu:\n      changes = {\n        isOpen: false\n      };\n      break;\n\n    case stateChangeTypes.FunctionSetHighlightedIndex:\n      changes = {\n        highlightedIndex: action.highlightedIndex\n      };\n      break;\n\n    case stateChangeTypes.FunctionSetInputValue:\n      changes = {\n        inputValue: action.inputValue\n      };\n      break;\n\n    case stateChangeTypes.FunctionReset:\n      changes = {\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n        isOpen: getDefaultValue(props, 'isOpen'),\n        selectedItem: getDefaultValue(props, 'selectedItem'),\n        inputValue: getDefaultValue(props, 'inputValue')\n      };\n      break;\n\n    default:\n      throw new Error('Reducer called without proper action type.');\n  }\n\n  return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nfunction getItemIndexByCharacterKey(keysSoFar, highlightedIndex, items, itemToString, getItemNodeFromIndex) {\n  var lowerCasedKeysSoFar = keysSoFar.toLowerCase();\n\n  for (var index = 0; index < items.length; index++) {\n    var offsetIndex = (index + highlightedIndex + 1) % items.length;\n\n    if (itemToString(items[offsetIndex]).toLowerCase().startsWith(lowerCasedKeysSoFar)) {\n      var element = getItemNodeFromIndex(offsetIndex);\n\n      if (!(element && element.hasAttribute('disabled'))) {\n        return offsetIndex;\n      }\n    }\n  }\n\n  return highlightedIndex;\n}\n\nvar propTypes = {\n  items: PropTypes.array.isRequired,\n  itemToString: PropTypes.func,\n  getA11yStatusMessage: PropTypes.func,\n  getA11ySelectionMessage: PropTypes.func,\n  circularNavigation: PropTypes.bool,\n  highlightedIndex: PropTypes.number,\n  defaultHighlightedIndex: PropTypes.number,\n  initialHighlightedIndex: PropTypes.number,\n  isOpen: PropTypes.bool,\n  defaultIsOpen: PropTypes.bool,\n  initialIsOpen: PropTypes.bool,\n  selectedItem: PropTypes.any,\n  initialSelectedItem: PropTypes.any,\n  defaultSelectedItem: PropTypes.any,\n  id: PropTypes.string,\n  labelId: PropTypes.string,\n  menuId: PropTypes.string,\n  getItemId: PropTypes.func,\n  toggleButtonId: PropTypes.string,\n  stateReducer: PropTypes.func,\n  onSelectedItemChange: PropTypes.func,\n  onHighlightedIndexChange: PropTypes.func,\n  onStateChange: PropTypes.func,\n  onIsOpenChange: PropTypes.func,\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func,\n    removeEventListener: PropTypes.func,\n    document: PropTypes.shape({\n      getElementById: PropTypes.func,\n      activeElement: PropTypes.any,\n      body: PropTypes.any\n    })\n  })\n};\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\n\nfunction getA11yStatusMessage$1(_ref) {\n  var isOpen = _ref.isOpen,\n      resultCount = _ref.resultCount,\n      previousResultCount = _ref.previousResultCount;\n\n  if (!isOpen) {\n    return '';\n  }\n\n  if (!resultCount) {\n    return 'No results are available.';\n  }\n\n  if (resultCount !== previousResultCount) {\n    return resultCount + \" result\" + (resultCount === 1 ? ' is' : 's are') + \" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.\";\n  }\n\n  return '';\n}\n\nvar defaultProps$1 = _extends({}, defaultProps, {\n  getA11yStatusMessage: getA11yStatusMessage$1\n}); // eslint-disable-next-line import/no-mutable-exports\n\n\nvar validatePropTypes = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n  validatePropTypes = function validatePropTypes(options, caller) {\n    PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name);\n  };\n}\n\nvar MenuKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_arrow_down__' : 0;\nvar MenuKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_arrow_up__' : 1;\nvar MenuKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_escape__' : 2;\nvar MenuKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_home__' : 3;\nvar MenuKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_end__' : 4;\nvar MenuKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_enter__' : 5;\nvar MenuKeyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_space_button__' : 6;\nvar MenuKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_character__' : 7;\nvar MenuBlur = process.env.NODE_ENV !== \"production\" ? '__menu_blur__' : 8;\nvar MenuMouseLeave = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 9;\nvar ItemMouseMove = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 10;\nvar ItemClick = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 11;\nvar ToggleButtonClick = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 12;\nvar ToggleButtonKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_down__' : 13;\nvar ToggleButtonKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_up__' : 14;\nvar ToggleButtonKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_character__' : 15;\nvar FunctionToggleMenu = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 16;\nvar FunctionOpenMenu = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 17;\nvar FunctionCloseMenu = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 18;\nvar FunctionSetHighlightedIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 19;\nvar FunctionSelectItem = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 20;\nvar FunctionSetInputValue = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 21;\nvar FunctionReset = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 22;\n\nvar stateChangeTypes$1 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  MenuKeyDownArrowDown: MenuKeyDownArrowDown,\n  MenuKeyDownArrowUp: MenuKeyDownArrowUp,\n  MenuKeyDownEscape: MenuKeyDownEscape,\n  MenuKeyDownHome: MenuKeyDownHome,\n  MenuKeyDownEnd: MenuKeyDownEnd,\n  MenuKeyDownEnter: MenuKeyDownEnter,\n  MenuKeyDownSpaceButton: MenuKeyDownSpaceButton,\n  MenuKeyDownCharacter: MenuKeyDownCharacter,\n  MenuBlur: MenuBlur,\n  MenuMouseLeave: MenuMouseLeave,\n  ItemMouseMove: ItemMouseMove,\n  ItemClick: ItemClick,\n  ToggleButtonClick: ToggleButtonClick,\n  ToggleButtonKeyDownArrowDown: ToggleButtonKeyDownArrowDown,\n  ToggleButtonKeyDownArrowUp: ToggleButtonKeyDownArrowUp,\n  ToggleButtonKeyDownCharacter: ToggleButtonKeyDownCharacter,\n  FunctionToggleMenu: FunctionToggleMenu,\n  FunctionOpenMenu: FunctionOpenMenu,\n  FunctionCloseMenu: FunctionCloseMenu,\n  FunctionSetHighlightedIndex: FunctionSetHighlightedIndex,\n  FunctionSelectItem: FunctionSelectItem,\n  FunctionSetInputValue: FunctionSetInputValue,\n  FunctionReset: FunctionReset\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftSelectReducer(state, action) {\n  var type = action.type,\n      props = action.props,\n      shiftKey = action.shiftKey;\n  var changes;\n\n  switch (type) {\n    case ItemClick:\n      changes = {\n        isOpen: getDefaultValue(props, 'isOpen'),\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n        selectedItem: props.items[action.index]\n      };\n      break;\n\n    case ToggleButtonKeyDownCharacter:\n      {\n        var lowercasedKey = action.key;\n        var inputValue = \"\" + state.inputValue + lowercasedKey;\n        var itemIndex = getItemIndexByCharacterKey(inputValue, state.selectedItem ? props.items.indexOf(state.selectedItem) : -1, props.items, props.itemToString, action.getItemNodeFromIndex);\n        changes = _extends({\n          inputValue: inputValue\n        }, itemIndex >= 0 && {\n          selectedItem: props.items[itemIndex]\n        });\n      }\n      break;\n\n    case ToggleButtonKeyDownArrowDown:\n      changes = {\n        highlightedIndex: getHighlightedIndexOnOpen(props, state, 1, action.getItemNodeFromIndex),\n        isOpen: true\n      };\n      break;\n\n    case ToggleButtonKeyDownArrowUp:\n      changes = {\n        highlightedIndex: getHighlightedIndexOnOpen(props, state, -1, action.getItemNodeFromIndex),\n        isOpen: true\n      };\n      break;\n\n    case MenuKeyDownEnter:\n    case MenuKeyDownSpaceButton:\n      changes = _extends({\n        isOpen: getDefaultValue(props, 'isOpen'),\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex')\n      }, state.highlightedIndex >= 0 && {\n        selectedItem: props.items[state.highlightedIndex]\n      });\n      break;\n\n    case MenuKeyDownHome:\n      changes = {\n        highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false)\n      };\n      break;\n\n    case MenuKeyDownEnd:\n      changes = {\n        highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false)\n      };\n      break;\n\n    case MenuKeyDownEscape:\n      changes = {\n        isOpen: false,\n        highlightedIndex: -1\n      };\n      break;\n\n    case MenuBlur:\n      changes = {\n        isOpen: false,\n        highlightedIndex: -1\n      };\n      break;\n\n    case MenuKeyDownCharacter:\n      {\n        var _lowercasedKey = action.key;\n\n        var _inputValue = \"\" + state.inputValue + _lowercasedKey;\n\n        var highlightedIndex = getItemIndexByCharacterKey(_inputValue, state.highlightedIndex, props.items, props.itemToString, action.getItemNodeFromIndex);\n        changes = _extends({\n          inputValue: _inputValue\n        }, highlightedIndex >= 0 && {\n          highlightedIndex: highlightedIndex\n        });\n      }\n      break;\n\n    case MenuKeyDownArrowDown:\n      changes = {\n        highlightedIndex: getNextWrappingIndex(shiftKey ? 5 : 1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n      };\n      break;\n\n    case MenuKeyDownArrowUp:\n      changes = {\n        highlightedIndex: getNextWrappingIndex(shiftKey ? -5 : -1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n      };\n      break;\n\n    case FunctionSelectItem:\n      changes = {\n        selectedItem: action.selectedItem\n      };\n      break;\n\n    default:\n      return downshiftCommonReducer(state, action, stateChangeTypes$1);\n  }\n\n  return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nuseSelect.stateChangeTypes = stateChangeTypes$1;\n\nfunction useSelect(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n\n  validatePropTypes(userProps, useSelect); // Props defaults and destructuring.\n\n  var props = _extends({}, defaultProps$1, userProps);\n\n  var items = props.items,\n      scrollIntoView = props.scrollIntoView,\n      environment = props.environment,\n      initialIsOpen = props.initialIsOpen,\n      defaultIsOpen = props.defaultIsOpen,\n      itemToString = props.itemToString,\n      getA11ySelectionMessage = props.getA11ySelectionMessage,\n      getA11yStatusMessage = props.getA11yStatusMessage; // Initial state depending on controlled props.\n\n  var initialState = getInitialState(props);\n\n  var _useControlledReducer = useControlledReducer(downshiftSelectReducer, initialState, props),\n      state = _useControlledReducer[0],\n      dispatch = _useControlledReducer[1];\n\n  var isOpen = state.isOpen,\n      highlightedIndex = state.highlightedIndex,\n      selectedItem = state.selectedItem,\n      inputValue = state.inputValue; // Element efs.\n\n  var toggleButtonRef = useRef(null);\n  var menuRef = useRef(null);\n  var itemRefs = useRef({}); // used not to trigger menu blur action in some scenarios.\n\n  var shouldBlurRef = useRef(true); // used to keep the inputValue clearTimeout object between renders.\n\n  var clearTimeoutRef = useRef(null); // prevent id re-generation between renders.\n\n  var elementIds = useElementIds(props); // used to keep track of how many items we had on previous cycle.\n\n  var previousResultCountRef = useRef();\n  var isInitialMountRef = useRef(true); // utility callback to get item element.\n\n  var latest = useLatestRef({\n    state: state,\n    props: props\n  }); // Some utils.\n\n  var getItemNodeFromIndex = useCallback(function (index) {\n    return itemRefs.current[elementIds.getItemId(index)];\n  }, [elementIds]); // Effects.\n  // Sets a11y status message on changes in state.\n\n  useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], _extends({\n    isInitialMount: isInitialMountRef.current,\n    previousResultCount: previousResultCountRef.current,\n    items: items,\n    environment: environment,\n    itemToString: itemToString\n  }, state)); // Sets a11y status message on changes in selectedItem.\n\n  useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], _extends({\n    isInitialMount: isInitialMountRef.current,\n    previousResultCount: previousResultCountRef.current,\n    items: items,\n    environment: environment,\n    itemToString: itemToString\n  }, state)); // Scroll on highlighted item if change comes from keyboard.\n\n  var shouldScrollRef = useScrollIntoView({\n    menuElement: menuRef.current,\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    itemRefs: itemRefs,\n    scrollIntoView: scrollIntoView,\n    getItemNodeFromIndex: getItemNodeFromIndex\n  }); // Sets cleanup for the keysSoFar after 500ms.\n\n  useEffect(function () {\n    // init the clean function here as we need access to dispatch.\n    if (isInitialMountRef.current) {\n      clearTimeoutRef.current = debounce(function (outerDispatch) {\n        outerDispatch({\n          type: FunctionSetInputValue,\n          inputValue: ''\n        });\n      }, 500);\n    }\n\n    if (!inputValue) {\n      return;\n    }\n\n    clearTimeoutRef.current(dispatch);\n  }, [dispatch, inputValue]);\n  useControlPropsValidator({\n    isInitialMount: isInitialMountRef.current,\n    props: props,\n    state: state\n  });\n  /* Controls the focus on the menu or the toggle button. */\n\n  useEffect(function () {\n    // Don't focus menu on first render.\n    if (isInitialMountRef.current) {\n      // Unless it was initialised as open.\n      if ((initialIsOpen || defaultIsOpen || isOpen) && menuRef.current) {\n        menuRef.current.focus();\n      }\n\n      return;\n    } // Focus menu on open.\n\n\n    if (isOpen) {\n      // istanbul ignore else\n      if (menuRef.current) {\n        menuRef.current.focus();\n      }\n\n      return;\n    } // Focus toggleButton on close, but not if it was closed with (Shift+)Tab.\n\n\n    if (environment.document.activeElement === menuRef.current) {\n      // istanbul ignore else\n      if (toggleButtonRef.current) {\n        shouldBlurRef.current = false;\n        toggleButtonRef.current.focus();\n      }\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  }, [isOpen]);\n  useEffect(function () {\n    if (isInitialMountRef.current) {\n      return;\n    }\n\n    previousResultCountRef.current = items.length;\n  }); // Add mouse/touch events to document.\n\n  var mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [menuRef, toggleButtonRef], environment, function () {\n    dispatch({\n      type: MenuBlur\n    });\n  });\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getMenuProps', 'getToggleButtonProps'); // Make initial ref false.\n\n  useEffect(function () {\n    isInitialMountRef.current = false;\n  }, []); // Reset itemRefs on close.\n\n  useEffect(function () {\n    if (!isOpen) {\n      itemRefs.current = {};\n    }\n  }, [isOpen]); // Event handler functions.\n\n  var toggleButtonKeyDownHandlers = useMemo(function () {\n    return {\n      ArrowDown: function ArrowDown(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownArrowDown,\n          getItemNodeFromIndex: getItemNodeFromIndex,\n          shiftKey: event.shiftKey\n        });\n      },\n      ArrowUp: function ArrowUp(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownArrowUp,\n          getItemNodeFromIndex: getItemNodeFromIndex,\n          shiftKey: event.shiftKey\n        });\n      }\n    };\n  }, [dispatch, getItemNodeFromIndex]);\n  var menuKeyDownHandlers = useMemo(function () {\n    return {\n      ArrowDown: function ArrowDown(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownArrowDown,\n          getItemNodeFromIndex: getItemNodeFromIndex,\n          shiftKey: event.shiftKey\n        });\n      },\n      ArrowUp: function ArrowUp(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownArrowUp,\n          getItemNodeFromIndex: getItemNodeFromIndex,\n          shiftKey: event.shiftKey\n        });\n      },\n      Home: function Home(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownHome,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      End: function End(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownEnd,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      Escape: function Escape() {\n        dispatch({\n          type: MenuKeyDownEscape\n        });\n      },\n      Enter: function Enter(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownEnter\n        });\n      },\n      ' ': function _(event) {\n        event.preventDefault();\n        dispatch({\n          type: MenuKeyDownSpaceButton\n        });\n      }\n    };\n  }, [dispatch, getItemNodeFromIndex]); // Action functions.\n\n  var toggleMenu = useCallback(function () {\n    dispatch({\n      type: FunctionToggleMenu\n    });\n  }, [dispatch]);\n  var closeMenu = useCallback(function () {\n    dispatch({\n      type: FunctionCloseMenu\n    });\n  }, [dispatch]);\n  var openMenu = useCallback(function () {\n    dispatch({\n      type: FunctionOpenMenu\n    });\n  }, [dispatch]);\n  var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n    dispatch({\n      type: FunctionSetHighlightedIndex,\n      highlightedIndex: newHighlightedIndex\n    });\n  }, [dispatch]);\n  var selectItem = useCallback(function (newSelectedItem) {\n    dispatch({\n      type: FunctionSelectItem,\n      selectedItem: newSelectedItem\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset\n    });\n  }, [dispatch]);\n  var setInputValue = useCallback(function (newInputValue) {\n    dispatch({\n      type: FunctionSetInputValue,\n      inputValue: newInputValue\n    });\n  }, [dispatch]); // Getter functions.\n\n  var getLabelProps = useCallback(function (labelProps) {\n    return _extends({\n      id: elementIds.labelId,\n      htmlFor: elementIds.toggleButtonId\n    }, labelProps);\n  }, [elementIds]);\n  var getMenuProps = useCallback(function (_temp, _temp2) {\n    var _extends2;\n\n    var _ref = _temp === void 0 ? {} : _temp,\n        onMouseLeave = _ref.onMouseLeave,\n        _ref$refKey = _ref.refKey,\n        refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n        onKeyDown = _ref.onKeyDown,\n        onBlur = _ref.onBlur,\n        ref = _ref.ref,\n        rest = _objectWithoutPropertiesLoose(_ref, [\"onMouseLeave\", \"refKey\", \"onKeyDown\", \"onBlur\", \"ref\"]);\n\n    var _ref2 = _temp2 === void 0 ? {} : _temp2,\n        _ref2$suppressRefErro = _ref2.suppressRefError,\n        suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n    var latestState = latest.current.state;\n\n    var menuHandleKeyDown = function menuHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n\n      if (key && menuKeyDownHandlers[key]) {\n        menuKeyDownHandlers[key](event);\n      } else if (isAcceptedCharacterKey(key)) {\n        dispatch({\n          type: MenuKeyDownCharacter,\n          key: key,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      }\n    };\n\n    var menuHandleBlur = function menuHandleBlur() {\n      // if the blur was a result of selection, we don't trigger this action.\n      if (shouldBlurRef.current === false) {\n        shouldBlurRef.current = true;\n        return;\n      }\n\n      var shouldBlur = !mouseAndTouchTrackersRef.current.isMouseDown;\n      /* istanbul ignore else */\n\n      if (shouldBlur) {\n        dispatch({\n          type: MenuBlur\n        });\n      }\n    };\n\n    var menuHandleMouseLeave = function menuHandleMouseLeave() {\n      dispatch({\n        type: MenuMouseLeave\n      });\n    };\n\n    setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n      menuRef.current = menuNode;\n    }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-labelledby'] = elementIds.labelId, _extends2.tabIndex = -1, _extends2), latestState.isOpen && latestState.highlightedIndex > -1 && {\n      'aria-activedescendant': elementIds.getItemId(latestState.highlightedIndex)\n    }, {\n      onMouseLeave: callAllEventHandlers(onMouseLeave, menuHandleMouseLeave),\n      onKeyDown: callAllEventHandlers(onKeyDown, menuHandleKeyDown),\n      onBlur: callAllEventHandlers(onBlur, menuHandleBlur)\n    }, rest);\n  }, [dispatch, latest, menuKeyDownHandlers, mouseAndTouchTrackersRef, setGetterPropCallInfo, elementIds, getItemNodeFromIndex]);\n  var getToggleButtonProps = useCallback(function (_temp3, _temp4) {\n    var _extends3;\n\n    var _ref3 = _temp3 === void 0 ? {} : _temp3,\n        onClick = _ref3.onClick,\n        onKeyDown = _ref3.onKeyDown,\n        _ref3$refKey = _ref3.refKey,\n        refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n        ref = _ref3.ref,\n        rest = _objectWithoutPropertiesLoose(_ref3, [\"onClick\", \"onKeyDown\", \"refKey\", \"ref\"]);\n\n    var _ref4 = _temp4 === void 0 ? {} : _temp4,\n        _ref4$suppressRefErro = _ref4.suppressRefError,\n        suppressRefError = _ref4$suppressRefErro === void 0 ? false : _ref4$suppressRefErro;\n\n    var toggleButtonHandleClick = function toggleButtonHandleClick() {\n      dispatch({\n        type: ToggleButtonClick\n      });\n    };\n\n    var toggleButtonHandleKeyDown = function toggleButtonHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n\n      if (key && toggleButtonKeyDownHandlers[key]) {\n        toggleButtonKeyDownHandlers[key](event);\n      } else if (isAcceptedCharacterKey(key)) {\n        dispatch({\n          type: ToggleButtonKeyDownCharacter,\n          key: key,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      }\n    };\n\n    var toggleProps = _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (toggleButtonNode) {\n      toggleButtonRef.current = toggleButtonNode;\n    }), _extends3.id = elementIds.toggleButtonId, _extends3['aria-haspopup'] = 'listbox', _extends3['aria-expanded'] = latest.current.state.isOpen, _extends3['aria-labelledby'] = elementIds.labelId + \" \" + elementIds.toggleButtonId, _extends3), rest);\n\n    if (!rest.disabled) {\n      toggleProps.onClick = callAllEventHandlers(onClick, toggleButtonHandleClick);\n      toggleProps.onKeyDown = callAllEventHandlers(onKeyDown, toggleButtonHandleKeyDown);\n    }\n\n    setGetterPropCallInfo('getToggleButtonProps', suppressRefError, refKey, toggleButtonRef);\n    return toggleProps;\n  }, [dispatch, latest, toggleButtonKeyDownHandlers, setGetterPropCallInfo, elementIds, getItemNodeFromIndex]);\n  var getItemProps = useCallback(function (_temp5) {\n    var _extends4;\n\n    var _ref5 = _temp5 === void 0 ? {} : _temp5,\n        item = _ref5.item,\n        index = _ref5.index,\n        onMouseMove = _ref5.onMouseMove,\n        onClick = _ref5.onClick,\n        _ref5$refKey = _ref5.refKey,\n        refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n        ref = _ref5.ref,\n        rest = _objectWithoutPropertiesLoose(_ref5, [\"item\", \"index\", \"onMouseMove\", \"onClick\", \"refKey\", \"ref\"]);\n\n    var _latest$current = latest.current,\n        latestState = _latest$current.state,\n        latestProps = _latest$current.props;\n\n    var itemHandleMouseMove = function itemHandleMouseMove() {\n      if (index === latestState.highlightedIndex) {\n        return;\n      }\n\n      shouldScrollRef.current = false;\n      dispatch({\n        type: ItemMouseMove,\n        index: index\n      });\n    };\n\n    var itemHandleClick = function itemHandleClick() {\n      dispatch({\n        type: ItemClick,\n        index: index\n      });\n    };\n\n    var itemIndex = getItemIndex(index, item, latestProps.items);\n\n    if (itemIndex < 0) {\n      throw new Error('Pass either item or item index in getItemProps!');\n    }\n\n    var itemProps = _extends((_extends4 = {\n      role: 'option',\n      'aria-selected': \"\" + (itemIndex === latestState.highlightedIndex),\n      id: elementIds.getItemId(itemIndex)\n    }, _extends4[refKey] = handleRefs(ref, function (itemNode) {\n      if (itemNode) {\n        itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n      }\n    }), _extends4), rest);\n\n    if (!rest.disabled) {\n      itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove);\n      itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick);\n    }\n\n    return itemProps;\n  }, [dispatch, latest, shouldScrollRef, elementIds]);\n  return {\n    // prop getters.\n    getToggleButtonProps: getToggleButtonProps,\n    getLabelProps: getLabelProps,\n    getMenuProps: getMenuProps,\n    getItemProps: getItemProps,\n    // actions.\n    toggleMenu: toggleMenu,\n    openMenu: openMenu,\n    closeMenu: closeMenu,\n    setHighlightedIndex: setHighlightedIndex,\n    selectItem: selectItem,\n    reset: reset,\n    setInputValue: setInputValue,\n    // state.\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\nvar InputKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_down__' : 0;\nvar InputKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_up__' : 1;\nvar InputKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__input_keydown_escape__' : 2;\nvar InputKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__input_keydown_home__' : 3;\nvar InputKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__input_keydown_end__' : 4;\nvar InputKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__input_keydown_enter__' : 5;\nvar InputChange = process.env.NODE_ENV !== \"production\" ? '__input_change__' : 6;\nvar InputBlur = process.env.NODE_ENV !== \"production\" ? '__input_blur__' : 7;\nvar MenuMouseLeave$1 = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 8;\nvar ItemMouseMove$1 = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 9;\nvar ItemClick$1 = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 10;\nvar ToggleButtonClick$1 = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 11;\nvar FunctionToggleMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 12;\nvar FunctionOpenMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 13;\nvar FunctionCloseMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 14;\nvar FunctionSetHighlightedIndex$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 15;\nvar FunctionSelectItem$1 = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 16;\nvar FunctionSetInputValue$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 17;\nvar FunctionReset$1 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 18;\nvar ControlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__controlled_prop_updated_selected_item__' : 19;\n\nvar stateChangeTypes$2 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  InputKeyDownArrowDown: InputKeyDownArrowDown,\n  InputKeyDownArrowUp: InputKeyDownArrowUp,\n  InputKeyDownEscape: InputKeyDownEscape,\n  InputKeyDownHome: InputKeyDownHome,\n  InputKeyDownEnd: InputKeyDownEnd,\n  InputKeyDownEnter: InputKeyDownEnter,\n  InputChange: InputChange,\n  InputBlur: InputBlur,\n  MenuMouseLeave: MenuMouseLeave$1,\n  ItemMouseMove: ItemMouseMove$1,\n  ItemClick: ItemClick$1,\n  ToggleButtonClick: ToggleButtonClick$1,\n  FunctionToggleMenu: FunctionToggleMenu$1,\n  FunctionOpenMenu: FunctionOpenMenu$1,\n  FunctionCloseMenu: FunctionCloseMenu$1,\n  FunctionSetHighlightedIndex: FunctionSetHighlightedIndex$1,\n  FunctionSelectItem: FunctionSelectItem$1,\n  FunctionSetInputValue: FunctionSetInputValue$1,\n  FunctionReset: FunctionReset$1,\n  ControlledPropUpdatedSelectedItem: ControlledPropUpdatedSelectedItem\n});\n\nfunction getInitialState$1(props) {\n  var initialState = getInitialState(props);\n  var selectedItem = initialState.selectedItem;\n  var inputValue = initialState.inputValue;\n\n  if (inputValue === '' && selectedItem && props.defaultInputValue === undefined && props.initialInputValue === undefined && props.inputValue === undefined) {\n    inputValue = props.itemToString(selectedItem);\n  }\n\n  return _extends({}, initialState, {\n    inputValue: inputValue\n  });\n}\n\nvar propTypes$1 = {\n  items: PropTypes.array.isRequired,\n  itemToString: PropTypes.func,\n  getA11yStatusMessage: PropTypes.func,\n  getA11ySelectionMessage: PropTypes.func,\n  circularNavigation: PropTypes.bool,\n  highlightedIndex: PropTypes.number,\n  defaultHighlightedIndex: PropTypes.number,\n  initialHighlightedIndex: PropTypes.number,\n  isOpen: PropTypes.bool,\n  defaultIsOpen: PropTypes.bool,\n  initialIsOpen: PropTypes.bool,\n  selectedItem: PropTypes.any,\n  initialSelectedItem: PropTypes.any,\n  defaultSelectedItem: PropTypes.any,\n  inputValue: PropTypes.string,\n  defaultInputValue: PropTypes.string,\n  initialInputValue: PropTypes.string,\n  id: PropTypes.string,\n  labelId: PropTypes.string,\n  menuId: PropTypes.string,\n  getItemId: PropTypes.func,\n  inputId: PropTypes.string,\n  toggleButtonId: PropTypes.string,\n  stateReducer: PropTypes.func,\n  onSelectedItemChange: PropTypes.func,\n  onHighlightedIndexChange: PropTypes.func,\n  onStateChange: PropTypes.func,\n  onIsOpenChange: PropTypes.func,\n  onInputValueChange: PropTypes.func,\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func,\n    removeEventListener: PropTypes.func,\n    document: PropTypes.shape({\n      getElementById: PropTypes.func,\n      activeElement: PropTypes.any,\n      body: PropTypes.any\n    })\n  })\n};\n/**\n * The useCombobox version of useControlledReducer, which also\n * checks if the controlled prop selectedItem changed between\n * renders. If so, it will also update inputValue with its\n * string equivalent. It uses the common useEnhancedReducer to\n * compute the rest of the state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\nfunction useControlledReducer$1(reducer, initialState, props) {\n  var previousSelectedItemRef = useRef();\n\n  var _useEnhancedReducer = useEnhancedReducer(reducer, initialState, props),\n      state = _useEnhancedReducer[0],\n      dispatch = _useEnhancedReducer[1]; // ToDo: if needed, make same approach as selectedItemChanged from Downshift.\n\n\n  useEffect(function () {\n    if (isControlledProp(props, 'selectedItem')) {\n      if (previousSelectedItemRef.current !== props.selectedItem) {\n        dispatch({\n          type: ControlledPropUpdatedSelectedItem,\n          inputValue: props.itemToString(props.selectedItem)\n        });\n      }\n\n      previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;\n    }\n  });\n  return [getState(state, props), dispatch];\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar validatePropTypes$1 = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n  validatePropTypes$1 = function validatePropTypes(options, caller) {\n    PropTypes.checkPropTypes(propTypes$1, options, 'prop', caller.name);\n  };\n}\n\nvar defaultProps$2 = _extends({}, defaultProps, {\n  getA11yStatusMessage: getA11yStatusMessage,\n  circularNavigation: true\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftUseComboboxReducer(state, action) {\n  var type = action.type,\n      props = action.props,\n      shiftKey = action.shiftKey;\n  var changes;\n\n  switch (type) {\n    case ItemClick$1:\n      changes = {\n        isOpen: getDefaultValue(props, 'isOpen'),\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n        selectedItem: props.items[action.index],\n        inputValue: props.itemToString(props.items[action.index])\n      };\n      break;\n\n    case InputKeyDownArrowDown:\n      if (state.isOpen) {\n        changes = {\n          highlightedIndex: getNextWrappingIndex(shiftKey ? 5 : 1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n        };\n      } else {\n        changes = {\n          highlightedIndex: getHighlightedIndexOnOpen(props, state, 1, action.getItemNodeFromIndex),\n          isOpen: props.items.length >= 0\n        };\n      }\n\n      break;\n\n    case InputKeyDownArrowUp:\n      if (state.isOpen) {\n        changes = {\n          highlightedIndex: getNextWrappingIndex(shiftKey ? -5 : -1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n        };\n      } else {\n        changes = {\n          highlightedIndex: getHighlightedIndexOnOpen(props, state, -1, action.getItemNodeFromIndex),\n          isOpen: props.items.length >= 0\n        };\n      }\n\n      break;\n\n    case InputKeyDownEnter:\n      changes = _extends({}, state.isOpen && state.highlightedIndex >= 0 && {\n        selectedItem: props.items[state.highlightedIndex],\n        isOpen: getDefaultValue(props, 'isOpen'),\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n        inputValue: props.itemToString(props.items[state.highlightedIndex])\n      });\n      break;\n\n    case InputKeyDownEscape:\n      changes = _extends({\n        isOpen: false,\n        highlightedIndex: -1\n      }, !state.isOpen && {\n        selectedItem: null,\n        inputValue: ''\n      });\n      break;\n\n    case InputKeyDownHome:\n      changes = {\n        highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false)\n      };\n      break;\n\n    case InputKeyDownEnd:\n      changes = {\n        highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false)\n      };\n      break;\n\n    case InputBlur:\n      changes = _extends({\n        isOpen: false,\n        highlightedIndex: -1\n      }, state.highlightedIndex >= 0 && action.selectItem && {\n        selectedItem: props.items[state.highlightedIndex],\n        inputValue: props.itemToString(props.items[state.highlightedIndex])\n      });\n      break;\n\n    case InputChange:\n      changes = {\n        isOpen: true,\n        highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n        inputValue: action.inputValue\n      };\n      break;\n\n    case FunctionSelectItem$1:\n      changes = {\n        selectedItem: action.selectedItem,\n        inputValue: props.itemToString(action.selectedItem)\n      };\n      break;\n\n    case ControlledPropUpdatedSelectedItem:\n      changes = {\n        inputValue: action.inputValue\n      };\n      break;\n\n    default:\n      return downshiftCommonReducer(state, action, stateChangeTypes$2);\n  }\n\n  return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nuseCombobox.stateChangeTypes = stateChangeTypes$2;\n\nfunction useCombobox(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n\n  validatePropTypes$1(userProps, useCombobox); // Props defaults and destructuring.\n\n  var props = _extends({}, defaultProps$2, userProps);\n\n  var initialIsOpen = props.initialIsOpen,\n      defaultIsOpen = props.defaultIsOpen,\n      items = props.items,\n      scrollIntoView = props.scrollIntoView,\n      environment = props.environment,\n      getA11yStatusMessage = props.getA11yStatusMessage,\n      getA11ySelectionMessage = props.getA11ySelectionMessage,\n      itemToString = props.itemToString; // Initial state depending on controlled props.\n\n  var initialState = getInitialState$1(props);\n\n  var _useControlledReducer = useControlledReducer$1(downshiftUseComboboxReducer, initialState, props),\n      state = _useControlledReducer[0],\n      dispatch = _useControlledReducer[1];\n\n  var isOpen = state.isOpen,\n      highlightedIndex = state.highlightedIndex,\n      selectedItem = state.selectedItem,\n      inputValue = state.inputValue; // Element refs.\n\n  var menuRef = useRef(null);\n  var itemRefs = useRef({});\n  var inputRef = useRef(null);\n  var toggleButtonRef = useRef(null);\n  var comboboxRef = useRef(null);\n  var isInitialMountRef = useRef(true); // prevent id re-generation between renders.\n\n  var elementIds = useElementIds(props); // used to keep track of how many items we had on previous cycle.\n\n  var previousResultCountRef = useRef(); // utility callback to get item element.\n\n  var latest = useLatestRef({\n    state: state,\n    props: props\n  });\n  var getItemNodeFromIndex = useCallback(function (index) {\n    return itemRefs.current[elementIds.getItemId(index)];\n  }, [elementIds]); // Effects.\n  // Sets a11y status message on changes in state.\n\n  useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], _extends({\n    isInitialMount: isInitialMountRef.current,\n    previousResultCount: previousResultCountRef.current,\n    items: items,\n    environment: environment,\n    itemToString: itemToString\n  }, state)); // Sets a11y status message on changes in selectedItem.\n\n  useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], _extends({\n    isInitialMount: isInitialMountRef.current,\n    previousResultCount: previousResultCountRef.current,\n    items: items,\n    environment: environment,\n    itemToString: itemToString\n  }, state)); // Scroll on highlighted item if change comes from keyboard.\n\n  var shouldScrollRef = useScrollIntoView({\n    menuElement: menuRef.current,\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    itemRefs: itemRefs,\n    scrollIntoView: scrollIntoView,\n    getItemNodeFromIndex: getItemNodeFromIndex\n  });\n  useControlPropsValidator({\n    isInitialMount: isInitialMountRef.current,\n    props: props,\n    state: state\n  }); // Focus the input on first render if required.\n\n  useEffect(function () {\n    var focusOnOpen = initialIsOpen || defaultIsOpen || isOpen;\n\n    if (focusOnOpen && inputRef.current) {\n      inputRef.current.focus();\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  }, []);\n  useEffect(function () {\n    if (isInitialMountRef.current) {\n      return;\n    }\n\n    previousResultCountRef.current = items.length;\n  }); // Add mouse/touch events to document.\n\n  var mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [comboboxRef, menuRef, toggleButtonRef], environment, function () {\n    dispatch({\n      type: InputBlur,\n      selectItem: false\n    });\n  });\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getInputProps', 'getComboboxProps', 'getMenuProps'); // Make initial ref false.\n\n  useEffect(function () {\n    isInitialMountRef.current = false;\n  }, []); // Reset itemRefs on close.\n\n  useEffect(function () {\n    if (!isOpen) {\n      itemRefs.current = {};\n    }\n  }, [isOpen]);\n  /* Event handler functions */\n\n  var inputKeyDownHandlers = useMemo(function () {\n    return {\n      ArrowDown: function ArrowDown(event) {\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownArrowDown,\n          shiftKey: event.shiftKey,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      ArrowUp: function ArrowUp(event) {\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownArrowUp,\n          shiftKey: event.shiftKey,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      Home: function Home(event) {\n        if (!latest.current.state.isOpen) {\n          return;\n        }\n\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownHome,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      End: function End(event) {\n        if (!latest.current.state.isOpen) {\n          return;\n        }\n\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownEnd,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      },\n      Escape: function Escape() {\n        var latestState = latest.current.state;\n\n        if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) {\n          dispatch({\n            type: InputKeyDownEscape\n          });\n        }\n      },\n      Enter: function Enter(event) {\n        var latestState = latest.current.state; // if closed or no highlighted index, do nothing.\n\n        if (!latestState.isOpen || latestState.highlightedIndex < 0 || event.which === 229 // if IME composing, wait for next Enter keydown event.\n        ) {\n            return;\n          }\n\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownEnter,\n          getItemNodeFromIndex: getItemNodeFromIndex\n        });\n      }\n    };\n  }, [dispatch, latest, getItemNodeFromIndex]); // Getter props.\n\n  var getLabelProps = useCallback(function (labelProps) {\n    return _extends({\n      id: elementIds.labelId,\n      htmlFor: elementIds.inputId\n    }, labelProps);\n  }, [elementIds]);\n  var getMenuProps = useCallback(function (_temp, _temp2) {\n    var _extends2;\n\n    var _ref = _temp === void 0 ? {} : _temp,\n        onMouseLeave = _ref.onMouseLeave,\n        _ref$refKey = _ref.refKey,\n        refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n        ref = _ref.ref,\n        rest = _objectWithoutPropertiesLoose(_ref, [\"onMouseLeave\", \"refKey\", \"ref\"]);\n\n    var _ref2 = _temp2 === void 0 ? {} : _temp2,\n        _ref2$suppressRefErro = _ref2.suppressRefError,\n        suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n    setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n      menuRef.current = menuNode;\n    }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-labelledby'] = elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, function () {\n      dispatch({\n        type: MenuMouseLeave$1\n      });\n    }), _extends2), rest);\n  }, [dispatch, setGetterPropCallInfo, elementIds]);\n  var getItemProps = useCallback(function (_temp3) {\n    var _extends3, _ref4;\n\n    var _ref3 = _temp3 === void 0 ? {} : _temp3,\n        item = _ref3.item,\n        index = _ref3.index,\n        _ref3$refKey = _ref3.refKey,\n        refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n        ref = _ref3.ref,\n        onMouseMove = _ref3.onMouseMove,\n        onClick = _ref3.onClick,\n        onPress = _ref3.onPress,\n        rest = _objectWithoutPropertiesLoose(_ref3, [\"item\", \"index\", \"refKey\", \"ref\", \"onMouseMove\", \"onClick\", \"onPress\"]);\n\n    var _latest$current = latest.current,\n        latestProps = _latest$current.props,\n        latestState = _latest$current.state;\n    var itemIndex = getItemIndex(index, item, latestProps.items);\n\n    if (itemIndex < 0) {\n      throw new Error('Pass either item or item index in getItemProps!');\n    }\n\n    var onSelectKey =  'onClick';\n    var customClickHandler =  onClick;\n\n    var itemHandleMouseMove = function itemHandleMouseMove() {\n      if (index === latestState.highlightedIndex) {\n        return;\n      }\n\n      shouldScrollRef.current = false;\n      dispatch({\n        type: ItemMouseMove$1,\n        index: index\n      });\n    };\n\n    var itemHandleClick = function itemHandleClick() {\n      dispatch({\n        type: ItemClick$1,\n        index: index\n      });\n\n      if (inputRef.current) {\n        inputRef.current.focus();\n      }\n    };\n\n    return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (itemNode) {\n      if (itemNode) {\n        itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n      }\n    }), _extends3.role = 'option', _extends3['aria-selected'] = \"\" + (itemIndex === latestState.highlightedIndex), _extends3.id = elementIds.getItemId(itemIndex), _extends3), !rest.disabled && (_ref4 = {\n      onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove)\n    }, _ref4[onSelectKey] = callAllEventHandlers(customClickHandler, itemHandleClick), _ref4), rest);\n  }, [dispatch, latest, shouldScrollRef, elementIds]);\n  var getToggleButtonProps = useCallback(function (_temp4) {\n    var _extends4;\n\n    var _ref5 = _temp4 === void 0 ? {} : _temp4,\n        onClick = _ref5.onClick,\n        onPress = _ref5.onPress,\n        _ref5$refKey = _ref5.refKey,\n        refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n        ref = _ref5.ref,\n        rest = _objectWithoutPropertiesLoose(_ref5, [\"onClick\", \"onPress\", \"refKey\", \"ref\"]);\n\n    var toggleButtonHandleClick = function toggleButtonHandleClick() {\n      dispatch({\n        type: ToggleButtonClick$1\n      });\n\n      if (!latest.current.state.isOpen && inputRef.current) {\n        inputRef.current.focus();\n      }\n    };\n\n    return _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (toggleButtonNode) {\n      toggleButtonRef.current = toggleButtonNode;\n    }), _extends4.id = elementIds.toggleButtonId, _extends4.tabIndex = -1, _extends4), !rest.disabled && _extends({},  {\n      onClick: callAllEventHandlers(onClick, toggleButtonHandleClick)\n    }), rest);\n  }, [dispatch, latest, elementIds]);\n  var getInputProps = useCallback(function (_temp5, _temp6) {\n    var _extends5;\n\n    var _ref6 = _temp5 === void 0 ? {} : _temp5,\n        onKeyDown = _ref6.onKeyDown,\n        onChange = _ref6.onChange,\n        onInput = _ref6.onInput,\n        onBlur = _ref6.onBlur,\n        onChangeText = _ref6.onChangeText,\n        _ref6$refKey = _ref6.refKey,\n        refKey = _ref6$refKey === void 0 ? 'ref' : _ref6$refKey,\n        ref = _ref6.ref,\n        rest = _objectWithoutPropertiesLoose(_ref6, [\"onKeyDown\", \"onChange\", \"onInput\", \"onBlur\", \"onChangeText\", \"refKey\", \"ref\"]);\n\n    var _ref7 = _temp6 === void 0 ? {} : _temp6,\n        _ref7$suppressRefErro = _ref7.suppressRefError,\n        suppressRefError = _ref7$suppressRefErro === void 0 ? false : _ref7$suppressRefErro;\n\n    setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef);\n    var latestState = latest.current.state;\n\n    var inputHandleKeyDown = function inputHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n\n      if (key && inputKeyDownHandlers[key]) {\n        inputKeyDownHandlers[key](event);\n      }\n    };\n\n    var inputHandleChange = function inputHandleChange(event) {\n      dispatch({\n        type: InputChange,\n        inputValue:  event.target.value\n      });\n    };\n\n    var inputHandleBlur = function inputHandleBlur() {\n      /* istanbul ignore else */\n      if (latestState.isOpen && !mouseAndTouchTrackersRef.current.isMouseDown) {\n        dispatch({\n          type: InputBlur,\n          selectItem: true\n        });\n      }\n    };\n    /* istanbul ignore next (preact) */\n\n\n    var onChangeKey =  'onChange';\n    var eventHandlers = {};\n\n    if (!rest.disabled) {\n      var _eventHandlers;\n\n      eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, inputHandleBlur), _eventHandlers);\n    }\n\n    return _extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function (inputNode) {\n      inputRef.current = inputNode;\n    }), _extends5.id = elementIds.inputId, _extends5['aria-autocomplete'] = 'list', _extends5['aria-controls'] = elementIds.menuId, _extends5), latestState.isOpen && latestState.highlightedIndex > -1 && {\n      'aria-activedescendant': elementIds.getItemId(latestState.highlightedIndex)\n    }, {\n      'aria-labelledby': elementIds.labelId,\n      // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n      // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n      autoComplete: 'off',\n      value: latestState.inputValue\n    }, eventHandlers, rest);\n  }, [dispatch, inputKeyDownHandlers, latest, mouseAndTouchTrackersRef, setGetterPropCallInfo, elementIds]);\n  var getComboboxProps = useCallback(function (_temp7, _temp8) {\n    var _extends6;\n\n    var _ref8 = _temp7 === void 0 ? {} : _temp7,\n        _ref8$refKey = _ref8.refKey,\n        refKey = _ref8$refKey === void 0 ? 'ref' : _ref8$refKey,\n        ref = _ref8.ref,\n        rest = _objectWithoutPropertiesLoose(_ref8, [\"refKey\", \"ref\"]);\n\n    var _ref9 = _temp8 === void 0 ? {} : _temp8,\n        _ref9$suppressRefErro = _ref9.suppressRefError,\n        suppressRefError = _ref9$suppressRefErro === void 0 ? false : _ref9$suppressRefErro;\n\n    setGetterPropCallInfo('getComboboxProps', suppressRefError, refKey, comboboxRef);\n    return _extends((_extends6 = {}, _extends6[refKey] = handleRefs(ref, function (comboboxNode) {\n      comboboxRef.current = comboboxNode;\n    }), _extends6.role = 'combobox', _extends6['aria-haspopup'] = 'listbox', _extends6['aria-owns'] = elementIds.menuId, _extends6['aria-expanded'] = latest.current.state.isOpen, _extends6), rest);\n  }, [latest, setGetterPropCallInfo, elementIds]); // returns\n\n  var toggleMenu = useCallback(function () {\n    dispatch({\n      type: FunctionToggleMenu$1\n    });\n  }, [dispatch]);\n  var closeMenu = useCallback(function () {\n    dispatch({\n      type: FunctionCloseMenu$1\n    });\n  }, [dispatch]);\n  var openMenu = useCallback(function () {\n    dispatch({\n      type: FunctionOpenMenu$1\n    });\n  }, [dispatch]);\n  var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n    dispatch({\n      type: FunctionSetHighlightedIndex$1,\n      highlightedIndex: newHighlightedIndex\n    });\n  }, [dispatch]);\n  var selectItem = useCallback(function (newSelectedItem) {\n    dispatch({\n      type: FunctionSelectItem$1,\n      selectedItem: newSelectedItem\n    });\n  }, [dispatch]);\n  var setInputValue = useCallback(function (newInputValue) {\n    dispatch({\n      type: FunctionSetInputValue$1,\n      inputValue: newInputValue\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset$1\n    });\n  }, [dispatch]);\n  return {\n    // prop getters.\n    getItemProps: getItemProps,\n    getLabelProps: getLabelProps,\n    getMenuProps: getMenuProps,\n    getInputProps: getInputProps,\n    getComboboxProps: getComboboxProps,\n    getToggleButtonProps: getToggleButtonProps,\n    // actions.\n    toggleMenu: toggleMenu,\n    openMenu: openMenu,\n    closeMenu: closeMenu,\n    setHighlightedIndex: setHighlightedIndex,\n    setInputValue: setInputValue,\n    selectItem: selectItem,\n    reset: reset,\n    // state.\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\nvar defaultStateValues = {\n  activeIndex: -1,\n  selectedItems: []\n};\n/**\n * Returns the initial value for a state key in the following order:\n * 1. controlled prop, 2. initial prop, 3. default prop, 4. default\n * value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\n\nfunction getInitialValue$1(props, propKey) {\n  return getInitialValue(props, propKey, defaultStateValues);\n}\n/**\n * Returns the default value for a state key in the following order:\n * 1. controlled prop, 2. default prop, 3. default value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\n\n\nfunction getDefaultValue$1(props, propKey) {\n  return getDefaultValue(props, propKey, defaultStateValues);\n}\n/**\n * Gets the initial state based on the provided props. It uses initial, default\n * and controlled props related to state in order to compute the initial value.\n *\n * @param {Object} props Props passed to the hook.\n * @returns {Object} The initial state.\n */\n\n\nfunction getInitialState$2(props) {\n  var activeIndex = getInitialValue$1(props, 'activeIndex');\n  var selectedItems = getInitialValue$1(props, 'selectedItems');\n  return {\n    activeIndex: activeIndex,\n    selectedItems: selectedItems\n  };\n}\n/**\n * Returns true if dropdown keydown operation is permitted. Should not be\n * allowed on keydown with modifier keys (ctrl, alt, shift, meta), on\n * input element with text content that is either highlighted or selection\n * cursor is not at the starting position.\n *\n * @param {KeyboardEvent} event The event from keydown.\n * @returns {boolean} Whether the operation is allowed.\n */\n\n\nfunction isKeyDownOperationPermitted(event) {\n  if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n    return false;\n  }\n\n  var element = event.target;\n\n  if (element instanceof HTMLInputElement && // if element is a text input\n  element.value !== '' && ( // and we have text in it\n  // and cursor is either not at the start or is currently highlighting text.\n  element.selectionStart !== 0 || element.selectionEnd !== 0)) {\n    return false;\n  }\n\n  return true;\n}\n/**\n * Returns a message to be added to aria-live region when item is removed.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\n\n\nfunction getA11yRemovalMessage(selectionParameters) {\n  var removedSelectedItem = selectionParameters.removedSelectedItem,\n      itemToStringLocal = selectionParameters.itemToString;\n  return itemToStringLocal(removedSelectedItem) + \" has been removed.\";\n}\n\nvar propTypes$2 = {\n  selectedItems: PropTypes.array,\n  initialSelectedItems: PropTypes.array,\n  defaultSelectedItems: PropTypes.array,\n  itemToString: PropTypes.func,\n  getA11yRemovalMessage: PropTypes.func,\n  stateReducer: PropTypes.func,\n  activeIndex: PropTypes.number,\n  initialActiveIndex: PropTypes.number,\n  defaultActiveIndex: PropTypes.number,\n  onActiveIndexChange: PropTypes.func,\n  onSelectedItemsChange: PropTypes.func,\n  keyNavigationNext: PropTypes.string,\n  keyNavigationPrevious: PropTypes.string,\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func,\n    removeEventListener: PropTypes.func,\n    document: PropTypes.shape({\n      getElementById: PropTypes.func,\n      activeElement: PropTypes.any,\n      body: PropTypes.any\n    })\n  })\n};\nvar defaultProps$3 = {\n  itemToString: defaultProps.itemToString,\n  stateReducer: defaultProps.stateReducer,\n  environment: defaultProps.environment,\n  getA11yRemovalMessage: getA11yRemovalMessage,\n  keyNavigationNext: 'ArrowRight',\n  keyNavigationPrevious: 'ArrowLeft'\n}; // eslint-disable-next-line import/no-mutable-exports\n\nvar validatePropTypes$2 = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n  validatePropTypes$2 = function validatePropTypes(options, caller) {\n    PropTypes.checkPropTypes(propTypes$2, options, 'prop', caller.name);\n  };\n}\n\nvar SelectedItemClick = process.env.NODE_ENV !== \"production\" ? '__selected_item_click__' : 0;\nvar SelectedItemKeyDownDelete = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_delete__' : 1;\nvar SelectedItemKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_backspace__' : 2;\nvar SelectedItemKeyDownNavigationNext = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_next__' : 3;\nvar SelectedItemKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_previous__' : 4;\nvar DropdownKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_navigation_previous__' : 5;\nvar DropdownKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_backspace__' : 6;\nvar DropdownClick = process.env.NODE_ENV !== \"production\" ? '__dropdown_click__' : 7;\nvar FunctionAddSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_add_selected_item__' : 8;\nvar FunctionRemoveSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_remove_selected_item__' : 9;\nvar FunctionSetSelectedItems = process.env.NODE_ENV !== \"production\" ? '__function_set_selected_items__' : 10;\nvar FunctionSetActiveIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_active_index__' : 11;\nvar FunctionReset$2 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 12;\n\nvar stateChangeTypes$3 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  SelectedItemClick: SelectedItemClick,\n  SelectedItemKeyDownDelete: SelectedItemKeyDownDelete,\n  SelectedItemKeyDownBackspace: SelectedItemKeyDownBackspace,\n  SelectedItemKeyDownNavigationNext: SelectedItemKeyDownNavigationNext,\n  SelectedItemKeyDownNavigationPrevious: SelectedItemKeyDownNavigationPrevious,\n  DropdownKeyDownNavigationPrevious: DropdownKeyDownNavigationPrevious,\n  DropdownKeyDownBackspace: DropdownKeyDownBackspace,\n  DropdownClick: DropdownClick,\n  FunctionAddSelectedItem: FunctionAddSelectedItem,\n  FunctionRemoveSelectedItem: FunctionRemoveSelectedItem,\n  FunctionSetSelectedItems: FunctionSetSelectedItems,\n  FunctionSetActiveIndex: FunctionSetActiveIndex,\n  FunctionReset: FunctionReset$2\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftMultipleSelectionReducer(state, action) {\n  var type = action.type,\n      index = action.index,\n      props = action.props,\n      selectedItem = action.selectedItem;\n  var activeIndex = state.activeIndex,\n      selectedItems = state.selectedItems;\n  var changes;\n\n  switch (type) {\n    case SelectedItemClick:\n      changes = {\n        activeIndex: index\n      };\n      break;\n\n    case SelectedItemKeyDownNavigationPrevious:\n      changes = {\n        activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1\n      };\n      break;\n\n    case SelectedItemKeyDownNavigationNext:\n      changes = {\n        activeIndex: activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1\n      };\n      break;\n\n    case SelectedItemKeyDownBackspace:\n    case SelectedItemKeyDownDelete:\n      {\n        var newActiveIndex = activeIndex;\n\n        if (selectedItems.length === 1) {\n          newActiveIndex = -1;\n        } else if (activeIndex === selectedItems.length - 1) {\n          newActiveIndex = selectedItems.length - 2;\n        }\n\n        changes = _extends({\n          selectedItems: [].concat(selectedItems.slice(0, activeIndex), selectedItems.slice(activeIndex + 1))\n        }, {\n          activeIndex: newActiveIndex\n        });\n        break;\n      }\n\n    case DropdownKeyDownNavigationPrevious:\n      changes = {\n        activeIndex: selectedItems.length - 1\n      };\n      break;\n\n    case DropdownKeyDownBackspace:\n      changes = {\n        selectedItems: selectedItems.slice(0, selectedItems.length - 1)\n      };\n      break;\n\n    case FunctionAddSelectedItem:\n      changes = {\n        selectedItems: [].concat(selectedItems, [selectedItem])\n      };\n      break;\n\n    case DropdownClick:\n      changes = {\n        activeIndex: -1\n      };\n      break;\n\n    case FunctionRemoveSelectedItem:\n      {\n        var _newActiveIndex = activeIndex;\n        var selectedItemIndex = selectedItems.indexOf(selectedItem);\n\n        if (selectedItems.length === 1) {\n          _newActiveIndex = -1;\n        } else if (selectedItemIndex === selectedItems.length - 1) {\n          _newActiveIndex = selectedItems.length - 2;\n        }\n\n        changes = _extends({\n          selectedItems: [].concat(selectedItems.slice(0, selectedItemIndex), selectedItems.slice(selectedItemIndex + 1))\n        }, {\n          activeIndex: _newActiveIndex\n        });\n        break;\n      }\n\n    case FunctionSetSelectedItems:\n      {\n        var newSelectedItems = action.selectedItems;\n        changes = {\n          selectedItems: newSelectedItems\n        };\n        break;\n      }\n\n    case FunctionSetActiveIndex:\n      {\n        var _newActiveIndex2 = action.activeIndex;\n        changes = {\n          activeIndex: _newActiveIndex2\n        };\n        break;\n      }\n\n    case FunctionReset$2:\n      changes = {\n        activeIndex: getDefaultValue$1(props, 'activeIndex'),\n        selectedItems: getDefaultValue$1(props, 'selectedItems')\n      };\n      break;\n\n    default:\n      throw new Error('Reducer called without proper action type.');\n  }\n\n  return _extends({}, state, changes);\n}\n\nuseMultipleSelection.stateChangeTypes = stateChangeTypes$3;\n\nfunction useMultipleSelection(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n\n  validatePropTypes$2(userProps, useMultipleSelection); // Props defaults and destructuring.\n\n  var props = _extends({}, defaultProps$3, userProps);\n\n  var getA11yRemovalMessage = props.getA11yRemovalMessage,\n      itemToString = props.itemToString,\n      environment = props.environment,\n      keyNavigationNext = props.keyNavigationNext,\n      keyNavigationPrevious = props.keyNavigationPrevious; // Reducer init.\n\n  var _useControlledReducer = useControlledReducer(downshiftMultipleSelectionReducer, getInitialState$2(props), props),\n      state = _useControlledReducer[0],\n      dispatch = _useControlledReducer[1];\n\n  var activeIndex = state.activeIndex,\n      selectedItems = state.selectedItems; // Refs.\n\n  var isInitialMountRef = useRef(true);\n  var dropdownRef = useRef(null);\n  var previousSelectedItemsRef = useRef(selectedItems);\n  var selectedItemRefs = useRef();\n  selectedItemRefs.current = [];\n  var latest = useLatestRef({\n    state: state,\n    props: props\n  }); // Effects.\n\n  /* Sets a11y status message on changes in selectedItem. */\n\n  useEffect(function () {\n    if (isInitialMountRef.current) {\n      return;\n    }\n\n    if (selectedItems.length < previousSelectedItemsRef.current.length) {\n      var removedSelectedItem = previousSelectedItemsRef.current.find(function (item) {\n        return selectedItems.indexOf(item) < 0;\n      });\n      setStatus(getA11yRemovalMessage({\n        itemToString: itemToString,\n        resultCount: selectedItems.length,\n        removedSelectedItem: removedSelectedItem,\n        activeIndex: activeIndex,\n        activeSelectedItem: selectedItems[activeIndex]\n      }), environment.document);\n    }\n\n    previousSelectedItemsRef.current = selectedItems; // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [selectedItems.length]); // Sets focus on active item.\n\n  useEffect(function () {\n    if (isInitialMountRef.current) {\n      return;\n    }\n\n    if (activeIndex === -1 && dropdownRef.current) {\n      dropdownRef.current.focus();\n    } else if (selectedItemRefs.current[activeIndex]) {\n      selectedItemRefs.current[activeIndex].focus();\n    }\n  }, [activeIndex]);\n  useControlPropsValidator({\n    isInitialMount: isInitialMountRef.current,\n    props: props,\n    state: state\n  });\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getDropdownProps'); // Make initial ref false.\n\n  useEffect(function () {\n    isInitialMountRef.current = false;\n  }, []); // Event handler functions.\n\n  var selectedItemKeyDownHandlers = useMemo(function () {\n    var _ref;\n\n    return _ref = {}, _ref[keyNavigationPrevious] = function () {\n      dispatch({\n        type: SelectedItemKeyDownNavigationPrevious\n      });\n    }, _ref[keyNavigationNext] = function () {\n      dispatch({\n        type: SelectedItemKeyDownNavigationNext\n      });\n    }, _ref.Delete = function Delete() {\n      dispatch({\n        type: SelectedItemKeyDownDelete\n      });\n    }, _ref.Backspace = function Backspace() {\n      dispatch({\n        type: SelectedItemKeyDownBackspace\n      });\n    }, _ref;\n  }, [dispatch, keyNavigationNext, keyNavigationPrevious]);\n  var dropdownKeyDownHandlers = useMemo(function () {\n    var _ref2;\n\n    return _ref2 = {}, _ref2[keyNavigationPrevious] = function (event) {\n      if (isKeyDownOperationPermitted(event)) {\n        dispatch({\n          type: DropdownKeyDownNavigationPrevious\n        });\n      }\n    }, _ref2.Backspace = function Backspace(event) {\n      if (isKeyDownOperationPermitted(event)) {\n        dispatch({\n          type: DropdownKeyDownBackspace\n        });\n      }\n    }, _ref2;\n  }, [dispatch, keyNavigationPrevious]); // Getter props.\n\n  var getSelectedItemProps = useCallback(function (_temp) {\n    var _extends2;\n\n    var _ref3 = _temp === void 0 ? {} : _temp,\n        _ref3$refKey = _ref3.refKey,\n        refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n        ref = _ref3.ref,\n        onClick = _ref3.onClick,\n        onKeyDown = _ref3.onKeyDown,\n        selectedItem = _ref3.selectedItem,\n        index = _ref3.index,\n        rest = _objectWithoutPropertiesLoose(_ref3, [\"refKey\", \"ref\", \"onClick\", \"onKeyDown\", \"selectedItem\", \"index\"]);\n\n    var latestState = latest.current.state;\n    var itemIndex = getItemIndex(index, selectedItem, latestState.selectedItems);\n\n    if (itemIndex < 0) {\n      throw new Error('Pass either selectedItem or index in getSelectedItemProps!');\n    }\n\n    var selectedItemHandleClick = function selectedItemHandleClick() {\n      dispatch({\n        type: SelectedItemClick,\n        index: index\n      });\n    };\n\n    var selectedItemHandleKeyDown = function selectedItemHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n\n      if (key && selectedItemKeyDownHandlers[key]) {\n        selectedItemKeyDownHandlers[key](event);\n      }\n    };\n\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (selectedItemNode) {\n      if (selectedItemNode) {\n        selectedItemRefs.current.push(selectedItemNode);\n      }\n    }), _extends2.tabIndex = index === latestState.activeIndex ? 0 : -1, _extends2.onClick = callAllEventHandlers(onClick, selectedItemHandleClick), _extends2.onKeyDown = callAllEventHandlers(onKeyDown, selectedItemHandleKeyDown), _extends2), rest);\n  }, [dispatch, latest, selectedItemKeyDownHandlers]);\n  var getDropdownProps = useCallback(function (_temp2, _temp3) {\n    var _extends3;\n\n    var _ref4 = _temp2 === void 0 ? {} : _temp2,\n        _ref4$refKey = _ref4.refKey,\n        refKey = _ref4$refKey === void 0 ? 'ref' : _ref4$refKey,\n        ref = _ref4.ref,\n        onKeyDown = _ref4.onKeyDown,\n        onClick = _ref4.onClick,\n        _ref4$preventKeyActio = _ref4.preventKeyAction,\n        preventKeyAction = _ref4$preventKeyActio === void 0 ? false : _ref4$preventKeyActio,\n        rest = _objectWithoutPropertiesLoose(_ref4, [\"refKey\", \"ref\", \"onKeyDown\", \"onClick\", \"preventKeyAction\"]);\n\n    var _ref5 = _temp3 === void 0 ? {} : _temp3,\n        _ref5$suppressRefErro = _ref5.suppressRefError,\n        suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;\n\n    setGetterPropCallInfo('getDropdownProps', suppressRefError, refKey, dropdownRef);\n\n    var dropdownHandleKeyDown = function dropdownHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n\n      if (key && dropdownKeyDownHandlers[key]) {\n        dropdownKeyDownHandlers[key](event);\n      }\n    };\n\n    var dropdownHandleClick = function dropdownHandleClick() {\n      dispatch({\n        type: DropdownClick\n      });\n    };\n\n    return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (dropdownNode) {\n      if (dropdownNode) {\n        dropdownRef.current = dropdownNode;\n      }\n    }), _extends3), !preventKeyAction && {\n      onKeyDown: callAllEventHandlers(onKeyDown, dropdownHandleKeyDown),\n      onClick: callAllEventHandlers(onClick, dropdownHandleClick)\n    }, rest);\n  }, [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo]); // returns\n\n  var addSelectedItem = useCallback(function (selectedItem) {\n    dispatch({\n      type: FunctionAddSelectedItem,\n      selectedItem: selectedItem\n    });\n  }, [dispatch]);\n  var removeSelectedItem = useCallback(function (selectedItem) {\n    dispatch({\n      type: FunctionRemoveSelectedItem,\n      selectedItem: selectedItem\n    });\n  }, [dispatch]);\n  var setSelectedItems = useCallback(function (newSelectedItems) {\n    dispatch({\n      type: FunctionSetSelectedItems,\n      selectedItems: newSelectedItems\n    });\n  }, [dispatch]);\n  var setActiveIndex = useCallback(function (newActiveIndex) {\n    dispatch({\n      type: FunctionSetActiveIndex,\n      activeIndex: newActiveIndex\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset$2\n    });\n  }, [dispatch]);\n  return {\n    getSelectedItemProps: getSelectedItemProps,\n    getDropdownProps: getDropdownProps,\n    addSelectedItem: addSelectedItem,\n    removeSelectedItem: removeSelectedItem,\n    setSelectedItems: setSelectedItems,\n    setActiveIndex: setActiveIndex,\n    reset: reset,\n    selectedItems: selectedItems,\n    activeIndex: activeIndex\n  };\n}\n\nexport default Downshift;\nexport { resetIdCounter, useCombobox, useMultipleSelection, useSelect };\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport InputBase from '../input-control/input-base';\nimport { Container as InputControlContainer } from '../input-control/styles/input-control-styles';\n\ntype BackCompatMinWidthProps = {\n\t__nextUnconstrainedWidth: boolean;\n};\n\nconst backCompatMinWidth = ( props: BackCompatMinWidthProps ) =>\n\t! props.__nextUnconstrainedWidth\n\t\t? css`\n\t\t\t\t${ InputControlContainer } {\n\t\t\t\t\tmin-width: 130px;\n\t\t\t\t}\n\t\t  `\n\t\t: '';\n\nexport const InputBaseWithBackCompatMinWidth = styled( InputBase )`\n\t${ backCompatMinWidth }\n`;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSelect } from 'downshift';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, check } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';\nimport SelectControlChevronDown from '../select-control/chevron-down';\nimport { InputBaseWithBackCompatMinWidth } from './styles';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\n\nconst itemToString = ( item ) => item?.name;\n// This is needed so that in Windows, where\n// the menu does not necessarily open on\n// key up/down, you can still switch between\n// options with the menu closed.\nconst stateReducer = (\n\t{ selectedItem },\n\t{ type, changes, props: { items } }\n) => {\n\tswitch ( type ) {\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:\n\t\t\t// If we already have a selected item, try to select the next one,\n\t\t\t// without circular navigation. Otherwise, select the first item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.min(\n\t\t\t\t\t\t\t\t\titems.indexOf( selectedItem ) + 1,\n\t\t\t\t\t\t\t\t\titems.length - 1\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};\n\t\tcase useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:\n\t\t\t// If we already have a selected item, try to select the previous one,\n\t\t\t// without circular navigation. Otherwise, select the last item.\n\t\t\treturn {\n\t\t\t\tselectedItem:\n\t\t\t\t\titems[\n\t\t\t\t\t\tselectedItem\n\t\t\t\t\t\t\t? Math.max( items.indexOf( selectedItem ) - 1, 0 )\n\t\t\t\t\t\t\t: items.length - 1\n\t\t\t\t\t],\n\t\t\t};\n\t\tdefault:\n\t\t\treturn changes;\n\t}\n};\nexport default function CustomSelectControl( {\n\t/** Start opting into the larger default height that will become the default size in a future version. */\n\t__next36pxDefaultSize = false,\n\t/** Start opting into the unconstrained width that will become the default in a future version. */\n\t__nextUnconstrainedWidth = false,\n\tclassName,\n\thideLabelFromVision,\n\tlabel,\n\tdescribedBy,\n\toptions: items,\n\tonChange: onSelectedItemChange,\n\t/** @type {import('../select-control/types').SelectControlProps.size} */\n\tsize = 'default',\n\tvalue: _selectedItem,\n} ) {\n\tconst {\n\t\tgetLabelProps,\n\t\tgetToggleButtonProps,\n\t\tgetMenuProps,\n\t\tgetItemProps,\n\t\tisOpen,\n\t\thighlightedIndex,\n\t\tselectedItem,\n\t} = useSelect( {\n\t\tinitialSelectedItem: items[ 0 ],\n\t\titems,\n\t\titemToString,\n\t\tonSelectedItemChange,\n\t\t...( typeof _selectedItem !== 'undefined' && _selectedItem !== null\n\t\t\t? { selectedItem: _selectedItem }\n\t\t\t: undefined ),\n\t\tstateReducer,\n\t} );\n\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tif ( ! __nextUnconstrainedWidth ) {\n\t\tdeprecated(\n\t\t\t'Constrained width styles for wp.components.CustomSelectControl',\n\t\t\t{\n\t\t\t\tsince: '6.1',\n\t\t\t\tversion: '6.4',\n\t\t\t\thint: 'Set the `__nextUnconstrainedWidth` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t\t}\n\t\t);\n\t}\n\n\tfunction getDescribedBy() {\n\t\tif ( describedBy ) {\n\t\t\treturn describedBy;\n\t\t}\n\n\t\tif ( ! selectedItem ) {\n\t\t\treturn __( 'No selection' );\n\t\t}\n\n\t\t// translators: %s: The selected option.\n\t\treturn sprintf( __( 'Currently selected: %s' ), selectedItem.name );\n\t}\n\n\tconst menuProps = getMenuProps( {\n\t\tclassName: 'components-custom-select-control__menu',\n\t\t'aria-hidden': ! isOpen,\n\t} );\n\n\tconst onKeyDownHandler = useCallback(\n\t\t( e ) => {\n\t\t\te.stopPropagation();\n\t\t\tmenuProps?.onKeyDown?.( e );\n\t\t},\n\t\t[ menuProps ]\n\t);\n\n\t// We need this here, because the null active descendant is not fully ARIA compliant.\n\tif (\n\t\tmenuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )\n\t) {\n\t\tdelete menuProps[ 'aria-activedescendant' ];\n\t}\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-custom-select-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"label\" { ...getLabelProps() }>\n\t\t\t\t\t{ label }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */\n\t\t\t\t<StyledLabel\n\t\t\t\t\t{ ...getLabelProps( {\n\t\t\t\t\t\tclassName: 'components-custom-select-control__label',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</StyledLabel>\n\t\t\t) }\n\t\t\t<InputBaseWithBackCompatMinWidth\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t__nextUnconstrainedWidth={ __nextUnconstrainedWidth }\n\t\t\t\tisFocused={ isOpen || isFocused }\n\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t__nextUnconstrainedWidth ? undefined : 'auto'\n\t\t\t\t}\n\t\t\t\tlabelPosition={ __nextUnconstrainedWidth ? undefined : 'top' }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={ <SelectControlChevronDown /> }\n\t\t\t>\n\t\t\t\t<SelectControlSelect\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\t{ ...getToggleButtonProps( {\n\t\t\t\t\t\t// This is needed because some speech recognition software don't support `aria-labelledby`.\n\t\t\t\t\t\t'aria-label': label,\n\t\t\t\t\t\t'aria-labelledby': undefined,\n\t\t\t\t\t\tclassName: 'components-custom-select-control__button',\n\t\t\t\t\t\tdescribedBy: getDescribedBy(),\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ itemToString( selectedItem ) }\n\t\t\t\t</SelectControlSelect>\n\t\t\t</InputBaseWithBackCompatMinWidth>\n\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>\n\t\t\t\t{ isOpen &&\n\t\t\t\t\titems.map( ( item, index ) => (\n\t\t\t\t\t\t// eslint-disable-next-line react/jsx-key\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t{ ...getItemProps( {\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tkey: item.key,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\titem.className,\n\t\t\t\t\t\t\t\t\t'components-custom-select-control__item',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-highlighted':\n\t\t\t\t\t\t\t\t\t\t\tindex === highlightedIndex,\n\t\t\t\t\t\t\t\t\t\t'has-hint': !! item.__experimentalHint,\n\t\t\t\t\t\t\t\t\t\t'is-next-36px-default-size':\n\t\t\t\t\t\t\t\t\t\t\t__next36pxDefaultSize,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: item.style,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.name }\n\t\t\t\t\t\t\t{ item.__experimentalHint && (\n\t\t\t\t\t\t\t\t<span className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t\t\t\t{ item.__experimentalHint }\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{ item === selectedItem && (\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\tclassName=\"components-custom-select-control__item-icon\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n}\n","export default function toInteger(dirtyNumber) {\n  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n    return NaN;\n  }\n\n  var number = Number(dirtyNumber);\n\n  if (isNaN(number)) {\n    return number;\n  }\n\n  return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","export default function requiredArgs(required, args) {\n  if (args.length < required) {\n    throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n  }\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n  requiredArgs(1, arguments);\n  var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n  if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new Date(argument.getTime());\n  } else if (typeof argument === 'number' || argStr === '[object Number]') {\n    return new Date(argument);\n  } else {\n    if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n      // eslint-disable-next-line no-console\n      console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule\"); // eslint-disable-next-line no-console\n\n      console.warn(new Error().stack);\n    }\n\n    return new Date(NaN);\n  }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  date.setDate(date.getDate() + amount);\n  return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n\n  var endOfDesiredMonth = new Date(date.getTime());\n  endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n  var daysInMonth = endOfDesiredMonth.getDate();\n\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n    return date;\n  }\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, dirtyOptions) {\n  requiredArgs(1, arguments);\n  var options = dirtyOptions || {};\n  var locale = options.locale;\n  var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n  var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n  var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setDate(date.getDate() - diff);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  var days = amount * 7;\n  return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var month = date.getMonth();\n  date.setFullYear(date.getFullYear(), month + 1, 0);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `eachDay` to `eachDayOfInterval`.\n *   This change was made to mirror the use of the word \"interval\" in standard ISO 8601:2004 terminology:\n *\n *   ```\n *   2.1.3\n *   time interval\n *   part of the time axis limited by two instants\n *   ```\n *\n *   Also, this function now accepts an object with `start` and `end` properties\n *   instead of two arguments as an interval.\n *   This function now throws `RangeError` if the start of the interval is after its end\n *   or if any date in the interval is `Invalid Date`.\n *\n *   ```javascript\n *   // Before v2.0.0\n *\n *   eachDay(new Date(2014, 0, 10), new Date(2014, 0, 20))\n *\n *   // v2.0.0 onward\n *\n *   eachDayOfInterval(\n *     { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }\n *   )\n *   ```\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n *   start: new Date(2014, 9, 6),\n *   end: new Date(2014, 9, 10)\n * })\n * //=> [\n * //   Mon Oct 06 2014 00:00:00,\n * //   Tue Oct 07 2014 00:00:00,\n * //   Wed Oct 08 2014 00:00:00,\n * //   Thu Oct 09 2014 00:00:00,\n * //   Fri Oct 10 2014 00:00:00\n * // ]\n */\n\nexport default function eachDayOfInterval(dirtyInterval, options) {\n  requiredArgs(1, arguments);\n  var interval = dirtyInterval || {};\n  var startDate = toDate(interval.start);\n  var endDate = toDate(interval.end);\n  var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n  if (!(startDate.getTime() <= endTime)) {\n    throw new RangeError('Invalid interval');\n  }\n\n  var dates = [];\n  var currentDate = startDate;\n  currentDate.setHours(0, 0, 0, 0);\n  var step = options && 'step' in options ? Number(options.step) : 1;\n  if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n\n  while (currentDate.getTime() <= endTime) {\n    dates.push(toDate(currentDate));\n    currentDate.setDate(currentDate.getDate() + step);\n    currentDate.setHours(0, 0, 0, 0);\n  }\n\n  return dates;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, dirtyOptions) {\n  requiredArgs(1, arguments);\n  var options = dirtyOptions || {};\n  var locale = options.locale;\n  var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n  var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n  var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n  date.setDate(date.getDate() + diff);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getFullYear();\n  var monthIndex = date.getMonth();\n  var lastDayOfMonth = new Date(0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n *   new Date(2014, 6, 2, 6, 30, 45, 0),\n *   new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyLeftDate);\n  var dateRight = toDate(dirtyRightDate);\n  return dateLeft.getTime() === dateRight.getTime();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var month = toInteger(dirtyMonth);\n  var year = date.getFullYear();\n  var day = date.getDate();\n  var dateWithDesiredMonth = new Date(0);\n  dateWithDesiredMonth.setFullYear(year, month, 15);\n  dateWithDesiredMonth.setHours(0, 0, 0, 0);\n  var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n  // if the original date was the last day of the longer month\n\n  date.setMonth(month, Math.min(day, daysInMonth));\n  return date;\n}","import {\n  addMonths,\n  addYears,\n  eachDayOfInterval,\n  eachMonthOfInterval,\n  eachWeekOfInterval,\n  endOfMonth,\n  endOfWeek,\n  isAfter,\n  isBefore,\n  isEqual,\n  set,\n  setMonth,\n  setYear,\n  startOfMonth,\n  startOfToday,\n  startOfWeek,\n  subMonths,\n  subYears,\n} from \"date-fns\";\nimport { useCallback, useMemo, useState } from \"react\";\n\nexport enum Month {\n  JANUARY,\n  FEBRUARY,\n  MARCH,\n  APRIL,\n  MAY,\n  JUNE,\n  JULY,\n  AUGUST,\n  SEPTEMBER,\n  OCTOBER,\n  NOVEMBER,\n  DECEMBER,\n}\n\nexport enum Day {\n  SUNDAY,\n  MONDAY,\n  TUESDAY,\n  WEDNESDAY,\n  THURSDAY,\n  FRIDAY,\n  SATURDAY,\n}\n\nexport interface Options {\n  /**\n   * What day a week starts on within the calendar matrix.\n   *\n   * @default Day.SUNDAY\n   */\n  weekStartsOn?: Day;\n\n  /**\n   * The initial viewing date.\n   *\n   * @default new Date()\n   */\n  viewing?: Date;\n\n  /**\n   * The initial date(s) selection.\n   *\n   * @default []\n   */\n  selected?: Date[];\n\n  /**\n   * The number of months in the calendar.\n   *\n   * @default 1\n   */\n  numberOfMonths?: number;\n}\n\nexport interface Returns {\n  /**\n   * Returns a copy of the given date with the time set to 00:00:00:00.\n   */\n  clearTime: (date: Date) => Date;\n\n  /**\n   * Returns whether or not a date is between 2 other dates (inclusive).\n   */\n  inRange: (date: Date, min: Date, max: Date) => boolean;\n\n  /**\n   * The date represented in the calendar matrix. Note that\n   * the month and year are the only parts used.\n   */\n  viewing: Date;\n\n  /**\n   * Set the date represented in the calendar matrix. Note that\n   * the month and year are the only parts used.\n   */\n  setViewing: React.Dispatch<React.SetStateAction<Date>>;\n\n  /**\n   * Set the viewing date to today.\n   */\n  viewToday: () => void;\n\n  /**\n   * Set the viewing date to the given month.\n   */\n  viewMonth: (month: Month) => void;\n\n  /**\n   * Set the viewing date to the month before the current.\n   */\n  viewPreviousMonth: () => void;\n\n  /**\n   * Set the viewing date to the month after the current.\n   */\n  viewNextMonth: () => void;\n\n  /**\n   * Set the viewing date to the given year.\n   */\n  viewYear: (year: number) => void;\n\n  /**\n   * Set the viewing date to the year before the current.\n   */\n  viewPreviousYear: () => void;\n\n  /**\n   * Set the viewing date to the year after the current.\n   */\n  viewNextYear: () => void;\n\n  /**\n   * The dates currently selected.\n   */\n  selected: Date[];\n\n  /**\n   * Override the currently selected dates.\n   */\n  setSelected: React.Dispatch<React.SetStateAction<Date[]>>;\n\n  /**\n   * Reset the selected dates to [].\n   */\n  clearSelected: () => void;\n\n  /**\n   * Determine whether or not a date has been selected.\n   */\n  isSelected: (date: Date) => boolean;\n\n  /**\n   * Select one or more dates.\n   */\n  select: (date: Date | Date[], replaceExisting?: boolean) => void;\n\n  /**\n   * Deselect one or more dates.\n   */\n  deselect: (date: Date | Date[]) => void;\n\n  /**\n   * Toggle the selection of a date.\n   */\n  toggle: (date: Date, replaceExisting?: boolean) => void;\n\n  /**\n   * Select a range of dates (inclusive).\n   */\n  selectRange: (start: Date, end: Date, replaceExisting?: boolean) => void;\n\n  /**\n   * Deselect a range of dates (inclusive).\n   */\n  deselectRange: (start: Date, end: Date) => void;\n\n  /**\n   * A matrix of days based on the current viewing date.\n   */\n  calendar: Date[][][];\n}\n\nconst inRange = (date: Date, min: Date, max: Date) =>\n  (isEqual(date, min) || isAfter(date, min)) && (isEqual(date, max) || isBefore(date, max));\n\nconst clearTime = (date: Date) => set(date, { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 });\n\nexport const useLilius = ({\n  weekStartsOn = Day.SUNDAY,\n  viewing: initialViewing = new Date(),\n  selected: initialSelected = [],\n  numberOfMonths = 1,\n}: Options = {}): Returns => {\n  const [viewing, setViewing] = useState<Date>(initialViewing);\n\n  const viewToday = useCallback(() => setViewing(startOfToday()), [setViewing]);\n\n  const viewMonth = useCallback((month: Month) => setViewing((v) => setMonth(v, month)), []);\n\n  const viewPreviousMonth = useCallback(() => setViewing((v) => subMonths(v, 1)), []);\n\n  const viewNextMonth = useCallback(() => setViewing((v) => addMonths(v, 1)), []);\n\n  const viewYear = useCallback((year: number) => setViewing((v) => setYear(v, year)), []);\n\n  const viewPreviousYear = useCallback(() => setViewing((v) => subYears(v, 1)), []);\n\n  const viewNextYear = useCallback(() => setViewing((v) => addYears(v, 1)), []);\n\n  const [selected, setSelected] = useState<Date[]>(initialSelected.map(clearTime));\n\n  const clearSelected = () => setSelected([]);\n\n  const isSelected = useCallback((date: Date) => selected.findIndex((s) => isEqual(s, date)) > -1, [selected]);\n\n  const select = useCallback((date: Date | Date[], replaceExisting?: boolean) => {\n    if (replaceExisting) {\n      setSelected(Array.isArray(date) ? date : [date]);\n    } else {\n      setSelected((selectedItems) => selectedItems.concat(Array.isArray(date) ? date : [date]));\n    }\n  }, []);\n\n  const deselect = useCallback(\n    (date: Date | Date[]) =>\n      setSelected((selectedItems) =>\n        Array.isArray(date)\n          ? selectedItems.filter((s) => !date.map((d) => d.getTime()).includes(s.getTime()))\n          : selectedItems.filter((s) => !isEqual(s, date)),\n      ),\n    [],\n  );\n\n  const toggle = useCallback(\n    (date: Date, replaceExisting?: boolean) => (isSelected(date) ? deselect(date) : select(date, replaceExisting)),\n    [deselect, isSelected, select],\n  );\n\n  const selectRange = useCallback((start: Date, end: Date, replaceExisting?: boolean) => {\n    if (replaceExisting) {\n      setSelected(eachDayOfInterval({ start, end }));\n    } else {\n      setSelected((selectedItems) => selectedItems.concat(eachDayOfInterval({ start, end })));\n    }\n  }, []);\n\n  const deselectRange = useCallback((start: Date, end: Date) => {\n    setSelected((selectedItems) =>\n      selectedItems.filter(\n        (s) =>\n          !eachDayOfInterval({ start, end })\n            .map((d) => d.getTime())\n            .includes(s.getTime()),\n      ),\n    );\n  }, []);\n\n  const calendar = useMemo<Date[][][]>(\n    () =>\n      eachMonthOfInterval({\n        start: startOfMonth(viewing),\n        end: endOfMonth(addMonths(viewing, numberOfMonths - 1)),\n      }).map((month) =>\n        eachWeekOfInterval(\n          {\n            start: startOfMonth(month),\n            end: endOfMonth(month),\n          },\n          { weekStartsOn },\n        ).map((week) =>\n          eachDayOfInterval({\n            start: startOfWeek(week, { weekStartsOn }),\n            end: endOfWeek(week, { weekStartsOn }),\n          }),\n        ),\n      ),\n    [viewing, weekStartsOn, numberOfMonths],\n  );\n\n  return {\n    clearTime,\n    inRange,\n    viewing,\n    setViewing,\n    viewToday,\n    viewMonth,\n    viewPreviousMonth,\n    viewNextMonth,\n    viewYear,\n    viewPreviousYear,\n    viewNextYear,\n    selected,\n    setSelected,\n    clearSelected,\n    isSelected,\n    select,\n    deselect,\n    toggle,\n    selectRange,\n    deselectRange,\n    calendar,\n  };\n};\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var dateToCompare = toDate(dirtyDateToCompare);\n  return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var dateToCompare = toDate(dirtyDateToCompare);\n  return date.getTime() < dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Object} values - an object with options\n * @param {Number} [values.year] - the number of years to be set\n * @param {Number} [values.month] - the number of months to be set\n * @param {Number} [values.date] - the number of days to be set\n * @param {Number} [values.hours] - the number of hours to be set\n * @param {Number} [values.minutes] - the number of minutes to be set\n * @param {Number} [values.seconds] - the number of seconds to be set\n * @param {Number} [values.milliseconds] - the number of milliseconds to be set\n * @returns {Date} the new date with options set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `values` must be an object\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * var result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * var result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport default function set(dirtyDate, values) {\n  requiredArgs(2, arguments);\n\n  if (typeof values !== 'object' || values === null) {\n    throw new RangeError('values parameter must be an object');\n  }\n\n  var date = toDate(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n  if (isNaN(date.getTime())) {\n    return new Date(NaN);\n  }\n\n  if (values.year != null) {\n    date.setFullYear(values.year);\n  }\n\n  if (values.month != null) {\n    date = setMonth(date, values.month);\n  }\n\n  if (values.date != null) {\n    date.setDate(toInteger(values.date));\n  }\n\n  if (values.hours != null) {\n    date.setHours(toInteger(values.hours));\n  }\n\n  if (values.minutes != null) {\n    date.setMinutes(toInteger(values.minutes));\n  }\n\n  if (values.seconds != null) {\n    date.setSeconds(toInteger(values.seconds));\n  }\n\n  if (values.milliseconds != null) {\n    date.setMilliseconds(toInteger(values.milliseconds));\n  }\n\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import startOfDay from \"../startOfDay/index.js\";\n/**\n * @name startOfToday\n * @category Day Helpers\n * @summary Return the start of today.\n * @pure false\n *\n * @description\n * Return the start of today.\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @returns {Date} the start of today\n *\n * @example\n * // If today is 6 October 2014:\n * var result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\n\nexport default function startOfToday() {\n  return startOfDay(Date.now());\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMonths(dirtyDate, -amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n  if (isNaN(date.getTime())) {\n    return new Date(NaN);\n  }\n\n  date.setFullYear(year);\n  return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addYears from \"../addYears/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\n\nexport default function subYears(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addYears(dirtyDate, -amount);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @returns {Date[]} the array with starts of months from the month of the interval start to the month of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * var result = eachMonthOfInterval({\n *   start: new Date(2014, 1, 6),\n *   end: new Date(2014, 7, 10)\n * })\n * //=> [\n * //   Sat Feb 01 2014 00:00:00,\n * //   Sat Mar 01 2014 00:00:00,\n * //   Tue Apr 01 2014 00:00:00,\n * //   Thu May 01 2014 00:00:00,\n * //   Sun Jun 01 2014 00:00:00,\n * //   Tue Jul 01 2014 00:00:00,\n * //   Fri Aug 01 2014 00:00:00\n * // ]\n */\n\nexport default function eachMonthOfInterval(dirtyInterval) {\n  requiredArgs(1, arguments);\n  var interval = dirtyInterval || {};\n  var startDate = toDate(interval.start);\n  var endDate = toDate(interval.end);\n  var endTime = endDate.getTime();\n  var dates = []; // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n  if (!(startDate.getTime() <= endTime)) {\n    throw new RangeError('Invalid interval');\n  }\n\n  var currentDate = startDate;\n  currentDate.setHours(0, 0, 0, 0);\n  currentDate.setDate(1);\n\n  while (currentDate.getTime() <= endTime) {\n    dates.push(toDate(currentDate));\n    currentDate.setMonth(currentDate.getMonth() + 1);\n  }\n\n  return dates;\n}","import addWeeks from \"../addWeeks/index.js\";\nimport startOfWeek from \"../startOfWeek/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachWeekOfInterval\n * @category Interval Helpers\n * @summary Return the array of weeks within the specified time interval.\n *\n * @description\n * Return the array of weeks within the specified time interval.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date[]} the array with starts of weeks from the week of the interval start to the week of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be 0, 1, ..., 6\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each week within interval 6 October 2014 - 23 November 2014:\n * var result = eachWeekOfInterval({\n *   start: new Date(2014, 9, 6),\n *   end: new Date(2014, 10, 23)\n * })\n * //=> [\n * //   Sun Oct 05 2014 00:00:00,\n * //   Sun Oct 12 2014 00:00:00,\n * //   Sun Oct 19 2014 00:00:00,\n * //   Sun Oct 26 2014 00:00:00,\n * //   Sun Nov 02 2014 00:00:00,\n * //   Sun Nov 09 2014 00:00:00,\n * //   Sun Nov 16 2014 00:00:00,\n * //   Sun Nov 23 2014 00:00:00\n * // ]\n */\n\nexport default function eachWeekOfInterval(dirtyInterval, options) {\n  requiredArgs(1, arguments);\n  var interval = dirtyInterval || {};\n  var startDate = toDate(interval.start);\n  var endDate = toDate(interval.end);\n  var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n  if (!(startDate.getTime() <= endTime)) {\n    throw new RangeError('Invalid interval');\n  }\n\n  var startDateWeek = startOfWeek(startDate, options);\n  var endDateWeek = startOfWeek(endDate, options); // Some timezones switch DST at midnight, making start of day unreliable in these timezones, 3pm is a safe bet\n\n  startDateWeek.setHours(15);\n  endDateWeek.setHours(15);\n  endTime = endDateWeek.getTime();\n  var weeks = [];\n  var currentWeek = startDateWeek;\n\n  while (currentWeek.getTime() <= endTime) {\n    currentWeek.setHours(0);\n    weeks.push(toDate(currentWeek));\n    currentWeek = addWeeks(currentWeek, 1);\n    currentWeek.setHours(15);\n  }\n\n  return weeks;\n}","export default function requiredArgs(required, args) {\n  if (args.length < required) {\n    throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n  }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n  requiredArgs(1, arguments);\n  var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n  if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new Date(argument.getTime());\n  } else if (typeof argument === 'number' || argStr === '[object Number]') {\n    return new Date(argument);\n  } else {\n    if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n      // eslint-disable-next-line no-console\n      console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n      console.warn(new Error().stack);\n    }\n\n    return new Date(NaN);\n  }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","export default function toInteger(dirtyNumber) {\n  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n    return NaN;\n  }\n\n  var number = Number(dirtyNumber);\n\n  if (isNaN(number)) {\n    return number;\n  }\n\n  return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n\n  var endOfDesiredMonth = new Date(date.getTime());\n  endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n  var daysInMonth = endOfDesiredMonth.getDate();\n\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n    return date;\n  }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMonths(dirtyDate, -amount);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n  requiredArgs(1, arguments);\n  return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n  requiredArgs(1, arguments);\n\n  if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n    return false;\n  }\n\n  var date = toDate(dirtyDate);\n  return !isNaN(Number(date));\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var timestamp = toDate(dirtyDate).getTime();\n  var amount = toInteger(dirtyAmount);\n  return new Date(timestamp + amount);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var timestamp = date.getTime();\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n  var startOfYearTimestamp = date.getTime();\n  var difference = timestamp - startOfYearTimestamp;\n  return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var weekStartsOn = 1;\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var fourthOfJanuaryOfNextYear = new Date(0);\n  fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n  var fourthOfJanuaryOfThisYear = new Date(0);\n  fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var year = getUTCISOWeekYear(dirtyDate);\n  var fourthOfJanuary = new Date(0);\n  fourthOfJanuary.setUTCFullYear(year, 0, 4);\n  fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCISOWeek(fourthOfJanuary);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","var defaultOptions = {};\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n\n  var firstWeekOfNextYear = new Date(0);\n  firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n  var firstWeekOfThisYear = new Date(0);\n  firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n  var year = getUTCWeekYear(dirtyDate, options);\n  var firstWeek = new Date(0);\n  firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCWeek(firstWeek, options);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n  var sign = number < 0 ? '-' : '';\n  var output = Math.abs(number).toString();\n\n  while (output.length < targetLength) {\n    output = '0' + output;\n  }\n\n  return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n  // Year\n  y: function y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n    var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n    var year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n  },\n  // Month\n  M: function M(date, token) {\n    var month = date.getUTCMonth();\n    return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n  // Day of the month\n  d: function d(date, token) {\n    return addLeadingZeros(date.getUTCDate(), token.length);\n  },\n  // AM or PM\n  a: function a(date, token) {\n    var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return dayPeriodEnumValue.toUpperCase();\n\n      case 'aaa':\n        return dayPeriodEnumValue;\n\n      case 'aaaaa':\n        return dayPeriodEnumValue[0];\n\n      case 'aaaa':\n      default:\n        return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n    }\n  },\n  // Hour [1-12]\n  h: function h(date, token) {\n    return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n  },\n  // Hour [0-23]\n  H: function H(date, token) {\n    return addLeadingZeros(date.getUTCHours(), token.length);\n  },\n  // Minute\n  m: function m(date, token) {\n    return addLeadingZeros(date.getUTCMinutes(), token.length);\n  },\n  // Second\n  s: function s(date, token) {\n    return addLeadingZeros(date.getUTCSeconds(), token.length);\n  },\n  // Fraction of second\n  S: function S(date, token) {\n    var numberOfDigits = token.length;\n    var milliseconds = date.getUTCMilliseconds();\n    var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n    return addLeadingZeros(fractionalSeconds, token.length);\n  }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n  am: 'am',\n  pm: 'pm',\n  midnight: 'midnight',\n  noon: 'noon',\n  morning: 'morning',\n  afternoon: 'afternoon',\n  evening: 'evening',\n  night: 'night'\n};\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\nvar formatters = {\n  // Era\n  G: function G(date, token, localize) {\n    var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n    switch (token) {\n      // AD, BC\n      case 'G':\n      case 'GG':\n      case 'GGG':\n        return localize.era(era, {\n          width: 'abbreviated'\n        });\n      // A, B\n\n      case 'GGGGG':\n        return localize.era(era, {\n          width: 'narrow'\n        });\n      // Anno Domini, Before Christ\n\n      case 'GGGG':\n      default:\n        return localize.era(era, {\n          width: 'wide'\n        });\n    }\n  },\n  // Year\n  y: function y(date, token, localize) {\n    // Ordinal number\n    if (token === 'yo') {\n      var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n      var year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, {\n        unit: 'year'\n      });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n  // Local week-numbering year\n  Y: function Y(date, token, localize, options) {\n    var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n    var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n    if (token === 'YY') {\n      var twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    } // Ordinal number\n\n\n    if (token === 'Yo') {\n      return localize.ordinalNumber(weekYear, {\n        unit: 'year'\n      });\n    } // Padding\n\n\n    return addLeadingZeros(weekYear, token.length);\n  },\n  // ISO week-numbering year\n  R: function R(date, token) {\n    var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function u(date, token) {\n    var year = date.getUTCFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n  // Quarter\n  Q: function Q(date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'Q':\n        return String(quarter);\n      // 01, 02, 03, 04\n\n      case 'QQ':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'Qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'QQQ':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'QQQQQ':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'QQQQ':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone quarter\n  q: function q(date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'q':\n        return String(quarter);\n      // 01, 02, 03, 04\n\n      case 'qq':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'qqq':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'qqqqq':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'qqqq':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Month\n  M: function M(date, token, localize) {\n    var month = date.getUTCMonth();\n\n    switch (token) {\n      case 'M':\n      case 'MM':\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n\n      case 'Mo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n\n      case 'MMM':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // J, F, ..., D\n\n      case 'MMMMM':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // January, February, ..., December\n\n      case 'MMMM':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone month\n  L: function L(date, token, localize) {\n    var month = date.getUTCMonth();\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case 'L':\n        return String(month + 1);\n      // 01, 02, ..., 12\n\n      case 'LL':\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n\n      case 'Lo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n\n      case 'LLL':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // J, F, ..., D\n\n      case 'LLLLL':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // January, February, ..., December\n\n      case 'LLLL':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Local week of year\n  w: function w(date, token, localize, options) {\n    var week = getUTCWeek(date, options);\n\n    if (token === 'wo') {\n      return localize.ordinalNumber(week, {\n        unit: 'week'\n      });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n  // ISO week of year\n  I: function I(date, token, localize) {\n    var isoWeek = getUTCISOWeek(date);\n\n    if (token === 'Io') {\n      return localize.ordinalNumber(isoWeek, {\n        unit: 'week'\n      });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n  // Day of the month\n  d: function d(date, token, localize) {\n    if (token === 'do') {\n      return localize.ordinalNumber(date.getUTCDate(), {\n        unit: 'date'\n      });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n  // Day of year\n  D: function D(date, token, localize) {\n    var dayOfYear = getUTCDayOfYear(date);\n\n    if (token === 'Do') {\n      return localize.ordinalNumber(dayOfYear, {\n        unit: 'dayOfYear'\n      });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n  // Day of week\n  E: function E(date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n\n    switch (token) {\n      // Tue\n      case 'E':\n      case 'EE':\n      case 'EEE':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'EEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'EEEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'EEEE':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Local day of week\n  e: function e(date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case 'e':\n        return String(localDayOfWeek);\n      // Padded numerical value\n\n      case 'ee':\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n\n      case 'eo':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n\n      case 'eee':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'eeeee':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'eeeeee':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'eeee':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone local day of week\n  c: function c(date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case 'c':\n        return String(localDayOfWeek);\n      // Padded numerical value\n\n      case 'cc':\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n\n      case 'co':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n\n      case 'ccc':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // T\n\n      case 'ccccc':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // Tu\n\n      case 'cccccc':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'standalone'\n        });\n      // Tuesday\n\n      case 'cccc':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // ISO day of week\n  i: function i(date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n    var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n    switch (token) {\n      // 2\n      case 'i':\n        return String(isoDayOfWeek);\n      // 02\n\n      case 'ii':\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n\n      case 'io':\n        return localize.ordinalNumber(isoDayOfWeek, {\n          unit: 'day'\n        });\n      // Tue\n\n      case 'iii':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'iiiii':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'iiiiii':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'iiii':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM or PM\n  a: function a(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'aaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n\n      case 'aaaaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'aaaa':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM, PM, midnight, noon\n  b: function b(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n    }\n\n    switch (token) {\n      case 'b':\n      case 'bb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'bbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n\n      case 'bbbbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'bbbb':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // in the morning, in the afternoon, in the evening, at night\n  B: function B(date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case 'B':\n      case 'BB':\n      case 'BBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'BBBBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'BBBB':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Hour [1-12]\n  h: function h(date, token, localize) {\n    if (token === 'ho') {\n      var hours = date.getUTCHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n  // Hour [0-23]\n  H: function H(date, token, localize) {\n    if (token === 'Ho') {\n      return localize.ordinalNumber(date.getUTCHours(), {\n        unit: 'hour'\n      });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n  // Hour [0-11]\n  K: function K(date, token, localize) {\n    var hours = date.getUTCHours() % 12;\n\n    if (token === 'Ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n  // Hour [1-24]\n  k: function k(date, token, localize) {\n    var hours = date.getUTCHours();\n    if (hours === 0) hours = 24;\n\n    if (token === 'ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n  // Minute\n  m: function m(date, token, localize) {\n    if (token === 'mo') {\n      return localize.ordinalNumber(date.getUTCMinutes(), {\n        unit: 'minute'\n      });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n  // Second\n  s: function s(date, token, localize) {\n    if (token === 'so') {\n      return localize.ordinalNumber(date.getUTCSeconds(), {\n        unit: 'second'\n      });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n  // Fraction of second\n  S: function S(date, token) {\n    return lightFormatters.S(date, token);\n  },\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function X(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return 'Z';\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case 'X':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n\n      case 'XXXX':\n      case 'XX':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n\n      case 'XXXXX':\n      case 'XXX': // Hours and minutes with `:` delimiter\n\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function x(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case 'x':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n\n      case 'xxxx':\n      case 'xx':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n\n      case 'xxxxx':\n      case 'xxx': // Hours and minutes with `:` delimiter\n\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (GMT)\n  O: function O(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case 'O':\n      case 'OO':\n      case 'OOO':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n\n      case 'OOOO':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (specific non-location)\n  z: function z(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case 'z':\n      case 'zz':\n      case 'zzz':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n\n      case 'zzzz':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Seconds timestamp\n  t: function t(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = Math.floor(originalDate.getTime() / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n  // Milliseconds timestamp\n  T: function T(date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = originalDate.getTime();\n    return addLeadingZeros(timestamp, token.length);\n  }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = Math.floor(absOffset / 60);\n  var minutes = absOffset % 60;\n\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n\n  var delimiter = dirtyDelimiter || '';\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n  if (offset % 60 === 0) {\n    var sign = offset > 0 ? '-' : '+';\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n\n  return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n  var delimiter = dirtyDelimiter || '';\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n  var minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n  switch (pattern) {\n    case 'P':\n      return formatLong.date({\n        width: 'short'\n      });\n\n    case 'PP':\n      return formatLong.date({\n        width: 'medium'\n      });\n\n    case 'PPP':\n      return formatLong.date({\n        width: 'long'\n      });\n\n    case 'PPPP':\n    default:\n      return formatLong.date({\n        width: 'full'\n      });\n  }\n};\n\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n  switch (pattern) {\n    case 'p':\n      return formatLong.time({\n        width: 'short'\n      });\n\n    case 'pp':\n      return formatLong.time({\n        width: 'medium'\n      });\n\n    case 'ppp':\n      return formatLong.time({\n        width: 'long'\n      });\n\n    case 'pppp':\n    default:\n      return formatLong.time({\n        width: 'full'\n      });\n  }\n};\n\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n  var matchResult = pattern.match(/(P+)(p+)?/) || [];\n  var datePattern = matchResult[1];\n  var timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  var dateTimeFormat;\n\n  switch (datePattern) {\n    case 'P':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'short'\n      });\n      break;\n\n    case 'PP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'medium'\n      });\n      break;\n\n    case 'PPP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'long'\n      });\n      break;\n\n    case 'PPPP':\n    default:\n      dateTimeFormat = formatLong.dateTime({\n        width: 'full'\n      });\n      break;\n  }\n\n  return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n  utcDate.setUTCFullYear(date.getFullYear());\n  return date.getTime() - utcDate.getTime();\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n  return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n  return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n  if (token === 'YYYY') {\n    throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'YY') {\n    throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'D') {\n    throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'DD') {\n    throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  }\n}","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'less than a second',\n    other: 'less than {{count}} seconds'\n  },\n  xSeconds: {\n    one: '1 second',\n    other: '{{count}} seconds'\n  },\n  halfAMinute: 'half a minute',\n  lessThanXMinutes: {\n    one: 'less than a minute',\n    other: 'less than {{count}} minutes'\n  },\n  xMinutes: {\n    one: '1 minute',\n    other: '{{count}} minutes'\n  },\n  aboutXHours: {\n    one: 'about 1 hour',\n    other: 'about {{count}} hours'\n  },\n  xHours: {\n    one: '1 hour',\n    other: '{{count}} hours'\n  },\n  xDays: {\n    one: '1 day',\n    other: '{{count}} days'\n  },\n  aboutXWeeks: {\n    one: 'about 1 week',\n    other: 'about {{count}} weeks'\n  },\n  xWeeks: {\n    one: '1 week',\n    other: '{{count}} weeks'\n  },\n  aboutXMonths: {\n    one: 'about 1 month',\n    other: 'about {{count}} months'\n  },\n  xMonths: {\n    one: '1 month',\n    other: '{{count}} months'\n  },\n  aboutXYears: {\n    one: 'about 1 year',\n    other: 'about {{count}} years'\n  },\n  xYears: {\n    one: '1 year',\n    other: '{{count}} years'\n  },\n  overXYears: {\n    one: 'over 1 year',\n    other: 'over {{count}} years'\n  },\n  almostXYears: {\n    one: 'almost 1 year',\n    other: 'almost {{count}} years'\n  }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', count.toString());\n  }\n\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'in ' + result;\n    } else {\n      return result + ' ago';\n    }\n  }\n\n  return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n  return function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    // TODO: Remove String()\n    var width = options.width ? String(options.width) : args.defaultWidth;\n    var format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE, MMMM do, y',\n  long: 'MMMM do, y',\n  medium: 'MMM d, y',\n  short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n  full: 'h:mm:ss a zzzz',\n  long: 'h:mm:ss a z',\n  medium: 'h:mm:ss a',\n  short: 'h:mm a'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n  return function (dirtyIndex, options) {\n    var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n    var valuesArray;\n\n    if (context === 'formatting' && args.formattingValues) {\n      var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n      valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      var _defaultWidth = args.defaultWidth;\n\n      var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[_width] || args.values[_defaultWidth];\n    }\n\n    var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n    return valuesArray[index];\n  };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['B', 'A'],\n  abbreviated: ['BC', 'AD'],\n  wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n  wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n  wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n  narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n  short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n  abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n  wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n  var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  var rem100 = number % 100;\n\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + 'st';\n\n      case 2:\n        return number + 'nd';\n\n      case 3:\n        return number + 'rd';\n    }\n  }\n\n  return number + 'th';\n};\n\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function argumentCallback(quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","export default function buildMatchFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var width = options.width;\n    var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n    var matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n\n    var matchedString = matchResult[0];\n    var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n    var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    }) : findKey(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    });\n    var value;\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (var key in object) {\n    if (object.hasOwnProperty(key) && predicate(object[key])) {\n      return key;\n    }\n  }\n\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (var key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n\n  return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function valueCallback(value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function valueCallback(index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    var matchedString = matchResult[0];\n    var parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n  code: 'en-US',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0\n    /* Sunday */\n    ,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n *    and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n  requiredArgs(2, arguments);\n  var formatStr = String(dirtyFormatStr);\n  var defaultOptions = getDefaultOptions();\n  var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n\n  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  if (!locale.localize) {\n    throw new RangeError('locale must contain localize property');\n  }\n\n  if (!locale.formatLong) {\n    throw new RangeError('locale must contain formatLong property');\n  }\n\n  var originalDate = toDate(dirtyDate);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError('Invalid time value');\n  } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n  // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n  // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n  var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n  var utcDate = subMilliseconds(originalDate, timezoneOffset);\n  var formatterOptions = {\n    firstWeekContainsDate: firstWeekContainsDate,\n    weekStartsOn: weekStartsOn,\n    locale: locale,\n    _originalDate: originalDate\n  };\n  var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n    var firstCharacter = substring[0];\n\n    if (firstCharacter === 'p' || firstCharacter === 'P') {\n      var longFormatter = longFormatters[firstCharacter];\n      return longFormatter(substring, locale.formatLong);\n    }\n\n    return substring;\n  }).join('').match(formattingTokensRegExp).map(function (substring) {\n    // Replace two single quote characters with one single quote character\n    if (substring === \"''\") {\n      return \"'\";\n    }\n\n    var firstCharacter = substring[0];\n\n    if (firstCharacter === \"'\") {\n      return cleanEscapedString(substring);\n    }\n\n    var formatter = formatters[firstCharacter];\n\n    if (formatter) {\n      if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n\n      if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n\n      return formatter(utcDate, substring, locale.localize, formatterOptions);\n    }\n\n    if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n      throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n    }\n\n    return substring;\n  }).join('');\n  return result;\n}\n\nfunction cleanEscapedString(input) {\n  var matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n *   new Date(2014, 6, 2, 6, 30, 45, 0),\n *   new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyLeftDate);\n  var dateRight = toDate(dirtyRightDate);\n  return dateLeft.getTime() === dateRight.getTime();\n}","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n  var dateRightStartOfDay = startOfDay(dirtyDateRight);\n  return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  date.setDate(date.getDate() + amount);\n  return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  var days = amount * 7;\n  return addDays(dirtyDate, days);\n}","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z\" />\n\t</SVG>\n);\n\nexport default arrowRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z\" />\n\t</SVG>\n);\n\nexport default arrowLeft;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { COLORS, CONFIG } from '../../utils';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { space } from '../../ui/utils/space';\n\nexport const Wrapper = styled.div`\n\tbox-sizing: border-box;\n`;\n\nexport const Navigator = styled( HStack )`\n\tmargin-bottom: ${ space( 4 ) };\n`;\n\nexport const NavigatorHeading = styled( Heading )`\n\tfont-size: ${ CONFIG.fontSize };\n\tfont-weight: ${ CONFIG.fontWeight };\n\n\tstrong {\n\t\tfont-weight: ${ CONFIG.fontWeightHeading };\n\t}\n`;\n\nexport const Calendar = styled.div`\n\tcolumn-gap: ${ space( 2 ) };\n\tdisplay: grid;\n\tgrid-template-columns: 0.5fr repeat( 5, 1fr ) 0.5fr;\n\tjustify-items: center;\n\trow-gap: ${ space( 2 ) };\n`;\n\nexport const DayOfWeek = styled.div`\n\tcolor: ${ COLORS.gray[ 700 ] };\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: ${ CONFIG.fontLineHeightBase };\n\n\t&:nth-of-type( 1 ) {\n\t\tjustify-self: start;\n\t}\n\n\t&:nth-of-type( 7 ) {\n\t\tjustify-self: end;\n\t}\n`;\n\nexport const DayButton = styled( Button, {\n\tshouldForwardProp: ( prop: string ) =>\n\t\t! [ 'column', 'isSelected', 'isToday', 'hasEvents' ].includes( prop ),\n} )< {\n\tcolumn: number;\n\tisSelected: boolean;\n\tisToday: boolean;\n\thasEvents: boolean;\n} >`\n\tgrid-column: ${ ( props ) => props.column };\n\tposition: relative;\n\tjustify-content: center;\n\n\t${ ( props ) =>\n\t\tprops.column === 1 &&\n\t\t`\n\t\tjustify-self: start;\n\t\t` }\n\n\t${ ( props ) =>\n\t\tprops.column === 7 &&\n\t\t`\n\t\tjustify-self: end;\n\t\t` }\n\n\t${ ( props ) =>\n\t\tprops.disabled &&\n\t\t`\n\t\tpointer-events: none;\n\t\t` }\n\n\t&&& {\n\t\tborder-radius: 100%;\n\t\theight: ${ space( 7 ) };\n\t\twidth: ${ space( 7 ) };\n\n\t\t${ ( props ) =>\n\t\t\tprops.isSelected &&\n\t\t\t`\n\t\t\tbackground: ${ COLORS.ui.theme };\n\t\t\tcolor: ${ COLORS.white };\n\t\t\t` }\n\n\t\t${ ( props ) =>\n\t\t\t! props.isSelected &&\n\t\t\tprops.isToday &&\n\t\t\t`\n\t\t\tbackground: ${ COLORS.gray[ 200 ] };\n\t\t\t` }\n\t}\n\n\t${ ( props ) =>\n\t\tprops.hasEvents &&\n\t\t`\n\t\t::before {\n\t\t\tbackground: ${ props.isSelected ? COLORS.white : COLORS.ui.theme };\n\t\t\tborder-radius: 2px;\n\t\t\tbottom: 0;\n\t\t\tcontent: \" \";\n\t\t\theight: 4px;\n\t\t\tleft: 50%;\n\t\t\tmargin-left: -2px;\n\t\t\tposition: absolute;\n\t\t\twidth: 4px;\n\t\t}\n\t\t` }\n`;\n","/**\n * External dependencies\n */\nimport { toDate } from 'date-fns';\n\n/**\n * Like date-fn's toDate, but tries to guess the format when a string is\n * given.\n *\n * @param  input Value to turn into a date.\n */\nexport function inputToDate( input: Date | string | number ): Date {\n\tif ( typeof input === 'string' ) {\n\t\treturn new Date( input );\n\t}\n\treturn toDate( input );\n}\n","export const TIMEZONELESS_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\n","/**\n * External dependencies\n */\nimport { useLilius } from 'use-lilius';\nimport {\n\tformat,\n\tisSameDay,\n\tsubMonths,\n\taddMonths,\n\tstartOfDay,\n\tisEqual,\n\taddDays,\n\tsubWeeks,\n\taddWeeks,\n\tisSameMonth,\n\tstartOfWeek,\n\tendOfWeek,\n} from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf, isRTL } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight } from '@wordpress/icons';\nimport { dateI18n, getSettings } from '@wordpress/date';\nimport { useState, useRef, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DatePickerProps } from '../types';\nimport {\n\tWrapper,\n\tNavigator,\n\tNavigatorHeading,\n\tCalendar,\n\tDayOfWeek,\n\tDayButton,\n} from './styles';\nimport { inputToDate } from '../utils';\nimport Button from '../../button';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\n/**\n * DatePicker is a React component that renders a calendar for date selection.\n *\n * ```jsx\n * import { DatePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDatePicker = () => {\n *   const [ date, setDate ] = useState( new Date() );\n *\n *   return (\n *     <DatePicker\n *       currentDate={ date }\n *       onChange={ ( newDate ) => setDate( newDate ) }\n *     />\n *   );\n * };\n * ```\n */\nexport function DatePicker( {\n\tcurrentDate,\n\tonChange,\n\tevents = [],\n\tisInvalidDate,\n\tonMonthPreviewed,\n\tstartOfWeek: weekStartsOn = 0,\n}: DatePickerProps ) {\n\tconst date = currentDate ? inputToDate( currentDate ) : new Date();\n\n\tconst {\n\t\tcalendar,\n\t\tviewing,\n\t\tsetSelected,\n\t\tsetViewing,\n\t\tisSelected,\n\t\tviewPreviousMonth,\n\t\tviewNextMonth,\n\t} = useLilius( {\n\t\tselected: [ startOfDay( date ) ],\n\t\tviewing: startOfDay( date ),\n\t\tweekStartsOn,\n\t} );\n\n\t// Used to implement a roving tab index. Tracks the day that receives focus\n\t// when the user tabs into the calendar.\n\tconst [ focusable, setFocusable ] = useState( startOfDay( date ) );\n\n\t// Allows us to only programmatically focus() a day when focus was already\n\t// within the calendar. This stops us stealing focus from e.g. a TimePicker\n\t// input.\n\tconst [ isFocusWithinCalendar, setIsFocusWithinCalendar ] =\n\t\tuseState( false );\n\n\t// Update internal state when currentDate prop changes.\n\tconst [ prevCurrentDate, setPrevCurrentDate ] = useState( currentDate );\n\tif ( currentDate !== prevCurrentDate ) {\n\t\tsetPrevCurrentDate( currentDate );\n\t\tsetSelected( [ startOfDay( date ) ] );\n\t\tsetViewing( startOfDay( date ) );\n\t\tsetFocusable( startOfDay( date ) );\n\t}\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__date\"\n\t\t\trole=\"application\"\n\t\t\taria-label={ __( 'Calendar' ) }\n\t\t>\n\t\t\t<Navigator>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ isRTL() ? arrowRight : arrowLeft }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\taria-label={ __( 'View previous month' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tviewPreviousMonth();\n\t\t\t\t\t\tsetFocusable( subMonths( focusable, 1 ) );\n\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\tsubMonths( viewing, 1 ),\n\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\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<NavigatorHeading level={ 3 }>\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{ dateI18n(\n\t\t\t\t\t\t\t'F',\n\t\t\t\t\t\t\tviewing,\n\t\t\t\t\t\t\t-viewing.getTimezoneOffset()\n\t\t\t\t\t\t) }\n\t\t\t\t\t</strong>{ ' ' }\n\t\t\t\t\t{ dateI18n( 'Y', viewing, -viewing.getTimezoneOffset() ) }\n\t\t\t\t</NavigatorHeading>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ isRTL() ? arrowLeft : arrowRight }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\taria-label={ __( 'View next month' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tviewNextMonth();\n\t\t\t\t\t\tsetFocusable( addMonths( focusable, 1 ) );\n\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\taddMonths( viewing, 1 ),\n\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\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</Navigator>\n\t\t\t<Calendar\n\t\t\t\tonFocus={ () => setIsFocusWithinCalendar( true ) }\n\t\t\t\tonBlur={ () => setIsFocusWithinCalendar( false ) }\n\t\t\t>\n\t\t\t\t{ calendar[ 0 ][ 0 ].map( ( day ) => (\n\t\t\t\t\t<DayOfWeek key={ day.toString() }>\n\t\t\t\t\t\t{ dateI18n( 'D', day, -day.getTimezoneOffset() ) }\n\t\t\t\t\t</DayOfWeek>\n\t\t\t\t) ) }\n\t\t\t\t{ calendar[ 0 ].map( ( week ) =>\n\t\t\t\t\tweek.map( ( day, index ) => {\n\t\t\t\t\t\tif ( ! isSameMonth( day, viewing ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Day\n\t\t\t\t\t\t\t\tkey={ day.toString() }\n\t\t\t\t\t\t\t\tday={ day }\n\t\t\t\t\t\t\t\tcolumn={ index + 1 }\n\t\t\t\t\t\t\t\tisSelected={ isSelected( day ) }\n\t\t\t\t\t\t\t\tisFocusable={ isEqual( day, focusable ) }\n\t\t\t\t\t\t\t\tisFocusAllowed={ isFocusWithinCalendar }\n\t\t\t\t\t\t\t\tisToday={ isSameDay( day, new Date() ) }\n\t\t\t\t\t\t\t\tisInvalid={\n\t\t\t\t\t\t\t\t\tisInvalidDate ? isInvalidDate( day ) : false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnumEvents={\n\t\t\t\t\t\t\t\t\tevents.filter( ( event ) =>\n\t\t\t\t\t\t\t\t\t\tisSameDay( event.date, day )\n\t\t\t\t\t\t\t\t\t).length\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\tsetSelected( [ day ] );\n\t\t\t\t\t\t\t\t\tsetFocusable( day );\n\t\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\t\t\t\t// Don't change the selected date's time fields.\n\t\t\t\t\t\t\t\t\t\t\tnew Date(\n\t\t\t\t\t\t\t\t\t\t\t\tday.getFullYear(),\n\t\t\t\t\t\t\t\t\t\t\t\tday.getMonth(),\n\t\t\t\t\t\t\t\t\t\t\t\tday.getDate(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getHours(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getMinutes(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getSeconds(),\n\t\t\t\t\t\t\t\t\t\t\t\tdate.getMilliseconds()\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\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\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\t\tlet nextFocusable;\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowLeft' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addDays(\n\t\t\t\t\t\t\t\t\t\t\tday,\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? 1 : -1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowRight' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addDays(\n\t\t\t\t\t\t\t\t\t\t\tday,\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? -1 : 1\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowUp' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = subWeeks( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'ArrowDown' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addWeeks( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'PageUp' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = subMonths( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'PageDown' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = addMonths( day, 1 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'Home' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = startOfWeek( day );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( event.key === 'End' ) {\n\t\t\t\t\t\t\t\t\t\tnextFocusable = startOfDay(\n\t\t\t\t\t\t\t\t\t\t\tendOfWeek( day )\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( nextFocusable ) {\n\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\tsetFocusable( nextFocusable );\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t! isSameMonth(\n\t\t\t\t\t\t\t\t\t\t\t\tnextFocusable,\n\t\t\t\t\t\t\t\t\t\t\t\tviewing\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\tsetViewing( nextFocusable );\n\t\t\t\t\t\t\t\t\t\t\tonMonthPreviewed?.(\n\t\t\t\t\t\t\t\t\t\t\t\tformat(\n\t\t\t\t\t\t\t\t\t\t\t\t\tnextFocusable,\n\t\t\t\t\t\t\t\t\t\t\t\t\tTIMEZONELESS_FORMAT\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/>\n\t\t\t\t\t\t);\n\t\t\t\t\t} )\n\t\t\t\t) }\n\t\t\t</Calendar>\n\t\t</Wrapper>\n\t);\n}\n\ntype DayProps = {\n\tday: Date;\n\tcolumn: number;\n\tisSelected: boolean;\n\tisFocusable: boolean;\n\tisFocusAllowed: boolean;\n\tisToday: boolean;\n\tnumEvents: number;\n\tisInvalid: boolean;\n\tonClick: () => void;\n\tonKeyDown: ( event: KeyboardEvent ) => void;\n};\n\nfunction Day( {\n\tday,\n\tcolumn,\n\tisSelected,\n\tisFocusable,\n\tisFocusAllowed,\n\tisToday,\n\tisInvalid,\n\tnumEvents,\n\tonClick,\n\tonKeyDown,\n}: DayProps ) {\n\tconst ref = useRef< HTMLButtonElement >();\n\n\t// Focus the day when it becomes focusable, e.g. because an arrow key is\n\t// pressed. Only do this if focus is allowed - this stops us stealing focus\n\t// from e.g. a TimePicker input.\n\tuseEffect( () => {\n\t\tif ( ref.current && isFocusable && isFocusAllowed ) {\n\t\t\tref.current.focus();\n\t\t}\n\t\t// isFocusAllowed is not a dep as there is no point calling focus() on\n\t\t// an already focused element.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ isFocusable ] );\n\n\treturn (\n\t\t<DayButton\n\t\t\tref={ ref }\n\t\t\tclassName=\"components-datetime__date__day\" // Unused, for backwards compatibility.\n\t\t\tdisabled={ isInvalid }\n\t\t\ttabIndex={ isFocusable ? 0 : -1 }\n\t\t\taria-label={ getDayLabel( day, isSelected, numEvents ) }\n\t\t\tcolumn={ column }\n\t\t\tisSelected={ isSelected }\n\t\t\tisToday={ isToday }\n\t\t\thasEvents={ numEvents > 0 }\n\t\t\tonClick={ onClick }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t>\n\t\t\t{ dateI18n( 'j', day, -day.getTimezoneOffset() ) }\n\t\t</DayButton>\n\t);\n}\n\nfunction getDayLabel( date: Date, isSelected: boolean, numEvents: number ) {\n\tconst { formats } = getSettings();\n\tconst localizedDate = dateI18n(\n\t\tformats.date,\n\t\tdate,\n\t\t-date.getTimezoneOffset()\n\t);\n\tif ( isSelected && numEvents > 0 ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: The calendar date. 2: Number of events on the calendar date.\n\t\t\t_n(\n\t\t\t\t'%1$s. Selected. There is %2$d event',\n\t\t\t\t'%1$s. Selected. There are %2$d events',\n\t\t\t\tnumEvents\n\t\t\t),\n\t\t\tlocalizedDate,\n\t\t\tnumEvents\n\t\t);\n\t} else if ( isSelected ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: The calendar date.\n\t\t\t__( '%1$s. Selected' ),\n\t\t\tlocalizedDate\n\t\t);\n\t} else if ( numEvents > 0 ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: The calendar date. 2: Number of events on the calendar date.\n\t\t\t_n(\n\t\t\t\t'%1$s. There is %2$d event',\n\t\t\t\t'%1$s. There are %2$d events',\n\t\t\t\tnumEvents\n\t\t\t),\n\t\t\tlocalizedDate,\n\t\t\tnumEvents\n\t\t);\n\t}\n\treturn localizedDate;\n}\n\nexport default DatePicker;\n","import toInteger from \"../_lib/toInteger/index.js\";\nimport addWeeks from \"../addWeeks/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\n\nexport default function subWeeks(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addWeeks(dirtyDate, -amount);\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setDate(date.getDate() - diff);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n  date.setDate(date.getDate() + diff);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMinute\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a minute\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\n\nexport default function startOfMinute(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setSeconds(0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getFullYear();\n  var monthIndex = date.getMonth();\n  var lastDayOfMonth = new Date(0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var month = toInteger(dirtyMonth);\n  var year = date.getFullYear();\n  var day = date.getDate();\n  var dateWithDesiredMonth = new Date(0);\n  dateWithDesiredMonth.setFullYear(year, month, 15);\n  dateWithDesiredMonth.setHours(0, 0, 0, 0);\n  var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n  // if the original date was the last day of the longer month\n\n  date.setMonth(month, Math.min(day, daysInMonth));\n  return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport toDate from \"../toDate/index.js\";\nimport setMonth from \"../setMonth/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Object} values - an object with options\n * @param {Number} [values.year] - the number of years to be set\n * @param {Number} [values.month] - the number of months to be set\n * @param {Number} [values.date] - the number of days to be set\n * @param {Number} [values.hours] - the number of hours to be set\n * @param {Number} [values.minutes] - the number of minutes to be set\n * @param {Number} [values.seconds] - the number of seconds to be set\n * @param {Number} [values.milliseconds] - the number of milliseconds to be set\n * @returns {Date} the new date with options set\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `values` must be an object\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport default function set(dirtyDate, values) {\n  requiredArgs(2, arguments);\n\n  if (_typeof(values) !== 'object' || values === null) {\n    throw new RangeError('values parameter must be an object');\n  }\n\n  var date = toDate(dirtyDate); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n  if (isNaN(date.getTime())) {\n    return new Date(NaN);\n  }\n\n  if (values.year != null) {\n    date.setFullYear(values.year);\n  }\n\n  if (values.month != null) {\n    date = setMonth(date, values.month);\n  }\n\n  if (values.date != null) {\n    date.setDate(toInteger(values.date));\n  }\n\n  if (values.hours != null) {\n    date.setHours(toInteger(values.hours));\n  }\n\n  if (values.minutes != null) {\n    date.setMinutes(toInteger(values.minutes));\n  }\n\n  if (values.seconds != null) {\n    date.setSeconds(toInteger(values.seconds));\n  }\n\n  if (values.milliseconds != null) {\n    date.setMilliseconds(toInteger(values.milliseconds));\n  }\n\n  return date;\n}","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../../utils';\nimport { space } from '../../ui/utils/space';\nimport {\n\tInput,\n\tBackdropUI,\n} from '../../input-control/styles/input-control-styles';\nimport NumberControl from '../../number-control';\nimport SelectControl from '../../select-control';\nimport { Select } from '../../select-control/styles/select-control-styles';\n\nexport const Wrapper = styled.div`\n\tbox-sizing: border-box;\n\tfont-size: ${ CONFIG.fontSize };\n`;\n\nexport const Fieldset = styled.fieldset`\n\tborder: 0;\n\tmargin: 0 0 ${ space( 2 * 2 ) } 0;\n\tpadding: 0;\n\n\t&:last-child {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nexport const TimeWrapper = styled.div`\n\tdirection: ltr;\n\tdisplay: flex;\n`;\n\nconst baseInput = css`\n\t&&& ${ Input } {\n\t\tpadding-left: ${ space( 2 ) };\n\t\tpadding-right: ${ space( 2 ) };\n\t\ttext-align: center;\n\t}\n`;\n\nexport const HoursInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n\n\t&&& ${ Input } {\n\t\tpadding-right: 0;\n\t}\n\n\t&&& ${ BackdropUI } {\n\t\tborder-right: 0;\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t}\n`;\n\nexport const TimeSeparator = styled.span`\n\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 700 ] };\n\tborder-bottom: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 700 ] };\n\tline-height: calc(\n\t\t${ CONFIG.controlHeight } - ${ CONFIG.borderWidth } * 2\n\t);\n\tdisplay: inline-block;\n`;\n\nexport const MinutesInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n\n\t&&& ${ Input } {\n\t\tpadding-left: 0;\n\t}\n\n\t&&& ${ BackdropUI } {\n\t\tborder-left: 0;\n\t\tborder-top-left-radius: 0;\n\t\tborder-bottom-left-radius: 0;\n\t}\n`;\n\n// Ideally we wouldn't need a wrapper, but can't otherwise target the\n// <BaseControl> in <SelectControl>\nexport const MonthSelectWrapper = styled.div`\n\tflex-grow: 1;\n`;\n\nexport const MonthSelect = styled( SelectControl )`\n\theight: 36px;\n\n\t${ Select } {\n\t\tline-height: 30px;\n\t}\n`;\n\nexport const DayInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 9 ) };\n`;\n\nexport const YearInput = styled( NumberControl )`\n\t${ baseInput }\n\n\twidth: ${ space( 14 ) };\n`;\n\nexport const TimeZone = styled.div`\n\ttext-decoration: underline dotted;\n`;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSettings as getDateSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../../tooltip';\nimport { TimeZone as StyledComponent } from './styles';\n\n/**\n * Displays timezone information when user timezone is different from site\n * timezone.\n */\nconst TimeZone = () => {\n\tconst { timezone } = getDateSettings();\n\n\t// Convert timezone offset to hours.\n\tconst userTimezoneOffset = -1 * ( new Date().getTimezoneOffset() / 60 );\n\n\t// System timezone and user timezone match, nothing needed.\n\t// Compare as numbers because it comes over as string.\n\tif ( Number( timezone.offset ) === userTimezoneOffset ) {\n\t\treturn null;\n\t}\n\n\tconst offsetSymbol = Number( timezone.offset ) >= 0 ? '+' : '';\n\tconst zoneAbbr =\n\t\t'' !== timezone.abbr && isNaN( Number( timezone.abbr ) )\n\t\t\t? timezone.abbr\n\t\t\t: `UTC${ offsetSymbol }${ timezone.offset }`;\n\n\tconst timezoneDetail =\n\t\t'UTC' === timezone.string\n\t\t\t? __( 'Coordinated Universal Time' )\n\t\t\t: `(${ zoneAbbr }) ${ timezone.string.replace( '_', ' ' ) }`;\n\n\treturn (\n\t\t<Tooltip position=\"top center\" text={ timezoneDetail }>\n\t\t\t<StyledComponent className=\"components-datetime__timezone\">\n\t\t\t\t{ zoneAbbr }\n\t\t\t</StyledComponent>\n\t\t</Tooltip>\n\t);\n};\n\nexport default TimeZone;\n","/**\n * External dependencies\n */\nimport { startOfMinute, format, set, setHours, setMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../../base-control';\nimport Button from '../../button';\nimport ButtonGroup from '../../button-group';\nimport TimeZone from './timezone';\nimport type { TimePickerProps } from '../types';\nimport {\n\tWrapper,\n\tFieldset,\n\tHoursInput,\n\tTimeSeparator,\n\tMinutesInput,\n\tMonthSelectWrapper,\n\tMonthSelect,\n\tDayInput,\n\tYearInput,\n\tTimeWrapper,\n} from './styles';\nimport { HStack } from '../../h-stack';\nimport { Spacer } from '../../spacer';\nimport type { InputChangeCallback } from '../../input-control/types';\nimport type { InputState } from '../../input-control/reducer/state';\nimport {\n\tCOMMIT,\n\tInputAction,\n\tPRESS_DOWN,\n\tPRESS_UP,\n} from '../../input-control/reducer/actions';\nimport { inputToDate } from '../utils';\nimport { TIMEZONELESS_FORMAT } from '../constants';\n\nfunction from12hTo24h( hours: number, isPm: boolean ) {\n\treturn isPm ? ( ( hours % 12 ) + 12 ) % 24 : hours % 12;\n}\n\n/**\n * Creates an InputControl reducer used to pad an input so that it is always a\n * given width. For example, the hours and minutes inputs are padded to 2 so\n * that '4' appears as '04'.\n *\n * @param  pad How many digits the value should be.\n */\nfunction buildPadInputStateReducer( pad: number ) {\n\treturn ( state: InputState, action: InputAction ) => {\n\t\tconst nextState = { ...state };\n\t\tif (\n\t\t\taction.type === COMMIT ||\n\t\t\taction.type === PRESS_UP ||\n\t\t\taction.type === PRESS_DOWN\n\t\t) {\n\t\t\tif ( nextState.value !== undefined ) {\n\t\t\t\tnextState.value = nextState.value\n\t\t\t\t\t.toString()\n\t\t\t\t\t.padStart( pad, '0' );\n\t\t\t}\n\t\t}\n\t\treturn nextState;\n\t};\n}\n\n/**\n * TimePicker is a React component that renders a clock for time selection.\n *\n * ```jsx\n * import { TimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTimePicker = () => {\n *   const [ time, setTime ] = useState( new Date() );\n *\n *   return (\n *     <TimePicker\n *       currentTime={ date }\n *       onChange={ ( newTime ) => setTime( newTime ) }\n *       is12Hour\n *     />\n *   );\n * };\n * ```\n */\nexport function TimePicker( {\n\tis12Hour,\n\tcurrentTime,\n\tonChange,\n}: TimePickerProps ) {\n\tconst [ date, setDate ] = useState( () =>\n\t\t// Truncate the date at the minutes, see: #15495.\n\t\tcurrentTime ? startOfMinute( inputToDate( currentTime ) ) : new Date()\n\t);\n\n\t// Reset the state when currentTime changed.\n\t// TODO: useEffect() shouldn't be used like this, causes an unnecessary render\n\tuseEffect( () => {\n\t\tsetDate(\n\t\t\tcurrentTime\n\t\t\t\t? startOfMinute( inputToDate( currentTime ) )\n\t\t\t\t: new Date()\n\t\t);\n\t}, [ currentTime ] );\n\n\tconst { day, month, year, minutes, hours, am } = useMemo(\n\t\t() => ( {\n\t\t\tday: format( date, 'dd' ),\n\t\t\tmonth: format( date, 'MM' ),\n\t\t\tyear: format( date, 'yyyy' ),\n\t\t\tminutes: format( date, 'mm' ),\n\t\t\thours: format( date, is12Hour ? 'hh' : 'HH' ),\n\t\t\tam: format( date, 'a' ),\n\t\t} ),\n\t\t[ date, is12Hour ]\n\t);\n\n\tconst buildNumberControlChangeCallback = (\n\t\tmethod: 'hours' | 'minutes' | 'date' | 'year'\n\t) => {\n\t\tconst callback: InputChangeCallback = ( value, { event } ) => {\n\t\t\tif ( ! ( event.target instanceof HTMLInputElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! event.target.validity.valid ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We can safely assume value is a number if target is valid.\n\t\t\tlet numberValue = Number( value );\n\n\t\t\t// If the 12-hour format is being used and the 'PM' period is\n\t\t\t// selected, then the incoming value (which ranges 1-12) should be\n\t\t\t// increased by 12 to match the expected 24-hour format.\n\t\t\tif ( method === 'hours' && is12Hour ) {\n\t\t\t\tnumberValue = from12hTo24h( numberValue, am === 'PM' );\n\t\t\t}\n\n\t\t\tconst newDate = set( date, { [ method ]: numberValue } );\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t\treturn callback;\n\t};\n\n\tfunction buildAmPmChangeCallback( value: 'AM' | 'PM' ) {\n\t\treturn () => {\n\t\t\tif ( am === value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst parsedHours = parseInt( hours, 10 );\n\n\t\t\tconst newDate = setHours(\n\t\t\t\tdate,\n\t\t\t\tfrom12hTo24h( parsedHours, value === 'PM' )\n\t\t\t);\n\t\t\tsetDate( newDate );\n\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t};\n\t}\n\n\tconst dayField = (\n\t\t<DayInput\n\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-day\" // Unused, for backwards compatibility.\n\t\t\tlabel={ __( 'Day' ) }\n\t\t\thideLabelFromVision\n\t\t\t__next36pxDefaultSize\n\t\t\tvalue={ day }\n\t\t\tstep={ 1 }\n\t\t\tmin={ 1 }\n\t\t\tmax={ 31 }\n\t\t\trequired\n\t\t\thideHTMLArrows\n\t\t\tisPressEnterToChange\n\t\t\tisDragEnabled={ false }\n\t\t\tisShiftStepEnabled={ false }\n\t\t\tonChange={ buildNumberControlChangeCallback( 'date' ) }\n\t\t/>\n\t);\n\n\tconst monthField = (\n\t\t<MonthSelectWrapper>\n\t\t\t<MonthSelect\n\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-month\" // Unused, for backwards compatibility.\n\t\t\t\tlabel={ __( 'Month' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ month }\n\t\t\t\toptions={ [\n\t\t\t\t\t{ value: '01', label: __( 'January' ) },\n\t\t\t\t\t{ value: '02', label: __( 'February' ) },\n\t\t\t\t\t{ value: '03', label: __( 'March' ) },\n\t\t\t\t\t{ value: '04', label: __( 'April' ) },\n\t\t\t\t\t{ value: '05', label: __( 'May' ) },\n\t\t\t\t\t{ value: '06', label: __( 'June' ) },\n\t\t\t\t\t{ value: '07', label: __( 'July' ) },\n\t\t\t\t\t{ value: '08', label: __( 'August' ) },\n\t\t\t\t\t{ value: '09', label: __( 'September' ) },\n\t\t\t\t\t{ value: '10', label: __( 'October' ) },\n\t\t\t\t\t{ value: '11', label: __( 'November' ) },\n\t\t\t\t\t{ value: '12', label: __( 'December' ) },\n\t\t\t\t] }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst newDate = setMonth( date, Number( value ) - 1 );\n\t\t\t\t\tsetDate( newDate );\n\t\t\t\t\tonChange?.( format( newDate, TIMEZONELESS_FORMAT ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</MonthSelectWrapper>\n\t);\n\n\treturn (\n\t\t<Wrapper\n\t\t\tclassName=\"components-datetime__time\" // Unused, for backwards compatibility.\n\t\t>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Time' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<TimeWrapper\n\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-time\" // Unused, for backwards compatibility.\n\t\t\t\t\t>\n\t\t\t\t\t\t<HoursInput\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field-hours-input\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tlabel={ __( 'Hours' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t__next36pxDefaultSize\n\t\t\t\t\t\t\tvalue={ hours }\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tmin={ is12Hour ? 1 : 0 }\n\t\t\t\t\t\t\tmax={ is12Hour ? 12 : 23 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\thideHTMLArrows\n\t\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback(\n\t\t\t\t\t\t\t\t'hours'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<TimeSeparator\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-separator\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t:\n\t\t\t\t\t\t</TimeSeparator>\n\t\t\t\t\t\t<MinutesInput\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field-minutes-input\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tlabel={ __( 'Minutes' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t__next36pxDefaultSize\n\t\t\t\t\t\t\tvalue={ minutes }\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 59 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\thideHTMLArrows\n\t\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback(\n\t\t\t\t\t\t\t\t'minutes'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</TimeWrapper>\n\t\t\t\t\t{ is12Hour && (\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-am-pm\" // Unused, for backwards compatibility.\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=\"components-datetime__time-am-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tam === 'AM' ? 'primary' : 'secondary'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={ buildAmPmChangeCallback( 'AM' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'AM' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__time-pm-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tam === 'PM' ? 'primary' : 'secondary'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={ buildAmPmChangeCallback( 'PM' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'PM' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t<TimeZone />\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t\t<Fieldset>\n\t\t\t\t<BaseControl.VisualLabel\n\t\t\t\t\tas=\"legend\"\n\t\t\t\t\tclassName=\"components-datetime__time-legend\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Date' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__time-wrapper\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ is12Hour ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ monthField }\n\t\t\t\t\t\t\t{ dayField }\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{ dayField }\n\t\t\t\t\t\t\t{ monthField }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t<YearInput\n\t\t\t\t\t\tclassName=\"components-datetime__time-field components-datetime__time-field-year\" // Unused, for backwards compatibility.\n\t\t\t\t\t\tlabel={ __( 'Year' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t__next36pxDefaultSize\n\t\t\t\t\t\tvalue={ year }\n\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 9999 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t\thideHTMLArrows\n\t\t\t\t\t\tisPressEnterToChange\n\t\t\t\t\t\tisDragEnabled={ false }\n\t\t\t\t\t\tisShiftStepEnabled={ false }\n\t\t\t\t\t\tonChange={ buildNumberControlChangeCallback( 'year' ) }\n\t\t\t\t\t\t__unstableStateReducer={ buildPadInputStateReducer(\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t</Fieldset>\n\t\t</Wrapper>\n\t);\n}\n\nexport default TimePicker;\n","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * const result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var hours = toInteger(dirtyHours);\n  date.setHours(hours);\n  return date;\n}","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { VStack } from '../../v-stack';\n\nexport const Wrapper = styled( VStack )`\n\tbox-sizing: border-box;\n`;\n\nexport const CalendarHelp = styled.div`\n\tmin-width: 260px;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useState, forwardRef } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport type { DateTimePickerProps } from '../types';\nimport { Wrapper, CalendarHelp } from './styles';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { Spacer } from '../../spacer';\n\nexport { DatePicker, TimePicker };\n\nconst noop = () => {};\n\nfunction UnforwardedDateTimePicker(\n\t{\n\t\tcurrentDate,\n\t\tis12Hour,\n\t\tisInvalidDate,\n\t\tonMonthPreviewed = noop,\n\t\tonChange,\n\t\tevents,\n\t\tstartOfWeek,\n\t\t__nextRemoveHelpButton = false,\n\t\t__nextRemoveResetButton = false,\n\t}: DateTimePickerProps,\n\tref: ForwardedRef< any >\n) {\n\tif ( ! __nextRemoveHelpButton ) {\n\t\tdeprecated( 'Help button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\tif ( ! __nextRemoveResetButton ) {\n\t\tdeprecated( 'Reset button in wp.components.DateTimePicker', {\n\t\t\tsince: '13.4',\n\t\t\tversion: '14.6', // Six months of plugin releases.\n\t\t\thint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =\n\t\tuseState( false );\n\n\tfunction onClickDescriptionToggle() {\n\t\tsetCalendarHelpIsVisible( ! calendarHelpIsVisible );\n\t}\n\n\treturn (\n\t\t<Wrapper ref={ ref } className=\"components-datetime\" spacing={ 4 }>\n\t\t\t{ ! calendarHelpIsVisible && (\n\t\t\t\t<>\n\t\t\t\t\t<TimePicker\n\t\t\t\t\t\tcurrentTime={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tis12Hour={ is12Hour }\n\t\t\t\t\t/>\n\t\t\t\t\t<DatePicker\n\t\t\t\t\t\tcurrentDate={ currentDate }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisInvalidDate={ isInvalidDate }\n\t\t\t\t\t\tevents={ events }\n\t\t\t\t\t\tonMonthPreviewed={ onMonthPreviewed }\n\t\t\t\t\t\tstartOfWeek={ startOfWeek }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ calendarHelpIsVisible && (\n\t\t\t\t<CalendarHelp\n\t\t\t\t\tclassName=\"components-datetime__calendar-help\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Click the right or left arrows to select other months in the past or the future.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>{ __( 'Click the desired day to select it.' ) }</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<Heading level={ 4 }>\n\t\t\t\t\t\t{ __( 'Navigating with a keyboard' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr\n\t\t\t\t\t\t\t\taria-label={ _x( 'Enter', 'keyboard button' ) }\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</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>{ __( 'Select the date in focus.' ) }</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Left and Right Arrows' ) }>\n\t\t\t\t\t\t\t\t←/→\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\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'Move backward (left) or forward (right) by one day.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Up and Down Arrows' ) }>\n\t\t\t\t\t\t\t\t↑/↓\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\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'Move backward (up) or forward (down) by one week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Page Up and Page Down' ) }>\n\t\t\t\t\t\t\t\t{ __( 'PgUp/PgDn' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\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'Move backward (PgUp) or forward (PgDn) by one month.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<abbr aria-label={ __( 'Home and End' ) }>\n\t\t\t\t\t\t\t\t{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }\n\t\t\t\t\t\t\t\t{ __( 'Home/End' ) }\n\t\t\t\t\t\t\t</abbr>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t' ' /* JSX removes whitespace, but a space is required for screen readers. */\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'Go to the first (Home) or last (End) day of a week.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</CalendarHelp>\n\t\t\t) }\n\t\t\t{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"components-datetime__buttons\" // Unused, for backwards compatibility.\n\t\t\t\t>\n\t\t\t\t\t{ ! __nextRemoveResetButton &&\n\t\t\t\t\t\t! calendarHelpIsVisible &&\n\t\t\t\t\t\tcurrentDate && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"components-datetime__date-reset-button\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\tonClick={ () => onChange?.( null ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t<Spacer />\n\t\t\t\t\t{ ! __nextRemoveHelpButton && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-datetime__date-help-toggle\" // Unused, for backwards compatibility.\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ onClickDescriptionToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ calendarHelpIsVisible\n\t\t\t\t\t\t\t\t? __( 'Close' )\n\t\t\t\t\t\t\t\t: __( 'Calendar Help' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n *   const [ date, setDate ] = useState( new Date() );\n *\n *   return (\n *     <DateTimePicker\n *       currentDate={ date }\n *       onChange={ ( newDate ) => setDate( newDate ) }\n *       is12Hour\n *     />\n *   );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef( UnforwardedDateTimePicker );\n\nexport default DateTimePicker;\n","/**\n * Internal dependencies\n */\nimport { default as DatePicker } from './date';\nimport { default as TimePicker } from './time';\nimport { default as DateTimePicker } from './date-time';\n\nexport { DatePicker, TimePicker };\nexport default DateTimePicker;\n","/**\n * Sizes\n *\n * defines the sizes used in dimension controls\n * all hardcoded `size` values are based on the value of\n * the Sass variable `$block-padding` from\n * `packages/block-editor/src/components/dimension-control/sizes.js`.\n */\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Finds the correct size object from the provided sizes\n * table by size slug (eg: `medium`)\n *\n * @param {Array}  sizes containing objects for each size definition.\n * @param {string} slug  a string representation of the size (eg: `medium`).\n *\n * @return {Object} the matching size definition.\n */\nexport const findSizeBySlug = ( sizes, slug ) =>\n\tsizes.find( ( size ) => slug === size.slug );\n\nexport default [\n\t{\n\t\tname: _x( 'None', 'Size of a UI element' ),\n\t\tslug: 'none',\n\t},\n\t{\n\t\tname: _x( 'Small', 'Size of a UI element' ),\n\t\tslug: 'small',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'Size of a UI element' ),\n\t\tslug: 'medium',\n\t},\n\t{\n\t\tname: _x( 'Large', 'Size of a UI element' ),\n\t\tslug: 'large',\n\t},\n\t{\n\t\tname: _x( 'Extra Large', 'Size of a UI element' ),\n\t\tslug: 'xlarge',\n\t},\n];\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Icon, SelectControl } from '../';\nimport sizesTable, { findSizeBySlug } from './sizes';\n\nexport function DimensionControl( props ) {\n\tconst {\n\t\tlabel,\n\t\tvalue,\n\t\tsizes = sizesTable,\n\t\ticon,\n\t\tonChange,\n\t\tclassName = '',\n\t} = props;\n\n\tconst onChangeSpacingSize = ( val ) => {\n\t\tconst theSize = findSizeBySlug( sizes, val );\n\n\t\tif ( ! theSize || value === theSize.slug ) {\n\t\t\tonChange( undefined );\n\t\t} else if ( typeof onChange === 'function' ) {\n\t\t\tonChange( theSize.slug );\n\t\t}\n\t};\n\n\tconst formatSizesAsOptions = ( theSizes ) => {\n\t\tconst options = theSizes.map( ( { name, slug } ) => ( {\n\t\t\tlabel: name,\n\t\t\tvalue: slug,\n\t\t} ) );\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: __( 'Default' ),\n\t\t\t\tvalue: '',\n\t\t\t},\n\t\t].concat( options );\n\t};\n\n\tconst selectLabel = (\n\t\t<Fragment>\n\t\t\t{ icon && <Icon icon={ icon } /> }\n\t\t\t{ label }\n\t\t</Fragment>\n\t);\n\n\treturn (\n\t\t<SelectControl\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'block-editor-dimension-control'\n\t\t\t) }\n\t\t\tlabel={ selectLabel }\n\t\t\thideLabelFromVision={ false }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChangeSpacingSize }\n\t\t\toptions={ formatSizesAsOptions( sizes ) }\n\t\t/>\n\t);\n}\n\nexport default DimensionControl;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\nexport const disabledStyles = css`\n\tposition: relative;\n\tpointer-events: none;\n\n\t&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t}\n\n\t// Also make nested blocks unselectable.\n\t* {\n\t\tpointer-events: none;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { HTMLProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useDisabled } from '@wordpress/compose';\nimport { createContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { disabledStyles } from './styles/disabled-styles';\nimport type { DisabledProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useCx } from '../utils';\n\nconst Context = createContext< boolean >( false );\nconst { Consumer, Provider } = Context;\n\n// Extracting this ContentWrapper component in order to make it more explicit\n// the same 'ContentWrapper' component is needed so that React can reconcile\n// the dom correctly when switching between disabled/non-disabled (instead\n// of thrashing the previous DOM and therefore losing the form fields values).\nconst ContentWrapper = forwardRef<\n\tHTMLDivElement,\n\tHTMLProps< HTMLDivElement >\n>( ( props, ref ) => <div { ...props } ref={ ref } /> );\n\n/**\n * `Disabled` is a component which disables descendant tabbable elements and prevents pointer interaction.\n *\n * ```jsx\n * import { Button, Disabled, TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDisabled = () => {\n * \tconst [ isDisabled, setIsDisabled ] = useState( true );\n *\n * \tlet input = <TextControl label=\"Input\" onChange={ () => {} } />;\n * \tif ( isDisabled ) {\n * \t\tinput = <Disabled>{ input }</Disabled>;\n * \t}\n *\n * \tconst toggleDisabled = () => {\n * \t\tsetIsDisabled( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t{ input }\n * \t\t\t<Button variant=\"primary\" onClick={ toggleDisabled }>\n * \t\t\t\tToggle Disabled\n * \t\t\t</Button>\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction Disabled( {\n\tclassName,\n\tchildren,\n\tisDisabled = true,\n\t...props\n}: WordPressComponentProps< DisabledProps, 'div' > ) {\n\tconst ref = useDisabled();\n\tconst cx = useCx();\n\tif ( ! isDisabled ) {\n\t\treturn (\n\t\t\t<Provider value={ false }>\n\t\t\t\t<ContentWrapper>{ children }</ContentWrapper>\n\t\t\t</Provider>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Provider value={ true }>\n\t\t\t<ContentWrapper\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ cx(\n\t\t\t\t\tdisabledStyles,\n\t\t\t\t\tclassName,\n\t\t\t\t\t'components-disabled'\n\t\t\t\t) }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</ContentWrapper>\n\t\t</Provider>\n\t);\n}\n\nDisabled.Context = Context;\nDisabled.Consumer = Consumer;\n\nexport default Disabled;\n","/**\n * WordPress dependencies\n */\nimport { throttle } from '@wordpress/compose';\nimport { useEffect, useRef } from '@wordpress/element';\n\nconst dragImageClass = 'components-draggable__invisible-drag-image';\nconst cloneWrapperClass = 'components-draggable__clone';\nconst clonePadding = 0;\nconst bodyClass = 'is-dragging-components-draggable';\n\n/**\n * @typedef RenderProp\n * @property {(event: import('react').DragEvent) => void} onDraggableStart `onDragStart` handler.\n * @property {(event: import('react').DragEvent) => void} onDraggableEnd   `onDragEnd` handler.\n */\n\n/**\n * @typedef Props\n * @property {(props: RenderProp) => JSX.Element | null}  children                         Children.\n * @property {(event: import('react').DragEvent) => void} [onDragStart]                    Callback when dragging starts.\n * @property {(event: import('react').DragEvent) => void} [onDragOver]                     Callback when dragging happens over the document.\n * @property {(event: import('react').DragEvent) => void} [onDragEnd]                      Callback when dragging ends.\n * @property {string}                                     [cloneClassname]                 Classname for the cloned element.\n * @property {string}                                     [elementId]                      ID for the element.\n * @property {any}                                        [transferData]                   Transfer data for the drag event.\n * @property {string}                                     [__experimentalTransferDataType] The transfer data type to set.\n * @property {import('react').ReactNode}                  __experimentalDragComponent      Component to show when dragging.\n */\n\n/**\n * @param {Props} props\n * @return {JSX.Element} A draggable component.\n */\nexport default function Draggable( {\n\tchildren,\n\tonDragStart,\n\tonDragOver,\n\tonDragEnd,\n\tcloneClassname,\n\telementId,\n\ttransferData,\n\t__experimentalTransferDataType: transferDataType = 'text',\n\t__experimentalDragComponent: dragComponent,\n} ) {\n\t/** @type {import('react').MutableRefObject<HTMLDivElement | null>} */\n\tconst dragComponentRef = useRef( null );\n\tconst cleanup = useRef( () => {} );\n\n\t/**\n\t * Removes the element clone, resets cursor, and removes drag listener.\n\t *\n\t * @param {import('react').DragEvent} event The non-custom DragEvent.\n\t */\n\tfunction end( event ) {\n\t\tevent.preventDefault();\n\t\tcleanup.current();\n\n\t\tif ( onDragEnd ) {\n\t\t\tonDragEnd( event );\n\t\t}\n\t}\n\n\t/**\n\t * This method does a couple of things:\n\t *\n\t * - Clones the current element and spawns clone over original element.\n\t * - Adds a fake temporary drag image to avoid browser defaults.\n\t * - Sets transfer data.\n\t * - Adds dragover listener.\n\t *\n\t * @param {import('react').DragEvent} event The non-custom DragEvent.\n\t */\n\tfunction start( event ) {\n\t\t// @ts-ignore We know that ownerDocument does exist on an Element\n\t\tconst { ownerDocument } = event.target;\n\n\t\tevent.dataTransfer.setData(\n\t\t\ttransferDataType,\n\t\t\tJSON.stringify( transferData )\n\t\t);\n\n\t\tconst cloneWrapper = ownerDocument.createElement( 'div' );\n\t\t// Reset position to 0,0. Natural stacking order will position this lower, even with a transform otherwise.\n\t\tcloneWrapper.style.top = 0;\n\t\tcloneWrapper.style.left = 0;\n\n\t\tconst dragImage = ownerDocument.createElement( 'div' );\n\n\t\t// Set a fake drag image to avoid browser defaults. Remove from DOM\n\t\t// right after. event.dataTransfer.setDragImage is not supported yet in\n\t\t// IE, we need to check for its existence first.\n\t\tif ( 'function' === typeof event.dataTransfer.setDragImage ) {\n\t\t\tdragImage.classList.add( dragImageClass );\n\t\t\townerDocument.body.appendChild( dragImage );\n\t\t\tevent.dataTransfer.setDragImage( dragImage, 0, 0 );\n\t\t}\n\n\t\tcloneWrapper.classList.add( cloneWrapperClass );\n\n\t\tif ( cloneClassname ) {\n\t\t\tcloneWrapper.classList.add( cloneClassname );\n\t\t}\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\t// If a dragComponent is defined, the following logic will clone the\n\t\t// HTML node and inject it into the cloneWrapper.\n\t\tif ( dragComponentRef.current ) {\n\t\t\t// Position dragComponent at the same position as the cursor.\n\t\t\tx = event.clientX;\n\t\t\ty = event.clientY;\n\t\t\tcloneWrapper.style.transform = `translate( ${ x }px, ${ y }px )`;\n\n\t\t\tconst clonedDragComponent = ownerDocument.createElement( 'div' );\n\t\t\tclonedDragComponent.innerHTML = dragComponentRef.current.innerHTML;\n\t\t\tcloneWrapper.appendChild( clonedDragComponent );\n\n\t\t\t// Inject the cloneWrapper into the DOM.\n\t\t\townerDocument.body.appendChild( cloneWrapper );\n\t\t} else {\n\t\t\tconst element = ownerDocument.getElementById( elementId );\n\n\t\t\t// Prepare element clone and append to element wrapper.\n\t\t\tconst elementRect = element.getBoundingClientRect();\n\t\t\tconst elementWrapper = element.parentNode;\n\t\t\tconst elementTopOffset = parseInt( elementRect.top, 10 );\n\t\t\tconst elementLeftOffset = parseInt( elementRect.left, 10 );\n\n\t\t\tcloneWrapper.style.width = `${\n\t\t\t\telementRect.width + clonePadding * 2\n\t\t\t}px`;\n\n\t\t\tconst clone = element.cloneNode( true );\n\t\t\tclone.id = `clone-${ elementId }`;\n\n\t\t\t// Position clone right over the original element (20px padding).\n\t\t\tx = elementLeftOffset - clonePadding;\n\t\t\ty = elementTopOffset - clonePadding;\n\t\t\tcloneWrapper.style.transform = `translate( ${ x }px, ${ y }px )`;\n\n\t\t\t// Hack: Remove iFrames as it's causing the embeds drag clone to freeze.\n\t\t\tArray.from( clone.querySelectorAll( 'iframe' ) ).forEach(\n\t\t\t\t( child ) => child.parentNode.removeChild( child )\n\t\t\t);\n\n\t\t\tcloneWrapper.appendChild( clone );\n\n\t\t\t// Inject the cloneWrapper into the DOM.\n\t\t\telementWrapper.appendChild( cloneWrapper );\n\t\t}\n\n\t\t// Mark the current cursor coordinates.\n\t\tlet cursorLeft = event.clientX;\n\t\tlet cursorTop = event.clientY;\n\n\t\t/**\n\t\t * @param {import('react').DragEvent<Element>} e\n\t\t */\n\t\tfunction over( e ) {\n\t\t\t// Skip doing any work if mouse has not moved.\n\t\t\tif ( cursorLeft === e.clientX && cursorTop === e.clientY ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst nextX = x + e.clientX - cursorLeft;\n\t\t\tconst nextY = y + e.clientY - cursorTop;\n\t\t\tcloneWrapper.style.transform = `translate( ${ nextX }px, ${ nextY }px )`;\n\t\t\tcursorLeft = e.clientX;\n\t\t\tcursorTop = e.clientY;\n\t\t\tx = nextX;\n\t\t\ty = nextY;\n\t\t\tif ( onDragOver ) {\n\t\t\t\tonDragOver( e );\n\t\t\t}\n\t\t}\n\n\t\t// Aim for 60fps (16 ms per frame) for now. We can potentially use requestAnimationFrame (raf) instead,\n\t\t// note that browsers may throttle raf below 60fps in certain conditions.\n\t\t// @ts-ignore\n\t\tconst throttledDragOver = throttle( over, 16 );\n\n\t\townerDocument.addEventListener( 'dragover', throttledDragOver );\n\n\t\t// Update cursor to 'grabbing', document wide.\n\t\townerDocument.body.classList.add( bodyClass );\n\n\t\t// Allow the Synthetic Event to be accessed from asynchronous code.\n\t\t// https://reactjs.org/docs/events.html#event-pooling\n\t\tevent.persist();\n\n\t\t/** @type {number | undefined} */\n\t\tlet timerId;\n\n\t\tif ( onDragStart ) {\n\t\t\ttimerId = setTimeout( () => onDragStart( event ) );\n\t\t}\n\n\t\tcleanup.current = () => {\n\t\t\t// Remove drag clone.\n\t\t\tif ( cloneWrapper && cloneWrapper.parentNode ) {\n\t\t\t\tcloneWrapper.parentNode.removeChild( cloneWrapper );\n\t\t\t}\n\n\t\t\tif ( dragImage && dragImage.parentNode ) {\n\t\t\t\tdragImage.parentNode.removeChild( dragImage );\n\t\t\t}\n\n\t\t\t// Reset cursor.\n\t\t\townerDocument.body.classList.remove( bodyClass );\n\n\t\t\townerDocument.removeEventListener( 'dragover', throttledDragOver );\n\n\t\t\tclearTimeout( timerId );\n\t\t};\n\t}\n\n\tuseEffect(\n\t\t() => () => {\n\t\t\tcleanup.current();\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ children( {\n\t\t\t\tonDraggableStart: start,\n\t\t\t\tonDraggableEnd: end,\n\t\t\t} ) }\n\t\t\t{ dragComponent && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-draggable-drag-component-root\"\n\t\t\t\t\tstyle={ { display: 'none' } }\n\t\t\t\t\tref={ dragComponentRef }\n\t\t\t\t>\n\t\t\t\t\t{ dragComponent }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { upload, Icon } from '@wordpress/icons';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\nimport {\n\t__experimentalUseDropZone as useDropZone,\n\tuseReducedMotion,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { DropType, DropZoneProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\n/**\n * `DropZone` is a component creating a drop zone area taking the full size of its parent element. It supports dropping files, HTML content or any other HTML drop event.\n *\n * ```jsx\n * import { DropZone } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDropZone = () => {\n *   const [ hasDropped, setHasDropped ] = useState( false );\n *\n *   return (\n *     <div>\n *       { hasDropped ? 'Dropped!' : 'Drop something here' }\n *       <DropZone\n *         onFilesDrop={ () => setHasDropped( true ) }\n *         onHTMLDrop={ () => setHasDropped( true ) }\n *         onDrop={ () => setHasDropped( true ) }\n *       />\n *     </div>\n *   );\n * }\n * ```\n */\nexport function DropZoneComponent( {\n\tclassName,\n\tlabel,\n\tonFilesDrop,\n\tonHTMLDrop,\n\tonDrop,\n\t...restProps\n}: WordPressComponentProps< DropZoneProps, 'div', false > ) {\n\tconst [ isDraggingOverDocument, setIsDraggingOverDocument ] =\n\t\tuseState< boolean >();\n\tconst [ isDraggingOverElement, setIsDraggingOverElement ] =\n\t\tuseState< boolean >();\n\tconst [ type, setType ] = useState< DropType >();\n\tconst ref = useDropZone( {\n\t\tonDrop( event ) {\n\t\t\tconst files = event.dataTransfer\n\t\t\t\t? getFilesFromDataTransfer( event.dataTransfer )\n\t\t\t\t: [];\n\t\t\tconst html = event.dataTransfer?.getData( 'text/html' );\n\n\t\t\t/**\n\t\t\t * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.\n\t\t\t * The order of the checks is important to recognise the HTML drop.\n\t\t\t */\n\t\t\tif ( html && onHTMLDrop ) {\n\t\t\t\tonHTMLDrop( html );\n\t\t\t} else if ( files.length && onFilesDrop ) {\n\t\t\t\tonFilesDrop( files );\n\t\t\t} else if ( onDrop ) {\n\t\t\t\tonDrop( event );\n\t\t\t}\n\t\t},\n\t\tonDragStart( event ) {\n\t\t\tsetIsDraggingOverDocument( true );\n\n\t\t\tlet _type: DropType = 'default';\n\n\t\t\t/**\n\t\t\t * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.\n\t\t\t * The order of the checks is important to recognise the HTML drop.\n\t\t\t */\n\t\t\tif ( event.dataTransfer?.types.includes( 'text/html' ) ) {\n\t\t\t\t_type = 'html';\n\t\t\t} else if (\n\t\t\t\t// Check for the types because sometimes the files themselves\n\t\t\t\t// are only available on drop.\n\t\t\t\tevent.dataTransfer?.types.includes( 'Files' ) ||\n\t\t\t\t( event.dataTransfer\n\t\t\t\t\t? getFilesFromDataTransfer( event.dataTransfer )\n\t\t\t\t\t: []\n\t\t\t\t).length > 0\n\t\t\t) {\n\t\t\t\t_type = 'file';\n\t\t\t}\n\n\t\t\tsetType( _type );\n\t\t},\n\t\tonDragEnd() {\n\t\t\tsetIsDraggingOverDocument( false );\n\t\t\tsetType( undefined );\n\t\t},\n\t\tonDragEnter() {\n\t\t\tsetIsDraggingOverElement( true );\n\t\t},\n\t\tonDragLeave() {\n\t\t\tsetIsDraggingOverElement( false );\n\t\t},\n\t} );\n\tconst disableMotion = useReducedMotion();\n\n\tlet children;\n\tconst backdrop = {\n\t\thidden: { scaleY: 0, opacity: 0 },\n\t\tshow: {\n\t\t\tscaleY: 1,\n\t\t\topacity: 1,\n\t\t\ttransition: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.2,\n\t\t\t\tdelay: 0.1,\n\t\t\t\tdelayChildren: 0.2,\n\t\t\t},\n\t\t},\n\t\texit: {\n\t\t\tscaleY: 1,\n\t\t\topacity: 0,\n\t\t\ttransition: {\n\t\t\t\tduration: 0.3,\n\t\t\t\tdelayChildren: 0,\n\t\t\t},\n\t\t},\n\t};\n\n\tconst foreground = {\n\t\thidden: { opacity: 0, scale: 0.75 },\n\t\tshow: { opacity: 1, scale: 1 },\n\t\texit: { opacity: 0, scale: 0.9 },\n\t};\n\n\tif ( isDraggingOverElement ) {\n\t\tchildren = (\n\t\t\t<motion.div\n\t\t\t\tvariants={ backdrop }\n\t\t\t\tinitial={ disableMotion ? 'show' : 'hidden' }\n\t\t\t\tanimate=\"show\"\n\t\t\t\texit={ disableMotion ? 'show' : 'exit' }\n\t\t\t\tclassName=\"components-drop-zone__content\"\n\t\t\t\t// Without this, when this div is shown,\n\t\t\t\t// Safari calls a onDropZoneLeave causing a loop because of this bug\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=66547\n\t\t\t\tstyle={ { pointerEvents: 'none' } }\n\t\t\t>\n\t\t\t\t<motion.div variants={ foreground }>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\tclassName=\"components-drop-zone__content-icon\"\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"components-drop-zone__content-text\">\n\t\t\t\t\t\t{ label ? label : __( 'Drop files to upload' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</motion.div>\n\t\t\t</motion.div>\n\t\t);\n\t}\n\n\tconst classes = classnames( 'components-drop-zone', className, {\n\t\t'is-active':\n\t\t\t( isDraggingOverDocument || isDraggingOverElement ) &&\n\t\t\t( ( type === 'file' && onFilesDrop ) ||\n\t\t\t\t( type === 'html' && onHTMLDrop ) ||\n\t\t\t\t( type === 'default' && onDrop ) ),\n\t\t'is-dragging-over-document': isDraggingOverDocument,\n\t\t'is-dragging-over-element': isDraggingOverElement,\n\t\t[ `is-dragging-${ type }` ]: !! type,\n\t} );\n\n\treturn (\n\t\t<div { ...restProps } ref={ ref } className={ classes }>\n\t\t\t{ disableMotion ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<AnimatePresence>{ children }</AnimatePresence>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default DropZoneComponent;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport default function DropZoneProvider( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\tdeprecated( 'wp.components.DropZoneProvider', {\n\t\tsince: '5.8',\n\t\thint: 'wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code.',\n\t} );\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst swatch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 17.7c.4.5.8.9 1.2 1.2l1.1-1.4c-.4-.3-.7-.6-1-1L5 17.7zM5 6.3l1.4 1.1c.3-.4.6-.7 1-1L6.3 5c-.5.4-.9.8-1.3 1.3zm.1 7.8l-1.7.5c.2.6.4 1.1.7 1.6l1.5-.8c-.2-.4-.4-.8-.5-1.3zM4.8 12v-.7L3 11.1v1.8l1.7-.2c.1-.2.1-.5.1-.7zm3 7.9c.5.3 1.1.5 1.6.7l.5-1.7c-.5-.1-.9-.3-1.3-.5l-.8 1.5zM19 6.3c-.4-.5-.8-.9-1.2-1.2l-1.1 1.4c.4.3.7.6 1 1L19 6.3zm-.1 3.6l1.7-.5c-.2-.6-.4-1.1-.7-1.6l-1.5.8c.2.4.4.8.5 1.3zM5.6 8.6l-1.5-.8c-.3.5-.5 1-.7 1.6l1.7.5c.1-.5.3-.9.5-1.3zm2.2-4.5l.8 1.5c.4-.2.8-.4 1.3-.5l-.5-1.7c-.6.2-1.1.4-1.6.7zm8.8 13.5l1.1 1.4c.5-.4.9-.8 1.2-1.2l-1.4-1.1c-.2.3-.5.6-.9.9zm1.8-2.2l1.5.8c.3-.5.5-1.1.7-1.6l-1.7-.5c-.1.5-.3.9-.5 1.3zm2.6-4.3l-1.7.2v1.4l1.7.2V12v-.9zM11.1 3l.2 1.7h1.4l.2-1.7h-1.8zm3 2.1c.5.1.9.3 1.3.5l.8-1.5c-.5-.3-1.1-.5-1.6-.7l-.5 1.7zM12 19.2h-.7l-.2 1.8h1.8l-.2-1.7c-.2-.1-.5-.1-.7-.1zm2.1-.3l.5 1.7c.6-.2 1.1-.4 1.6-.7l-.8-1.5c-.4.2-.8.4-1.3.5z\" />\n\t</SVG>\n);\n\nexport default swatch;\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\nextend( [ namesPlugin ] );\n\n/**\n * Object representation for a color.\n *\n * @typedef {Object} RGBColor\n * @property {number} r Red component of the color in the range [0,1].\n * @property {number} g Green component of the color in the range [0,1].\n * @property {number} b Blue component of the color in the range [0,1].\n */\n\n/**\n * Calculate the brightest and darkest values from a color palette.\n *\n * @param {Object[]} palette Color palette for the theme.\n *\n * @return {string[]} Tuple of the darkest color and brightest color.\n */\nexport function getDefaultColors( palette ) {\n\t// A default dark and light color are required.\n\tif ( ! palette || palette.length < 2 ) return [ '#000', '#fff' ];\n\n\treturn palette\n\t\t.map( ( { color } ) => ( {\n\t\t\tcolor,\n\t\t\tbrightness: colord( color ).brightness(),\n\t\t} ) )\n\t\t.reduce(\n\t\t\t( [ min, max ], current ) => {\n\t\t\t\treturn [\n\t\t\t\t\tcurrent.brightness <= min.brightness ? current : min,\n\t\t\t\t\tcurrent.brightness >= max.brightness ? current : max,\n\t\t\t\t];\n\t\t\t},\n\t\t\t[ { brightness: 1 }, { brightness: 0 } ]\n\t\t)\n\t\t.map( ( { color } ) => color );\n}\n\n/**\n * Generate a duotone gradient from a list of colors.\n *\n * @param {string[]} colors CSS color strings.\n * @param {string}   angle  CSS gradient angle.\n *\n * @return {string} CSS gradient string for the duotone swatch.\n */\nexport function getGradientFromCSSColors( colors = [], angle = '90deg' ) {\n\tconst l = 100 / colors.length;\n\n\tconst stops = colors\n\t\t.map( ( c, i ) => `${ c } ${ i * l }%, ${ c } ${ ( i + 1 ) * l }%` )\n\t\t.join( ', ' );\n\n\treturn `linear-gradient( ${ angle }, ${ stops } )`;\n}\n\n/**\n * Convert a color array to an array of color stops.\n *\n * @param {string[]} colors CSS colors array\n *\n * @return {Object[]} Color stop information.\n */\nexport function getColorStopsFromColors( colors ) {\n\treturn colors.map( ( color, i ) => ( {\n\t\tposition: ( i * 100 ) / ( colors.length - 1 ),\n\t\tcolor,\n\t} ) );\n}\n\n/**\n * Convert a color stop array to an array colors.\n *\n * @param {Object[]} colorStops Color stop information.\n *\n * @return {string[]} CSS colors array.\n */\nexport function getColorsFromColorStops( colorStops = [] ) {\n\treturn colorStops.map( ( { color } ) => color );\n}\n","/**\n * WordPress dependencies\n */\nimport { swatch } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ColorIndicator from '../color-indicator';\nimport Icon from '../icon';\nimport { getGradientFromCSSColors } from './utils';\n\nfunction DuotoneSwatch( { values } ) {\n\treturn values ? (\n\t\t<ColorIndicator\n\t\t\tcolorValue={ getGradientFromCSSColors( values, '135deg' ) }\n\t\t/>\n\t) : (\n\t\t<Icon icon={ swatch } />\n\t);\n}\n\nexport default DuotoneSwatch;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { swatch } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ColorPalette from '../color-palette';\nimport ColorIndicator from '../color-indicator';\nimport Icon from '../icon';\nimport { HStack } from '../h-stack';\n\nfunction ColorOption( {\n\tlabel,\n\tvalue,\n\tcolors,\n\tdisableCustomColors,\n\tenableAlpha,\n\tonChange,\n} ) {\n\tconst [ isOpen, setIsOpen ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tclassName=\"components-color-list-picker__swatch-button\"\n\t\t\t\tonClick={ () => setIsOpen( ( prev ) => ! prev ) }\n\t\t\t>\n\t\t\t\t<HStack justify=\"flex-start\" spacing={ 2 }>\n\t\t\t\t\t{ value ? (\n\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\tcolorValue={ value }\n\t\t\t\t\t\t\tclassName=\"components-color-list-picker__swatch-color\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon icon={ swatch } />\n\t\t\t\t\t) }\n\t\t\t\t\t<span>{ label }</span>\n\t\t\t\t</HStack>\n\t\t\t</Button>\n\t\t\t{ isOpen && (\n\t\t\t\t<ColorPalette\n\t\t\t\t\tclassName=\"components-color-list-picker__color-picker\"\n\t\t\t\t\tcolors={ colors }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tclearable={ false }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction ColorListPicker( {\n\tcolors,\n\tlabels,\n\tvalue = [],\n\tdisableCustomColors,\n\tenableAlpha,\n\tonChange,\n} ) {\n\treturn (\n\t\t<div className=\"components-color-list-picker\">\n\t\t\t{ labels.map( ( label, index ) => (\n\t\t\t\t<ColorOption\n\t\t\t\t\tkey={ index }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tvalue={ value[ index ] }\n\t\t\t\t\tcolors={ colors }\n\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\tonChange={ ( newColor ) => {\n\t\t\t\t\t\tconst newColors = value.slice();\n\t\t\t\t\t\tnewColors[ index ] = newColor;\n\t\t\t\t\t\tonChange( newColors );\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 ColorListPicker;\n","/**\n * Internal dependencies\n */\nimport CustomGradientBar from '../custom-gradient-picker/gradient-bar';\n\nimport {\n\tgetColorStopsFromColors,\n\tgetGradientFromCSSColors,\n\tgetColorsFromColorStops,\n} from './utils';\n\nconst PLACEHOLDER_VALUES = [ '#333', '#CCC' ];\n\nexport default function CustomDuotoneBar( { value, onChange } ) {\n\tconst hasGradient = !! value;\n\tconst values = hasGradient ? value : PLACEHOLDER_VALUES;\n\tconst background = getGradientFromCSSColors( values );\n\tconst controlPoints = getColorStopsFromColors( values );\n\treturn (\n\t\t<CustomGradientBar\n\t\t\tdisableInserter\n\t\t\tbackground={ background }\n\t\t\thasGradient={ hasGradient }\n\t\t\tvalue={ controlPoints }\n\t\t\tonChange={ ( newColorStops ) => {\n\t\t\t\tconst newValue = getColorsFromColorStops( newColorStops );\n\t\t\t\tonChange( newValue );\n\t\t\t} }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { isEqual } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from '../color-list-picker';\nimport CircularOptionPicker from '../circular-option-picker';\nimport { VStack } from '../v-stack';\n\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\n\nfunction DuotonePicker( {\n\tclearable = true,\n\tunsetable = true,\n\tcolorPalette,\n\tduotonePalette,\n\tdisableCustomColors,\n\tdisableCustomDuotone,\n\tvalue,\n\tonChange,\n} ) {\n\tconst [ defaultDark, defaultLight ] = useMemo(\n\t\t() => getDefaultColors( colorPalette ),\n\t\t[ colorPalette ]\n\t);\n\n\tconst isUnset = value === 'unset';\n\n\tconst unsetOption = (\n\t\t<CircularOptionPicker.Option\n\t\t\tkey=\"unset\"\n\t\t\tvalue=\"unset\"\n\t\t\tisSelected={ isUnset }\n\t\t\ttooltipText={ __( 'Unset' ) }\n\t\t\tclassName=\"components-duotone-picker__color-indicator\"\n\t\t\tonClick={ () => {\n\t\t\t\tonChange( isUnset ? undefined : 'unset' );\n\t\t\t} }\n\t\t/>\n\t);\n\n\tconst options = duotonePalette.map( ( { colors, slug, name } ) => {\n\t\tconst style = {\n\t\t\tbackground: getGradientFromCSSColors( colors, '135deg' ),\n\t\t\tcolor: 'transparent',\n\t\t};\n\t\tconst tooltipText =\n\t\t\tname ??\n\t\t\tsprintf(\n\t\t\t\t// translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n\t\t\t\t__( 'Duotone code: %s' ),\n\t\t\t\tslug\n\t\t\t);\n\t\tconst label = name\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: The name of the option e.g: \"Dark grayscale\".\n\t\t\t\t\t__( 'Duotone: %s' ),\n\t\t\t\t\tname\n\t\t\t  )\n\t\t\t: tooltipText;\n\t\tconst isSelected = isEqual( colors, value );\n\n\t\treturn (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ slug }\n\t\t\t\tvalue={ colors }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\taria-label={ label }\n\t\t\t\ttooltipText={ tooltipText }\n\t\t\t\tstyle={ style }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonChange( isSelected ? undefined : colors );\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\toptions={ unsetable ? [ unsetOption, ...options ] : options }\n\t\t\tactions={\n\t\t\t\t!! clearable && (\n\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\tonClick={ () => onChange( undefined ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t)\n\t\t\t}\n\t\t>\n\t\t\t<Spacer paddingTop={ 4 }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t{ ! disableCustomColors && ! disableCustomDuotone && (\n\t\t\t\t\t\t<CustomDuotoneBar\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! disableCustomDuotone && (\n\t\t\t\t\t\t<ColorListPicker\n\t\t\t\t\t\t\tlabels={ [ __( 'Shadows' ), __( 'Highlights' ) ] }\n\t\t\t\t\t\t\tcolors={ colorPalette }\n\t\t\t\t\t\t\tvalue={ isUnset ? undefined : value }\n\t\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\t\tenableAlpha\n\t\t\t\t\t\t\tonChange={ ( newColors ) => {\n\t\t\t\t\t\t\t\tif ( ! newColors[ 0 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 0 ] = defaultDark;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( ! newColors[ 1 ] ) {\n\t\t\t\t\t\t\t\t\tnewColors[ 1 ] = defaultLight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconst newValue =\n\t\t\t\t\t\t\t\t\tnewColors.length >= 2\n\t\t\t\t\t\t\t\t\t\t? newColors\n\t\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\t\t\tonChange( newValue );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</Spacer>\n\t\t</CircularOptionPicker>\n\t);\n}\n\nexport default DuotonePicker;\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=\"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z\" />\n\t</SVG>\n);\n\nexport default external;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/icons';\n\nexport const StyledIcon = styled( Icon )`\n\twidth: 1em;\n\theight: 1em;\n\tmargin: 0;\n\tvertical-align: middle;\n\tfill: currentColor;\n`;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { external } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VisuallyHidden } from '../visually-hidden';\nimport { StyledIcon } from './styles/external-link-styles';\nimport type { ExternalLinkProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nfunction UnforwardedExternalLink(\n\tprops: Omit<\n\t\tWordPressComponentProps< ExternalLinkProps, 'a', false >,\n\t\t'target'\n\t>,\n\tref: ForwardedRef< HTMLAnchorElement >\n) {\n\tconst { href, children, className, rel = '', ...additionalProps } = props;\n\tconst optimizedRel = [\n\t\t...new Set(\n\t\t\t[\n\t\t\t\t...rel.split( ' ' ),\n\t\t\t\t'external',\n\t\t\t\t'noreferrer',\n\t\t\t\t'noopener',\n\t\t\t].filter( Boolean )\n\t\t),\n\t].join( ' ' );\n\tconst classes = classnames( 'components-external-link', className );\n\t/* Anchor links are percieved as external links.\n\tThis constant helps check for on page anchor links,\n\tto prevent them from being opened in the editor. */\n\tconst isInternalAnchor = !! href?.startsWith( '#' );\n\n\treturn (\n\t\t/* eslint-disable react/jsx-no-target-blank */\n\t\t<a\n\t\t\t{ ...additionalProps }\n\t\t\tclassName={ classes }\n\t\t\thref={ href }\n\t\t\tonClick={\n\t\t\t\tisInternalAnchor\n\t\t\t\t\t? ( event ) => event.preventDefault()\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\ttarget=\"_blank\"\n\t\t\trel={ optimizedRel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ children }\n\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t{\n\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t}\n\t\t\t</VisuallyHidden>\n\t\t\t<StyledIcon\n\t\t\t\ticon={ external }\n\t\t\t\tclassName=\"components-external-link__icon\"\n\t\t\t/>\n\t\t</a>\n\t\t/* eslint-enable react/jsx-no-target-blank */\n\t);\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n *   <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef( UnforwardedExternalLink );\n\nexport default ExternalLink;\n","export const INITIAL_BOUNDS = {\n\twidth: 200,\n\theight: 170,\n};\n\nconst VIDEO_EXTENSIONS = [\n\t'avi',\n\t'mpg',\n\t'mpeg',\n\t'mov',\n\t'mp4',\n\t'm4v',\n\t'ogg',\n\t'ogv',\n\t'webm',\n\t'wmv',\n];\n\n/**\n * Gets the extension of a file name.\n *\n * @param  filename The file name.\n * @return  The extension of the file name.\n */\nexport function getExtension( filename = '' ): string {\n\tconst parts = filename.split( '.' );\n\treturn parts[ parts.length - 1 ];\n}\n\n/**\n * Checks if a file is a video.\n *\n * @param  filename The file name.\n * @return Whether the file is a video.\n */\nexport function isVideoType( filename: string = '' ): boolean {\n\tif ( ! filename ) return false;\n\treturn VIDEO_EXTENSIONS.includes( getExtension( filename ) );\n}\n\n/**\n * Transforms a fraction value to a percentage value.\n *\n * @param  fraction The fraction value.\n * @return A percentage value.\n */\nexport function fractionToPercentage( fraction: number ): number {\n\treturn Math.round( fraction * 100 );\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../../flex';\nimport UnitControl from '../../unit-control';\nimport { COLORS } from '../../utils';\nimport type { FocalPointPickerControlsProps } from '../types';\nimport { INITIAL_BOUNDS } from '../utils';\n\nexport const MediaWrapper = styled.div`\n\tbackground-color: transparent;\n\ttext-align: center;\n\twidth: 100%;\n`;\n\nexport const MediaContainer = styled.div`\n\talign-items: center;\n\tbox-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.2 );\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\tmargin: auto;\n\tposition: relative;\n\theight: 100%;\n\n\timg,\n\tvideo {\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\tmargin: 0;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t\tpointer-events: none;\n\t\tuser-select: none;\n\t\twidth: auto;\n\t}\n`;\n\nexport const MediaPlaceholder = styled.div`\n\tbackground: ${ COLORS.gray[ 100 ] };\n\tbox-sizing: border-box;\n\theight: ${ INITIAL_BOUNDS.height }px;\n\tmax-width: 280px;\n\tmin-width: ${ INITIAL_BOUNDS.width }px;\n\twidth: 100%;\n`;\n\nexport const StyledUnitControl = styled( UnitControl )`\n\twidth: 100px;\n`;\n\nconst deprecatedBottomMargin = ( {\n\t__nextHasNoMarginBottom,\n}: FocalPointPickerControlsProps ) => {\n\treturn ! __nextHasNoMarginBottom\n\t\t? css`\n\t\t\t\tpadding-bottom: 1em;\n\t\t  `\n\t\t: undefined;\n};\n\nconst extraHelpTextMargin = ( {\n\thasHelpText = false,\n}: FocalPointPickerControlsProps ) => {\n\treturn hasHelpText\n\t\t? css`\n\t\t\t\tpadding-bottom: 1em;\n\t\t  `\n\t\t: undefined;\n};\n\nexport const ControlWrapper = styled( Flex )`\n\tmax-width: 320px;\n\tpadding-top: 1em;\n\n\t${ extraHelpTextMargin }\n\t${ deprecatedBottomMargin }\n`;\n\nexport const GridView = styled.div`\n\tleft: 50%;\n\toverflow: hidden;\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 50%;\n\ttransform: translate3d( -50%, -50%, 0 );\n\ttransition: opacity 120ms linear;\n\tz-index: 1;\n\n\topacity: ${ ( { showOverlay }: { showOverlay?: boolean } ) =>\n\t\tshowOverlay ? 1 : 0 };\n`;\n\nexport const GridLine = styled.div`\n\tbackground: white;\n\tbox-shadow: 0 0 2px rgba( 0, 0, 0, 0.6 );\n\tposition: absolute;\n\topacity: 0.4;\n\ttransform: translateZ( 0 );\n`;\n\nexport const GridLineX = styled( GridLine )`\n\theight: 1px;\n\tleft: 0;\n\tright: 0;\n`;\n\nexport const GridLineY = styled( GridLine )`\n\twidth: 1px;\n\ttop: 0;\n\tbottom: 0;\n`;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tStyledUnitControl,\n\tControlWrapper,\n} from './styles/focal-point-picker-style';\nimport { fractionToPercentage } from './utils';\nimport type {\n\tUnitControlProps,\n\tUnitControlOnChangeCallback,\n} from '../unit-control/types';\nimport type { FocalPointAxis, FocalPointPickerControlsProps } from './types';\n\nconst TEXTCONTROL_MIN = 0;\nconst TEXTCONTROL_MAX = 100;\nconst noop = () => {};\n\nexport default function FocalPointPickerControls( {\n\t__nextHasNoMarginBottom,\n\thasHelpText,\n\tonChange = noop,\n\tpoint = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n}: FocalPointPickerControlsProps ) {\n\tconst valueX = fractionToPercentage( point.x );\n\tconst valueY = fractionToPercentage( point.y );\n\n\tconst handleChange = (\n\t\tvalue: Parameters< UnitControlOnChangeCallback >[ 0 ],\n\t\taxis: FocalPointAxis\n\t) => {\n\t\tif ( value === undefined ) return;\n\n\t\tconst num = parseInt( value, 10 );\n\n\t\tif ( ! isNaN( num ) ) {\n\t\t\tonChange( { ...point, [ axis ]: num / 100 } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<ControlWrapper\n\t\t\tclassName=\"focal-point-picker__controls\"\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\thasHelpText={ hasHelpText }\n\t\t>\n\t\t\t<FocalPointUnitControl\n\t\t\t\tlabel={ __( 'Left' ) }\n\t\t\t\tvalue={ [ valueX, '%' ].join( '' ) }\n\t\t\t\tonChange={\n\t\t\t\t\t( ( next ) =>\n\t\t\t\t\t\thandleChange(\n\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t'x'\n\t\t\t\t\t\t) ) as UnitControlOnChangeCallback\n\t\t\t\t}\n\t\t\t\tdragDirection=\"e\"\n\t\t\t/>\n\t\t\t<FocalPointUnitControl\n\t\t\t\tlabel={ __( 'Top' ) }\n\t\t\t\tvalue={ [ valueY, '%' ].join( '' ) }\n\t\t\t\tonChange={\n\t\t\t\t\t( ( next ) =>\n\t\t\t\t\t\thandleChange(\n\t\t\t\t\t\t\tnext,\n\t\t\t\t\t\t\t'y'\n\t\t\t\t\t\t) ) as UnitControlOnChangeCallback\n\t\t\t\t}\n\t\t\t\tdragDirection=\"s\"\n\t\t\t/>\n\t\t</ControlWrapper>\n\t);\n}\n\nfunction FocalPointUnitControl( props: UnitControlProps ) {\n\treturn (\n\t\t<StyledUnitControl\n\t\t\tclassName=\"focal-point-picker__controls-position-unit-control\"\n\t\t\tlabelPosition=\"top\"\n\t\t\tmax={ TEXTCONTROL_MAX }\n\t\t\tmin={ TEXTCONTROL_MIN }\n\t\t\tunits={ [ { value: '%', label: '%' } ] }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../../utils';\n\nexport const FocalPointWrapper = styled.div`\n\tbackground-color: transparent;\n\tcursor: grab;\n\theight: 30px;\n\tmargin: -15px 0 0 -15px;\n\topacity: 0.8;\n\tposition: absolute;\n\tuser-select: none;\n\twidth: 30px;\n\twill-change: transform;\n\tz-index: 10000;\n\n\t${ ( { isDragging }: { isDragging: boolean } ) =>\n\t\tisDragging && 'cursor: grabbing;' }\n`;\n\nexport const PointerIconSVG = styled( SVG )`\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n`;\n\nexport const PointerIconPathOutline = styled( Path )`\n\tfill: white;\n`;\n\nexport const PointerIconPathFill = styled( Path )`\n\tfill: ${ COLORS.ui.theme };\n`;\n","/**\n * Internal dependencies\n */\nimport {\n\tFocalPointWrapper,\n\tPointerIconPathFill,\n\tPointerIconPathOutline,\n\tPointerIconSVG,\n} from './styles/focal-point-style';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { FocalPointProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport default function FocalPoint( {\n\tleft = '50%',\n\ttop = '50%',\n\t...props\n}: WordPressComponentProps< FocalPointProps, 'div' > ) {\n\tconst classes = classnames(\n\t\t'components-focal-point-picker__icon_container'\n\t);\n\n\tconst style = { left, top };\n\n\treturn (\n\t\t<FocalPointWrapper { ...props } className={ classes } style={ style }>\n\t\t\t<PointerIconSVG\n\t\t\t\tclassName=\"components-focal-point-picker__icon\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 30 30\"\n\t\t\t>\n\t\t\t\t<PointerIconPathOutline\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-outline\"\n\t\t\t\t\td=\"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z\"\n\t\t\t\t/>\n\t\t\t\t<PointerIconPathFill\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-fill\"\n\t\t\t\t\td=\"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z\"\n\t\t\t\t/>\n\t\t\t</PointerIconSVG>\n\t\t</FocalPointWrapper>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport {\n\tGridView,\n\tGridLineX,\n\tGridLineY,\n} from './styles/focal-point-picker-style';\nimport type { FocalPointPickerGridProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\n\nexport default function FocalPointPickerGrid( {\n\tbounds,\n\t...props\n}: WordPressComponentProps< FocalPointPickerGridProps, 'div' > ) {\n\treturn (\n\t\t<GridView\n\t\t\t{ ...props }\n\t\t\tclassName=\"components-focal-point-picker__grid\"\n\t\t\tstyle={ {\n\t\t\t\twidth: bounds.width,\n\t\t\t\theight: bounds.height,\n\t\t\t} }\n\t\t>\n\t\t\t<GridLineX style={ { top: '33%' } } />\n\t\t\t<GridLineX style={ { top: '66%' } } />\n\t\t\t<GridLineY style={ { left: '33%' } } />\n\t\t\t<GridLineY style={ { left: '66%' } } />\n\t\t</GridView>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { MediaPlaceholder } from './styles/focal-point-picker-style';\nimport { isVideoType } from './utils';\nimport type { FocalPointPickerMediaProps } from './types';\n\nexport default function Media( {\n\talt,\n\tautoPlay,\n\tsrc,\n\tonLoad,\n\tmediaRef,\n\t// Exposing muted prop for test rendering purposes\n\t// https://github.com/testing-library/react-testing-library/issues/470\n\tmuted = true,\n\t...props\n}: FocalPointPickerMediaProps ) {\n\tif ( ! src ) {\n\t\treturn (\n\t\t\t<MediaPlaceholder\n\t\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--placeholder\"\n\t\t\t\tref={ mediaRef as Ref< HTMLDivElement > }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst isVideo = isVideoType( src );\n\n\treturn isVideo ? (\n\t\t<video\n\t\t\t{ ...props }\n\t\t\tautoPlay={ autoPlay }\n\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--video\"\n\t\t\tloop\n\t\t\tmuted={ muted }\n\t\t\tonLoadedData={ onLoad }\n\t\t\tref={ mediaRef as Ref< HTMLVideoElement > }\n\t\t\tsrc={ src }\n\t\t/>\n\t) : (\n\t\t<img\n\t\t\t{ ...props }\n\t\t\talt={ alt }\n\t\t\tclassName=\"components-focal-point-picker__media components-focal-point-picker__media--image\"\n\t\t\tonLoad={ onLoad }\n\t\t\tref={ mediaRef as Ref< HTMLImageElement > }\n\t\t\tsrc={ src }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\n\n/**\n * A `React.useEffect` that will not run on the first render.\n * Source:\n * https://github.com/reakit/reakit/blob/HEAD/packages/reakit-utils/src/useUpdateEffect.ts\n *\n * @param {import('react').EffectCallback} effect\n * @param {import('react').DependencyList} deps\n */\nfunction useUpdateEffect( effect, deps ) {\n\tconst mounted = useRef( false );\n\n\tuseEffect( () => {\n\t\tif ( mounted.current ) {\n\t\t\treturn effect();\n\t\t}\n\t\tmounted.current = true;\n\t\treturn undefined;\n\t}, deps );\n}\n\nexport default useUpdateEffect;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport {\n\t__experimentalUseDragging as useDragging,\n\tuseInstanceId,\n\tuseIsomorphicLayoutEffect,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Controls from './controls';\nimport FocalPoint from './focal-point';\nimport Grid from './grid';\nimport Media from './media';\nimport {\n\tMediaWrapper,\n\tMediaContainer,\n} from './styles/focal-point-picker-style';\nimport { INITIAL_BOUNDS } from './utils';\nimport { useUpdateEffect } from '../utils/hooks';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type {\n\tFocalPoint as FocalPointType,\n\tFocalPointPickerProps,\n} from './types';\nimport type { KeyboardEventHandler } from 'react';\n\nconst GRID_OVERLAY_TIMEOUT = 600;\n\n/**\n * Focal Point Picker is a component which creates a UI for identifying the most important visual point of an image.\n *\n * This component addresses a specific problem: with large background images it is common to see undesirable crops,\n * especially when viewing on smaller viewports such as mobile phones. This component allows the selection of\n * the point with the most important visual information and returns it as a pair of numbers between 0 and 1.\n * This value can be easily converted into the CSS `background-position` attribute, and will ensure that the\n * focal point is never cropped out, regardless of viewport.\n *\n * - Example focal point picker value: `{ x: 0.5, y: 0.1 }`\n * - Corresponding CSS: `background-position: 50% 10%;`\n *\n * ```jsx\n * import { FocalPointPicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ focalPoint, setFocalPoint ] = useState( {\n * \t\tx: 0.5,\n * \t\ty: 0.5,\n * \t} );\n *\n * \tconst url = '/path/to/image';\n *\n * \t// Example function to render the CSS styles based on Focal Point Picker value\n * \tconst style = {\n * \t\tbackgroundImage: `url(${ url })`,\n * \t\tbackgroundPosition: `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%`,\n * \t};\n *\n * \treturn (\n * \t\t<>\n * \t\t\t<FocalPointPicker\n * \t\t\t\turl={ url }\n * \t\t\t\tvalue={ focalPoint }\n * \t\t\t\tonDragStart={ setFocalPoint }\n * \t\t\t\tonDrag={ setFocalPoint }\n * \t\t\t\tonChange={ setFocalPoint }\n * \t\t\t/>\n * \t\t\t<div style={ style } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nexport function FocalPointPicker( {\n\t__nextHasNoMarginBottom,\n\tautoPlay = true,\n\tclassName,\n\thelp,\n\tlabel,\n\tonChange,\n\tonDrag,\n\tonDragEnd,\n\tonDragStart,\n\tresolvePoint,\n\turl,\n\tvalue: valueProp = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n\t...restProps\n}: WordPressComponentProps< FocalPointPickerProps, 'div', false > ) {\n\tconst [ point, setPoint ] = useState( valueProp );\n\tconst [ showGridOverlay, setShowGridOverlay ] = useState( false );\n\n\tconst { startDrag, endDrag, isDragging } = useDragging( {\n\t\tonDragStart: ( event ) => {\n\t\t\tdragAreaRef.current?.focus();\n\t\t\tconst value = getValueWithinDragArea( event );\n\n\t\t\t// `value` can technically be undefined if getValueWithinDragArea() is\n\t\t\t// called before dragAreaRef is set, but this shouldn't happen in reality.\n\t\t\tif ( ! value ) return;\n\n\t\t\tonDragStart?.( value, event );\n\t\t\tsetPoint( value );\n\t\t},\n\t\tonDragMove: ( event ) => {\n\t\t\t// Prevents text-selection when dragging.\n\t\t\tevent.preventDefault();\n\t\t\tconst value = getValueWithinDragArea( event );\n\t\t\tif ( ! value ) return;\n\t\t\tonDrag?.( value, event );\n\t\t\tsetPoint( value );\n\t\t},\n\t\tonDragEnd: () => {\n\t\t\tonDragEnd?.();\n\t\t\tonChange?.( point );\n\t\t},\n\t} );\n\n\t// Uses the internal point while dragging or else the value from props.\n\tconst { x, y } = isDragging ? point : valueProp;\n\n\tconst dragAreaRef = useRef< HTMLDivElement >( null );\n\tconst [ bounds, setBounds ] = useState( INITIAL_BOUNDS );\n\tconst refUpdateBounds = useRef( () => {\n\t\tif ( ! dragAreaRef.current ) return;\n\n\t\tconst { clientWidth: width, clientHeight: height } =\n\t\t\tdragAreaRef.current;\n\t\t// Falls back to initial bounds if the ref has no size. Since styles\n\t\t// give the drag area dimensions even when the media has not loaded\n\t\t// this should only happen in unit tests (jsdom).\n\t\tsetBounds(\n\t\t\twidth > 0 && height > 0 ? { width, height } : { ...INITIAL_BOUNDS }\n\t\t);\n\t} );\n\n\tuseEffect( () => {\n\t\tconst updateBounds = refUpdateBounds.current;\n\t\tif ( ! dragAreaRef.current ) return;\n\n\t\tconst { defaultView } = dragAreaRef.current.ownerDocument;\n\t\tdefaultView?.addEventListener( 'resize', updateBounds );\n\t\treturn () => defaultView?.removeEventListener( 'resize', updateBounds );\n\t}, [] );\n\n\t// Updates the bounds to cover cases of unspecified media or load failures.\n\tuseIsomorphicLayoutEffect( () => void refUpdateBounds.current(), [] );\n\n\t// TODO: Consider refactoring getValueWithinDragArea() into a pure function.\n\t// https://github.com/WordPress/gutenberg/pull/43872#discussion_r963455173\n\tconst getValueWithinDragArea = ( {\n\t\tclientX,\n\t\tclientY,\n\t\tshiftKey,\n\t}: {\n\t\tclientX: number;\n\t\tclientY: number;\n\t\tshiftKey: boolean;\n\t} ) => {\n\t\tif ( ! dragAreaRef.current ) return;\n\n\t\tconst { top, left } = dragAreaRef.current.getBoundingClientRect();\n\t\tlet nextX = ( clientX - left ) / bounds.width;\n\t\tlet nextY = ( clientY - top ) / bounds.height;\n\t\t// Enables holding shift to jump values by 10%.\n\t\tif ( shiftKey ) {\n\t\t\tnextX = Math.round( nextX / 0.1 ) * 0.1;\n\t\t\tnextY = Math.round( nextY / 0.1 ) * 0.1;\n\t\t}\n\t\treturn getFinalValue( { x: nextX, y: nextY } );\n\t};\n\n\tconst getFinalValue = ( value: FocalPointType ): FocalPointType => {\n\t\tconst resolvedValue = resolvePoint?.( value ) ?? value;\n\t\tresolvedValue.x = Math.max( 0, Math.min( resolvedValue.x, 1 ) );\n\t\tresolvedValue.y = Math.max( 0, Math.min( resolvedValue.y, 1 ) );\n\t\tconst roundToTwoDecimalPlaces = ( n: number ) =>\n\t\t\tMath.round( n * 1e2 ) / 1e2;\n\n\t\treturn {\n\t\t\tx: roundToTwoDecimalPlaces( resolvedValue.x ),\n\t\t\ty: roundToTwoDecimalPlaces( resolvedValue.y ),\n\t\t};\n\t};\n\n\tconst arrowKeyStep: KeyboardEventHandler< HTMLDivElement > = ( event ) => {\n\t\tconst { code, shiftKey } = event;\n\t\tif (\n\t\t\t! [ 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t)\n\t\t\treturn;\n\n\t\tevent.preventDefault();\n\t\tconst value = { x, y };\n\t\tconst step = shiftKey ? 0.1 : 0.01;\n\t\tconst delta =\n\t\t\tcode === 'ArrowUp' || code === 'ArrowLeft' ? -1 * step : step;\n\t\tconst axis = code === 'ArrowUp' || code === 'ArrowDown' ? 'y' : 'x';\n\t\tvalue[ axis ] = value[ axis ] + delta;\n\t\tonChange?.( getFinalValue( value ) );\n\t};\n\n\tconst focalPointPosition = {\n\t\tleft: x * bounds.width,\n\t\ttop: y * bounds.height,\n\t};\n\n\tconst classes = classnames(\n\t\t'components-focal-point-picker-control',\n\t\tclassName\n\t);\n\n\tconst instanceId = useInstanceId( FocalPointPicker );\n\tconst id = `inspector-focal-point-picker-control-${ instanceId }`;\n\n\tuseUpdateEffect( () => {\n\t\tsetShowGridOverlay( true );\n\t\tconst timeout = window.setTimeout( () => {\n\t\t\tsetShowGridOverlay( false );\n\t\t}, GRID_OVERLAY_TIMEOUT );\n\n\t\treturn () => window.clearTimeout( timeout );\n\t}, [ x, y ] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t{ ...restProps }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t<MediaWrapper className=\"components-focal-point-picker-wrapper\">\n\t\t\t\t<MediaContainer\n\t\t\t\t\tclassName=\"components-focal-point-picker\"\n\t\t\t\t\tonKeyDown={ arrowKeyStep }\n\t\t\t\t\tonMouseDown={ startDrag }\n\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\tif ( isDragging ) endDrag();\n\t\t\t\t\t} }\n\t\t\t\t\tref={ dragAreaRef }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<Grid bounds={ bounds } showOverlay={ showGridOverlay } />\n\t\t\t\t\t<Media\n\t\t\t\t\t\talt={ __( 'Media preview' ) }\n\t\t\t\t\t\tautoPlay={ autoPlay }\n\t\t\t\t\t\tonLoad={ refUpdateBounds.current }\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t/>\n\t\t\t\t\t<FocalPoint\n\t\t\t\t\t\t{ ...focalPointPosition }\n\t\t\t\t\t\tisDragging={ isDragging }\n\t\t\t\t\t/>\n\t\t\t\t</MediaContainer>\n\t\t\t</MediaWrapper>\n\t\t\t<Controls\n\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\thasHelpText={ !! help }\n\t\t\t\tpoint={ { x, y } }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tonChange?.( getFinalValue( value ) );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\nexport default FocalPointPicker;\n","/**\n * WordPress dependencies\n */\nimport { useMergeRefs, useFocusableIframe } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * @param {Object}                                 props\n * @param {import('react').Ref<HTMLIFrameElement>} props.iframeRef\n */\nexport default function FocusableIframe( { iframeRef, ...props } ) {\n\t// @ts-expect-error: Return type for useFocusableIframe() is incorrect.\n\tconst ref = useMergeRefs( [ iframeRef, useFocusableIframe() ] );\n\tdeprecated( 'wp.components.FocusableIframe', {\n\t\tsince: '5.9',\n\t\talternative: 'wp.compose.useFocusableIframe',\n\t} );\n\t// Disable reason: The rendered iframe is a pass-through component,\n\t// assigning props inherited from the rendering parent. It's the\n\t// responsibility of the parent to assign a title.\n\t// eslint-disable-next-line jsx-a11y/iframe-has-title\n\treturn <iframe ref={ ref } { ...props } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst settings = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z\" />\n\t</SVG>\n);\n\nexport default settings;\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { useState } from 'react';\nimport 'reakit-utils/useIsomorphicEffect';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport 'reakit-utils/getDocument';\nimport '../reverse-30eaa122.js';\nimport '../getCurrentId-5aa9849e.js';\nimport '../findEnabledItemById-8ddca752.js';\nimport '../Id/IdProvider.js';\nimport 'reakit-utils/applyState';\nimport '../Id/IdState.js';\nimport { useCompositeState } from '../Composite/CompositeState.js';\n\nfunction useRadioState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      initialValue = _useSealedState.state,\n      _useSealedState$loop = _useSealedState.loop,\n      loop = _useSealedState$loop === void 0 ? true : _useSealedState$loop,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"state\", \"loop\"]);\n\n  var _React$useState = useState(initialValue),\n      state = _React$useState[0],\n      setState = _React$useState[1];\n\n  var composite = useCompositeState(_objectSpread2(_objectSpread2({}, sealed), {}, {\n    loop: loop\n  }));\n  return _objectSpread2(_objectSpread2({}, composite), {}, {\n    state: state,\n    setState: setState\n  });\n}\n\nexport { useRadioState };\n","// Automatically generated\nvar RADIO_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"unstable_virtual\", \"rtl\", \"orientation\", \"items\", \"groups\", \"currentId\", \"loop\", \"wrap\", \"shift\", \"unstable_moves\", \"unstable_hasActiveWidget\", \"unstable_includesBaseElement\", \"state\", \"setBaseId\", \"registerItem\", \"unregisterItem\", \"registerGroup\", \"unregisterGroup\", \"move\", \"next\", \"previous\", \"up\", \"down\", \"first\", \"last\", \"sort\", \"unstable_setVirtual\", \"setRTL\", \"setOrientation\", \"setCurrentId\", \"setLoop\", \"setWrap\", \"setShift\", \"reset\", \"unstable_setIncludesBaseElement\", \"unstable_setHasActiveWidget\", \"setState\"];\nvar RADIO_KEYS = [].concat(RADIO_STATE_KEYS, [\"value\", \"checked\", \"unstable_checkOnFocus\"]);\nvar RADIO_GROUP_KEYS = RADIO_STATE_KEYS;\n\nexport { RADIO_KEYS as R, RADIO_GROUP_KEYS as a };\n","import { a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport 'react';\nimport 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport { useWarning } from 'reakit-warning';\nimport 'reakit-utils/useLiveRef';\nimport 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport '../Tabbable/Tabbable.js';\nimport { useCreateElement } from 'reakit-system/useCreateElement';\nimport 'reakit-utils/getDocument';\nimport 'reakit-utils/fireBlurEvent';\nimport 'reakit-utils/fireKeyboardEvent';\nimport 'reakit-utils/canUseDOM';\nimport 'reakit-utils/getNextActiveElementOnBlur';\nimport '../reverse-30eaa122.js';\nimport '../getCurrentId-5aa9849e.js';\nimport '../findEnabledItemById-8ddca752.js';\nimport '../__keys-6742f591.js';\nimport '../userFocus-e16425e3.js';\nimport { useComposite } from '../Composite/Composite.js';\nimport { a as RADIO_GROUP_KEYS } from '../__keys-d251e56b.js';\n\nvar useRadioGroup = createHook({\n  name: \"RadioGroup\",\n  compose: useComposite,\n  keys: RADIO_GROUP_KEYS,\n  useProps: function useProps(_, htmlProps) {\n    return _objectSpread2({\n      role: \"radiogroup\"\n    }, htmlProps);\n  }\n});\nvar RadioGroup = createComponent({\n  as: \"div\",\n  useHook: useRadioGroup,\n  useCreateElement: function useCreateElement$1(type, props, children) {\n    process.env.NODE_ENV !== \"production\" ? useWarning(!props[\"aria-label\"] && !props[\"aria-labelledby\"], \"You should provide either `aria-label` or `aria-labelledby` props.\", \"See https://reakit.io/docs/radio\") : void 0;\n    return useCreateElement(type, props, children);\n  }\n});\n\nexport { RadioGroup };\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS, reduceMotion } from '../../utils';\nimport type { ToggleGroupControlProps } from '../types';\n\nexport const ToggleGroupControl = ( {\n\tsize,\n}: {\n\tsize: NonNullable< ToggleGroupControlProps[ 'size' ] >;\n} ) => css`\n\tbackground: ${ COLORS.ui.background };\n\tborder: 1px solid transparent;\n\tborder-radius: ${ CONFIG.controlBorderRadius };\n\tdisplay: inline-flex;\n\tmin-width: 0;\n\tpadding: 2px;\n\tposition: relative;\n\ttransition: transform ${ CONFIG.transitionDurationFastest } linear;\n\t${ reduceMotion( 'transition' ) }\n\n\t${ toggleGroupControlSize( size ) }\n\n\t&:focus-within {\n\t\tborder-color: ${ COLORS.ui.borderFocus };\n\t\tbox-shadow: ${ CONFIG.controlBoxShadowFocus };\n\t\toutline: none;\n\t\tz-index: 1;\n\t}\n`;\n\nexport const border = css`\n\tborder-color: ${ COLORS.ui.border };\n\n\t&:hover {\n\t\tborder-color: ${ COLORS.ui.borderHover };\n\t}\n`;\n\nexport const toggleGroupControlSize = (\n\tsize: NonNullable< ToggleGroupControlProps[ 'size' ] >\n) => {\n\tconst heights = {\n\t\tdefault: '36px',\n\t\t'__unstable-large': '40px',\n\t};\n\n\treturn css`\n\t\tmin-height: ${ heights[ size ] };\n\t`;\n};\n\nexport const block = css`\n\tdisplay: flex;\n\twidth: 100%;\n`;\n\nexport const BackdropView = styled.div`\n\tbackground: ${ COLORS.gray[ 900 ] };\n\tborder-radius: ${ CONFIG.controlBorderRadius };\n\tbox-shadow: ${ CONFIG.toggleGroupControlBackdropBoxShadow };\n\tleft: 0;\n\tposition: absolute;\n\ttop: 2px;\n\tbottom: 2px;\n\ttransition: transform ${ CONFIG.transitionDurationFast } ease;\n\t${ reduceMotion( 'transition' ) }\n\tz-index: 1;\n`;\n\nexport const VisualLabelWrapper = styled.div`\n\t// Makes the inline label be the correct height, equivalent to setting line-height: 0\n\tdisplay: flex;\n`;\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect, memo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToggleGroupControlBackdropProps } from '../types';\nimport { BackdropView } from './styles';\n\nfunction ToggleGroupControlBackdrop( {\n\tcontainerRef,\n\tcontainerWidth,\n\tisAdaptiveWidth,\n\tstate,\n}: ToggleGroupControlBackdropProps ) {\n\tconst [ left, setLeft ] = useState( 0 );\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ canAnimate, setCanAnimate ] = useState( false );\n\tconst [ renderBackdrop, setRenderBackdrop ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst containerNode = containerRef?.current;\n\t\tif ( ! containerNode ) return;\n\n\t\t/**\n\t\t * Workaround for Reakit\n\t\t */\n\t\tconst targetNode = containerNode.querySelector(\n\t\t\t`[data-value=\"${ state }\"]`\n\t\t);\n\t\tsetRenderBackdrop( !! targetNode );\n\t\tif ( ! targetNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst computeDimensions = () => {\n\t\t\tconst { width: offsetWidth, x } =\n\t\t\t\ttargetNode.getBoundingClientRect();\n\n\t\t\tconst { x: parentX } = containerNode.getBoundingClientRect();\n\n\t\t\tconst borderWidth = 1;\n\t\t\tconst offsetLeft = x - parentX - borderWidth;\n\n\t\t\tsetLeft( offsetLeft );\n\t\t\tsetWidth( offsetWidth );\n\t\t};\n\t\t// Fix to make the component appear as expected inside popovers.\n\t\t// If the targetNode width is 0 it means the element was not yet rendered we should allow\n\t\t// some time for the render to happen.\n\t\t// requestAnimationFrame instead of setTimeout with a small time does not seems to work.\n\t\tconst dimensionsRequestId = window.setTimeout( computeDimensions, 100 );\n\n\t\tlet animationRequestId: number;\n\t\tif ( ! canAnimate ) {\n\t\t\tanimationRequestId = window.requestAnimationFrame( () => {\n\t\t\t\tsetCanAnimate( true );\n\t\t\t} );\n\t\t}\n\t\treturn () => {\n\t\t\twindow.clearTimeout( dimensionsRequestId );\n\t\t\twindow.cancelAnimationFrame( animationRequestId );\n\t\t};\n\t}, [ canAnimate, containerRef, containerWidth, state, isAdaptiveWidth ] );\n\n\tif ( ! renderBackdrop ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BackdropView\n\t\t\trole=\"presentation\"\n\t\t\tstyle={ {\n\t\t\t\ttransform: `translateX(${ left }px)`,\n\t\t\t\ttransition: canAnimate ? undefined : 'none',\n\t\t\t\twidth,\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default memo( ToggleGroupControlBackdrop );\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToggleGroupControlContextProps } from './types';\n\nconst ToggleGroupControlContext = createContext(\n\t{} as ToggleGroupControlContextProps\n);\nexport const useToggleGroupControlContext = () =>\n\tuseContext( ToggleGroupControlContext );\nexport default ToggleGroupControlContext;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { RadioGroup, useRadioState } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useMemo } from '@wordpress/element';\nimport {\n\tuseMergeRefs,\n\tuseInstanceId,\n\tusePrevious,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useUpdateEffect, useCx } from '../../utils/hooks';\nimport { View } from '../../view';\nimport BaseControl from '../../base-control';\nimport type { ToggleGroupControlProps } from '../types';\nimport ToggleGroupControlBackdrop from './toggle-group-control-backdrop';\nimport ToggleGroupControlContext from '../context';\nimport { VisualLabelWrapper } from './styles';\nimport * as styles from './styles';\n\nconst noop = () => {};\n\nfunction UnconnectedToggleGroupControl(\n\tprops: WordPressComponentProps< ToggleGroupControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tisAdaptiveWidth = false,\n\t\tisBlock = false,\n\t\t__experimentalIsBorderless = false,\n\t\tlabel,\n\t\thideLabelFromVision = false,\n\t\thelp,\n\t\tonChange = noop,\n\t\tsize = 'default',\n\t\tvalue,\n\t\tchildren,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToggleGroupControl' );\n\tconst cx = useCx();\n\tconst containerRef = useRef();\n\tconst [ resizeListener, sizes ] = useResizeObserver();\n\tconst baseId = useInstanceId(\n\t\tToggleGroupControl,\n\t\t'toggle-group-control'\n\t).toString();\n\tconst radio = useRadioState( {\n\t\tbaseId,\n\t\tstate: value,\n\t} );\n\tconst previousValue = usePrevious( value );\n\n\t// Propagate radio.state change.\n\tuseUpdateEffect( () => {\n\t\t// Avoid calling onChange if radio state changed\n\t\t// from incoming value.\n\t\tif ( previousValue !== radio.state ) {\n\t\t\tonChange( radio.state );\n\t\t}\n\t}, [ radio.state ] );\n\n\t// Sync incoming value with radio.state.\n\tuseUpdateEffect( () => {\n\t\tif ( value !== radio.state ) {\n\t\t\tradio.setState( value );\n\t\t}\n\t}, [ value ] );\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.ToggleGroupControl( { size } ),\n\t\t\t\t! __experimentalIsBorderless && styles.border,\n\t\t\t\tisBlock && styles.block,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, isBlock, __experimentalIsBorderless, size ]\n\t);\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t<ToggleGroupControlContext.Provider\n\t\t\t\tvalue={ { ...radio, isBlock: ! isAdaptiveWidth, size } }\n\t\t\t>\n\t\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t\t<VisualLabelWrapper>\n\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t</VisualLabelWrapper>\n\t\t\t\t) }\n\t\t\t\t<RadioGroup\n\t\t\t\t\t{ ...radio }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tas={ View }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\tref={ useMergeRefs( [ containerRef, forwardedRef ] ) }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<ToggleGroupControlBackdrop\n\t\t\t\t\t\t{ ...radio }\n\t\t\t\t\t\tcontainerRef={ containerRef }\n\t\t\t\t\t\tcontainerWidth={ sizes.width }\n\t\t\t\t\t\tisAdaptiveWidth={ isAdaptiveWidth }\n\t\t\t\t\t/>\n\t\t\t\t\t{ children }\n\t\t\t\t</RadioGroup>\n\t\t\t</ToggleGroupControlContext.Provider>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `ToggleGroupControl` is a form component that lets users choose options\n * represented in horizontal segments. To render options for this control use\n * `ToggleGroupControlOption` component.\n *\n * This component is intended for selecting a single persistent value from a set of options,\n * similar to a how a radio button group would work. If you simply want a toggle to switch between views,\n * use a `TabPanel` instead.\n *\n * Only use this control when you know for sure the labels of items inside won't\n * wrap. For items with longer labels, you can consider a `SelectControl` or a\n * `CustomSelectControl` component instead.\n *\n * ```jsx\n * import {\n *   __experimentalToggleGroupControl as ToggleGroupControl,\n *   __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n *       <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n *       <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n *     </ToggleGroupControl>\n *   );\n * }\n * ```\n */\nexport const ToggleGroupControl = contextConnect(\n\tUnconnectedToggleGroupControl,\n\t'ToggleGroupControl'\n);\n\nexport default ToggleGroupControl;\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport { useRef, useState, useEffect, useCallback } from 'react';\nimport { useForkRef } from 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport 'reakit-warning';\nimport { useLiveRef } from 'reakit-utils/useLiveRef';\nimport 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport '../Tabbable/Tabbable.js';\nimport '../Clickable/Clickable.js';\nimport { createEvent } from 'reakit-utils/createEvent';\nimport 'reakit-utils/getDocument';\nimport '../getCurrentId-5aa9849e.js';\nimport '../__keys-6742f591.js';\nimport '../userFocus-e16425e3.js';\nimport 'reakit-utils/isTextField';\nimport 'reakit-utils/ensureFocus';\nimport '../Id/IdProvider.js';\nimport '../Id/Id.js';\nimport 'reakit-utils/fireEvent';\nimport '../setTextFieldValue-0a221f4e.js';\nimport { useCompositeItem } from '../Composite/CompositeItem.js';\nimport { warning } from 'reakit-warning/warning';\nimport { R as RADIO_KEYS } from '../__keys-d251e56b.js';\n\nfunction getChecked(options) {\n  if (typeof options.checked !== \"undefined\") {\n    return options.checked;\n  }\n\n  return typeof options.value !== \"undefined\" && options.state === options.value;\n}\n\nfunction useInitialChecked(options) {\n  var _React$useState = useState(function () {\n    return getChecked(options);\n  }),\n      initialChecked = _React$useState[0];\n\n  var _React$useState2 = useState(options.currentId),\n      initialCurrentId = _React$useState2[0];\n\n  var id = options.id,\n      setCurrentId = options.setCurrentId;\n  useEffect(function () {\n    if (initialChecked && id && initialCurrentId !== id) {\n      setCurrentId === null || setCurrentId === void 0 ? void 0 : setCurrentId(id);\n    }\n  }, [initialChecked, id, setCurrentId, initialCurrentId]);\n}\n\nfunction fireChange(element, onChange) {\n  var event = createEvent(element, \"change\");\n  Object.defineProperties(event, {\n    type: {\n      value: \"change\"\n    },\n    target: {\n      value: element\n    },\n    currentTarget: {\n      value: element\n    }\n  });\n  onChange === null || onChange === void 0 ? void 0 : onChange(event);\n}\n\nvar useRadio = createHook({\n  name: \"Radio\",\n  compose: useCompositeItem,\n  keys: RADIO_KEYS,\n  useOptions: function useOptions(_ref, _ref2) {\n    var _options$value;\n\n    var value = _ref2.value,\n        checked = _ref2.checked;\n\n    var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,\n        unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? false : _ref$unstable_clickOn,\n        _ref$unstable_checkOn = _ref.unstable_checkOnFocus,\n        unstable_checkOnFocus = _ref$unstable_checkOn === void 0 ? true : _ref$unstable_checkOn,\n        options = _objectWithoutPropertiesLoose(_ref, [\"unstable_clickOnEnter\", \"unstable_checkOnFocus\"]);\n\n    return _objectSpread2(_objectSpread2({\n      checked: checked,\n      unstable_clickOnEnter: unstable_clickOnEnter,\n      unstable_checkOnFocus: unstable_checkOnFocus\n    }, options), {}, {\n      value: (_options$value = options.value) != null ? _options$value : value\n    });\n  },\n  useProps: function useProps(options, _ref3) {\n    var htmlRef = _ref3.ref,\n        htmlOnChange = _ref3.onChange,\n        htmlOnClick = _ref3.onClick,\n        htmlProps = _objectWithoutPropertiesLoose(_ref3, [\"ref\", \"onChange\", \"onClick\"]);\n\n    var ref = useRef(null);\n\n    var _React$useState3 = useState(true),\n        isNativeRadio = _React$useState3[0],\n        setIsNativeRadio = _React$useState3[1];\n\n    var checked = getChecked(options);\n    var isCurrentItemRef = useLiveRef(options.currentId === options.id);\n    var onChangeRef = useLiveRef(htmlOnChange);\n    var onClickRef = useLiveRef(htmlOnClick);\n    useInitialChecked(options);\n    useEffect(function () {\n      var element = ref.current;\n\n      if (!element) {\n        process.env.NODE_ENV !== \"production\" ? warning(true, \"Can't determine whether the element is a native radio because `ref` wasn't passed to the component\", \"See https://reakit.io/docs/radio\") : void 0;\n        return;\n      }\n\n      if (element.tagName !== \"INPUT\" || element.type !== \"radio\") {\n        setIsNativeRadio(false);\n      }\n    }, []);\n    var onChange = useCallback(function (event) {\n      var _onChangeRef$current, _options$setState;\n\n      (_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call(onChangeRef, event);\n      if (event.defaultPrevented) return;\n      if (options.disabled) return;\n      (_options$setState = options.setState) === null || _options$setState === void 0 ? void 0 : _options$setState.call(options, options.value);\n    }, [options.disabled, options.setState, options.value]);\n    var onClick = useCallback(function (event) {\n      var _onClickRef$current;\n\n      (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);\n      if (event.defaultPrevented) return;\n      if (isNativeRadio) return;\n      fireChange(event.currentTarget, onChange);\n    }, [onChange, isNativeRadio]);\n    useEffect(function () {\n      var element = ref.current;\n      if (!element) return;\n\n      if (options.unstable_moves && isCurrentItemRef.current && options.unstable_checkOnFocus) {\n        fireChange(element, onChange);\n      }\n    }, [options.unstable_moves, options.unstable_checkOnFocus, onChange]);\n    return _objectSpread2({\n      ref: useForkRef(ref, htmlRef),\n      role: !isNativeRadio ? \"radio\" : undefined,\n      type: isNativeRadio ? \"radio\" : undefined,\n      value: isNativeRadio ? options.value : undefined,\n      name: isNativeRadio ? options.baseId : undefined,\n      \"aria-checked\": checked,\n      checked: checked,\n      onChange: onChange,\n      onClick: onClick\n    }, htmlProps);\n  }\n});\nvar Radio = createComponent({\n  as: \"input\",\n  memo: true,\n  useHook: useRadio\n});\n\nexport { Radio, useRadio };\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG, COLORS, reduceMotion } from '../../utils';\nimport type { ToggleGroupControlProps } from '../types';\n\nexport const LabelView = styled.div`\n\tdisplay: inline-flex;\n\tmax-width: 100%;\n\tmin-width: 0;\n\tposition: relative;\n`;\n\nexport const labelBlock = css`\n\tflex: 1;\n`;\n\nexport const buttonView = css`\n\talign-items: center;\n\tappearance: none;\n\tbackground: transparent;\n\tborder: none;\n\tborder-radius: ${ CONFIG.controlBorderRadius };\n\tcolor: ${ COLORS.gray[ 700 ] };\n\tfill: currentColor;\n\tcursor: pointer;\n\tdisplay: flex;\n\tfont-family: inherit;\n\theight: 100%;\n\tjustify-content: center;\n\tline-height: 100%;\n\toutline: none;\n\tpadding: 0 12px;\n\tposition: relative;\n\ttext-align: center;\n\ttransition: background ${ CONFIG.transitionDurationFast } linear,\n\t\tcolor ${ CONFIG.transitionDurationFast } linear, font-weight 60ms linear;\n\t${ reduceMotion( 'transition' ) }\n\tuser-select: none;\n\twidth: 100%;\n\tz-index: 2;\n\n\t&::-moz-focus-inner {\n\t\tborder: 0;\n\t}\n\n\t&:active {\n\t\tbackground: ${ CONFIG.toggleGroupControlBackgroundColor };\n\t}\n`;\n\nexport const ButtonContentView = styled.div`\n\tfont-size: ${ CONFIG.fontSize };\n\tline-height: 1;\n`;\n\nexport const separatorActive = css`\n\tbackground: transparent;\n`;\n\nexport const isIcon = ( {\n\tsize,\n}: {\n\tsize: NonNullable< ToggleGroupControlProps[ 'size' ] >;\n} ) => {\n\tconst iconButtonSizes = {\n\t\tdefault: '30px',\n\t\t'__unstable-large': '34px',\n\t};\n\n\treturn css`\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\twidth: ${ iconButtonSizes[ size ] };\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t`;\n};\n\nexport const buttonActive = css`\n\tcolor: ${ COLORS.white };\n\n\t&:active {\n\t\tbackground: transparent;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { Radio } from 'reakit';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport type {\n\tToggleGroupControlOptionBaseProps,\n\tWithToolTipProps,\n} from '../types';\nimport { useToggleGroupControlContext } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks';\nimport Tooltip from '../../tooltip';\n\nconst { ButtonContentView, LabelView } = styles;\n\nconst WithToolTip = ( { showTooltip, text, children }: WithToolTipProps ) => {\n\tif ( showTooltip && text ) {\n\t\treturn (\n\t\t\t<Tooltip text={ text } position=\"top center\">\n\t\t\t\t{ children }\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction ToggleGroupControlOptionBase(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionBaseProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst toggleGroupControlContext = useToggleGroupControlContext();\n\tconst id = useInstanceId(\n\t\tToggleGroupControlOptionBase,\n\t\ttoggleGroupControlContext.baseId || 'toggle-group-control-option-base'\n\t) as string;\n\tconst buttonProps = useContextSystem(\n\t\t{ ...props, id },\n\t\t'ToggleGroupControlOptionBase'\n\t);\n\tconst {\n\t\tclassName,\n\t\tisBlock = false,\n\t\tisIcon = false,\n\t\tvalue,\n\t\tchildren,\n\t\tsize = 'default',\n\t\tshowTooltip = false,\n\t\t...radioProps\n\t} = {\n\t\t...toggleGroupControlContext,\n\t\t...buttonProps,\n\t};\n\n\tconst isActive = radioProps.state === value;\n\tconst cx = useCx();\n\tconst labelViewClasses = cx( isBlock && styles.labelBlock );\n\tconst classes = cx(\n\t\tstyles.buttonView,\n\t\tisIcon && styles.isIcon( { size } ),\n\t\tclassName,\n\t\tisActive && styles.buttonActive\n\t);\n\n\treturn (\n\t\t<LabelView className={ labelViewClasses } data-active={ isActive }>\n\t\t\t<WithToolTip\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttext={ radioProps[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t<Radio\n\t\t\t\t\t{ ...radioProps }\n\t\t\t\t\tas=\"button\"\n\t\t\t\t\taria-label={ radioProps[ 'aria-label' ] }\n\t\t\t\t\tclassName={ classes }\n\t\t\t\t\tdata-value={ value }\n\t\t\t\t\tref={ forwardedRef }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t>\n\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t</Radio>\n\t\t\t</WithToolTip>\n\t\t</LabelView>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionBase` is a form component and is meant to be used as an internal,\n * generic component for any children of `ToggleGroupControl`.\n *\n * @example\n * ```jsx\n * import {\n *   __experimentalToggleGroupControl as ToggleGroupControl,\n *   __experimentalToggleGroupControlOptionBase as ToggleGroupControlOptionBase,\n * } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n *       <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n *       <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n *     </ToggleGroupControl>\n *   );\n * }\n * ```\n */\nconst ConnectedToggleGroupControlOptionBase = contextConnect(\n\tToggleGroupControlOptionBase,\n\t'ToggleGroupControlOptionBase'\n);\n\nexport default ConnectedToggleGroupControlOptionBase;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport type { ToggleGroupControlOptionProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\n\nfunction UnforwardedToggleGroupControlOption(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { label, ...restProps } = props;\n\tconst optionLabel = restProps[ 'aria-label' ] || label;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\taria-label={ optionLabel }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label }\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n *   __experimentalToggleGroupControl as ToggleGroupControl,\n *   __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n *       <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n *       <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n *     </ToggleGroupControl>\n *   );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(\n\tUnforwardedToggleGroupControlOption\n);\n\nexport default ToggleGroupControlOption;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tFontSize,\n\tFontSizeOption,\n\tFontSizeSelectOption,\n\tFontSizeToggleGroupOption,\n\tFontSizePickerProps,\n} from './types';\n\nconst DEFAULT_FONT_SIZE = 'default';\nconst DEFAULT_FONT_SIZE_OPTION = {\n\tslug: DEFAULT_FONT_SIZE,\n\tname: __( 'Default' ),\n};\nexport const CUSTOM_FONT_SIZE = 'custom';\nconst CUSTOM_FONT_SIZE_OPTION = {\n\tslug: CUSTOM_FONT_SIZE,\n\tname: __( 'Custom' ),\n};\n\n/**\n * In case we have at most five font sizes, show a `T-shirt size`\n * alias as a label of the font size. The label assumes that the font sizes\n * are ordered accordingly - from smallest to largest.\n */\nconst FONT_SIZES_ALIASES = [\n\t/* translators: S stands for 'small' and is a size label. */\n\t__( 'S' ),\n\t/* translators: M stands for 'medium' and is a size label. */\n\t__( 'M' ),\n\t/* translators: L stands for 'large' and is a size label. */\n\t__( 'L' ),\n\t/* translators: XL stands for 'extra large' and is a size label. */\n\t__( 'XL' ),\n\t/* translators: XXL stands for 'extra extra large' and is a size label. */\n\t__( 'XXL' ),\n];\n\n/**\n * Helper util to split a font size to its numeric value\n * and its `unit`, if exists.\n *\n * @param  size Font size.\n * @return An array with the numeric value and the unit if exists.\n */\nexport function splitValueAndUnitFromSize(\n\tsize: NonNullable< FontSizePickerProps[ 'value' ] >\n) {\n\tconst [ numericValue, unit ] = `${ size }`.match( /[\\d\\.]+|\\D+/g ) ?? [];\n\n\tif (\n\t\t! isNaN( parseFloat( numericValue ) ) &&\n\t\tisFinite( Number( numericValue ) )\n\t) {\n\t\treturn [ numericValue, unit ];\n\t}\n\n\treturn [];\n}\n\n/**\n * Some themes use css vars for their font sizes, so until we\n * have the way of calculating them don't display them.\n *\n * @param  value The value that is checked.\n * @return Whether the value is a simple css value.\n */\nexport function isSimpleCssValue(\n\tvalue: NonNullable< FontSizePickerProps[ 'value' ] >\n) {\n\tconst sizeRegex = /^[\\d\\.]+(px|em|rem|vw|vh|%)?$/i;\n\treturn sizeRegex.test( String( value ) );\n}\n\n/**\n * Return font size options in the proper format depending\n * on the currently used control (select, toggle group).\n *\n * @param  useSelectControl       Whether to use a select control.\n * @param  optionsArray           Array of available font sizes objects.\n * @param  disableCustomFontSizes Flag that indicates if custom font sizes are disabled.\n * @return Array of font sizes in proper format for the used control.\n */\nexport function getFontSizeOptions(\n\tuseSelectControl: boolean,\n\toptionsArray: FontSize[],\n\tdisableCustomFontSizes: boolean\n): FontSizeSelectOption[] | FontSizeToggleGroupOption[] | null {\n\tif ( disableCustomFontSizes && ! optionsArray.length ) {\n\t\treturn null;\n\t}\n\treturn useSelectControl\n\t\t? getSelectOptions( optionsArray, disableCustomFontSizes )\n\t\t: getToggleGroupOptions( optionsArray );\n}\n\nfunction getSelectOptions(\n\toptionsArray: FontSize[],\n\tdisableCustomFontSizes: boolean\n): FontSizeSelectOption[] {\n\tconst options: FontSizeOption[] = [\n\t\tDEFAULT_FONT_SIZE_OPTION,\n\t\t...optionsArray,\n\t\t...( disableCustomFontSizes ? [] : [ CUSTOM_FONT_SIZE_OPTION ] ),\n\t];\n\treturn options.map( ( { slug, name, size } ) => ( {\n\t\tkey: slug,\n\t\tname,\n\t\tsize,\n\t\t__experimentalHint:\n\t\t\tsize && isSimpleCssValue( size ) && parseFloat( String( size ) ),\n\t} ) );\n}\n\n/**\n * Build options for the toggle group options.\n *\n * @param  optionsArray An array of font size options.\n * @param  labelAliases An array of alternative labels.\n * @return Remapped optionsArray.\n */\nexport function getToggleGroupOptions(\n\toptionsArray: FontSize[],\n\tlabelAliases: string[] = FONT_SIZES_ALIASES\n): FontSizeToggleGroupOption[] {\n\treturn optionsArray.map( ( { slug, size, name }, index ) => {\n\t\treturn {\n\t\t\tkey: slug,\n\t\t\tvalue: size,\n\t\t\tlabel: labelAliases[ index ],\n\t\t\tname: name || labelAliases[ index ],\n\t\t};\n\t} );\n}\n\nexport function getSelectedOption(\n\tfontSizes: FontSize[],\n\tvalue: FontSizePickerProps[ 'value' ]\n): FontSizeOption {\n\tif ( ! value ) {\n\t\treturn DEFAULT_FONT_SIZE_OPTION;\n\t}\n\treturn (\n\t\tfontSizes.find( ( font ) => font.size === value ) ||\n\t\tCUSTOM_FONT_SIZE_OPTION\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { space } from '../ui/utils/space';\nimport { COLORS } from '../utils';\nimport type { FontSizePickerProps } from './types';\n\nexport const Container = styled.fieldset`\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n`;\n\nexport const HeaderLabel = styled( BaseControl.VisualLabel )`\n\tmargin-bottom: 0;\n`;\n\nexport const HeaderHint = styled.span`\n\tcolor: ${ COLORS.gray[ 700 ] };\n\tmargin-left: ${ space( 1 ) };\n`;\n\nexport const Controls = styled.div< {\n\t__nextHasNoMarginBottom: boolean;\n} >`\n\t${ ( props ) =>\n\t\t! props.__nextHasNoMarginBottom && `margin-bottom: ${ space( 6 ) };` }\n`;\n\nexport const ResetButton = styled( Button )< {\n\tsize: FontSizePickerProps[ 'size' ];\n} >`\n\t&&& {\n\t\theight: ${ ( props ) =>\n\t\t\tprops.size === '__unstable-large' ? '40px' : '30px' };\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport { default as UnitControl, useCustomUnits } from '../unit-control';\nimport CustomSelectControl from '../custom-select-control';\nimport { VisuallyHidden } from '../visually-hidden';\nimport {\n\tToggleGroupControl,\n\tToggleGroupControlOption,\n} from '../toggle-group-control';\nimport {\n\tgetFontSizeOptions,\n\tgetSelectedOption,\n\tsplitValueAndUnitFromSize,\n\tisSimpleCssValue,\n\tCUSTOM_FONT_SIZE,\n} from './utils';\nimport { VStack } from '../v-stack';\nimport { HStack } from '../h-stack';\nimport type {\n\tFontSizePickerProps,\n\tFontSizeSelectOption,\n\tFontSizeToggleGroupOption,\n} from './types';\nimport {\n\tContainer,\n\tHeaderHint,\n\tHeaderLabel,\n\tControls,\n\tResetButton,\n} from './styles';\nimport { Spacer } from '../spacer';\n\n// This conditional is needed to maintain the spacing before the slider in the `withSlider` case.\nconst MaybeVStack = ( {\n\t__nextHasNoMarginBottom,\n\tchildren,\n}: {\n\t__nextHasNoMarginBottom: boolean;\n\tchildren: ReactNode;\n} ) =>\n\t! __nextHasNoMarginBottom ? (\n\t\t<>{ children }</>\n\t) : (\n\t\t<VStack spacing={ 6 } children={ children } />\n\t);\n\nconst UnforwardedFontSizePicker = (\n\tprops: FontSizePickerProps,\n\tref: ForwardedRef< any >\n) => {\n\tconst {\n\t\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t\t__nextHasNoMarginBottom = false,\n\t\tfallbackFontSize,\n\t\tfontSizes = [],\n\t\tdisableCustomFontSizes = false,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\twithSlider = false,\n\t\twithReset = true,\n\t} = props;\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated( 'Bottom margin styles for wp.components.FontSizePicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t} );\n\t}\n\n\tconst hasUnits = [ typeof value, typeof fontSizes?.[ 0 ]?.size ].includes(\n\t\t'string'\n\t);\n\tconst noUnitsValue = ! hasUnits ? value : parseInt( String( value ) );\n\tconst isPixelValue = typeof value === 'number' || value?.endsWith?.( 'px' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: [ 'px', 'em', 'rem' ],\n\t} );\n\n\t/**\n\t * The main font size UI displays a toggle group when the presets are less\n\t * than six and a select control when they are more.\n\t */\n\tconst fontSizesContainComplexValues = fontSizes.some(\n\t\t( { size: sizeArg } ) => ! isSimpleCssValue( sizeArg )\n\t);\n\tconst shouldUseSelectControl = fontSizes.length > 5;\n\tconst options = useMemo(\n\t\t() =>\n\t\t\tgetFontSizeOptions(\n\t\t\t\tshouldUseSelectControl,\n\t\t\t\tfontSizes,\n\t\t\t\tdisableCustomFontSizes\n\t\t\t),\n\t\t[ shouldUseSelectControl, fontSizes, disableCustomFontSizes ]\n\t);\n\tconst selectedOption = getSelectedOption( fontSizes, value );\n\tconst isCustomValue = selectedOption.slug === CUSTOM_FONT_SIZE;\n\tconst [ showCustomValueControl, setShowCustomValueControl ] = useState(\n\t\t! disableCustomFontSizes && isCustomValue\n\t);\n\tconst headerHint = useMemo( () => {\n\t\tif ( showCustomValueControl ) {\n\t\t\treturn `(${ __( 'Custom' ) })`;\n\t\t}\n\n\t\t// If we have a custom value that is not available in the font sizes,\n\t\t// show it as a hint as long as it's a simple CSS value.\n\t\tif ( isCustomValue ) {\n\t\t\treturn (\n\t\t\t\tvalue !== undefined &&\n\t\t\t\tisSimpleCssValue( value ) &&\n\t\t\t\t`(${ value })`\n\t\t\t);\n\t\t}\n\t\tif ( shouldUseSelectControl ) {\n\t\t\treturn (\n\t\t\t\tselectedOption?.size !== undefined &&\n\t\t\t\tisSimpleCssValue( selectedOption?.size ) &&\n\t\t\t\t`(${ selectedOption?.size })`\n\t\t\t);\n\t\t}\n\n\t\t// Calculate the `hint` for toggle group control.\n\t\tlet hint = selectedOption.name;\n\t\tif (\n\t\t\t! fontSizesContainComplexValues &&\n\t\t\ttypeof selectedOption.size === 'string'\n\t\t) {\n\t\t\tconst [ , unit ] = splitValueAndUnitFromSize( selectedOption.size );\n\t\t\thint += `(${ unit })`;\n\t\t}\n\t\treturn hint;\n\t}, [\n\t\tshowCustomValueControl,\n\t\tselectedOption?.name,\n\t\tselectedOption?.size,\n\t\tvalue,\n\t\tisCustomValue,\n\t\tshouldUseSelectControl,\n\t\tfontSizesContainComplexValues,\n\t] );\n\n\tif ( ! options ) {\n\t\treturn null;\n\t}\n\n\t// This is used for select control only. We need to add support\n\t// for ToggleGroupControl.\n\tconst currentFontSizeSR = sprintf(\n\t\t// translators: %s: Currently selected font size.\n\t\t__( 'Currently selected font size: %s' ),\n\t\tselectedOption.name\n\t);\n\treturn (\n\t\t<Container ref={ ref } className=\"components-font-size-picker\">\n\t\t\t<VisuallyHidden as=\"legend\">{ __( 'Font size' ) }</VisuallyHidden>\n\t\t\t<Spacer>\n\t\t\t\t<HStack className=\"components-font-size-picker__header\">\n\t\t\t\t\t<HeaderLabel>\n\t\t\t\t\t\t{ __( 'Size' ) }\n\t\t\t\t\t\t{ headerHint && (\n\t\t\t\t\t\t\t<HeaderHint className=\"components-font-size-picker__header__hint\">\n\t\t\t\t\t\t\t\t{ headerHint }\n\t\t\t\t\t\t\t</HeaderHint>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HeaderLabel>\n\t\t\t\t\t{ ! disableCustomFontSizes && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tshowCustomValueControl\n\t\t\t\t\t\t\t\t\t? __( 'Use size preset' )\n\t\t\t\t\t\t\t\t\t: __( 'Set custom size' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ settings }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowCustomValueControl(\n\t\t\t\t\t\t\t\t\t! showCustomValueControl\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisPressed={ showCustomValueControl }\n\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t</Spacer>\n\t\t\t<MaybeVStack __nextHasNoMarginBottom={ __nextHasNoMarginBottom }>\n\t\t\t\t<Controls\n\t\t\t\t\tclassName=\"components-font-size-picker__controls\"\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t>\n\t\t\t\t\t{ !! fontSizes.length &&\n\t\t\t\t\t\tshouldUseSelectControl &&\n\t\t\t\t\t\t! showCustomValueControl && (\n\t\t\t\t\t\t\t<CustomSelectControl\n\t\t\t\t\t\t\t\t__nextUnconstrainedWidth\n\t\t\t\t\t\t\t\tclassName=\"components-font-size-picker__select\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Font size' ) }\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tdescribedBy={ currentFontSizeSR }\n\t\t\t\t\t\t\t\toptions={ options as FontSizeSelectOption[] }\n\t\t\t\t\t\t\t\tvalue={ (\n\t\t\t\t\t\t\t\t\toptions as FontSizeSelectOption[]\n\t\t\t\t\t\t\t\t ).find(\n\t\t\t\t\t\t\t\t\t( option ) =>\n\t\t\t\t\t\t\t\t\t\toption.key === selectedOption.slug\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tonChange={ ( {\n\t\t\t\t\t\t\t\t\tselectedItem,\n\t\t\t\t\t\t\t\t}: {\n\t\t\t\t\t\t\t\t\tselectedItem: FontSizeSelectOption;\n\t\t\t\t\t\t\t\t} ) => {\n\t\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\t\thasUnits\n\t\t\t\t\t\t\t\t\t\t\t? selectedItem.size\n\t\t\t\t\t\t\t\t\t\t\t: Number( selectedItem.size )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tselectedItem.key === CUSTOM_FONT_SIZE\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tsetShowCustomValueControl( true );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t{ ! shouldUseSelectControl && ! showCustomValueControl && (\n\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\t\t\tlabel={ __( 'Font size' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\tonChange?.(\n\t\t\t\t\t\t\t\t\thasUnits ? newValue : Number( newValue )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( options as FontSizeToggleGroupOption[] ).map(\n\t\t\t\t\t\t\t\t( option ) => (\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tkey={ option.key }\n\t\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\t\t\t\t\taria-label={ option.name }\n\t\t\t\t\t\t\t\t\t\tshowTooltip={ true }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! withSlider &&\n\t\t\t\t\t\t! disableCustomFontSizes &&\n\t\t\t\t\t\tshowCustomValueControl && (\n\t\t\t\t\t\t\t<Flex className=\"components-font-size-picker__custom-size-control\">\n\t\t\t\t\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( nextSize ) => {\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! nextSize ||\n\t\t\t\t\t\t\t\t\t\t\t\t0 === parseFloat( nextSize )\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange?.( undefined );\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\tonChange?.(\n\t\t\t\t\t\t\t\t\t\t\t\t\thasUnits\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? nextSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: parseInt(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnextSize,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\t\t\tunits={ hasUnits ? units : [] }\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{ withReset && (\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t<ResetButton\n\t\t\t\t\t\t\t\t\t\t\tdisabled={ value === undefined }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonChange?.( undefined );\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t\t\t\t\t</ResetButton>\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</Controls>\n\t\t\t\t{ withSlider && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\t\tclassName=\"components-font-size-picker__custom-input\"\n\t\t\t\t\t\tlabel={ __( 'Custom Size' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tisPixelValue && noUnitsValue\n\t\t\t\t\t\t\t\t? Number( noUnitsValue )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinitialPosition={ fallbackFontSize }\n\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\tonChange?.( hasUnits ? newValue + 'px' : newValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmin={ 12 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</MaybeVStack>\n\t\t</Container>\n\t);\n};\n\nexport const FontSizePicker = forwardRef( UnforwardedFontSizePicker );\n\nexport default FontSizePicker;\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { FormFileUploadProps } from './types';\n\n/**\n * FormFileUpload is a component that allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n *   <FormFileUpload\n *     accept=\"image/*\"\n *     onChange={ ( event ) => console.log( event.currentTarget.files ) }\n *   >\n *     Upload\n *   </FormFileUpload>\n * );\n * ```\n */\nexport function FormFileUpload( {\n\taccept,\n\tchildren,\n\tmultiple = false,\n\tonChange,\n\tonClick,\n\trender,\n\t...props\n}: WordPressComponentProps< FormFileUploadProps, 'button', false > ) {\n\tconst ref = useRef< HTMLInputElement >( null );\n\tconst openFileDialog = () => {\n\t\tref.current?.click();\n\t};\n\n\tconst ui = render ? (\n\t\trender( { openFileDialog } )\n\t) : (\n\t\t<Button onClick={ openFileDialog } { ...props }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n\treturn (\n\t\t<div className=\"components-form-file-upload\">\n\t\t\t{ ui }\n\t\t\t<input\n\t\t\t\ttype=\"file\"\n\t\t\t\tref={ ref }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\tstyle={ { display: 'none' } }\n\t\t\t\taccept={ accept }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tdata-testid=\"form-file-upload-input\"\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default FormFileUpload;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport type { FormToggleProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport const noop = () => {};\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n *   const [ isChecked, setChecked ] = useState( true );\n *\n *   return (\n *     <FormToggle\n *       checked={ isChecked }\n *       onChange={ () => setChecked( ( state ) => ! state ) }\n *     />\n *   );\n * };\n * ```\n */\nexport function FormToggle(\n\tprops: WordPressComponentProps< FormToggleProps, 'input', false >\n) {\n\tconst {\n\t\tclassName,\n\t\tchecked,\n\t\tid,\n\t\tdisabled,\n\t\tonChange = noop,\n\t\t...additionalProps\n\t} = props;\n\tconst wrapperClasses = classnames( 'components-form-toggle', className, {\n\t\t'is-checked': checked,\n\t\t'is-disabled': disabled,\n\t} );\n\n\treturn (\n\t\t<span className={ wrapperClasses }>\n\t\t\t<input\n\t\t\t\tclassName=\"components-form-toggle__input\"\n\t\t\t\tid={ id }\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tchecked={ checked }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t\t<span className=\"components-form-toggle__track\"></span>\n\t\t\t<span className=\"components-form-toggle__thumb\"></span>\n\t\t</span>\n\t);\n}\n\nexport default FormToggle;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport type { TokenProps } from './types';\n\nconst noop = () => {};\n\nexport default function Token( {\n\tvalue,\n\tstatus,\n\ttitle,\n\tdisplayTransform,\n\tisBorderless = false,\n\tdisabled = false,\n\tonClickRemove = noop,\n\tonMouseEnter,\n\tonMouseLeave,\n\tmessages,\n\ttermPosition,\n\ttermsCount,\n}: TokenProps ) {\n\tconst instanceId = useInstanceId( Token );\n\tconst tokenClasses = classnames( 'components-form-token-field__token', {\n\t\t'is-error': 'error' === status,\n\t\t'is-success': 'success' === status,\n\t\t'is-validating': 'validating' === status,\n\t\t'is-borderless': isBorderless,\n\t\t'is-disabled': disabled,\n\t} );\n\n\tconst onClick = () => onClickRemove( { value } );\n\n\tconst transformedValue = displayTransform( value );\n\tconst termPositionAndCount = sprintf(\n\t\t/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n\t\t__( '%1$s (%2$s of %3$s)' ),\n\t\ttransformedValue,\n\t\ttermPosition,\n\t\ttermsCount\n\t);\n\n\treturn (\n\t\t<span\n\t\t\tclassName={ tokenClasses }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\ttitle={ title }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"components-form-token-field__token-text\"\n\t\t\t\tid={ `components-form-token-field__token-text-${ instanceId }` }\n\t\t\t>\n\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t{ termPositionAndCount }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<span aria-hidden=\"true\">{ transformedValue }</span>\n\t\t\t</span>\n\n\t\t\t<Button\n\t\t\t\tclassName=\"components-form-token-field__remove-token\"\n\t\t\t\ticon={ closeSmall }\n\t\t\t\tonClick={ ! disabled && onClick }\n\t\t\t\tlabel={ messages.remove }\n\t\t\t\taria-describedby={ `components-form-token-field__token-text-${ instanceId }` }\n\t\t\t/>\n\t\t</span>\n\t);\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { Flex } from '../flex';\nimport { space } from '../ui/utils/space';\n\ntype TokensAndInputWrapperProps = {\n\t__next36pxDefaultSize: boolean;\n\thasTokens: boolean;\n};\n\nconst deprecatedPaddings = ( {\n\t__next36pxDefaultSize,\n\thasTokens,\n}: TokensAndInputWrapperProps ) =>\n\t! __next36pxDefaultSize &&\n\tcss`\n\t\tpadding-top: ${ space( hasTokens ? 1 : 0.5 ) };\n\t\tpadding-bottom: ${ space( hasTokens ? 1 : 0.5 ) };\n\t`;\n\nexport const TokensAndInputWrapperFlex = styled( Flex )`\n\tpadding: 5px ${ space( 1 ) };\n\n\t${ deprecatedPaddings }\n`;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { KeyboardEvent, MouseEvent, TouchEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useDebounce, useInstanceId, usePrevious } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport Token from './token';\nimport TokenInput from './token-input';\nimport { TokensAndInputWrapperFlex } from './styles';\nimport SuggestionsList from './suggestions-list';\nimport type { FormTokenFieldProps, TokenItem } from './types';\nimport { FlexItem } from '../flex';\nimport { StyledLabel } from '../base-control/styles/base-control-styles';\n\nconst identity = ( value: string ) => value;\n\n/**\n * A `FormTokenField` is a field similar to the tags and categories fields in the interim editor chrome,\n * or the \"to\" field in Mail on OS X. Tokens can be entered by typing them or selecting them from a list of suggested tokens.\n *\n * Up to one hundred suggestions that match what the user has typed so far will be shown from which the user can pick from (auto-complete).\n * Tokens are separated by the \",\" character. Suggestions can be selected with the up or down arrows and added with the tab or enter key.\n *\n * The `value` property is handled in a manner similar to controlled form components.\n * See [Forms](http://facebook.github.io/react/docs/forms.html) in the React Documentation for more information.\n */\nexport function FormTokenField( props: FormTokenFieldProps ) {\n\tconst {\n\t\tautoCapitalize,\n\t\tautoComplete,\n\t\tmaxLength,\n\t\tplaceholder,\n\t\tlabel = __( 'Add item' ),\n\t\tclassName,\n\t\tsuggestions = [],\n\t\tmaxSuggestions = 100,\n\t\tvalue = [],\n\t\tdisplayTransform = identity,\n\t\tsaveTransform = ( token ) => token.trim(),\n\t\tonChange = () => {},\n\t\tonInputChange = () => {},\n\t\tonFocus = undefined,\n\t\tisBorderless = false,\n\t\tdisabled = false,\n\t\ttokenizeOnSpace = false,\n\t\tmessages = {\n\t\t\tadded: __( 'Item added.' ),\n\t\t\tremoved: __( 'Item removed.' ),\n\t\t\tremove: __( 'Remove item' ),\n\t\t\t__experimentalInvalid: __( 'Invalid item' ),\n\t\t},\n\t\t__experimentalRenderItem,\n\t\t__experimentalExpandOnFocus = false,\n\t\t__experimentalValidateInput = () => true,\n\t\t__experimentalShowHowTo = true,\n\t\t__next36pxDefaultSize = false,\n\t\t__experimentalAutoSelectFirstMatch = false,\n\t} = props;\n\n\tconst instanceId = useInstanceId( FormTokenField );\n\n\t// We reset to these initial values again in the onBlur\n\tconst [ incompleteTokenValue, setIncompleteTokenValue ] = useState( '' );\n\tconst [ inputOffsetFromEnd, setInputOffsetFromEnd ] = useState( 0 );\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst [ isExpanded, setIsExpanded ] = useState( false );\n\tconst [ selectedSuggestionIndex, setSelectedSuggestionIndex ] =\n\t\tuseState( -1 );\n\tconst [ selectedSuggestionScroll, setSelectedSuggestionScroll ] =\n\t\tuseState( false );\n\n\tconst prevSuggestions = usePrevious< string[] >( suggestions );\n\tconst prevValue = usePrevious< ( string | TokenItem )[] >( value );\n\n\tconst input = useRef< HTMLInputElement >( null );\n\tconst tokensAndInput = useRef< HTMLInputElement >( null );\n\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\tuseEffect( () => {\n\t\t// Make sure to focus the input when the isActive state is true.\n\t\tif ( isActive && ! hasFocus() ) {\n\t\t\tfocus();\n\t\t}\n\t}, [ isActive ] );\n\n\tuseEffect( () => {\n\t\tconst suggestionsDidUpdate = ! isShallowEqual(\n\t\t\tsuggestions,\n\t\t\tprevSuggestions || []\n\t\t);\n\n\t\tif ( suggestionsDidUpdate || value !== prevValue ) {\n\t\t\tupdateSuggestions( suggestionsDidUpdate );\n\t\t}\n\n\t\t// TODO: updateSuggestions() should first be refactored so its actual deps are clearer.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ suggestions, prevSuggestions, value, prevValue ] );\n\n\tuseEffect( () => {\n\t\tupdateSuggestions();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ incompleteTokenValue ] );\n\n\tuseEffect( () => {\n\t\tupdateSuggestions();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ __experimentalAutoSelectFirstMatch ] );\n\n\tif ( disabled && isActive ) {\n\t\tsetIsActive( false );\n\t\tsetIncompleteTokenValue( '' );\n\t}\n\n\tfunction focus() {\n\t\tinput.current?.focus();\n\t}\n\n\tfunction hasFocus() {\n\t\treturn input.current === input.current?.ownerDocument.activeElement;\n\t}\n\n\tfunction onFocusHandler( event: FocusEvent ) {\n\t\t// If focus is on the input or on the container, set the isActive state to true.\n\t\tif ( hasFocus() || event.target === tokensAndInput.current ) {\n\t\t\tsetIsActive( true );\n\t\t\tsetIsExpanded( __experimentalExpandOnFocus || isExpanded );\n\t\t} else {\n\t\t\t/*\n\t\t\t * Otherwise, focus is on one of the token \"remove\" buttons and we\n\t\t\t * set the isActive state to false to prevent the input to be\n\t\t\t * re-focused, see componentDidUpdate().\n\t\t\t */\n\t\t\tsetIsActive( false );\n\t\t}\n\n\t\tif ( 'function' === typeof onFocus ) {\n\t\t\tonFocus( event );\n\t\t}\n\t}\n\n\tfunction onBlur() {\n\t\tif ( inputHasValidValue() ) {\n\t\t\tsetIsActive( false );\n\t\t} else {\n\t\t\t// Reset to initial state\n\t\t\tsetIncompleteTokenValue( '' );\n\t\t\tsetInputOffsetFromEnd( 0 );\n\t\t\tsetIsActive( false );\n\t\t\tsetIsExpanded( false );\n\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\t}\n\n\tfunction onKeyDown( event: KeyboardEvent ) {\n\t\tlet preventDefault = false;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\t\tswitch ( event.code ) {\n\t\t\tcase 'Backspace':\n\t\t\t\tpreventDefault = handleDeleteKey( deleteTokenBeforeInput );\n\t\t\t\tbreak;\n\t\t\tcase 'Enter':\n\t\t\t\tpreventDefault = addCurrentToken();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tpreventDefault = handleLeftArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpreventDefault = handleUpArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tpreventDefault = handleRightArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpreventDefault = handleDownArrowKey();\n\t\t\t\tbreak;\n\t\t\tcase 'Delete':\n\t\t\t\tpreventDefault = handleDeleteKey( deleteTokenAfterInput );\n\t\t\t\tbreak;\n\t\t\tcase 'Space':\n\t\t\t\tif ( tokenizeOnSpace ) {\n\t\t\t\t\tpreventDefault = addCurrentToken();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'Escape':\n\t\t\t\tpreventDefault = handleEscapeKey( event );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onKeyPress( event: KeyboardEvent ) {\n\t\tlet preventDefault = false;\n\t\t// TODO: replace to event.code;\n\t\tswitch ( event.charCode ) {\n\t\t\tcase 44: // Comma.\n\t\t\t\tpreventDefault = handleCommaKey();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onContainerTouched( event: MouseEvent | TouchEvent ) {\n\t\t// Prevent clicking/touching the tokensAndInput container from blurring\n\t\t// the input and adding the current token.\n\t\tif ( event.target === tokensAndInput.current && isActive ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onTokenClickRemove( event: { value: string } ) {\n\t\tdeleteToken( event.value );\n\t\tfocus();\n\t}\n\n\tfunction onSuggestionHovered( suggestion: string ) {\n\t\tconst index = getMatchingSuggestions().indexOf( suggestion );\n\n\t\tif ( index >= 0 ) {\n\t\t\tsetSelectedSuggestionIndex( index );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\t}\n\n\tfunction onSuggestionSelected( suggestion: string ) {\n\t\taddNewToken( suggestion );\n\t}\n\n\tfunction onInputChangeHandler( event: { value: string } ) {\n\t\tconst text = event.value;\n\t\tconst separator = tokenizeOnSpace ? /[ ,\\t]+/ : /[,\\t]+/;\n\t\tconst items = text.split( separator );\n\t\tconst tokenValue = items[ items.length - 1 ] || '';\n\n\t\tif ( items.length > 1 ) {\n\t\t\taddNewTokens( items.slice( 0, -1 ) );\n\t\t}\n\t\tsetIncompleteTokenValue( tokenValue );\n\t\tonInputChange( tokenValue );\n\t}\n\n\tfunction handleDeleteKey( _deleteToken: () => void ) {\n\t\tlet preventDefault = false;\n\t\tif ( hasFocus() && isInputEmpty() ) {\n\t\t\t_deleteToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleLeftArrowKey() {\n\t\tlet preventDefault = false;\n\t\tif ( isInputEmpty() ) {\n\t\t\tmoveInputBeforePreviousToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleRightArrowKey() {\n\t\tlet preventDefault = false;\n\t\tif ( isInputEmpty() ) {\n\t\t\tmoveInputAfterNextToken();\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction handleUpArrowKey() {\n\t\tsetSelectedSuggestionIndex( ( index ) => {\n\t\t\treturn (\n\t\t\t\t( index === 0\n\t\t\t\t\t? getMatchingSuggestions(\n\t\t\t\t\t\t\tincompleteTokenValue,\n\t\t\t\t\t\t\tsuggestions,\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\tmaxSuggestions,\n\t\t\t\t\t\t\tsaveTransform\n\t\t\t\t\t  ).length\n\t\t\t\t\t: index ) - 1\n\t\t\t);\n\t\t} );\n\t\tsetSelectedSuggestionScroll( true );\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleDownArrowKey() {\n\t\tsetSelectedSuggestionIndex( ( index ) => {\n\t\t\treturn (\n\t\t\t\t( index + 1 ) %\n\t\t\t\tgetMatchingSuggestions(\n\t\t\t\t\tincompleteTokenValue,\n\t\t\t\t\tsuggestions,\n\t\t\t\t\tvalue,\n\t\t\t\t\tmaxSuggestions,\n\t\t\t\t\tsaveTransform\n\t\t\t\t).length\n\t\t\t);\n\t\t} );\n\n\t\tsetSelectedSuggestionScroll( true );\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleEscapeKey( event: KeyboardEvent ) {\n\t\tif ( event.target instanceof HTMLInputElement ) {\n\t\t\tsetIncompleteTokenValue( event.target.value );\n\t\t\tsetIsExpanded( false );\n\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\tsetSelectedSuggestionScroll( false );\n\t\t}\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction handleCommaKey() {\n\t\tif ( inputHasValidValue() ) {\n\t\t\taddNewToken( incompleteTokenValue );\n\t\t}\n\n\t\treturn true; // PreventDefault.\n\t}\n\n\tfunction moveInputToIndex( index: number ) {\n\t\tsetInputOffsetFromEnd( value.length - Math.max( index, -1 ) - 1 );\n\t}\n\n\tfunction moveInputBeforePreviousToken() {\n\t\tsetInputOffsetFromEnd( ( prevInputOffsetFromEnd ) => {\n\t\t\treturn Math.min( prevInputOffsetFromEnd + 1, value.length );\n\t\t} );\n\t}\n\n\tfunction moveInputAfterNextToken() {\n\t\tsetInputOffsetFromEnd( ( prevInputOffsetFromEnd ) => {\n\t\t\treturn Math.max( prevInputOffsetFromEnd - 1, 0 );\n\t\t} );\n\t}\n\n\tfunction deleteTokenBeforeInput() {\n\t\tconst index = getIndexOfInput() - 1;\n\n\t\tif ( index > -1 ) {\n\t\t\tdeleteToken( value[ index ] );\n\t\t}\n\t}\n\n\tfunction deleteTokenAfterInput() {\n\t\tconst index = getIndexOfInput();\n\n\t\tif ( index < value.length ) {\n\t\t\tdeleteToken( value[ index ] );\n\t\t\t// Update input offset since it's the offset from the last token.\n\t\t\tmoveInputToIndex( index );\n\t\t}\n\t}\n\n\tfunction addCurrentToken() {\n\t\tlet preventDefault = false;\n\t\tconst selectedSuggestion = getSelectedSuggestion();\n\n\t\tif ( selectedSuggestion ) {\n\t\t\taddNewToken( selectedSuggestion );\n\t\t\tpreventDefault = true;\n\t\t} else if ( inputHasValidValue() ) {\n\t\t\taddNewToken( incompleteTokenValue );\n\t\t\tpreventDefault = true;\n\t\t}\n\n\t\treturn preventDefault;\n\t}\n\n\tfunction addNewTokens( tokens: string[] ) {\n\t\tconst tokensToAdd = [\n\t\t\t...new Set(\n\t\t\t\ttokens\n\t\t\t\t\t.map( saveTransform )\n\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t.filter( ( token ) => ! valueContainsToken( token ) )\n\t\t\t),\n\t\t];\n\n\t\tif ( tokensToAdd.length > 0 ) {\n\t\t\tconst newValue = [ ...value ];\n\t\t\tnewValue.splice( getIndexOfInput(), 0, ...tokensToAdd );\n\t\t\tonChange( newValue );\n\t\t}\n\t}\n\n\tfunction addNewToken( token: string ) {\n\t\tif ( ! __experimentalValidateInput( token ) ) {\n\t\t\tspeak( messages.__experimentalInvalid, 'assertive' );\n\t\t\treturn;\n\t\t}\n\t\taddNewTokens( [ token ] );\n\t\tspeak( messages.added, 'assertive' );\n\n\t\tsetIncompleteTokenValue( '' );\n\t\tsetSelectedSuggestionIndex( -1 );\n\t\tsetSelectedSuggestionScroll( false );\n\t\tsetIsExpanded( ! __experimentalExpandOnFocus );\n\n\t\tif ( isActive ) {\n\t\t\tfocus();\n\t\t}\n\t}\n\n\tfunction deleteToken( token: string | TokenItem ) {\n\t\tconst newTokens = value.filter( ( item ) => {\n\t\t\treturn getTokenValue( item ) !== getTokenValue( token );\n\t\t} );\n\t\tonChange( newTokens );\n\t\tspeak( messages.removed, 'assertive' );\n\t}\n\n\tfunction getTokenValue( token: { value: string } | string ) {\n\t\tif ( 'object' === typeof token ) {\n\t\t\treturn token.value;\n\t\t}\n\n\t\treturn token;\n\t}\n\n\tfunction getMatchingSuggestions(\n\t\tsearchValue = incompleteTokenValue,\n\t\t_suggestions = suggestions,\n\t\t_value = value,\n\t\t_maxSuggestions = maxSuggestions,\n\t\t_saveTransform = saveTransform\n\t) {\n\t\tlet match = _saveTransform( searchValue );\n\t\tconst startsWithMatch: string[] = [];\n\t\tconst containsMatch: string[] = [];\n\t\tconst normalizedValue = _value.map( ( item ) => {\n\t\t\tif ( typeof item === 'string' ) {\n\t\t\t\treturn item;\n\t\t\t}\n\t\t\treturn item.value;\n\t\t} );\n\n\t\tif ( match.length === 0 ) {\n\t\t\t_suggestions = _suggestions.filter(\n\t\t\t\t( suggestion ) => ! normalizedValue.includes( suggestion )\n\t\t\t);\n\t\t} else {\n\t\t\tmatch = match.toLocaleLowerCase();\n\n\t\t\t_suggestions.forEach( ( suggestion ) => {\n\t\t\t\tconst index = suggestion.toLocaleLowerCase().indexOf( match );\n\t\t\t\tif ( normalizedValue.indexOf( suggestion ) === -1 ) {\n\t\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\t\tstartsWithMatch.push( suggestion );\n\t\t\t\t\t} else if ( index > 0 ) {\n\t\t\t\t\t\tcontainsMatch.push( suggestion );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t_suggestions = startsWithMatch.concat( containsMatch );\n\t\t}\n\n\t\treturn _suggestions.slice( 0, _maxSuggestions );\n\t}\n\n\tfunction getSelectedSuggestion() {\n\t\tif ( selectedSuggestionIndex !== -1 ) {\n\t\t\treturn getMatchingSuggestions()[ selectedSuggestionIndex ];\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tfunction valueContainsToken( token: string ) {\n\t\treturn value.some( ( item ) => {\n\t\t\treturn getTokenValue( token ) === getTokenValue( item );\n\t\t} );\n\t}\n\n\tfunction getIndexOfInput() {\n\t\treturn value.length - inputOffsetFromEnd;\n\t}\n\n\tfunction isInputEmpty() {\n\t\treturn incompleteTokenValue.length === 0;\n\t}\n\n\tfunction inputHasValidValue() {\n\t\treturn saveTransform( incompleteTokenValue ).length > 0;\n\t}\n\n\tfunction updateSuggestions( resetSelectedSuggestion = true ) {\n\t\tconst inputHasMinimumChars = incompleteTokenValue.trim().length > 1;\n\t\tconst matchingSuggestions =\n\t\t\tgetMatchingSuggestions( incompleteTokenValue );\n\t\tconst hasMatchingSuggestions = matchingSuggestions.length > 0;\n\n\t\tconst shouldExpandIfFocuses = hasFocus() && __experimentalExpandOnFocus;\n\t\tsetIsExpanded(\n\t\t\tshouldExpandIfFocuses ||\n\t\t\t\t( inputHasMinimumChars && hasMatchingSuggestions )\n\t\t);\n\n\t\tif ( resetSelectedSuggestion ) {\n\t\t\tif (\n\t\t\t\t__experimentalAutoSelectFirstMatch &&\n\t\t\t\tinputHasMinimumChars &&\n\t\t\t\thasMatchingSuggestions\n\t\t\t) {\n\t\t\t\tsetSelectedSuggestionIndex( 0 );\n\t\t\t\tsetSelectedSuggestionScroll( true );\n\t\t\t} else {\n\t\t\t\tsetSelectedSuggestionIndex( -1 );\n\t\t\t\tsetSelectedSuggestionScroll( false );\n\t\t\t}\n\t\t}\n\n\t\tif ( inputHasMinimumChars ) {\n\t\t\tconst message = hasMatchingSuggestions\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %d: number of results. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmatchingSuggestions.length\n\t\t\t\t  )\n\t\t\t\t: __( 'No results.' );\n\n\t\t\tdebouncedSpeak( message, 'assertive' );\n\t\t}\n\t}\n\n\tfunction renderTokensAndInput() {\n\t\tconst components = value.map( renderToken );\n\t\tcomponents.splice( getIndexOfInput(), 0, renderInput() );\n\n\t\treturn components;\n\t}\n\n\tfunction renderToken(\n\t\ttoken: string | TokenItem,\n\t\tindex: number,\n\t\ttokens: ( string | TokenItem )[]\n\t) {\n\t\tconst _value = getTokenValue( token );\n\t\tconst status = typeof token !== 'string' ? token.status : undefined;\n\t\tconst termPosition = index + 1;\n\t\tconst termsCount = tokens.length;\n\n\t\treturn (\n\t\t\t<FlexItem key={ 'token-' + _value }>\n\t\t\t\t<Token\n\t\t\t\t\tvalue={ _value }\n\t\t\t\t\tstatus={ status }\n\t\t\t\t\ttitle={\n\t\t\t\t\t\ttypeof token !== 'string' ? token.title : undefined\n\t\t\t\t\t}\n\t\t\t\t\tdisplayTransform={ displayTransform }\n\t\t\t\t\tonClickRemove={ onTokenClickRemove }\n\t\t\t\t\tisBorderless={\n\t\t\t\t\t\t( typeof token !== 'string' && token.isBorderless ) ||\n\t\t\t\t\t\tisBorderless\n\t\t\t\t\t}\n\t\t\t\t\tonMouseEnter={\n\t\t\t\t\t\ttypeof token !== 'string'\n\t\t\t\t\t\t\t? token.onMouseEnter\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tonMouseLeave={\n\t\t\t\t\t\ttypeof token !== 'string'\n\t\t\t\t\t\t\t? token.onMouseLeave\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tdisabled={ 'error' !== status && disabled }\n\t\t\t\t\tmessages={ messages }\n\t\t\t\t\ttermsCount={ termsCount }\n\t\t\t\t\ttermPosition={ termPosition }\n\t\t\t\t/>\n\t\t\t</FlexItem>\n\t\t);\n\t}\n\n\tfunction renderInput() {\n\t\tconst inputProps = {\n\t\t\tinstanceId,\n\t\t\tautoCapitalize,\n\t\t\tautoComplete,\n\t\t\tplaceholder: value.length === 0 ? placeholder : '',\n\t\t\tkey: 'input',\n\t\t\tdisabled,\n\t\t\tvalue: incompleteTokenValue,\n\t\t\tonBlur,\n\t\t\tisExpanded,\n\t\t\tselectedSuggestionIndex,\n\t\t};\n\n\t\treturn (\n\t\t\t<TokenInput\n\t\t\t\t{ ...inputProps }\n\t\t\t\tonChange={\n\t\t\t\t\t! ( maxLength && value.length >= maxLength )\n\t\t\t\t\t\t? onInputChangeHandler\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ input }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst classes = classnames(\n\t\tclassName,\n\t\t'components-form-token-field__input-container',\n\t\t{\n\t\t\t'is-active': isActive,\n\t\t\t'is-disabled': disabled,\n\t\t}\n\t);\n\n\tlet tokenFieldProps = {\n\t\tclassName: 'components-form-token-field',\n\t\ttabIndex: -1,\n\t};\n\tconst matchingSuggestions = getMatchingSuggestions();\n\n\tif ( ! disabled ) {\n\t\ttokenFieldProps = Object.assign( {}, tokenFieldProps, {\n\t\t\tonKeyDown,\n\t\t\tonKeyPress,\n\t\t\tonFocus: onFocusHandler,\n\t\t} );\n\t}\n\n\t// Disable reason: There is no appropriate role which describes the\n\t// input container intended accessible usability.\n\t// TODO: Refactor click detection to use blur to stop propagation.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<div { ...tokenFieldProps }>\n\t\t\t<StyledLabel\n\t\t\t\thtmlFor={ `components-form-token-input-${ instanceId }` }\n\t\t\t\tclassName=\"components-form-token-field__label\"\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</StyledLabel>\n\t\t\t<div\n\t\t\t\tref={ tokensAndInput }\n\t\t\t\tclassName={ classes }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonMouseDown={ onContainerTouched }\n\t\t\t\tonTouchStart={ onContainerTouched }\n\t\t\t>\n\t\t\t\t<TokensAndInputWrapperFlex\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tgap={ 1 }\n\t\t\t\t\twrap={ true }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\thasTokens={ !! value.length }\n\t\t\t\t>\n\t\t\t\t\t{ renderTokensAndInput() }\n\t\t\t\t</TokensAndInputWrapperFlex>\n\t\t\t\t{ isExpanded && (\n\t\t\t\t\t<SuggestionsList\n\t\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\t\tmatch={ saveTransform( incompleteTokenValue ) }\n\t\t\t\t\t\tdisplayTransform={ displayTransform }\n\t\t\t\t\t\tsuggestions={ matchingSuggestions }\n\t\t\t\t\t\tselectedIndex={ selectedSuggestionIndex }\n\t\t\t\t\t\tscrollIntoView={ selectedSuggestionScroll }\n\t\t\t\t\t\tonHover={ onSuggestionHovered }\n\t\t\t\t\t\tonSelect={ onSuggestionSelected }\n\t\t\t\t\t\t__experimentalRenderItem={ __experimentalRenderItem }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ __experimentalShowHowTo && (\n\t\t\t\t<p\n\t\t\t\t\tid={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t\t\t\tclassName=\"components-form-token-field__help\"\n\t\t\t\t>\n\t\t\t\t\t{ tokenizeOnSpace\n\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t'Separate with commas, spaces, or the Enter key.'\n\t\t\t\t\t\t  )\n\t\t\t\t\t\t: __( 'Separate with commas or the Enter key.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</div>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n}\n\nexport default FormTokenField;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Circle } from '@wordpress/primitives';\n\nexport const PageControlIcon = ( { isSelected } ) => (\n\t<SVG width=\"8\" height=\"8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Circle\n\t\t\tcx=\"4\"\n\t\t\tcy=\"4\"\n\t\t\tr=\"4\"\n\t\t\tfill={ isSelected ? '#419ECD' : '#E1E3E6' }\n\t\t/>\n\t</SVG>\n);\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { PageControlIcon } from './icons';\n\nexport default function PageControl( {\n\tcurrentPage,\n\tnumberOfPages,\n\tsetCurrentPage,\n} ) {\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"components-guide__page-control\"\n\t\t\taria-label={ __( 'Guide controls' ) }\n\t\t>\n\t\t\t{ Array.from( { length: numberOfPages } ).map( ( _, page ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ page }\n\t\t\t\t\t// Set aria-current=\"step\" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current\n\t\t\t\t\taria-current={ page === currentPage ? 'step' : undefined }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ page }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<PageControlIcon\n\t\t\t\t\t\t\t\tisSelected={ page === currentPage }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: 1: current page number 2: total number of pages */\n\t\t\t\t\t\t\t__( 'Page %1$d of %2$d' ),\n\t\t\t\t\t\t\tpage + 1,\n\t\t\t\t\t\t\tnumberOfPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => setCurrentPage( page ) }\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, Children, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport Button from '../button';\nimport PageControl from './page-control';\n\nexport default function Guide( {\n\tchildren,\n\tclassName,\n\tcontentLabel,\n\tfinishButtonText,\n\tonFinish,\n\tpages = [],\n} ) {\n\tconst guideContainer = useRef();\n\tconst [ currentPage, setCurrentPage ] = useState( 0 );\n\n\tuseEffect( () => {\n\t\tif ( Children.count( children ) ) {\n\t\t\tdeprecated( 'Passing children to <Guide>', {\n\t\t\t\tsince: '5.5',\n\t\t\t\talternative: 'the `pages` prop',\n\t\t\t} );\n\t\t}\n\t}, [ children ] );\n\n\tuseEffect( () => {\n\t\t// Each time we change the current page, start from the first element of the page.\n\t\t// This also solves any focus loss that can happen.\n\t\tif ( guideContainer.current ) {\n\t\t\tfocus.tabbable.find( guideContainer.current )?.[ 0 ]?.focus();\n\t\t}\n\t}, [ currentPage ] );\n\n\tif ( Children.count( children ) ) {\n\t\tpages = Children.map( children, ( child ) => ( { content: child } ) );\n\t}\n\n\tconst canGoBack = currentPage > 0;\n\tconst canGoForward = currentPage < pages.length - 1;\n\n\tconst goBack = () => {\n\t\tif ( canGoBack ) {\n\t\t\tsetCurrentPage( currentPage - 1 );\n\t\t}\n\t};\n\n\tconst goForward = () => {\n\t\tif ( canGoForward ) {\n\t\t\tsetCurrentPage( currentPage + 1 );\n\t\t}\n\t};\n\n\tif ( pages.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName={ classnames( 'components-guide', className ) }\n\t\t\tcontentLabel={ contentLabel }\n\t\t\tonRequestClose={ onFinish }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\tgoBack();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( event.code === 'ArrowRight' ) {\n\t\t\t\t\tgoForward();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tref={ guideContainer }\n\t\t>\n\t\t\t<div className=\"components-guide__container\">\n\t\t\t\t<div className=\"components-guide__page\">\n\t\t\t\t\t{ pages[ currentPage ].image }\n\n\t\t\t\t\t{ pages.length > 1 && (\n\t\t\t\t\t\t<PageControl\n\t\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\t\tnumberOfPages={ pages.length }\n\t\t\t\t\t\t\tsetCurrentPage={ setCurrentPage }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ pages[ currentPage ].content }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"components-guide__footer\">\n\t\t\t\t\t{ canGoBack && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__back-button\"\n\t\t\t\t\t\t\tonClick={ goBack }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Previous' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__forward-button\"\n\t\t\t\t\t\t\tonClick={ goForward }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Next' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__finish-button\"\n\t\t\t\t\t\t\tonClick={ onFinish }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ finishButtonText || __( 'Finish' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\nexport default function GuidePage( props ) {\n\tuseEffect( () => {\n\t\tdeprecated( '<GuidePage>', {\n\t\t\tsince: '5.5',\n\t\t\talternative: 'the `pages` prop in <Guide>',\n\t\t} );\n\t}, [] );\n\n\treturn <div { ...props } />;\n}\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\n\nfunction IconButton( { labelPosition, size, tooltip, label, ...props }, ref ) {\n\tdeprecated( 'wp.components.IconButton', {\n\t\tsince: '5.4',\n\t\talternative: 'wp.components.Button',\n\t\tversion: '6.2',\n\t} );\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ttooltipPosition={ labelPosition }\n\t\t\ticonSize={ size }\n\t\t\tshowTooltip={ tooltip !== undefined ? !! tooltip : undefined }\n\t\t\tlabel={ tooltip || label }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( IconButton );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { ItemProps } from '../types';\nimport { useItem } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\n\nfunction Item(\n\tprops: WordPressComponentProps< ItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { role, wrapperClassName, ...otherProps } = useItem( props );\n\n\treturn (\n\t\t<div role={ role } className={ wrapperClassName }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</div>\n\t);\n}\n\nexport default contextConnect( Item, 'Item' );\n","/**\n * External dependencies\n */\nimport type { ElementType } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useItemGroupContext } from '../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemProps } from '../types';\n\nexport function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {\n\tconst {\n\t\tas: asProp,\n\t\tclassName,\n\t\tonClick,\n\t\trole = 'listitem',\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Item' );\n\n\tconst { spacedAround, size: contextSize } = useItemGroupContext();\n\n\tconst size = sizeProp || contextSize;\n\n\tconst as =\n\t\tasProp ||\n\t\t( ( typeof onClick !== 'undefined'\n\t\t\t? 'button'\n\t\t\t: 'div' ) as ElementType );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tas === 'button' && styles.unstyledButton,\n\t\t\t\tstyles.itemSizes[ size ] || styles.itemSizes.medium,\n\t\t\t\tstyles.item,\n\t\t\t\tspacedAround && styles.spacedAround,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ as, className, cx, size, spacedAround ]\n\t);\n\n\tconst wrapperClassName = cx( styles.itemWrapper );\n\n\treturn {\n\t\tas,\n\t\tclassName: classes,\n\t\tonClick,\n\t\twrapperClassName,\n\t\trole,\n\t\t...otherProps,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { Spacer } from '../spacer';\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport type { InputControlPrefixWrapperProps } from './types';\n\nfunction UnconnectedInputControlPrefixWrapper(\n\tprops: WordPressComponentProps< InputControlPrefixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlPrefixWrapper' );\n\n\treturn (\n\t\t<Spacer marginBottom={ 0 } { ...derivedProps } ref={ forwardedRef } />\n\t);\n}\n\n/**\n * A convenience wrapper for the `prefix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n *   __experimentalInputControl as InputControl,\n *   __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n *   prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n * />\n * ```\n */\nexport const InputControlPrefixWrapper = contextConnect(\n\tUnconnectedInputControlPrefixWrapper,\n\t'InputControlPrefixWrapper'\n);\n\nexport default InputControlPrefixWrapper;\n","/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\nfunction KeyboardShortcut( {\n\ttarget,\n\tcallback,\n\tshortcut,\n\tbindGlobal,\n\teventName,\n} ) {\n\tuseKeyboardShortcut( shortcut, callback, {\n\t\tbindGlobal,\n\t\ttarget,\n\t\teventName,\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcuts( { children, shortcuts, bindGlobal, eventName } ) {\n\tconst target = useRef();\n\n\tconst element = map( shortcuts, ( callback, shortcut ) => (\n\t\t<KeyboardShortcut\n\t\t\tkey={ shortcut }\n\t\t\tshortcut={ shortcut }\n\t\t\tcallback={ callback }\n\t\t\tbindGlobal={ bindGlobal }\n\t\t\teventName={ eventName }\n\t\t\ttarget={ target }\n\t\t/>\n\t) );\n\n\t// Render as non-visual if there are no children pressed. Keyboard\n\t// events will be bound to the document instead.\n\tif ( ! Children.count( children ) ) {\n\t\treturn element;\n\t}\n\n\treturn (\n\t\t<div ref={ target }>\n\t\t\t{ element }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default KeyboardShortcuts;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\nexport function MenuGroup( props ) {\n\tconst { children, className = '', label, hideSeparator } = props;\n\tconst instanceId = useInstanceId( MenuGroup );\n\n\tif ( ! Children.count( children ) ) {\n\t\treturn null;\n\t}\n\n\tconst labelId = `components-menu-group-label-${ instanceId }`;\n\tconst classNames = classnames( className, 'components-menu-group', {\n\t\t'has-hidden-separator': hideSeparator,\n\t} );\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t{ label && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"components-menu-group__label\"\n\t\t\t\t\tid={ labelId }\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div role=\"group\" aria-labelledby={ label ? labelId : null }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default MenuGroup;\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\n\nexport function MenuItem( props, ref ) {\n\tlet {\n\t\tchildren,\n\t\tinfo,\n\t\tclassName,\n\t\ticon,\n\t\ticonPosition = 'right',\n\t\tshortcut,\n\t\tisSelected,\n\t\trole = 'menuitem',\n\t\tsuffix,\n\t\t...buttonProps\n\t} = props;\n\n\tclassName = classnames( 'components-menu-item__button', className );\n\n\tif ( info ) {\n\t\tchildren = (\n\t\t\t<span className=\"components-menu-item__info-wrapper\">\n\t\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t\t<span className=\"components-menu-item__info\">{ info }</span>\n\t\t\t</span>\n\t\t);\n\t}\n\n\tif ( icon && typeof icon !== 'string' ) {\n\t\ticon = cloneElement( icon, {\n\t\t\tclassName: classnames( 'components-menu-items__item-icon', {\n\t\t\t\t'has-icon-right': iconPosition === 'right',\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\tref={ ref }\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\taria-checked={\n\t\t\t\trole === 'menuitemcheckbox' || role === 'menuitemradio'\n\t\t\t\t\t? isSelected\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\trole={ role }\n\t\t\ticon={ iconPosition === 'left' ? icon : undefined }\n\t\t\tclassName={ className }\n\t\t\t{ ...buttonProps }\n\t\t>\n\t\t\t<span className=\"components-menu-item__item\">{ children }</span>\n\t\t\t{ ! suffix && (\n\t\t\t\t<Shortcut\n\t\t\t\t\tclassName=\"components-menu-item__shortcut\"\n\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! suffix && icon && iconPosition === 'right' && (\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t) }\n\t\t\t{ suffix }\n\t\t</Button>\n\t);\n}\n\nexport default forwardRef( MenuItem );\n","/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport MenuItem from '../menu-item';\n\nconst noop = () => {};\n\nexport default function MenuItemsChoice( {\n\tchoices = [],\n\tonHover = noop,\n\tonSelect,\n\tvalue,\n} ) {\n\treturn choices.map( ( item ) => {\n\t\tconst isSelected = value === item.value;\n\t\treturn (\n\t\t\t<MenuItem\n\t\t\t\tkey={ item.value }\n\t\t\t\trole=\"menuitemradio\"\n\t\t\t\ticon={ isSelected && check }\n\t\t\t\tinfo={ item.info }\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tshortcut={ item.shortcut }\n\t\t\t\tclassName=\"components-menu-items-choice\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isSelected ) {\n\t\t\t\t\t\tonSelect( item.value );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonMouseEnter={ () => onHover( item.value ) }\n\t\t\t\tonMouseLeave={ () => onHover( null ) }\n\t\t\t\taria-label={ item[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t{ item.label }\n\t\t\t</MenuItem>\n\t\t);\n\t} );\n}\n","// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function TabbableContainer( { eventToOffset, ...props }, ref ) {\n\tconst innerEventToOffset = ( evt ) => {\n\t\tconst { code, shiftKey } = evt;\n\t\tif ( 'Tab' === code ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// -  0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( TabbableContainer );\n","export const ROOT_MENU = 'root';\nexport const SEARCH_FOCUS_DELAY = 100;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from './constants';\n\nconst noop = () => {};\n\nexport const NavigationContext = createContext( {\n\tactiveItem: undefined,\n\tactiveMenu: ROOT_MENU,\n\tsetActiveMenu: noop,\n\tisMenuEmpty: noop,\n\n\tnavigationTree: {\n\t\titems: {},\n\t\tgetItem: noop,\n\t\taddItem: noop,\n\t\tremoveItem: noop,\n\n\t\tmenus: {},\n\t\tgetMenu: noop,\n\t\taddMenu: noop,\n\t\tremoveMenu: noop,\n\t\tchildMenu: {},\n\t\ttraverseMenu: noop,\n\t\tisMenuEmpty: noop,\n\t},\n} );\nexport const useNavigationContext = () => useContext( NavigationContext );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst search = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z\" />\n\t</SVG>\n);\n\nexport default search;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type { SearchControlProps } from './types';\nimport type { ForwardedRef } from 'react';\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tclassName,\n\t\tonChange,\n\t\tonKeyDown,\n\t\tvalue,\n\t\tlabel,\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\thelp,\n\t\tonClose,\n\t\t...restProps\n\t}: WordPressComponentProps< SearchControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst searchRef = useRef< HTMLInputElement >();\n\tconst instanceId = useInstanceId( SearchControl );\n\tconst id = `components-search-control-${ instanceId }`;\n\n\tconst renderRightButton = () => {\n\t\tif ( onClose ) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Close search' ) }\n\t\t\t\t\tonClick={ onClose }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif ( !! value ) {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tlabel={ __( 'Reset search' ) }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonChange( '' );\n\t\t\t\t\t\tsearchRef.current?.focus();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn <Icon icon={ search } />;\n\t};\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-search-control' ) }\n\t\t>\n\t\t\t<div className=\"components-search-control__input-wrapper\">\n\t\t\t\t<input\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\t\tclassName=\"components-search-control__input\"\n\t\t\t\t\tid={ id }\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tonChange={ ( event ) => onChange( event.target.value ) }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tvalue={ value || '' }\n\t\t\t\t/>\n\t\t\t\t<div className=\"components-search-control__icon\">\n\t\t\t\t\t{ renderRightButton() }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n *   const [ searchInput, setSearchInput ] = useState( '' );\n *\n *   return (\n *     <SearchControl\n *       value={ searchInput }\n *       onChange={ setSearchInput }\n *     />\n *   );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../../utils/colors-values';\nimport Button from '../../button';\nimport { Text } from '../../text';\nimport { Heading } from '../../heading';\nimport { reduceMotion, rtl } from '../../utils';\nimport { space } from '../../ui/utils/space';\nimport SearchControl from '../../search-control';\n\nexport const NavigationUI = styled.div`\n\twidth: 100%;\n\tbox-sizing: border-box;\n\tpadding: 0 ${ space( 4 ) };\n\toverflow: hidden;\n`;\n\nexport const MenuUI = styled.div`\n\tmargin-top: ${ space( 6 ) };\n\tmargin-bottom: ${ space( 6 ) };\n\tdisplay: flex;\n\tflex-direction: column;\n\tul {\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\tlist-style: none;\n\t}\n\t.components-navigation__back-button {\n\t\tmargin-bottom: ${ space( 6 ) };\n\t}\n\n\t.components-navigation__group + .components-navigation__group {\n\t\tmargin-top: ${ space( 6 ) };\n\t}\n`;\n\nexport const MenuBackButtonUI = styled( Button )`\n\t&.is-tertiary {\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\n\t\t&:hover:not( :disabled ) {\n\t\t\topacity: 1;\n\t\t\tbox-shadow: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t&:active:not( :disabled ) {\n\t\t\tbackground: transparent;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n`;\n\nexport const MenuTitleUI = styled.div`\n\toverflow: hidden;\n\twidth: 100%;\n`;\n\nexport const MenuTitleActionsUI = styled.span`\n\theight: ${ space( 6 ) }; // 24px, same height as the buttons inside\n\n\t.components-button.is-small {\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\t\tmargin-right: ${ space( 1 ) }; // Avoid hiding the focus outline\n\t\tpadding: 0;\n\n\t\t&:active:not( :disabled ) {\n\t\t\tbackground: none;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t\t&:hover:not( :disabled ) {\n\t\t\tbox-shadow: none;\n\t\t\topacity: 1;\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n`;\n\nexport const MenuTitleSearchUI = styled( SearchControl )`\n\tinput[type='search'].components-search-control__input {\n\t\tmargin: 0;\n\t\tbackground: #303030;\n\t\tcolor: #fff;\n\n\t\t&:focus {\n\t\t\tbackground: #434343;\n\t\t\tcolor: #fff;\n\t\t}\n\n\t\t&::placeholder {\n\t\t\tcolor: rgba( 255, 255, 255, 0.6 );\n\t\t}\n\t}\n\n\tsvg {\n\t\tfill: white;\n\t}\n\n\t.components-button.has-icon {\n\t\tpadding: 0;\n\t\tmin-width: auto;\n\t}\n`;\n\nexport const GroupTitleUI = styled( Heading )`\n\tmin-height: ${ space( 12 ) };\n\talign-items: center;\n\tcolor: inherit;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tmargin-bottom: ${ space( 2 ) };\n\tpadding: ${ () =>\n\t\tisRTL()\n\t\t\t? `${ space( 1 ) } ${ space( 4 ) } ${ space( 1 ) } ${ space( 2 ) }`\n\t\t\t: `${ space( 1 ) } ${ space( 2 ) } ${ space( 1 ) } ${ space(\n\t\t\t\t\t4\n\t\t\t  ) }` };\n`;\n\nexport const ItemBaseUI = styled.li`\n\tborder-radius: 2px;\n\tcolor: inherit;\n\tmargin-bottom: 0;\n\n\t> button,\n\t> a.components-button,\n\t> a {\n\t\twidth: 100%;\n\t\tcolor: inherit;\n\t\topacity: 0.7;\n\t\tpadding: ${ space( 2 ) } ${ space( 4 ) }; /* 8px 16px */\n\t\t${ rtl( { textAlign: 'left' }, { textAlign: 'right' } ) }\n\n\t\t&:hover,\n\t\t&:focus:not( [aria-disabled='true'] ):active,\n\t\t&:active:not( [aria-disabled='true'] ):active {\n\t\t\tcolor: inherit;\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t&.is-active {\n\t\tbackground-color: ${ COLORS.ui.theme };\n\t\tcolor: ${ COLORS.white };\n\n\t\t> button,\n\t\t> a {\n\t\t\tcolor: ${ COLORS.white };\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t> svg path {\n\t\tcolor: ${ COLORS.gray[ 600 ] };\n\t}\n`;\n\nexport const ItemUI = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\theight: auto;\n\tmin-height: 40px;\n\tmargin: 0;\n\tpadding: ${ space( 1.5 ) } ${ space( 4 ) };\n\tfont-weight: 400;\n\tline-height: 20px;\n\twidth: 100%;\n\tcolor: inherit;\n\topacity: 0.7;\n`;\n\nexport const ItemIconUI = styled.span`\n\tdisplay: flex;\n\tmargin-right: ${ space( 2 ) };\n`;\n\nexport const ItemBadgeUI = styled.span`\n\tmargin-left: ${ () => ( isRTL() ? '0' : space( 2 ) ) };\n\tmargin-right: ${ () => ( isRTL() ? space( 2 ) : '0' ) };\n\tdisplay: inline-flex;\n\tpadding: ${ space( 1 ) } ${ space( 3 ) };\n\tborder-radius: 2px;\n\tanimation: fade-in 250ms ease-out;\n\n\t@keyframes fade-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t${ reduceMotion( 'animation' ) };\n`;\n\nexport const ItemTitleUI = styled( Text )`\n\t${ () => ( isRTL() ? 'margin-left: auto;' : 'margin-right: auto;' ) }\n\tfont-size: 14px;\n\tline-height: 20px;\n\tcolor: inherit;\n`;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\nexport const useNavigationTreeNodes = () => {\n\tconst [ nodes, setNodes ] = useState( {} );\n\n\tconst getNode = ( key ) => nodes[ key ];\n\n\tconst addNode = ( key, value ) => {\n\t\tconst { children, ...newNode } = value;\n\t\treturn setNodes( ( original ) => ( {\n\t\t\t...original,\n\t\t\t[ key ]: newNode,\n\t\t} ) );\n\t};\n\n\tconst removeNode = ( key ) => {\n\t\treturn setNodes( ( original ) => {\n\t\t\tconst { [ key ]: removedNode, ...remainingNodes } = original;\n\t\t\treturn remainingNodes;\n\t\t} );\n\t};\n\n\treturn { nodes, getNode, addNode, removeNode };\n};\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../animate';\nimport { ROOT_MENU } from './constants';\nimport { NavigationContext } from './context';\nimport { NavigationUI } from './styles/navigation-styles';\nimport { useCreateNavigationTree } from './use-create-navigation-tree';\n\nconst noop = () => {};\n\nexport default function Navigation( {\n\tactiveItem,\n\tactiveMenu = ROOT_MENU,\n\tchildren,\n\tclassName,\n\tonActivateMenu = noop,\n} ) {\n\tconst [ menu, setMenu ] = useState( activeMenu );\n\tconst [ slideOrigin, setSlideOrigin ] = useState();\n\tconst navigationTree = useCreateNavigationTree();\n\tconst defaultSlideOrigin = isRTL() ? 'right' : 'left';\n\n\tconst setActiveMenu = ( menuId, slideInOrigin = defaultSlideOrigin ) => {\n\t\tif ( ! navigationTree.getMenu( menuId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSlideOrigin( slideInOrigin );\n\t\tsetMenu( menuId );\n\t\tonActivateMenu( menuId );\n\t};\n\n\t// Used to prevent the sliding animation on mount\n\tconst isMounted = useRef( false );\n\tuseEffect( () => {\n\t\tif ( ! isMounted.current ) {\n\t\t\tisMounted.current = true;\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( activeMenu !== menu ) {\n\t\t\tsetActiveMenu( activeMenu );\n\t\t}\n\t\t// Ignore exhaustive-deps here, as it would require either a larger refactor or some questionable workarounds.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41612 for context.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ activeMenu ] );\n\n\tconst context = {\n\t\tactiveItem,\n\t\tactiveMenu: menu,\n\t\tsetActiveMenu,\n\t\tnavigationTree,\n\t};\n\n\tconst classes = classnames( 'components-navigation', className );\n\tconst animateClassName = getAnimateClassName( {\n\t\ttype: 'slide-in',\n\t\torigin: slideOrigin,\n\t} );\n\n\treturn (\n\t\t<NavigationUI className={ classes }>\n\t\t\t<div\n\t\t\t\tkey={ menu }\n\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t[ animateClassName ]: isMounted.current && slideOrigin,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<NavigationContext.Provider value={ context }>\n\t\t\t\t\t{ children }\n\t\t\t\t</NavigationContext.Provider>\n\t\t\t</div>\n\t\t</NavigationUI>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationTreeNodes } from './use-navigation-tree-nodes';\n\nexport const useCreateNavigationTree = () => {\n\tconst {\n\t\tnodes: items,\n\t\tgetNode: getItem,\n\t\taddNode: addItem,\n\t\tremoveNode: removeItem,\n\t} = useNavigationTreeNodes();\n\n\tconst {\n\t\tnodes: menus,\n\t\tgetNode: getMenu,\n\t\taddNode: addMenu,\n\t\tremoveNode: removeMenu,\n\t} = useNavigationTreeNodes();\n\n\t/**\n\t * Stores direct nested menus of menus\n\t * This makes it easy to traverse menu tree\n\t *\n\t * Key is the menu prop of the menu\n\t * Value is an array of menu keys\n\t */\n\tconst [ childMenu, setChildMenu ] = useState( {} );\n\tconst getChildMenu = ( menu ) => childMenu[ menu ] || [];\n\n\tconst traverseMenu = ( startMenu, callback ) => {\n\t\tconst visited = [];\n\t\tlet queue = [ startMenu ];\n\t\tlet current;\n\n\t\twhile ( queue.length > 0 ) {\n\t\t\tcurrent = getMenu( queue.shift() );\n\n\t\t\tif ( ! current || visited.includes( current.menu ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvisited.push( current.menu );\n\t\t\tqueue = [ ...queue, ...getChildMenu( current.menu ) ];\n\n\t\t\tif ( callback( current ) === false ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst isMenuEmpty = ( menuToCheck ) => {\n\t\tlet isEmpty = true;\n\n\t\ttraverseMenu( menuToCheck, ( current ) => {\n\t\t\tif ( ! current.isEmpty ) {\n\t\t\t\tisEmpty = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\treturn isEmpty;\n\t};\n\n\treturn {\n\t\titems,\n\t\tgetItem,\n\t\taddItem,\n\t\tremoveItem,\n\n\t\tmenus,\n\t\tgetMenu,\n\t\taddMenu: ( key, value ) => {\n\t\t\tsetChildMenu( ( state ) => {\n\t\t\t\tconst newState = { ...state };\n\n\t\t\t\tif ( ! newState[ value.parentMenu ] ) {\n\t\t\t\t\tnewState[ value.parentMenu ] = [];\n\t\t\t\t}\n\n\t\t\t\tnewState[ value.parentMenu ].push( key );\n\n\t\t\t\treturn newState;\n\t\t\t} );\n\n\t\t\taddMenu( key, value );\n\t\t},\n\t\tremoveMenu,\n\t\tchildMenu,\n\t\ttraverseMenu,\n\t\tisMenuEmpty,\n\t};\n};\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\" />\n\t</SVG>\n);\n\nexport default chevronRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z\" />\n\t</SVG>\n);\n\nexport default chevronLeft;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\n\nfunction NavigationBackButton(\n\t{ backButtonLabel, className, href, onClick, parentMenu },\n\tref\n) {\n\tconst { setActiveMenu, navigationTree } = useNavigationContext();\n\n\tconst classes = classnames(\n\t\t'components-navigation__back-button',\n\t\tclassName\n\t);\n\n\tconst parentMenuTitle = navigationTree.getMenu( parentMenu )?.title;\n\n\tconst handleOnClick = ( event ) => {\n\t\tif ( typeof onClick === 'function' ) {\n\t\t\tonClick( event );\n\t\t}\n\n\t\tconst animationDirection = isRTL() ? 'left' : 'right';\n\t\tif ( parentMenu && ! event.defaultPrevented ) {\n\t\t\tsetActiveMenu( parentMenu, animationDirection );\n\t\t}\n\t};\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\treturn (\n\t\t<MenuBackButtonUI\n\t\t\tclassName={ classes }\n\t\t\thref={ href }\n\t\t\tvariant=\"tertiary\"\n\t\t\tref={ ref }\n\t\t\tonClick={ handleOnClick }\n\t\t>\n\t\t\t<Icon icon={ icon } />\n\t\t\t{ backButtonLabel || parentMenuTitle || __( 'Back' ) }\n\t\t</MenuBackButtonUI>\n\t);\n}\nexport default forwardRef( NavigationBackButton );\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const NavigationGroupContext = createContext( { group: undefined } );\n\nexport const useNavigationGroupContext = () =>\n\tuseContext( NavigationGroupContext );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { NavigationGroupContext } from './context';\nimport { GroupTitleUI } from '../styles/navigation-styles';\nimport { useNavigationContext } from '../context';\n\nlet uniqueId = 0;\n\nexport default function NavigationGroup( { children, className, title } ) {\n\tconst [ groupId ] = useState( `group-${ ++uniqueId }` );\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\n\tconst context = { group: groupId };\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif (\n\t\t! Object.values( items ).some(\n\t\t\t( item ) => item.group === groupId && item._isVisible\n\t\t)\n\t) {\n\t\treturn (\n\t\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationGroupContext.Provider>\n\t\t);\n\t}\n\n\tconst groupTitleId = `components-navigation__group-title-${ groupId }`;\n\tconst classes = classnames( 'components-navigation__group', className );\n\n\treturn (\n\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t<li className={ classes }>\n\t\t\t\t{ title && (\n\t\t\t\t\t<GroupTitleUI\n\t\t\t\t\t\tclassName=\"components-navigation__group-title\"\n\t\t\t\t\t\tid={ groupTitleId }\n\t\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</GroupTitleUI>\n\t\t\t\t) }\n\t\t\t\t<ul aria-labelledby={ groupTitleId } role=\"group\">\n\t\t\t\t\t{ children }\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</NavigationGroupContext.Provider>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport { ItemBadgeUI, ItemTitleUI } from '../styles/navigation-styles';\n\nexport default function NavigationItemBaseContent( props ) {\n\tconst { badge, title } = props;\n\n\treturn (\n\t\t<>\n\t\t\t{ title && (\n\t\t\t\t<ItemTitleUI\n\t\t\t\t\tclassName=\"components-navigation__item-title\"\n\t\t\t\t\tvariant=\"body.small\"\n\t\t\t\t\tas=\"span\"\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ItemTitleUI>\n\t\t\t) }\n\n\t\t\t{ badge && (\n\t\t\t\t<ItemBadgeUI className=\"components-navigation__item-badge\">\n\t\t\t\t\t{ badge }\n\t\t\t\t</ItemBadgeUI>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const NavigationMenuContext = createContext( {\n\tmenu: undefined,\n\tsearch: '',\n} );\nexport const useNavigationMenuContext = () =>\n\tuseContext( NavigationMenuContext );\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n// @see packages/block-editor/src/components/inserter/search-items.js\nexport const normalizeInput = ( input ) =>\n\tremoveAccents( input ).replace( /^\\//, '' ).toLowerCase();\n\nexport const normalizedSearch = ( title, search ) =>\n\t-1 !== normalizeInput( title ).indexOf( normalizeInput( search ) );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeItem } from './use-navigation-tree-item';\nimport { ItemBaseUI } from '../styles/navigation-styles';\n\nlet uniqueId = 0;\n\nexport default function NavigationItemBase( props ) {\n\t// Also avoid to pass the `title` and `href` props to the ItemBaseUI styled component.\n\tconst { children, className, title, href, ...restProps } = props;\n\n\tconst [ itemId ] = useState( `item-${ ++uniqueId }` );\n\n\tuseNavigationTreeItem( itemId, props );\n\tconst { navigationTree } = useNavigationContext();\n\n\tif ( ! navigationTree.getItem( itemId )?._isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst classes = classnames( 'components-navigation__item', className );\n\n\treturn (\n\t\t<ItemBaseUI className={ classes } { ...restProps }>\n\t\t\t{ children }\n\t\t</ItemBaseUI>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { useNavigationGroupContext } from '../group/context';\nimport { useNavigationMenuContext } from '../menu/context';\nimport { normalizedSearch } from '../utils';\n\nexport const useNavigationTreeItem = ( itemId, props ) => {\n\tconst {\n\t\tactiveMenu,\n\t\tnavigationTree: { addItem, removeItem },\n\t} = useNavigationContext();\n\tconst { group } = useNavigationGroupContext();\n\tconst { menu, search } = useNavigationMenuContext();\n\n\tuseEffect( () => {\n\t\tconst isMenuActive = activeMenu === menu;\n\t\tconst isItemVisible =\n\t\t\t! search || normalizedSearch( props.title, search );\n\n\t\taddItem( itemId, {\n\t\t\t...props,\n\t\t\tgroup,\n\t\t\tmenu,\n\t\t\t_isVisible: isMenuActive && isItemVisible,\n\t\t} );\n\n\t\treturn () => {\n\t\t\tremoveItem( itemId );\n\t\t};\n\t\t// Ignore exhaustive-deps rule for now. See https://github.com/WordPress/gutenberg/pull/41639\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ activeMenu, search ] );\n};\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { useNavigationContext } from '../context';\nimport { ItemUI, ItemIconUI } from '../styles/navigation-styles';\nimport NavigationItemBaseContent from './base-content';\nimport NavigationItemBase from './base';\n\nconst noop = () => {};\n\nexport default function NavigationItem( props ) {\n\tconst {\n\t\tbadge,\n\t\tchildren,\n\t\tclassName,\n\t\thref,\n\t\titem,\n\t\tnavigateToMenu,\n\t\tonClick = noop,\n\t\ttitle,\n\t\ticon,\n\t\thideIfTargetMenuEmpty,\n\t\tisText,\n\t\t...restProps\n\t} = props;\n\n\tconst {\n\t\tactiveItem,\n\t\tsetActiveMenu,\n\t\tnavigationTree: { isMenuEmpty },\n\t} = useNavigationContext();\n\n\t// If hideIfTargetMenuEmpty prop is true\n\t// And the menu we are supposed to navigate to\n\t// Is marked as empty, then we skip rendering the item.\n\tif (\n\t\thideIfTargetMenuEmpty &&\n\t\tnavigateToMenu &&\n\t\tisMenuEmpty( navigateToMenu )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isActive = item && activeItem === item;\n\n\tconst classes = classnames( className, {\n\t\t'is-active': isActive,\n\t} );\n\n\tconst onItemClick = ( event ) => {\n\t\tif ( navigateToMenu ) {\n\t\t\tsetActiveMenu( navigateToMenu );\n\t\t}\n\n\t\tonClick( event );\n\t};\n\tconst navigationIcon = isRTL() ? chevronLeft : chevronRight;\n\tconst baseProps = children ? props : { ...props, onClick: undefined };\n\tconst itemProps = isText\n\t\t? restProps\n\t\t: {\n\t\t\t\tas: Button,\n\t\t\t\thref,\n\t\t\t\tonClick: onItemClick,\n\t\t\t\t'aria-current': isActive ? 'page' : undefined,\n\t\t\t\t...restProps,\n\t\t  };\n\n\treturn (\n\t\t<NavigationItemBase { ...baseProps } className={ classes }>\n\t\t\t{ children || (\n\t\t\t\t<ItemUI { ...itemProps }>\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<ItemIconUI>\n\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t</ItemIconUI>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<NavigationItemBaseContent\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tbadge={ badge }\n\t\t\t\t\t/>\n\n\t\t\t\t\t{ navigateToMenu && <Icon icon={ navigationIcon } /> }\n\t\t\t\t</ItemUI>\n\t\t\t) }\n\t\t</NavigationItemBase>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { ROOT_MENU } from '../constants';\n\nexport const useNavigationTreeMenu = ( props ) => {\n\tconst {\n\t\tnavigationTree: { addMenu, removeMenu },\n\t} = useNavigationContext();\n\n\tconst key = props.menu || ROOT_MENU;\n\tuseEffect( () => {\n\t\taddMenu( key, { ...props, menu: key } );\n\n\t\treturn () => {\n\t\t\tremoveMenu( key );\n\t\t};\n\t\t// Ignore exhaustive-deps rule for now. See https://github.com/WordPress/gutenberg/pull/44090\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n};\n","/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('@wordpress/element').WPComponent} WPComponent */\n\n/**\n * A Higher Order Component used to be provide speak and debounced speak\n * functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {WPComponent} Component The component to be wrapped.\n *\n * @return {WPComponent} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) =>\n\t\t(\n\t\t\t<Component\n\t\t\t\t{ ...props }\n\t\t\t\tspeak={ speak }\n\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t/>\n\t\t),\n\t'withSpokenMessages'\n);\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport withSpokenMessages from '../../higher-order/with-spoken-messages';\nimport { useNavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { MenuTitleSearchUI } from '../styles/navigation-styles';\nimport { SEARCH_FOCUS_DELAY } from '../constants';\n\nfunction MenuTitleSearch( {\n\tdebouncedSpeak,\n\tonCloseSearch,\n\tonSearch,\n\tsearch,\n\ttitle,\n} ) {\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\tconst { menu } = useNavigationMenuContext();\n\tconst inputRef = useRef();\n\n\t// Wait for the slide-in animation to complete before autofocusing the input.\n\t// This prevents scrolling to the input during the animation.\n\tuseEffect( () => {\n\t\tconst delayedFocus = setTimeout( () => {\n\t\t\tinputRef.current.focus();\n\t\t}, SEARCH_FOCUS_DELAY );\n\n\t\treturn () => {\n\t\t\tclearTimeout( delayedFocus );\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! search ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst count = Object.values( items ).filter(\n\t\t\t( item ) => item._isVisible\n\t\t).length;\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\n\t\t\t_n( '%d result found.', '%d results found.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t\t// Ignore exhaustive-deps rule for now. See https://github.com/WordPress/gutenberg/pull/44090\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ items, search ] );\n\n\tconst onClose = () => {\n\t\tonSearch( '' );\n\t\tonCloseSearch();\n\t};\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.code === 'Escape' && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tconst inputId = `components-navigation__menu-title-search-${ menu }`;\n\tconst placeholder = sprintf(\n\t\t/* translators: placeholder for menu search box. %s: menu title */\n\t\t__( 'Search %s' ),\n\t\ttitle?.toLowerCase()\n\t).trim();\n\n\treturn (\n\t\t<div className=\"components-navigation__menu-title-search\">\n\t\t\t<MenuTitleSearchUI\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tclassName=\"components-navigation__menu-search-input\"\n\t\t\t\tid={ inputId }\n\t\t\t\tonChange={ ( value ) => onSearch( value ) }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tonClose={ onClose }\n\t\t\t\tref={ inputRef }\n\t\t\t\ttype=\"search\"\n\t\t\t\tvalue={ search }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default withSpokenMessages( MenuTitleSearch );\n","/**\n * WordPress dependencies\n */\nimport { useRef, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, search as searchIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../../animate';\nimport Button from '../../button';\nimport MenuTitleSearch from './menu-title-search';\nimport {\n\tGroupTitleUI,\n\tMenuTitleActionsUI,\n\tMenuTitleUI,\n} from '../styles/navigation-styles';\nimport { useNavigationMenuContext } from './context';\nimport { SEARCH_FOCUS_DELAY } from '../constants';\n\nexport default function NavigationMenuTitle( {\n\thasSearch,\n\tonSearch,\n\tsearch,\n\ttitle,\n\ttitleAction,\n} ) {\n\tconst [ isSearching, setIsSearching ] = useState( false );\n\tconst { menu } = useNavigationMenuContext();\n\tconst searchButtonRef = useRef();\n\n\tif ( ! title ) {\n\t\treturn null;\n\t}\n\n\tconst onCloseSearch = () => {\n\t\tsetIsSearching( false );\n\n\t\t// Wait for the slide-in animation to complete before focusing the search button.\n\t\t// eslint-disable-next-line @wordpress/react-no-unsafe-timeout\n\t\tsetTimeout( () => {\n\t\t\tsearchButtonRef.current.focus();\n\t\t}, SEARCH_FOCUS_DELAY );\n\t};\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\t/* translators: search button label for menu search box. %s: menu title */\n\tconst searchButtonLabel = sprintf( __( 'Search in %s' ), title );\n\n\treturn (\n\t\t<MenuTitleUI className=\"components-navigation__menu-title\">\n\t\t\t{ ! isSearching && (\n\t\t\t\t<GroupTitleUI\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tclassName=\"components-navigation__menu-title-heading\"\n\t\t\t\t\tlevel={ 3 }\n\t\t\t\t>\n\t\t\t\t\t<span id={ menuTitleId }>{ title }</span>\n\n\t\t\t\t\t{ ( hasSearch || titleAction ) && (\n\t\t\t\t\t\t<MenuTitleActionsUI>\n\t\t\t\t\t\t\t{ titleAction }\n\n\t\t\t\t\t\t\t{ hasSearch && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tlabel={ searchButtonLabel }\n\t\t\t\t\t\t\t\t\tonClick={ () => setIsSearching( true ) }\n\t\t\t\t\t\t\t\t\tref={ searchButtonRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon icon={ searchIcon } />\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuTitleActionsUI>\n\t\t\t\t\t) }\n\t\t\t\t</GroupTitleUI>\n\t\t\t) }\n\n\t\t\t{ isSearching && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ getAnimateClassName( {\n\t\t\t\t\t\ttype: 'slide-in',\n\t\t\t\t\t\torigin: 'left',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<MenuTitleSearch\n\t\t\t\t\t\tonCloseSearch={ onCloseSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</MenuTitleUI>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { ItemBaseUI, ItemUI } from '../styles/navigation-styles';\n\nexport default function NavigationSearchNoResultsFound( { search } ) {\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\n\tconst resultsCount = Object.values( items ).filter(\n\t\t( item ) => item._isVisible\n\t).length;\n\n\tif ( ! search || !! resultsCount ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ItemBaseUI>\n\t\t\t<ItemUI>{ __( 'No results found.' ) } </ItemUI>\n\t\t</ItemBaseUI>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from '../constants';\nimport { NavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeMenu } from './use-navigation-tree-menu';\nimport NavigationBackButton from '../back-button';\nimport NavigationMenuTitle from './menu-title';\nimport NavigationSearchNoResultsFound from './search-no-results-found';\nimport { NavigableMenu } from '../../navigable-container';\nimport { MenuUI } from '../styles/navigation-styles';\n\nexport default function NavigationMenu( props ) {\n\tconst {\n\t\tbackButtonLabel,\n\t\tchildren,\n\t\tclassName,\n\t\thasSearch,\n\t\tmenu = ROOT_MENU,\n\t\tonBackButtonClick,\n\t\tonSearch: setControlledSearch,\n\t\tparentMenu,\n\t\tsearch: controlledSearch,\n\t\tisSearchDebouncing,\n\t\ttitle,\n\t\ttitleAction,\n\t} = props;\n\tconst [ uncontrolledSearch, setUncontrolledSearch ] = useState( '' );\n\tuseNavigationTreeMenu( props );\n\tconst { activeMenu } = useNavigationContext();\n\n\tconst context = {\n\t\tmenu,\n\t\tsearch: uncontrolledSearch,\n\t};\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif ( activeMenu !== menu ) {\n\t\treturn (\n\t\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationMenuContext.Provider>\n\t\t);\n\t}\n\n\tconst isControlledSearch = !! setControlledSearch;\n\tconst search = isControlledSearch ? controlledSearch : uncontrolledSearch;\n\tconst onSearch = isControlledSearch\n\t\t? setControlledSearch\n\t\t: setUncontrolledSearch;\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\tconst classes = classnames( 'components-navigation__menu', className );\n\n\treturn (\n\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t<MenuUI className={ classes }>\n\t\t\t\t{ ( parentMenu || onBackButtonClick ) && (\n\t\t\t\t\t<NavigationBackButton\n\t\t\t\t\t\tbackButtonLabel={ backButtonLabel }\n\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\tonClick={ onBackButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ title && (\n\t\t\t\t\t<NavigationMenuTitle\n\t\t\t\t\t\thasSearch={ hasSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ttitleAction={ titleAction }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<NavigableMenu>\n\t\t\t\t\t<ul aria-labelledby={ menuTitleId }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ search && ! isSearchDebouncing && (\n\t\t\t\t\t\t\t<NavigationSearchNoResultsFound search={ search } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ul>\n\t\t\t\t</NavigableMenu>\n\t\t\t</MenuUI>\n\t\t</NavigationMenuContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { NavigatorContext as NavigatorContextType } from './types';\n\nconst initialContextValue: NavigatorContextType = {\n\tlocation: {},\n\tgoTo: () => {},\n\tgoBack: () => {},\n};\nexport const NavigatorContext = createContext( initialContextValue );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type {\n\tNavigatorProviderProps,\n\tNavigatorLocation,\n\tNavigatorContext as NavigatorContextType,\n} from '../types';\n\nfunction NavigatorProvider(\n\tprops: WordPressComponentProps< NavigatorProviderProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst { initialPath, children, className, ...otherProps } =\n\t\tuseContextSystem( props, 'NavigatorProvider' );\n\n\tconst [ locationHistory, setLocationHistory ] = useState<\n\t\tNavigatorLocation[]\n\t>( [\n\t\t{\n\t\t\tpath: initialPath,\n\t\t},\n\t] );\n\n\tconst goTo: NavigatorContextType[ 'goTo' ] = useCallback(\n\t\t( path, options = {} ) => {\n\t\t\tsetLocationHistory( [\n\t\t\t\t...locationHistory,\n\t\t\t\t{\n\t\t\t\t\t...options,\n\t\t\t\t\tpath,\n\t\t\t\t\tisBack: false,\n\t\t\t\t},\n\t\t\t] );\n\t\t},\n\t\t[ locationHistory ]\n\t);\n\n\tconst goBack: NavigatorContextType[ 'goBack' ] = useCallback( () => {\n\t\tif ( locationHistory.length > 1 ) {\n\t\t\tsetLocationHistory( [\n\t\t\t\t...locationHistory.slice( 0, -2 ),\n\t\t\t\t{\n\t\t\t\t\t...locationHistory[ locationHistory.length - 2 ],\n\t\t\t\t\tisBack: true,\n\t\t\t\t},\n\t\t\t] );\n\t\t}\n\t}, [ locationHistory ] );\n\n\tconst navigatorContextValue: NavigatorContextType = useMemo(\n\t\t() => ( {\n\t\t\tlocation: {\n\t\t\t\t...locationHistory[ locationHistory.length - 1 ],\n\t\t\t\tisInitial: locationHistory.length === 1,\n\t\t\t},\n\t\t\tgoTo,\n\t\t\tgoBack,\n\t\t} ),\n\t\t[ locationHistory, goTo, goBack ]\n\t);\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t// Prevents horizontal overflow while animating screen transitions.\n\t\t() => cx( css( { overflowX: 'hidden' } ), className ),\n\t\t[ className, cx ]\n\t);\n\n\treturn (\n\t\t<View ref={ forwardedRef } className={ classes } { ...otherProps }>\n\t\t\t<NavigatorContext.Provider value={ navigatorContextValue }>\n\t\t\t\t{ children }\n\t\t\t</NavigatorContext.Provider>\n\t\t</View>\n\t);\n}\n\n/**\n * The `NavigatorProvider` component allows rendering nested views/panels/menus\n * (via the `NavigatorScreen` component and navigate between these different\n * view (via the `NavigatorButton` and `NavigatorBackButton` components or the\n * `useNavigator` hook).\n *\n * @example\n * ```jsx\n * import {\n *   __experimentalNavigatorProvider as NavigatorProvider,\n *   __experimentalNavigatorScreen as NavigatorScreen,\n *   __experimentalNavigatorButton as NavigatorButton,\n *   __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n *   <NavigatorProvider initialPath=\"/\">\n *     <NavigatorScreen path=\"/\">\n *       <p>This is the home screen.</p>\n *        <NavigatorButton path=\"/child\">\n *          Navigate to child screen.\n *       </NavigatorButton>\n *     </NavigatorScreen>\n *\n *     <NavigatorScreen path=\"/child\">\n *       <p>This is the child screen.</p>\n *       <NavigatorBackButton>\n *         Go back\n *       </NavigatorBackButton>\n *     </NavigatorScreen>\n *   </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorProvider = contextConnect(\n\tNavigatorProvider,\n\t'NavigatorProvider'\n);\n\nexport default ConnectedNavigatorProvider;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"escapeHtml\"];","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, MotionProps } from 'framer-motion';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { useContext, useEffect, useMemo, useRef } from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseMergeRefs,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type { NavigatorScreenProps } from '../types';\n\nconst animationEnterDelay = 0;\nconst animationEnterDuration = 0.14;\nconst animationExitDuration = 0.14;\nconst animationExitDelay = 0;\n\n// Props specific to `framer-motion` can't be currently passed to `NavigatorScreen`,\n// as some of them would overlap with HTML props (e.g. `onAnimationStart`, ...)\ntype Props = Omit<\n\tWordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tkeyof MotionProps\n>;\n\nfunction NavigatorScreen( props: Props, forwardedRef: ForwardedRef< any > ) {\n\tconst { children, className, path, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorScreen'\n\t);\n\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst { location } = useContext( NavigatorContext );\n\tconst isMatch = location.path === escapeAttribute( path );\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\n\tconst previousLocation = usePrevious( location );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tcss( {\n\t\t\t\t\t// Ensures horizontal overflow is visually accessible.\n\t\t\t\t\toverflowX: 'auto',\n\t\t\t\t\t// In case the root has a height, it should not be exceeded.\n\t\t\t\t\tmaxHeight: '100%',\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\t// Focus restoration\n\tconst isInitialLocation = location.isInitial && ! location.isBack;\n\tuseEffect( () => {\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\tif ( isInitialLocation || ! isMatch || ! wrapperRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = wrapperRef.current.ownerDocument.activeElement;\n\n\t\t// If an element is already focused within the wrapper do not focus the\n\t\t// element. This prevents inputs or buttons from losing focus unecessarily.\n\t\tif ( wrapperRef.current.contains( activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( location.isBack && previousLocation?.focusTargetSelector ) {\n\t\t\telementToFocus = wrapperRef.current.querySelector(\n\t\t\t\tpreviousLocation.focusTargetSelector\n\t\t\t);\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst firstTabbable = (\n\t\t\t\tfocus.tabbable.find( wrapperRef.current ) as HTMLElement[]\n\t\t\t )[ 0 ];\n\t\t\telementToFocus = firstTabbable ?? wrapperRef.current;\n\t\t}\n\n\t\telementToFocus.focus();\n\t}, [\n\t\tisInitialLocation,\n\t\tisMatch,\n\t\tlocation.isBack,\n\t\tpreviousLocation?.focusTargetSelector,\n\t] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\tif ( ! isMatch ) {\n\t\treturn null;\n\t}\n\n\tif ( prefersReducedMotion ) {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tref={ mergedWrapperRef }\n\t\t\t\tclassName={ classes }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst animate = {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\tdelay: animationEnterDelay,\n\t\t\tduration: animationEnterDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t\tx: 0,\n\t};\n\tconst initial = {\n\t\topacity: 0,\n\t\tx:\n\t\t\t( isRTL() && location.isBack ) || ( ! isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t};\n\tconst exit = {\n\t\tdelay: animationExitDelay,\n\t\topacity: 0,\n\t\tx:\n\t\t\t( ! isRTL() && location.isBack ) || ( isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t\ttransition: {\n\t\t\tduration: animationExitDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t};\n\n\tconst animatedProps = {\n\t\tanimate,\n\t\texit,\n\t\tinitial,\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...animatedProps }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n}\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorButton` and the `NavigatorBackButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n *   __experimentalNavigatorProvider as NavigatorProvider,\n *   __experimentalNavigatorScreen as NavigatorScreen,\n *   __experimentalNavigatorButton as NavigatorButton,\n *   __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n *   <NavigatorProvider initialPath=\"/\">\n *     <NavigatorScreen path=\"/\">\n *       <p>This is the home screen.</p>\n *        <NavigatorButton path=\"/child\">\n *          Navigate to child screen.\n *       </NavigatorButton>\n *     </NavigatorScreen>\n *\n *     <NavigatorScreen path=\"/child\">\n *       <p>This is the child screen.</p>\n *       <NavigatorBackButton>\n *         Go back\n *       </NavigatorBackButton>\n *     </NavigatorScreen>\n *   </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorScreen = contextConnect(\n\tNavigatorScreen,\n\t'NavigatorScreen'\n);\n\nexport default ConnectedNavigatorScreen;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { NavigatorContext } from './context';\nimport type { Navigator } from './types';\n\n/**\n * Retrieves a `navigator` instance.\n */\nfunction useNavigator(): Navigator {\n\tconst { location, goTo, goBack } = useContext( NavigatorContext );\n\n\treturn {\n\t\tlocation,\n\t\tgoTo,\n\t\tgoBack,\n\t};\n}\n\nexport default useNavigator;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useNavigatorButton } from './hook';\nimport type { NavigatorButtonProps } from '../types';\n\nfunction NavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorButtonProps = useNavigatorButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorButtonProps } />;\n}\n\n/**\n * The `NavigatorButton` component can be used to navigate to a screen and should\n * be used in combination with the `NavigatorProvider`, the `NavigatorScreen`\n * and the `NavigatorBackButton` components (or the `useNavigator` hook).\n *\n * @example\n * ```jsx\n * import {\n *   __experimentalNavigatorProvider as NavigatorProvider,\n *   __experimentalNavigatorScreen as NavigatorScreen,\n *   __experimentalNavigatorButton as NavigatorButton,\n *   __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n *   <NavigatorProvider initialPath=\"/\">\n *     <NavigatorScreen path=\"/\">\n *       <p>This is the home screen.</p>\n *        <NavigatorButton path=\"/child\">\n *          Navigate to child screen.\n *       </NavigatorButton>\n *     </NavigatorScreen>\n *\n *     <NavigatorScreen path=\"/child\">\n *       <p>This is the child screen.</p>\n *       <NavigatorBackButton>\n *         Go back\n *       </NavigatorBackButton>\n *     </NavigatorScreen>\n *   </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorButton = contextConnect(\n\tNavigatorButton,\n\t'NavigatorButton'\n);\n\nexport default ConnectedNavigatorButton;\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport Button from '../../button';\nimport useNavigator from '../use-navigator';\nimport type { NavigatorButtonProps } from '../types';\n\nconst cssSelectorForAttribute = ( attrName: string, attrValue: string ) =>\n\t`[${ attrName }=\"${ attrValue }\"]`;\n\nexport function useNavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >\n) {\n\tconst {\n\t\tpath,\n\t\tonClick,\n\t\tas = Button,\n\t\tattributeName = 'id',\n\t\t...otherProps\n\t} = useContextSystem( props, 'NavigatorButton' );\n\n\tconst escapedPath = escapeAttribute( path );\n\n\tconst { goTo } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tgoTo( escapedPath, {\n\t\t\t\t\tfocusTargetSelector: cssSelectorForAttribute(\n\t\t\t\t\t\tattributeName,\n\t\t\t\t\t\tescapedPath\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t\tonClick?.( e );\n\t\t\t},\n\t\t\t[ goTo, onClick, attributeName, escapedPath ]\n\t\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t\t[ attributeName ]: escapedPath,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useNavigatorBackButton } from './hook';\nimport type { NavigatorBackButtonProps } from '../types';\n\nfunction NavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorBackButtonProps = useNavigatorBackButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorBackButtonProps } />;\n}\n\n/**\n * The `NavigatorBackButton` component can be used to navigate to a screen and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorScreen` and the `NavigatorButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n *   __experimentalNavigatorProvider as NavigatorProvider,\n *   __experimentalNavigatorScreen as NavigatorScreen,\n *   __experimentalNavigatorButton as NavigatorButton,\n *   __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n *   <NavigatorProvider initialPath=\"/\">\n *     <NavigatorScreen path=\"/\">\n *       <p>This is the home screen.</p>\n *        <NavigatorButton path=\"/child\">\n *          Navigate to child screen.\n *       </NavigatorButton>\n *     </NavigatorScreen>\n *\n *     <NavigatorScreen path=\"/child\">\n *       <p>This is the child screen.</p>\n *       <NavigatorBackButton>\n *         Go back\n *       </NavigatorBackButton>\n *     </NavigatorScreen>\n *   </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorBackButton = contextConnect(\n\tNavigatorBackButton,\n\t'NavigatorBackButton'\n);\n\nexport default ConnectedNavigatorBackButton;\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport Button from '../../button';\nimport useNavigator from '../use-navigator';\nimport type { NavigatorBackButtonProps } from '../types';\n\nexport function useNavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >\n) {\n\tconst {\n\t\tonClick,\n\t\tas = Button,\n\t\t...otherProps\n\t} = useContextSystem( props, 'NavigatorBackButton' );\n\n\tconst { goBack } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > =\n\t\tuseCallback(\n\t\t\t( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tgoBack();\n\t\t\t\tonClick?.( e );\n\t\t\t},\n\t\t\t[ goBack, onClick ]\n\t\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t};\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML, useEffect, renderToString } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../';\n\n/** @typedef {import('@wordpress/element').WPElement} WPElement */\n\nconst noop = () => {};\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param {string|WPElement}     [message]  Message to announce.\n * @param {'polite'|'assertive'} politeness Politeness to announce.\n */\nfunction useSpokenMessage( message, politeness ) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\n/**\n * Given a notice status, returns an assumed default politeness for the status.\n * Defaults to 'assertive'.\n *\n * @param {string} [status] Notice status.\n *\n * @return {'polite'|'assertive'} Notice politeness.\n */\nfunction getDefaultPoliteness( status ) {\n\tswitch ( status ) {\n\t\tcase 'success':\n\t\tcase 'warning':\n\t\tcase 'info':\n\t\t\treturn 'polite';\n\n\t\tcase 'error':\n\t\tdefault:\n\t\t\treturn 'assertive';\n\t}\n}\n\nfunction Notice( {\n\tclassName,\n\tstatus = 'info',\n\tchildren,\n\tspokenMessage = children,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\tpoliteness = getDefaultPoliteness( status ),\n\t__unstableHTML,\n\t// onDismiss is a callback executed when the notice is dismissed.\n\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t// actually the function to call to remove the notice from the UI.\n\tonDismiss = noop,\n} ) {\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\tconst classes = classnames(\n\t\tclassName,\n\t\t'components-notice',\n\t\t'is-' + status,\n\t\t{\n\t\t\t'is-dismissible': isDismissible,\n\t\t}\n\t);\n\n\tif ( __unstableHTML ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\tconst onDismissNotice = ( event ) => {\n\t\tevent?.preventDefault?.();\n\t\tonDismiss();\n\t\tonRemove();\n\t};\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t<div className=\"components-notice__actions\">\n\t\t\t\t\t{ actions.map(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclassName: buttonCustomClasses,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tisPrimary,\n\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\tnoDefaultClasses = false,\n\t\t\t\t\t\t\t\tonClick,\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tlet computedVariant = variant;\n\t\t\t\t\t\t\tif ( variant !== 'primary' && ! noDefaultClasses ) {\n\t\t\t\t\t\t\t\tcomputedVariant = ! url ? 'secondary' : 'link';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof computedVariant === 'undefined' &&\n\t\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcomputedVariant = 'primary';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\t\t\tvariant={ computedVariant }\n\t\t\t\t\t\t\t\t\tonClick={ url ? undefined : onClick }\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'components-notice__action',\n\t\t\t\t\t\t\t\t\t\tbuttonCustomClasses\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{ label }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Dismiss this notice' ) }\n\t\t\t\t\tonClick={ onDismissNotice }\n\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Notice;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport Notice from './';\n\nconst noop = () => {};\n\n/**\n * Renders a list of notices.\n *\n * @param {Object}   $0           Props passed to the component.\n * @param {Array}    $0.notices   Array of notices to render.\n * @param {Function} $0.onRemove  Function called when a notice should be removed / dismissed.\n * @param {Object}   $0.className Name of the class used by the component.\n * @param {Object}   $0.children  Array of children to be rendered inside the notice list.\n *\n * @return {Object} The rendered notices list.\n */\nfunction NoticeList( { notices, onRemove = noop, className, children } ) {\n\tconst removeNotice = ( id ) => () => onRemove( id );\n\n\tclassName = classnames( 'components-notice-list', className );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ children }\n\t\t\t{ [ ...notices ].reverse().map( ( notice ) => {\n\t\t\t\tconst { content, ...restNotice } = notice;\n\t\t\t\treturn (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\tonRemove={ removeNotice( notice.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t</Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n\nexport default NoticeList;\n","function PanelHeader( { label, children } ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\n\nfunction Panel( { header, className, children }, ref ) {\n\tconst classNames = classnames( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( Panel );\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nconst noop = () => {};\n\nexport function PanelBody(\n\t{\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t},\n\tref\n) {\n\tconst [ isOpened, setIsOpened ] = useControlledState( opened, {\n\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t} );\n\tconst nodeRef = useRef();\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n\tconst scrollAfterOpenRef = useRef();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render.\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = classnames( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ isOpened }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: isOpened } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t( { isOpened, icon, title, ...props }, ref ) => {\n\t\tif ( ! title ) return null;\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nconst ForwardedComponent = forwardRef( PanelBody );\nForwardedComponent.displayName = 'PanelBody';\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nconst PanelRow = forwardRef( ( { className, children }, ref ) => (\n\t<div\n\t\tclassName={ classnames( 'components-panel__row', className ) }\n\t\tref={ ref }\n\t>\n\t\t{ children }\n\t</div>\n) );\n\nexport default PanelRow;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder< IconProps = unknown >(\n\tprops: WordPressComponentProps<\n\t\tPlaceholderProps< IconProps >,\n\t\t'div',\n\t\tfalse\n\t>\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = classnames(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\tconst fieldsetClasses = classnames( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t<fieldset className={ fieldsetClasses }>\n\t\t\t\t{ !! instructions && (\n\t\t\t\t\t<legend className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ instructions }\n\t\t\t\t\t</legend>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</fieldset>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n","/**\n * External dependencies\n */\nimport { groupBy } from 'lodash';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: null,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\tconst termsByParent = groupBy( flatTermsWithParentAndChildren, 'parent' );\n\tif ( termsByParent.null && termsByParent.null.length ) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n","/**\n * External dependencies\n */\nimport { unescape as unescapeString } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, SelectOptions, Truthy } from './types';\n\nfunction getSelectOptions( tree: Tree[], level = 0 ): SelectOptions {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + unescapeString( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * TreeSelect component is used to generate select input fields.\n *\n * @example\n * ```jsx\n * import { TreeSelect } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\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 * }\n * ```\n */\n\nexport function TreeSelect( {\n\tlabel,\n\tnoOptionLabel,\n\tonChange,\n\tselectedId,\n\ttree = [],\n\t...props\n}: TreeSelectProps ) {\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\treturn (\n\t\t<SelectControl\n\t\t\t{ ...{ label, options, onChange } }\n\t\t\tvalue={ selectedId }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default TreeSelect;\n","/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\nexport default function CategorySelect( {\n\tlabel,\n\tnoOptionLabel,\n\tcategoriesList,\n\tselectedCategoryId,\n\tonChange,\n\t...props\n} ) {\n\tconst termsTree = useMemo( () => {\n\t\treturn buildTermsTree( categoriesList );\n\t}, [ categoriesList ] );\n\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{ label, noOptionLabel, onChange } }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={ selectedCategoryId }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\n\nexport default function AuthorSelect( {\n\tlabel,\n\tnoOptionLabel,\n\tauthorList,\n\tselectedAuthorId,\n\tonChange,\n} ) {\n\tif ( ! authorList ) return null;\n\tconst termsTree = buildTermsTree( authorList );\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{ label, noOptionLabel, onChange } }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={ selectedAuthorId }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CategorySelect from './category-select';\nimport { RangeControl, SelectControl, FormTokenField } from '../';\nimport AuthorSelect from './author-select';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nexport default function QueryControls( {\n\tauthorList,\n\tselectedAuthorId,\n\tcategoriesList,\n\tselectedCategoryId,\n\tcategorySuggestions,\n\tselectedCategories,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonCategoryChange,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n} ) {\n\treturn [\n\t\tonOrderChange && onOrderByChange && (\n\t\t\t<SelectControl\n\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\t\toptions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t/* translators: label for ordering posts by title in ascending order */\n\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t/* translators: label for ordering posts by title in descending order */\n\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\tonOrderChange( newOrder );\n\t\t\t\t\t}\n\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\tonOrderByChange( newOrderBy );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t/>\n\t\t),\n\t\tcategoriesList && onCategoryChange && (\n\t\t\t<CategorySelect\n\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\tcategoriesList={ categoriesList }\n\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\tnoOptionLabel={ __( 'All' ) }\n\t\t\t\tselectedCategoryId={ selectedCategoryId }\n\t\t\t\tonChange={ onCategoryChange }\n\t\t\t/>\n\t\t),\n\t\tcategorySuggestions && onCategoryChange && (\n\t\t\t<FormTokenField\n\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\tvalue={\n\t\t\t\t\tselectedCategories &&\n\t\t\t\t\tselectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t} ) )\n\t\t\t\t}\n\t\t\t\tsuggestions={ Object.keys( categorySuggestions ) }\n\t\t\t\tonChange={ onCategoryChange }\n\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t/>\n\t\t),\n\t\tonAuthorChange && (\n\t\t\t<AuthorSelect\n\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\tauthorList={ authorList }\n\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\tnoOptionLabel={ __( 'All' ) }\n\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\tonChange={ onAuthorChange }\n\t\t\t/>\n\t\t),\n\t\tonNumberOfItemsChange && (\n\t\t\t<RangeControl\n\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\tvalue={ numberOfItems }\n\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\tmin={ minItems }\n\t\t\t\tmax={ maxItems }\n\t\t\t\trequired\n\t\t\t/>\n\t\t),\n\t];\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst RadioContext = createContext( {\n\tstate: null,\n\tsetState: () => {},\n} );\n\nexport default RadioContext;\n","/**\n * External dependencies\n */\nimport { Radio as ReakitRadio } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport RadioContext from '../radio-context';\n\nfunction Radio( { children, value, ...props }, ref ) {\n\tconst radioContext = useContext( RadioContext );\n\tconst checked = radioContext.state === value;\n\n\treturn (\n\t\t<ReakitRadio\n\t\t\tref={ ref }\n\t\t\tas={ Button }\n\t\t\tvariant={ checked ? 'primary' : 'secondary' }\n\t\t\tvalue={ value }\n\t\t\t{ ...radioContext }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children || value }\n\t\t</ReakitRadio>\n\t);\n}\n\nexport default forwardRef( Radio );\n","/**\n * External dependencies\n */\nimport { useRadioState, RadioGroup as ReakitRadioGroup } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport RadioContext from '../radio-context';\n\nfunction RadioGroup(\n\t{ label, checked, defaultChecked, disabled, onChange, ...props },\n\tref\n) {\n\tconst radioState = useRadioState( {\n\t\tstate: defaultChecked,\n\t\tbaseId: props.id,\n\t} );\n\tconst radioContext = {\n\t\t...radioState,\n\t\tdisabled,\n\t\t// Controlled or uncontrolled.\n\t\tstate: checked ?? radioState.state,\n\t\tsetState: onChange ?? radioState.setState,\n\t};\n\n\treturn (\n\t\t<RadioContext.Provider value={ radioContext }>\n\t\t\t<ReakitRadioGroup\n\t\t\t\tref={ ref }\n\t\t\t\tas={ ButtonGroup }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...radioState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</RadioContext.Provider>\n\t);\n}\n\nexport default forwardRef( RadioGroup );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n *   const [ option, setOption ] = useState( 'a' );\n *\n *   return (\n *     <RadioControl\n *       label=\"User type\"\n *       help=\"The type of the current user\"\n *       selected={ option }\n *       options={ [\n *         { label: 'Author', value: 'a' },\n *         { label: 'Editor', value: 'e' },\n *       ] }\n *       onChange={ ( value ) => setOption( value ) }\n *     />\n *   );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label htmlFor={ `${ id }-${ index }` }>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n","var __extends = (this && this.__extends) || (function () {\n    var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nvar styles = {\n    top: {\n        width: '100%',\n        height: '10px',\n        top: '-5px',\n        left: '0px',\n        cursor: 'row-resize',\n    },\n    right: {\n        width: '10px',\n        height: '100%',\n        top: '0px',\n        right: '-5px',\n        cursor: 'col-resize',\n    },\n    bottom: {\n        width: '100%',\n        height: '10px',\n        bottom: '-5px',\n        left: '0px',\n        cursor: 'row-resize',\n    },\n    left: {\n        width: '10px',\n        height: '100%',\n        top: '0px',\n        left: '-5px',\n        cursor: 'col-resize',\n    },\n    topRight: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        right: '-10px',\n        top: '-10px',\n        cursor: 'ne-resize',\n    },\n    bottomRight: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        right: '-10px',\n        bottom: '-10px',\n        cursor: 'se-resize',\n    },\n    bottomLeft: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        left: '-10px',\n        bottom: '-10px',\n        cursor: 'sw-resize',\n    },\n    topLeft: {\n        width: '20px',\n        height: '20px',\n        position: 'absolute',\n        left: '-10px',\n        top: '-10px',\n        cursor: 'nw-resize',\n    },\n};\nvar Resizer = /** @class */ (function (_super) {\n    __extends(Resizer, _super);\n    function Resizer() {\n        var _this = _super !== null && _super.apply(this, arguments) || this;\n        _this.onMouseDown = function (e) {\n            _this.props.onResizeStart(e, _this.props.direction);\n        };\n        _this.onTouchStart = function (e) {\n            _this.props.onResizeStart(e, _this.props.direction);\n        };\n        return _this;\n    }\n    Resizer.prototype.render = function () {\n        return (React.createElement(\"div\", { className: this.props.className || '', style: __assign(__assign({ position: 'absolute', userSelect: 'none' }, styles[this.props.direction]), (this.props.replaceStyles || {})), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children));\n    };\n    return Resizer;\n}(React.PureComponent));\nexport { Resizer };\n","var __extends = (this && this.__extends) || (function () {\n    var 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport { Resizer } from './resizer';\nimport memoize from 'fast-memoize';\nvar DEFAULT_SIZE = {\n    width: 'auto',\n    height: 'auto',\n};\nvar clamp = memoize(function (n, min, max) { return Math.max(Math.min(n, max), min); });\nvar snap = memoize(function (n, size) { return Math.round(n / size) * size; });\nvar hasDirection = memoize(function (dir, target) {\n    return new RegExp(dir, 'i').test(target);\n});\n// INFO: In case of window is a Proxy and does not porxy Events correctly, use isTouchEvent & isMouseEvent to distinguish event type instead of `instanceof`.\nvar isTouchEvent = function (event) {\n    return Boolean(event.touches && event.touches.length);\n};\nvar isMouseEvent = function (event) {\n    return Boolean((event.clientX || event.clientX === 0) &&\n        (event.clientY || event.clientY === 0));\n};\nvar findClosestSnap = memoize(function (n, snapArray, snapGap) {\n    if (snapGap === void 0) { snapGap = 0; }\n    var closestGapIndex = snapArray.reduce(function (prev, curr, index) { return (Math.abs(curr - n) < Math.abs(snapArray[prev] - n) ? index : prev); }, 0);\n    var gap = Math.abs(snapArray[closestGapIndex] - n);\n    return snapGap === 0 || gap < snapGap ? snapArray[closestGapIndex] : n;\n});\nvar endsWith = memoize(function (str, searchStr) {\n    return str.substr(str.length - searchStr.length, searchStr.length) === searchStr;\n});\nvar getStringSize = memoize(function (n) {\n    n = n.toString();\n    if (n === 'auto') {\n        return n;\n    }\n    if (endsWith(n, 'px')) {\n        return n;\n    }\n    if (endsWith(n, '%')) {\n        return n;\n    }\n    if (endsWith(n, 'vh')) {\n        return n;\n    }\n    if (endsWith(n, 'vw')) {\n        return n;\n    }\n    if (endsWith(n, 'vmax')) {\n        return n;\n    }\n    if (endsWith(n, 'vmin')) {\n        return n;\n    }\n    return n + \"px\";\n});\nvar getPixelSize = function (size, parentSize, innerWidth, innerHeight) {\n    if (size && typeof size === 'string') {\n        if (endsWith(size, 'px')) {\n            return Number(size.replace('px', ''));\n        }\n        if (endsWith(size, '%')) {\n            var ratio = Number(size.replace('%', '')) / 100;\n            return parentSize * ratio;\n        }\n        if (endsWith(size, 'vw')) {\n            var ratio = Number(size.replace('vw', '')) / 100;\n            return innerWidth * ratio;\n        }\n        if (endsWith(size, 'vh')) {\n            var ratio = Number(size.replace('vh', '')) / 100;\n            return innerHeight * ratio;\n        }\n    }\n    return size;\n};\nvar calculateNewMax = memoize(function (parentSize, innerWidth, innerHeight, maxWidth, maxHeight, minWidth, minHeight) {\n    maxWidth = getPixelSize(maxWidth, parentSize.width, innerWidth, innerHeight);\n    maxHeight = getPixelSize(maxHeight, parentSize.height, innerWidth, innerHeight);\n    minWidth = getPixelSize(minWidth, parentSize.width, innerWidth, innerHeight);\n    minHeight = getPixelSize(minHeight, parentSize.height, innerWidth, innerHeight);\n    return {\n        maxWidth: typeof maxWidth === 'undefined' ? undefined : Number(maxWidth),\n        maxHeight: typeof maxHeight === 'undefined' ? undefined : Number(maxHeight),\n        minWidth: typeof minWidth === 'undefined' ? undefined : Number(minWidth),\n        minHeight: typeof minHeight === 'undefined' ? undefined : Number(minHeight),\n    };\n});\nvar definedProps = [\n    'as',\n    'style',\n    'className',\n    'grid',\n    'snap',\n    'bounds',\n    'boundsByDirection',\n    'size',\n    'defaultSize',\n    'minWidth',\n    'minHeight',\n    'maxWidth',\n    'maxHeight',\n    'lockAspectRatio',\n    'lockAspectRatioExtraWidth',\n    'lockAspectRatioExtraHeight',\n    'enable',\n    'handleStyles',\n    'handleClasses',\n    'handleWrapperStyle',\n    'handleWrapperClass',\n    'children',\n    'onResizeStart',\n    'onResize',\n    'onResizeStop',\n    'handleComponent',\n    'scale',\n    'resizeRatio',\n    'snapGap',\n];\n// HACK: This class is used to calculate % size.\nvar baseClassName = '__resizable_base__';\nvar Resizable = /** @class */ (function (_super) {\n    __extends(Resizable, _super);\n    function Resizable(props) {\n        var _this = _super.call(this, props) || this;\n        _this.ratio = 1;\n        _this.resizable = null;\n        // For parent boundary\n        _this.parentLeft = 0;\n        _this.parentTop = 0;\n        // For boundary\n        _this.resizableLeft = 0;\n        _this.resizableRight = 0;\n        _this.resizableTop = 0;\n        _this.resizableBottom = 0;\n        // For target boundary\n        _this.targetLeft = 0;\n        _this.targetTop = 0;\n        _this.appendBase = function () {\n            if (!_this.resizable || !_this.window) {\n                return null;\n            }\n            var parent = _this.parentNode;\n            if (!parent) {\n                return null;\n            }\n            var element = _this.window.document.createElement('div');\n            element.style.width = '100%';\n            element.style.height = '100%';\n            element.style.position = 'absolute';\n            element.style.transform = 'scale(0, 0)';\n            element.style.left = '0';\n            element.style.flex = '0';\n            if (element.classList) {\n                element.classList.add(baseClassName);\n            }\n            else {\n                element.className += baseClassName;\n            }\n            parent.appendChild(element);\n            return element;\n        };\n        _this.removeBase = function (base) {\n            var parent = _this.parentNode;\n            if (!parent) {\n                return;\n            }\n            parent.removeChild(base);\n        };\n        _this.ref = function (c) {\n            if (c) {\n                _this.resizable = c;\n            }\n        };\n        _this.state = {\n            isResizing: false,\n            width: typeof (_this.propsSize && _this.propsSize.width) === 'undefined'\n                ? 'auto'\n                : _this.propsSize && _this.propsSize.width,\n            height: typeof (_this.propsSize && _this.propsSize.height) === 'undefined'\n                ? 'auto'\n                : _this.propsSize && _this.propsSize.height,\n            direction: 'right',\n            original: {\n                x: 0,\n                y: 0,\n                width: 0,\n                height: 0,\n            },\n            backgroundStyle: {\n                height: '100%',\n                width: '100%',\n                backgroundColor: 'rgba(0,0,0,0)',\n                cursor: 'auto',\n                opacity: 0,\n                position: 'fixed',\n                zIndex: 9999,\n                top: '0',\n                left: '0',\n                bottom: '0',\n                right: '0',\n            },\n            flexBasis: undefined,\n        };\n        _this.onResizeStart = _this.onResizeStart.bind(_this);\n        _this.onMouseMove = _this.onMouseMove.bind(_this);\n        _this.onMouseUp = _this.onMouseUp.bind(_this);\n        return _this;\n    }\n    Object.defineProperty(Resizable.prototype, \"parentNode\", {\n        get: function () {\n            if (!this.resizable) {\n                return null;\n            }\n            return this.resizable.parentNode;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"window\", {\n        get: function () {\n            if (!this.resizable) {\n                return null;\n            }\n            if (!this.resizable.ownerDocument) {\n                return null;\n            }\n            return this.resizable.ownerDocument.defaultView;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"propsSize\", {\n        get: function () {\n            return this.props.size || this.props.defaultSize || DEFAULT_SIZE;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"size\", {\n        get: function () {\n            var width = 0;\n            var height = 0;\n            if (this.resizable && this.window) {\n                var orgWidth = this.resizable.offsetWidth;\n                var orgHeight = this.resizable.offsetHeight;\n                // HACK: Set position `relative` to get parent size.\n                //       This is because when re-resizable set `absolute`, I can not get base width correctly.\n                var orgPosition = this.resizable.style.position;\n                if (orgPosition !== 'relative') {\n                    this.resizable.style.position = 'relative';\n                }\n                // INFO: Use original width or height if set auto.\n                width = this.resizable.style.width !== 'auto' ? this.resizable.offsetWidth : orgWidth;\n                height = this.resizable.style.height !== 'auto' ? this.resizable.offsetHeight : orgHeight;\n                // Restore original position\n                this.resizable.style.position = orgPosition;\n            }\n            return { width: width, height: height };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(Resizable.prototype, \"sizeStyle\", {\n        get: function () {\n            var _this = this;\n            var size = this.props.size;\n            var getSize = function (key) {\n                if (typeof _this.state[key] === 'undefined' || _this.state[key] === 'auto') {\n                    return 'auto';\n                }\n                if (_this.propsSize && _this.propsSize[key] && endsWith(_this.propsSize[key].toString(), '%')) {\n                    if (endsWith(_this.state[key].toString(), '%')) {\n                        return _this.state[key].toString();\n                    }\n                    var parentSize = _this.getParentSize();\n                    var value = Number(_this.state[key].toString().replace('px', ''));\n                    var percent = (value / parentSize[key]) * 100;\n                    return percent + \"%\";\n                }\n                return getStringSize(_this.state[key]);\n            };\n            var width = size && typeof size.width !== 'undefined' && !this.state.isResizing\n                ? getStringSize(size.width)\n                : getSize('width');\n            var height = size && typeof size.height !== 'undefined' && !this.state.isResizing\n                ? getStringSize(size.height)\n                : getSize('height');\n            return { width: width, height: height };\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Resizable.prototype.getParentSize = function () {\n        if (!this.parentNode) {\n            if (!this.window) {\n                return { width: 0, height: 0 };\n            }\n            return { width: this.window.innerWidth, height: this.window.innerHeight };\n        }\n        var base = this.appendBase();\n        if (!base) {\n            return { width: 0, height: 0 };\n        }\n        // INFO: To calculate parent width with flex layout\n        var wrapChanged = false;\n        var wrap = this.parentNode.style.flexWrap;\n        if (wrap !== 'wrap') {\n            wrapChanged = true;\n            this.parentNode.style.flexWrap = 'wrap';\n            // HACK: Use relative to get parent padding size\n        }\n        base.style.position = 'relative';\n        base.style.minWidth = '100%';\n        var size = {\n            width: base.offsetWidth,\n            height: base.offsetHeight,\n        };\n        if (wrapChanged) {\n            this.parentNode.style.flexWrap = wrap;\n        }\n        this.removeBase(base);\n        return size;\n    };\n    Resizable.prototype.bindEvents = function () {\n        if (this.window) {\n            this.window.addEventListener('mouseup', this.onMouseUp);\n            this.window.addEventListener('mousemove', this.onMouseMove);\n            this.window.addEventListener('mouseleave', this.onMouseUp);\n            this.window.addEventListener('touchmove', this.onMouseMove, {\n                capture: true,\n                passive: false,\n            });\n            this.window.addEventListener('touchend', this.onMouseUp);\n        }\n    };\n    Resizable.prototype.unbindEvents = function () {\n        if (this.window) {\n            this.window.removeEventListener('mouseup', this.onMouseUp);\n            this.window.removeEventListener('mousemove', this.onMouseMove);\n            this.window.removeEventListener('mouseleave', this.onMouseUp);\n            this.window.removeEventListener('touchmove', this.onMouseMove, true);\n            this.window.removeEventListener('touchend', this.onMouseUp);\n        }\n    };\n    Resizable.prototype.componentDidMount = function () {\n        if (!this.resizable || !this.window) {\n            return;\n        }\n        var computedStyle = this.window.getComputedStyle(this.resizable);\n        this.setState({\n            width: this.state.width || this.size.width,\n            height: this.state.height || this.size.height,\n            flexBasis: computedStyle.flexBasis !== 'auto' ? computedStyle.flexBasis : undefined,\n        });\n    };\n    Resizable.prototype.componentWillUnmount = function () {\n        if (this.window) {\n            this.unbindEvents();\n        }\n    };\n    Resizable.prototype.createSizeForCssProperty = function (newSize, kind) {\n        var propsSize = this.propsSize && this.propsSize[kind];\n        return this.state[kind] === 'auto' &&\n            this.state.original[kind] === newSize &&\n            (typeof propsSize === 'undefined' || propsSize === 'auto')\n            ? 'auto'\n            : newSize;\n    };\n    Resizable.prototype.calculateNewMaxFromBoundary = function (maxWidth, maxHeight) {\n        var boundsByDirection = this.props.boundsByDirection;\n        var direction = this.state.direction;\n        var widthByDirection = boundsByDirection && hasDirection('left', direction);\n        var heightByDirection = boundsByDirection && hasDirection('top', direction);\n        var boundWidth;\n        var boundHeight;\n        if (this.props.bounds === 'parent') {\n            var parent_1 = this.parentNode;\n            if (parent_1) {\n                boundWidth = widthByDirection\n                    ? this.resizableRight - this.parentLeft\n                    : parent_1.offsetWidth + (this.parentLeft - this.resizableLeft);\n                boundHeight = heightByDirection\n                    ? this.resizableBottom - this.parentTop\n                    : parent_1.offsetHeight + (this.parentTop - this.resizableTop);\n            }\n        }\n        else if (this.props.bounds === 'window') {\n            if (this.window) {\n                boundWidth = widthByDirection ? this.resizableRight : this.window.innerWidth - this.resizableLeft;\n                boundHeight = heightByDirection ? this.resizableBottom : this.window.innerHeight - this.resizableTop;\n            }\n        }\n        else if (this.props.bounds) {\n            boundWidth = widthByDirection\n                ? this.resizableRight - this.targetLeft\n                : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft);\n            boundHeight = heightByDirection\n                ? this.resizableBottom - this.targetTop\n                : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop);\n        }\n        if (boundWidth && Number.isFinite(boundWidth)) {\n            maxWidth = maxWidth && maxWidth < boundWidth ? maxWidth : boundWidth;\n        }\n        if (boundHeight && Number.isFinite(boundHeight)) {\n            maxHeight = maxHeight && maxHeight < boundHeight ? maxHeight : boundHeight;\n        }\n        return { maxWidth: maxWidth, maxHeight: maxHeight };\n    };\n    Resizable.prototype.calculateNewSizeFromDirection = function (clientX, clientY) {\n        var scale = this.props.scale || 1;\n        var resizeRatio = this.props.resizeRatio || 1;\n        var _a = this.state, direction = _a.direction, original = _a.original;\n        var _b = this.props, lockAspectRatio = _b.lockAspectRatio, lockAspectRatioExtraHeight = _b.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _b.lockAspectRatioExtraWidth;\n        var newWidth = original.width;\n        var newHeight = original.height;\n        var extraHeight = lockAspectRatioExtraHeight || 0;\n        var extraWidth = lockAspectRatioExtraWidth || 0;\n        if (hasDirection('right', direction)) {\n            newWidth = original.width + ((clientX - original.x) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n            }\n        }\n        if (hasDirection('left', direction)) {\n            newWidth = original.width - ((clientX - original.x) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newHeight = (newWidth - extraWidth) / this.ratio + extraHeight;\n            }\n        }\n        if (hasDirection('bottom', direction)) {\n            newHeight = original.height + ((clientY - original.y) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n            }\n        }\n        if (hasDirection('top', direction)) {\n            newHeight = original.height - ((clientY - original.y) * resizeRatio) / scale;\n            if (lockAspectRatio) {\n                newWidth = (newHeight - extraHeight) * this.ratio + extraWidth;\n            }\n        }\n        return { newWidth: newWidth, newHeight: newHeight };\n    };\n    Resizable.prototype.calculateNewSizeFromAspectRatio = function (newWidth, newHeight, max, min) {\n        var _a = this.props, lockAspectRatio = _a.lockAspectRatio, lockAspectRatioExtraHeight = _a.lockAspectRatioExtraHeight, lockAspectRatioExtraWidth = _a.lockAspectRatioExtraWidth;\n        var computedMinWidth = typeof min.width === 'undefined' ? 10 : min.width;\n        var computedMaxWidth = typeof max.width === 'undefined' || max.width < 0 ? newWidth : max.width;\n        var computedMinHeight = typeof min.height === 'undefined' ? 10 : min.height;\n        var computedMaxHeight = typeof max.height === 'undefined' || max.height < 0 ? newHeight : max.height;\n        var extraHeight = lockAspectRatioExtraHeight || 0;\n        var extraWidth = lockAspectRatioExtraWidth || 0;\n        if (lockAspectRatio) {\n            var extraMinWidth = (computedMinHeight - extraHeight) * this.ratio + extraWidth;\n            var extraMaxWidth = (computedMaxHeight - extraHeight) * this.ratio + extraWidth;\n            var extraMinHeight = (computedMinWidth - extraWidth) / this.ratio + extraHeight;\n            var extraMaxHeight = (computedMaxWidth - extraWidth) / this.ratio + extraHeight;\n            var lockedMinWidth = Math.max(computedMinWidth, extraMinWidth);\n            var lockedMaxWidth = Math.min(computedMaxWidth, extraMaxWidth);\n            var lockedMinHeight = Math.max(computedMinHeight, extraMinHeight);\n            var lockedMaxHeight = Math.min(computedMaxHeight, extraMaxHeight);\n            newWidth = clamp(newWidth, lockedMinWidth, lockedMaxWidth);\n            newHeight = clamp(newHeight, lockedMinHeight, lockedMaxHeight);\n        }\n        else {\n            newWidth = clamp(newWidth, computedMinWidth, computedMaxWidth);\n            newHeight = clamp(newHeight, computedMinHeight, computedMaxHeight);\n        }\n        return { newWidth: newWidth, newHeight: newHeight };\n    };\n    Resizable.prototype.setBoundingClientRect = function () {\n        // For parent boundary\n        if (this.props.bounds === 'parent') {\n            var parent_2 = this.parentNode;\n            if (parent_2) {\n                var parentRect = parent_2.getBoundingClientRect();\n                this.parentLeft = parentRect.left;\n                this.parentTop = parentRect.top;\n            }\n        }\n        // For target(html element) boundary\n        if (this.props.bounds && typeof this.props.bounds !== 'string') {\n            var targetRect = this.props.bounds.getBoundingClientRect();\n            this.targetLeft = targetRect.left;\n            this.targetTop = targetRect.top;\n        }\n        // For boundary\n        if (this.resizable) {\n            var _a = this.resizable.getBoundingClientRect(), left = _a.left, top_1 = _a.top, right = _a.right, bottom = _a.bottom;\n            this.resizableLeft = left;\n            this.resizableRight = right;\n            this.resizableTop = top_1;\n            this.resizableBottom = bottom;\n        }\n    };\n    Resizable.prototype.onResizeStart = function (event, direction) {\n        if (!this.resizable || !this.window) {\n            return;\n        }\n        var clientX = 0;\n        var clientY = 0;\n        if (event.nativeEvent && isMouseEvent(event.nativeEvent)) {\n            clientX = event.nativeEvent.clientX;\n            clientY = event.nativeEvent.clientY;\n            // When user click with right button the resize is stuck in resizing mode\n            // until users clicks again, dont continue if right click is used.\n            // HACK: MouseEvent does not have `which` from flow-bin v0.68.\n            if (event.nativeEvent.which === 3) {\n                return;\n            }\n        }\n        else if (event.nativeEvent && isTouchEvent(event.nativeEvent)) {\n            clientX = event.nativeEvent.touches[0].clientX;\n            clientY = event.nativeEvent.touches[0].clientY;\n        }\n        if (this.props.onResizeStart) {\n            if (this.resizable) {\n                var startResize = this.props.onResizeStart(event, direction, this.resizable);\n                if (startResize === false) {\n                    return;\n                }\n            }\n        }\n        // Fix #168\n        if (this.props.size) {\n            if (typeof this.props.size.height !== 'undefined' && this.props.size.height !== this.state.height) {\n                this.setState({ height: this.props.size.height });\n            }\n            if (typeof this.props.size.width !== 'undefined' && this.props.size.width !== this.state.width) {\n                this.setState({ width: this.props.size.width });\n            }\n        }\n        // For lockAspectRatio case\n        this.ratio =\n            typeof this.props.lockAspectRatio === 'number' ? this.props.lockAspectRatio : this.size.width / this.size.height;\n        var flexBasis;\n        var computedStyle = this.window.getComputedStyle(this.resizable);\n        if (computedStyle.flexBasis !== 'auto') {\n            var parent_3 = this.parentNode;\n            if (parent_3) {\n                var dir = this.window.getComputedStyle(parent_3).flexDirection;\n                this.flexDir = dir.startsWith('row') ? 'row' : 'column';\n                flexBasis = computedStyle.flexBasis;\n            }\n        }\n        // For boundary\n        this.setBoundingClientRect();\n        this.bindEvents();\n        var state = {\n            original: {\n                x: clientX,\n                y: clientY,\n                width: this.size.width,\n                height: this.size.height,\n            },\n            isResizing: true,\n            backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(event.target).cursor || 'auto' }),\n            direction: direction,\n            flexBasis: flexBasis,\n        };\n        this.setState(state);\n    };\n    Resizable.prototype.onMouseMove = function (event) {\n        if (!this.state.isResizing || !this.resizable || !this.window) {\n            return;\n        }\n        if (this.window.TouchEvent && isTouchEvent(event)) {\n            try {\n                event.preventDefault();\n                event.stopPropagation();\n            }\n            catch (e) {\n                // Ignore on fail\n            }\n        }\n        var _a = this.props, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight;\n        var clientX = isTouchEvent(event) ? event.touches[0].clientX : event.clientX;\n        var clientY = isTouchEvent(event) ? event.touches[0].clientY : event.clientY;\n        var _b = this.state, direction = _b.direction, original = _b.original, width = _b.width, height = _b.height;\n        var parentSize = this.getParentSize();\n        var max = calculateNewMax(parentSize, this.window.innerWidth, this.window.innerHeight, maxWidth, maxHeight, minWidth, minHeight);\n        maxWidth = max.maxWidth;\n        maxHeight = max.maxHeight;\n        minWidth = max.minWidth;\n        minHeight = max.minHeight;\n        // Calculate new size\n        var _c = this.calculateNewSizeFromDirection(clientX, clientY), newHeight = _c.newHeight, newWidth = _c.newWidth;\n        // Calculate max size from boundary settings\n        var boundaryMax = this.calculateNewMaxFromBoundary(maxWidth, maxHeight);\n        // Calculate new size from aspect ratio\n        var newSize = this.calculateNewSizeFromAspectRatio(newWidth, newHeight, { width: boundaryMax.maxWidth, height: boundaryMax.maxHeight }, { width: minWidth, height: minHeight });\n        newWidth = newSize.newWidth;\n        newHeight = newSize.newHeight;\n        if (this.props.grid) {\n            var newGridWidth = snap(newWidth, this.props.grid[0]);\n            var newGridHeight = snap(newHeight, this.props.grid[1]);\n            var gap = this.props.snapGap || 0;\n            newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;\n            newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;\n        }\n        if (this.props.snap && this.props.snap.x) {\n            newWidth = findClosestSnap(newWidth, this.props.snap.x, this.props.snapGap);\n        }\n        if (this.props.snap && this.props.snap.y) {\n            newHeight = findClosestSnap(newHeight, this.props.snap.y, this.props.snapGap);\n        }\n        var delta = {\n            width: newWidth - original.width,\n            height: newHeight - original.height,\n        };\n        if (width && typeof width === 'string') {\n            if (endsWith(width, '%')) {\n                var percent = (newWidth / parentSize.width) * 100;\n                newWidth = percent + \"%\";\n            }\n            else if (endsWith(width, 'vw')) {\n                var vw = (newWidth / this.window.innerWidth) * 100;\n                newWidth = vw + \"vw\";\n            }\n            else if (endsWith(width, 'vh')) {\n                var vh = (newWidth / this.window.innerHeight) * 100;\n                newWidth = vh + \"vh\";\n            }\n        }\n        if (height && typeof height === 'string') {\n            if (endsWith(height, '%')) {\n                var percent = (newHeight / parentSize.height) * 100;\n                newHeight = percent + \"%\";\n            }\n            else if (endsWith(height, 'vw')) {\n                var vw = (newHeight / this.window.innerWidth) * 100;\n                newHeight = vw + \"vw\";\n            }\n            else if (endsWith(height, 'vh')) {\n                var vh = (newHeight / this.window.innerHeight) * 100;\n                newHeight = vh + \"vh\";\n            }\n        }\n        var newState = {\n            width: this.createSizeForCssProperty(newWidth, 'width'),\n            height: this.createSizeForCssProperty(newHeight, 'height'),\n        };\n        if (this.flexDir === 'row') {\n            newState.flexBasis = newState.width;\n        }\n        else if (this.flexDir === 'column') {\n            newState.flexBasis = newState.height;\n        }\n        this.setState(newState);\n        if (this.props.onResize) {\n            this.props.onResize(event, direction, this.resizable, delta);\n        }\n    };\n    Resizable.prototype.onMouseUp = function (event) {\n        var _a = this.state, isResizing = _a.isResizing, direction = _a.direction, original = _a.original;\n        if (!isResizing || !this.resizable) {\n            return;\n        }\n        var delta = {\n            width: this.size.width - original.width,\n            height: this.size.height - original.height,\n        };\n        if (this.props.onResizeStop) {\n            this.props.onResizeStop(event, direction, this.resizable, delta);\n        }\n        if (this.props.size) {\n            this.setState(this.props.size);\n        }\n        this.unbindEvents();\n        this.setState({\n            isResizing: false,\n            backgroundStyle: __assign(__assign({}, this.state.backgroundStyle), { cursor: 'auto' }),\n        });\n    };\n    Resizable.prototype.updateSize = function (size) {\n        this.setState({ width: size.width, height: size.height });\n    };\n    Resizable.prototype.renderResizer = function () {\n        var _this = this;\n        var _a = this.props, enable = _a.enable, handleStyles = _a.handleStyles, handleClasses = _a.handleClasses, handleWrapperStyle = _a.handleWrapperStyle, handleWrapperClass = _a.handleWrapperClass, handleComponent = _a.handleComponent;\n        if (!enable) {\n            return null;\n        }\n        var resizers = Object.keys(enable).map(function (dir) {\n            if (enable[dir] !== false) {\n                return (React.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null));\n            }\n            return null;\n        });\n        // #93 Wrap the resize box in span (will not break 100% width/height)\n        return (React.createElement(\"div\", { className: handleWrapperClass, style: handleWrapperStyle }, resizers));\n    };\n    Resizable.prototype.render = function () {\n        var _this = this;\n        var extendsProps = Object.keys(this.props).reduce(function (acc, key) {\n            if (definedProps.indexOf(key) !== -1) {\n                return acc;\n            }\n            acc[key] = _this.props[key];\n            return acc;\n        }, {});\n        var style = __assign(__assign(__assign({ position: 'relative', userSelect: this.state.isResizing ? 'none' : 'auto' }, this.props.style), this.sizeStyle), { maxWidth: this.props.maxWidth, maxHeight: this.props.maxHeight, minWidth: this.props.minWidth, minHeight: this.props.minHeight, boxSizing: 'border-box', flexShrink: 0 });\n        if (this.state.flexBasis) {\n            style.flexBasis = this.state.flexBasis;\n        }\n        var Wrapper = this.props.as || 'div';\n        return (React.createElement(Wrapper, __assign({ ref: this.ref, style: style, className: this.props.className }, extendsProps),\n            this.state.isResizing && React.createElement(\"div\", { style: this.state.backgroundStyle }),\n            this.props.children,\n            this.renderResizer()));\n    };\n    Resizable.defaultProps = {\n        as: 'div',\n        onResizeStart: function () { },\n        onResize: function () { },\n        onResizeStop: function () { },\n        enable: {\n            top: true,\n            right: true,\n            bottom: true,\n            left: true,\n            topRight: true,\n            bottomRight: true,\n            bottomLeft: true,\n            topLeft: true,\n        },\n        style: {},\n        grid: [1, 1],\n        lockAspectRatio: false,\n        lockAspectRatioExtraWidth: 0,\n        lockAspectRatioExtraHeight: 0,\n        scale: 1,\n        resizeRatio: 1,\n        snapGap: 0,\n    };\n    return Resizable;\n}(React.PureComponent));\nexport { Resizable };\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n\nconst noop = () => {};\n\nexport type Axis = 'x' | 'y';\n\nexport const POSITIONS = {\n\tbottom: 'bottom',\n\tcorner: 'corner',\n} as const;\n\nexport type Position = typeof POSITIONS[ keyof typeof POSITIONS ];\n\ninterface UseResizeLabelProps {\n\t/** The label value. */\n\tlabel?: string;\n\t/** Element to be rendered for resize listening events. */\n\tresizeListener: JSX.Element;\n}\n\ninterface UseResizeLabelArgs {\n\taxis?: Axis;\n\tfadeTimeout: number;\n\tonResize( data: { width: number | null; height: number | null } ): void;\n\tposition: Position;\n\tshowPx: boolean;\n}\n\n/**\n * Custom hook that manages resize listener events. It also provides a label\n * based on current resize width x height values.\n *\n * @param  props\n * @param  props.axis        Only shows the label corresponding to the axis.\n * @param  props.fadeTimeout Duration (ms) before deactivating the resize label.\n * @param  props.onResize    Callback when a resize occurs. Provides { width, height } callback.\n * @param  props.position    Adjusts label value.\n * @param  props.showPx      Whether to add `PX` to the label.\n *\n * @return Properties for hook.\n */\nexport function useResizeLabel( {\n\taxis,\n\tfadeTimeout = 180,\n\tonResize = noop,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n}: UseResizeLabelArgs ): UseResizeLabelProps {\n\t/*\n\t * The width/height values derive from this special useResizeObserver hook.\n\t * This custom hook uses the ResizeObserver API to listen for resize events.\n\t */\n\tconst [ resizeListener, sizes ] = useResizeObserver();\n\n\t/*\n\t * Indicates if the x/y axis is preferred.\n\t * If set, we will avoid resetting the moveX and moveY values.\n\t * This will allow for the preferred axis values to persist in the label.\n\t */\n\tconst isAxisControlled = !! axis;\n\n\t/*\n\t * The moveX and moveY values are used to track whether the label should\n\t * display width, height, or width x height.\n\t */\n\tconst [ moveX, setMoveX ] = useState( false );\n\tconst [ moveY, setMoveY ] = useState( false );\n\n\t/*\n\t * Cached dimension values to check for width/height updates from the\n\t * sizes property from useResizeAware()\n\t */\n\tconst { width, height } = sizes;\n\tconst heightRef = useRef( height );\n\tconst widthRef = useRef( width );\n\n\t/*\n\t * This timeout is used with setMoveX and setMoveY to determine of\n\t * both width and height values have changed at (roughly) the same time.\n\t */\n\tconst moveTimeoutRef = useRef< number >();\n\n\tconst debounceUnsetMoveXY = useCallback( () => {\n\t\tconst unsetMoveXY = () => {\n\t\t\t/*\n\t\t\t * If axis is controlled, we will avoid resetting the moveX and moveY values.\n\t\t\t * This will allow for the preferred axis values to persist in the label.\n\t\t\t */\n\t\t\tif ( isAxisControlled ) return;\n\t\t\tsetMoveX( false );\n\t\t\tsetMoveY( false );\n\t\t};\n\n\t\tif ( moveTimeoutRef.current ) {\n\t\t\twindow.clearTimeout( moveTimeoutRef.current );\n\t\t}\n\n\t\tmoveTimeoutRef.current = window.setTimeout( unsetMoveXY, fadeTimeout );\n\t}, [ fadeTimeout, isAxisControlled ] );\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * On the initial render of useResizeAware, the height and width values are\n\t\t * null. They are calculated then set using via an internal useEffect hook.\n\t\t */\n\t\tconst isRendered = width !== null || height !== null;\n\n\t\tif ( ! isRendered ) return;\n\n\t\tconst didWidthChange = width !== widthRef.current;\n\t\tconst didHeightChange = height !== heightRef.current;\n\n\t\tif ( ! didWidthChange && ! didHeightChange ) return;\n\n\t\t/*\n\t\t * After the initial render, the useResizeAware will set the first\n\t\t * width and height values. We'll sync those values with our\n\t\t * width and height refs. However, we shouldn't render our Tooltip\n\t\t * label on this first cycle.\n\t\t */\n\t\tif ( width && ! widthRef.current && height && ! heightRef.current ) {\n\t\t\twidthRef.current = width;\n\t\t\theightRef.current = height;\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * After the first cycle, we can track width and height changes.\n\t\t */\n\t\tif ( didWidthChange ) {\n\t\t\tsetMoveX( true );\n\t\t\twidthRef.current = width;\n\t\t}\n\n\t\tif ( didHeightChange ) {\n\t\t\tsetMoveY( true );\n\t\t\theightRef.current = height;\n\t\t}\n\n\t\tonResize( { width, height } );\n\t\tdebounceUnsetMoveXY();\n\t}, [ width, height, onResize, debounceUnsetMoveXY ] );\n\n\tconst label = getSizeLabel( {\n\t\taxis,\n\t\theight,\n\t\tmoveX,\n\t\tmoveY,\n\t\tposition,\n\t\tshowPx,\n\t\twidth,\n\t} );\n\n\treturn {\n\t\tlabel,\n\t\tresizeListener,\n\t};\n}\n\ninterface GetSizeLabelArgs {\n\taxis?: Axis;\n\theight: number | null;\n\tmoveX: boolean;\n\tmoveY: boolean;\n\tposition: Position;\n\tshowPx: boolean;\n\twidth: number | null;\n}\n\n/**\n * Gets the resize label based on width and height values (as well as recent changes).\n *\n * @param  props\n * @param  props.axis     Only shows the label corresponding to the axis.\n * @param  props.height   Height value.\n * @param  props.moveX    Recent width (x axis) changes.\n * @param  props.moveY    Recent width (y axis) changes.\n * @param  props.position Adjusts label value.\n * @param  props.showPx   Whether to add `PX` to the label.\n * @param  props.width    Width value.\n *\n * @return The rendered label.\n */\nfunction getSizeLabel( {\n\taxis,\n\theight,\n\tmoveX = false,\n\tmoveY = false,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n\twidth,\n}: GetSizeLabelArgs ): string | undefined {\n\tif ( ! moveX && ! moveY ) return undefined;\n\n\t/*\n\t * Corner position...\n\t * We want the label to appear like width x height.\n\t */\n\tif ( position === POSITIONS.corner ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\n\t/*\n\t * Other POSITIONS...\n\t * The label will combine both width x height values if both\n\t * values have recently been changed.\n\t *\n\t * Otherwise, only width or height will be displayed.\n\t * The `PX` unit will be added, if specified by the `showPx` prop.\n\t */\n\tconst labelUnit = showPx ? ' px' : '';\n\n\tif ( axis ) {\n\t\tif ( axis === 'x' && moveX ) {\n\t\t\treturn `${ width }${ labelUnit }`;\n\t\t}\n\t\tif ( axis === 'y' && moveY ) {\n\t\t\treturn `${ height }${ labelUnit }`;\n\t\t}\n\t}\n\n\tif ( moveX && moveY ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\tif ( moveX ) {\n\t\treturn `${ width }${ labelUnit }`;\n\t}\n\tif ( moveY ) {\n\t\treturn `${ height }${ labelUnit }`;\n\t}\n\n\treturn undefined;\n}\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Text } from '../../../text';\nimport { COLORS } from '../../../utils';\n\nexport const Root = styled.div`\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tleft: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nexport const TooltipWrapper = styled.div`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\topacity: 0;\n\tpointer-events: none;\n\ttransition: opacity 120ms linear;\n`;\n\nexport const Tooltip = styled.div`\n\tbackground: ${ COLORS.gray[ 900 ] };\n\tborder-radius: 2px;\n\tbox-sizing: border-box;\n\tfont-size: 12px;\n\tcolor: ${ COLORS.ui.textDark };\n\tpadding: 4px 8px;\n\tposition: relative;\n`;\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const LabelText = styled( Text )`\n\t&&& {\n\t\tcolor: ${ COLORS.ui.textDark };\n\t\tdisplay: block;\n\t\tfont-size: 13px;\n\t\tline-height: 1.4;\n\t\twhite-space: nowrap;\n\t}\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Position, POSITIONS } from './utils';\nimport {\n\tTooltipWrapper,\n\tTooltip,\n\tLabelText,\n} from './styles/resize-tooltip.styles';\n\nconst CORNER_OFFSET = 4;\nconst CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;\n\ntype LabelProps = React.DetailedHTMLProps<\n\tReact.HTMLAttributes< HTMLDivElement >,\n\tHTMLDivElement\n> & {\n\tlabel?: string;\n\tposition: Position;\n\tzIndex: number;\n};\n\nfunction Label(\n\t{ label, position = POSITIONS.corner, zIndex = 1000, ...props }: LabelProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst showLabel = !! label;\n\n\tconst isBottom = position === POSITIONS.bottom;\n\tconst isCorner = position === POSITIONS.corner;\n\n\tif ( ! showLabel ) return null;\n\n\tlet style: React.CSSProperties = {\n\t\topacity: showLabel ? 1 : undefined,\n\t\tzIndex,\n\t};\n\n\tlet labelStyle = {};\n\n\tif ( isBottom ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\tbottom: CURSOR_OFFSET_TOP * -1,\n\t\t\tleft: '50%',\n\t\t\ttransform: 'translate(-50%, 0)',\n\t\t};\n\n\t\tlabelStyle = {\n\t\t\ttransform: `translate(0, 100%)`,\n\t\t};\n\t}\n\n\tif ( isCorner ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\ttop: CORNER_OFFSET,\n\t\t\tright: isRTL() ? undefined : CORNER_OFFSET,\n\t\t\tleft: isRTL() ? CORNER_OFFSET : undefined,\n\t\t};\n\t}\n\n\treturn (\n\t\t<TooltipWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-resizable-tooltip__tooltip-wrapper\"\n\t\t\tref={ ref }\n\t\t\tstyle={ style }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Tooltip\n\t\t\t\tclassName=\"components-resizable-tooltip__tooltip\"\n\t\t\t\tstyle={ labelStyle }\n\t\t\t>\n\t\t\t\t<LabelText as=\"span\">{ label }</LabelText>\n\t\t\t</Tooltip>\n\t\t</TooltipWrapper>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( Label );\n\nexport default ForwardedComponent;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport { useResizeLabel, Axis, Position, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) return null;\n\n\tconst classes = classnames( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tclassName: string;\n\tchildren: ReactNode;\n\tshowHandle: boolean;\n\t__experimentalShowTooltip: boolean;\n\t__experimentalTooltipProps: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction ResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport default forwardRef( ResizableBox );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n} ) {\n\tconst [ containerResizeListener, { width: containerWidth } ] =\n\t\tuseResizeObserver();\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\tconst imageStyle = {\n\t\tpaddingBottom:\n\t\t\tnaturalWidth < containerWidth\n\t\t\t\t? naturalHeight\n\t\t\t\t: ( naturalHeight / naturalWidth ) * 100 + '%',\n\t};\n\tconst TagName = isInline ? 'span' : 'div';\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t{ containerResizeListener }\n\t\t\t<TagName style={ imageStyle } />\n\t\t\t{ cloneElement( children, {\n\t\t\t\tclassName: classnames(\n\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\tchildren.props.className\n\t\t\t\t),\n\t\t\t} ) }\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n","/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\nconst observeAndResizeJS = `\n\t( function() {\n\t\tvar observer;\n\n\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\twindow.parent.postMessage( {\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t}, '*' );\n\t\t}\n\n\t\tobserver = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\tif ( /^\\\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t} );\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n} )();`;\n\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\nexport default function Sandbox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n} ) {\n\tconst ref = useRef();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current.contentDocument.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandbox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } = ref.current;\n\t\tconst { body } = contentDocument;\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !== body.getAttribute( 'data-resizable-iframe-connected' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: observeAndResizeJS,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandbox();\n\n\t\tfunction tryNoForceSandbox() {\n\t\t\ttrySandbox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst { ownerDocument } = iframe;\n\t\tconst { defaultView } = ownerDocument;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe.addEventListener( 'load', tryNoForceSandbox, false );\n\t\tdefaultView.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandbox, false );\n\t\t\tdefaultView.addEventListener( 'message', checkMessageForResize );\n\t\t};\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandbox();\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandbox( true );\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { useEffect, forwardRef, renderToString } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../';\n\nconst noop = () => {};\nconst NOTICE_TIMEOUT = 10000;\n\n/** @typedef {import('@wordpress/element').WPElement} WPElement */\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param {string|WPElement}     [message]  Message to announce.\n * @param {'polite'|'assertive'} politeness Politeness to announce.\n */\nfunction useSpokenMessage( message, politeness ) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction Snackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove = noop,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss = noop,\n\t\tlistRef,\n\t},\n\tref\n) {\n\tonDismiss = onDismiss || noop;\n\n\tfunction dismissMe( event ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef.current.focus();\n\n\t\tonDismiss();\n\t\tonRemove();\n\t}\n\n\tfunction onActionClick( event, onClick ) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\tuseEffect( () => {\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tonDismiss();\n\t\t\t\tonRemove();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ onDismiss, onRemove ] );\n\n\tconst classes = classnames( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have 1 action, use Notice if your message require many messages'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = classnames(\n\t\t'components-snackbar__content',\n\t\t{\n\t\t\t'components-snackbar__content-with-icon': !! icon,\n\t\t}\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : noop }\n\t\t\ttabIndex=\"0\"\n\t\t\trole={ ! explicitDismiss ? 'button' : '' }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : noop }\n\t\t\taria-label={ ! explicitDismiss ? __( 'Dismiss this notice' ) : '' }\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ ( event ) =>\n\t\t\t\t\t\t\t\tonActionClick( event, onClick )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label=\"Dismiss this notice\"\n\t\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t&#x2715;\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( Snackbar );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from './';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\n\nconst noop = () => {};\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { stiffness: 1000, velocity: -100 },\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\tduration: 0.5,\n\t\t},\n\t},\n};\n\nconst SNACKBAR_REDUCE_MOTION_VARIANTS = {\n\tinit: false,\n\topen: false,\n\texit: false,\n};\n\n/**\n * Renders a list of notices.\n *\n * @param {Object}   $0           Props passed to the component.\n * @param {Array}    $0.notices   Array of notices to render.\n * @param {Function} $0.onRemove  Function called when a notice should be removed / dismissed.\n * @param {Object}   $0.className Name of the class used by the component.\n * @param {Object}   $0.children  Array of children to be rendered inside the notice list.\n *\n * @return {Object} The rendered notices list.\n */\nfunction SnackbarList( { notices, className, children, onRemove = noop } ) {\n\tconst listRef = useRef();\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = classnames( 'components-snackbar-list', className );\n\tconst removeNotice = ( notice ) => () => onRemove( notice.id );\n\treturn (\n\t\t<div className={ className } tabIndex={ -1 } ref={ listRef }>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial={ 'init' }\n\t\t\t\t\t\t\tanimate={ 'open' }\n\t\t\t\t\t\t\texit={ 'exit' }\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion\n\t\t\t\t\t\t\t\t\t? SNACKBAR_REDUCE_MOTION_VARIANTS\n\t\t\t\t\t\t\t\t\t: SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst spinAnimation = keyframes`\n\tfrom {\n\t\ttransform: rotate(0deg);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n `;\n\nexport const StyledSpinner = styled.svg`\n\twidth: ${ CONFIG.spinnerSize }px;\n\theight: ${ CONFIG.spinnerSize }px;\n\tdisplay: inline-block;\n\tmargin: 5px 11px 0;\n\tposition: relative;\n\tcolor: var( --wp-admin-theme-color );\n\toverflow: visible;\n`;\n\nconst commonPathProps = css`\n\tfill: transparent;\n\tstroke-width: 1.5px;\n`;\n\nexport const SpinnerTrack = styled.circle`\n\t${ commonPathProps };\n\tstroke: ${ COLORS.gray[ 300 ] };\n`;\n\nexport const SpinnerIndicator = styled.path`\n\t${ commonPathProps };\n\tstroke: currentColor;\n\tstroke-linecap: round;\n\ttransform-origin: 50% 50%;\n\tanimation: 1.4s linear infinite both ${ spinAnimation };\n`;\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../ui/context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ classNames( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * @example\n * ```js\n *   import { Spinner } from '@wordpress/components';\n *\n *   function Example() {\n *     return <Spinner />;\n *   }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../ui/context';\nimport { View } from '../view';\nimport { useSurface } from './hook';\nimport type { SurfaceProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nfunction UnconnectedSurface(\n\tprops: WordPressComponentProps< SurfaceProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst surfaceProps = useSurface( props );\n\n\treturn <View { ...surfaceProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Surface` is a core component that renders a primary background color.\n *\n * In the example below, notice how the `Surface` renders in white (or dark gray if in dark mode).\n *\n * ```jsx\n * import {\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<Surface>\n * \t\t\t<Text>Code is Poetry</Text>\n * \t\t</Surface>\n * \t);\n * }\n * ```\n */\nexport const Surface = contextConnect( UnconnectedSurface, 'Surface' );\n\nexport default Surface;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { find } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { NavigableMenu } from '../navigable-container';\nimport Button from '../button';\nimport type { TabButtonProps, TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nconst TabButton = ( {\n\ttabId,\n\tonClick,\n\tchildren,\n\tselected,\n\t...rest\n}: TabButtonProps ) => (\n\t<Button\n\t\trole=\"tab\"\n\t\ttabIndex={ selected ? null : -1 }\n\t\taria-selected={ selected }\n\t\tid={ tabId }\n\t\tonClick={ onClick }\n\t\t{ ...rest }\n\t>\n\t\t{ children }\n\t</Button>\n);\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n *   console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n *   <TabPanel\n *     className=\"my-tab-panel\"\n *     activeClass=\"active-tab\"\n *     onSelect={ onSelect }\n *     tabs={ [\n *       {\n *         name: 'tab1',\n *         title: 'Tab 1',\n *         className: 'tab-one',\n *       },\n *       {\n *         name: 'tab2',\n *         title: 'Tab 2',\n *         className: 'tab-two',\n *       },\n *     ] }\n *   >\n *     { ( tab ) => <p>{ tab.title }</p> }\n *   </TabPanel>\n * );\n * ```\n */\nexport function TabPanel( {\n\tclassName,\n\tchildren,\n\ttabs,\n\tinitialTabName,\n\torientation = 'horizontal',\n\tactiveClass = 'is-active',\n\tonSelect,\n}: WordPressComponentProps< TabPanelProps, 'div', false > ) {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\tconst [ selected, setSelected ] = useState< string >();\n\n\tconst handleClick = ( tabKey: string ) => {\n\t\tsetSelected( tabKey );\n\t\tonSelect?.( tabKey );\n\t};\n\n\tconst onNavigate = ( _childIndex: number, child: HTMLButtonElement ) => {\n\t\tchild.click();\n\t};\n\tconst selectedTab = find( tabs, { name: selected } );\n\tconst selectedId = `${ instanceId }-${ selectedTab?.name ?? 'none' }`;\n\n\tuseEffect( () => {\n\t\tconst newSelectedTab = find( tabs, { name: selected } );\n\t\tif ( ! newSelectedTab ) {\n\t\t\tsetSelected(\n\t\t\t\tinitialTabName ||\n\t\t\t\t\t( tabs.length > 0 ? tabs[ 0 ].name : undefined )\n\t\t\t);\n\t\t}\n\t}, [ tabs ] );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<NavigableMenu\n\t\t\t\trole=\"tablist\"\n\t\t\t\torientation={ orientation }\n\t\t\t\tonNavigate={ onNavigate }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t<TabButton\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ activeClass ]: tab.name === selected,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\ttabId={ `${ instanceId }-${ tab.name }` }\n\t\t\t\t\t\taria-controls={ `${ instanceId }-${ tab.name }-view` }\n\t\t\t\t\t\tselected={ tab.name === selected }\n\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\tonClick={ () => handleClick( tab.name ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t</TabButton>\n\t\t\t\t) ) }\n\t\t\t</NavigableMenu>\n\t\t\t{ selectedTab && (\n\t\t\t\t<div\n\t\t\t\t\tkey={ selectedId }\n\t\t\t\t\taria-labelledby={ selectedId }\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\tid={ `${ selectedId }-view` }\n\t\t\t\t\tclassName=\"components-tab-panel__tab-content\"\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default TabPanel;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { TextControlProps } from './types';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextControl );\n\tconst id = `inspector-text-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName=\"components-text-control__input\"\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n *\n * @example\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n *   const [ className, setClassName ] = useState( '' );\n *\n *   return (\n *     <TextControl\n *       label=\"Additional CSS Class\"\n *       value={ className }\n *       onChange={ ( value ) => setClassName( value ) }\n *     />\n *   );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { reduceMotion } from '../reduce-motion';\nimport { COLORS } from '../colors-values';\nimport { CONFIG } from '../';\n\nexport const inputStyleNeutral = css`\n\tbox-shadow: 0 0 0 transparent;\n\ttransition: box-shadow 0.1s linear;\n\tborder-radius: ${ CONFIG.radiusBlockUi };\n\tborder: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border } };\n\t${ reduceMotion( 'transition' ) }\n`;\n\nexport const inputStyleFocus = css`\n\tborder-color: var( --wp-admin-theme-color );\n\tbox-shadow: 0 0 0\n\t\tcalc( ${ CONFIG.borderWidthFocus } - ${ CONFIG.borderWidth } )\n\t\tvar( --wp-admin-theme-color );\n\n\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\toutline: 2px solid transparent;\n`;\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { inputStyleNeutral, inputStyleFocus } from './base';\nimport { font } from '../font';\nimport { COLORS } from '../colors-values';\nimport { breakpoint } from '../breakpoint';\n\nexport const inputControl = css`\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tpadding: 6px 8px;\n\t${ inputStyleNeutral };\n\n\t/* Fonts smaller than 16px causes mobile safari to zoom. */\n\tfont-size: ${ font( 'mobileTextMinFontSize' ) };\n\t/* Override core line-height. To be reviewed. */\n\tline-height: normal;\n\n\t${ breakpoint( 'small' ) } {\n\t\tfont-size: ${ font( 'default.fontSize' ) };\n\t\t/* Override core line-height. To be reviewed. */\n\t\tline-height: normal;\n\t}\n\n\t&:focus {\n\t\t${ inputStyleFocus }\n\t}\n\n\t// Use opacity to work in various editor styles.\n\t&::-webkit-input-placeholder {\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t&::-moz-placeholder {\n\t\topacity: 1; // Necessary because Firefox reduces this from 1.\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t&:-ms-input-placeholder {\n\t\tcolor: ${ COLORS.ui.darkGrayPlaceholder };\n\t}\n\n\t.is-dark-theme & {\n\t\t&::-webkit-input-placeholder {\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\n\t\t&::-moz-placeholder {\n\t\t\topacity: 1; // Necessary because Firefox reduces this from 1.\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\n\t\t&:-ms-input-placeholder {\n\t\t\tcolor: ${ COLORS.ui.lightGrayPlaceholder };\n\t\t}\n\t}\n`;\n","/**\n * Internal dependencies\n */\nimport breakpoints from './breakpoint-values';\n\n/**\n * @param {keyof breakpoints} point\n * @return {string} Media query declaration.\n */\nexport const breakpoint = ( point ) =>\n\t`@media (min-width: ${ breakpoints[ point ] })`;\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { inputControl } from '../../utils/input';\n\nexport const StyledTextarea = styled.textarea`\n\twidth: 100%;\n\t${ inputControl }\n`;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n *   const [ text, setText ] = useState( '' );\n *\n *   return (\n *     <TextareaControl\n *       label=\"Text\"\n *       help=\"Enter some text\"\n *       value={ text }\n *       onChange={ ( value ) => setText( value ) }\n *     />\n *   );\n * };\n * ```\n */\nexport function TextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\nexport default TextareaControl;\n","/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport type { TextHighlightProps } from './types';\n\n/**\n * Highlights occurrences of a given string within another string of text. Wraps\n * each match with a `<mark>` tag which provides browser default styling.\n *\n * ```jsx\n * import { TextHighlight } from '@wordpress/components';\n *\n * const MyTextHighlight = () => (\n *   <TextHighlight\n *     text=\"Why do we like Gutenberg? Because Gutenberg is the best!\"\n *     highlight=\"Gutenberg\"\n *   />\n * );\n * ```\n */\nexport const TextHighlight = ( props: TextHighlightProps ) => {\n\tconst { text = '', highlight = '' } = props;\n\tconst trimmedHighlightText = highlight.trim();\n\n\tif ( ! trimmedHighlightText ) {\n\t\treturn <>{ text }</>;\n\t}\n\n\tconst regex = new RegExp(\n\t\t`(${ escapeRegExp( trimmedHighlightText ) })`,\n\t\t'gi'\n\t);\n\n\treturn createInterpolateElement( text.replace( regex, '<mark>$&</mark>' ), {\n\t\tmark: <mark />,\n\t} );\n};\n\nexport default TextHighlight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst tip = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 15.8c-3.7 0-6.8-3-6.8-6.8s3-6.8 6.8-6.8c3.7 0 6.8 3 6.8 6.8s-3.1 6.8-6.8 6.8zm0-12C9.1 3.8 6.8 6.1 6.8 9s2.4 5.2 5.2 5.2c2.9 0 5.2-2.4 5.2-5.2S14.9 3.8 12 3.8zM8 17.5h8V19H8zM10 20.5h4V22h-4z\" />\n\t</SVG>\n);\n\nexport default tip;\n","/**\n * WordPress dependencies\n */\nimport { Icon, tip } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { TipProps } from './types';\n\nexport function Tip( props: TipProps ) {\n\tconst { children } = props;\n\n\treturn (\n\t\t<div className=\"components-tip\">\n\t\t\t<Icon icon={ tip } />\n\t\t\t<p>{ children }</p>\n\t\t</div>\n\t);\n}\n\nexport default Tip;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent } from 'react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../ui/utils/space';\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n *   const [ value, setValue ] = useState( false );\n *\n *   return (\n *     <ToggleControl\n *       label=\"Fixed Background\"\n *       checked={ value }\n *       onChange={ () => setValue( ( state ) => ! state ) }\n *     />\n *   );\n * };\n * ```\n */\nexport function ToggleControl( {\n\t__nextHasNoMarginBottom,\n\tlabel,\n\tchecked,\n\thelp,\n\tclassName,\n\tonChange,\n\tdisabled,\n}: WordPressComponentProps< ToggleControlProps, 'input', false > ) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tdescribedBy = id + '__help';\n\t\thelpLabel = typeof help === 'function' ? help( checked ) : help;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={ helpLabel }\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 3 }>\n\t\t\t\t<FormToggle\n\t\t\t\t\tid={ id }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChangeToggle }\n\t\t\t\t\taria-describedby={ describedBy }\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t/>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tclassName=\"components-toggle-control__label\"\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</label>\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default ToggleControl;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport type { ToggleGroupControlOptionIconProps } from '../types';\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\n\nfunction UnforwardedToggleGroupControlOptionIcon(\n\tprops: WordPressComponentProps<\n\t\tToggleGroupControlOptionIconProps,\n\t\t'button',\n\t\tfalse\n\t>,\n\tref: ForwardedRef< any >\n) {\n\tconst { icon, label, ...restProps } = props;\n\treturn (\n\t\t<ToggleGroupControlOptionBase\n\t\t\t{ ...restProps }\n\t\t\tisIcon\n\t\t\taria-label={ label }\n\t\t\tshowTooltip\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Icon icon={ icon } />\n\t\t</ToggleGroupControlOptionBase>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n *\treturn (\n *\t\t<ToggleGroupControl>\n *\t\t\t<ToggleGroupControlOptionIcon\n *\t\t\t\tvalue=\"uppercase\"\n *\t\t\t\tlabel=\"Uppercase\"\n *\t\t\t\ticon={ formatUppercase }\n *\t\t\t/>\n *\t\t\t<ToggleGroupControlOptionIcon\n *\t\t\t\tvalue=\"lowercase\"\n *\t\t\t\tlabel=\"Lowercase\"\n *\t\t\t\ticon={ formatLowercase }\n *\t\t\t/>\n *\t\t</ToggleGroupControl>\n *\t);\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(\n\tUnforwardedToggleGroupControlOptionIcon\n);\n\nexport default ToggleGroupControlOptionIcon;\n","// Automatically generated\nvar TOOLBAR_STATE_KEYS = [\"baseId\", \"unstable_idCountRef\", \"unstable_virtual\", \"rtl\", \"orientation\", \"items\", \"groups\", \"currentId\", \"loop\", \"wrap\", \"shift\", \"unstable_moves\", \"unstable_hasActiveWidget\", \"unstable_includesBaseElement\", \"setBaseId\", \"registerItem\", \"unregisterItem\", \"registerGroup\", \"unregisterGroup\", \"move\", \"next\", \"previous\", \"up\", \"down\", \"first\", \"last\", \"sort\", \"unstable_setVirtual\", \"setRTL\", \"setOrientation\", \"setCurrentId\", \"setLoop\", \"setWrap\", \"setShift\", \"reset\", \"unstable_setIncludesBaseElement\", \"unstable_setHasActiveWidget\"];\nvar TOOLBAR_KEYS = TOOLBAR_STATE_KEYS;\nvar TOOLBAR_ITEM_KEYS = TOOLBAR_KEYS;\nvar TOOLBAR_SEPARATOR_KEYS = TOOLBAR_ITEM_KEYS;\n\nexport { TOOLBAR_KEYS as T, TOOLBAR_ITEM_KEYS as a, TOOLBAR_SEPARATOR_KEYS as b };\n","import '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport 'react';\nimport 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport 'reakit-warning';\nimport 'reakit-utils/useLiveRef';\nimport 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport '../Tabbable/Tabbable.js';\nimport '../Clickable/Clickable.js';\nimport 'reakit-utils/getDocument';\nimport '../getCurrentId-5aa9849e.js';\nimport '../__keys-6742f591.js';\nimport '../userFocus-e16425e3.js';\nimport 'reakit-utils/isTextField';\nimport 'reakit-utils/ensureFocus';\nimport '../Id/IdProvider.js';\nimport '../Id/Id.js';\nimport 'reakit-utils/fireEvent';\nimport '../setTextFieldValue-0a221f4e.js';\nimport { useCompositeItem } from '../Composite/CompositeItem.js';\nimport { a as TOOLBAR_ITEM_KEYS } from '../__keys-ae468c11.js';\n\nvar useToolbarItem = createHook({\n  name: \"ToolbarItem\",\n  compose: useCompositeItem,\n  keys: TOOLBAR_ITEM_KEYS\n});\nvar ToolbarItem = createComponent({\n  as: \"button\",\n  memo: true,\n  useHook: useToolbarItem\n});\n\nexport { ToolbarItem, useToolbarItem };\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst ToolbarContext = createContext();\n\nexport default ToolbarContext;\n","/**\n * External dependencies\n */\nimport { ToolbarItem as BaseToolbarItem } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarItem( { children, as: Component, ...props }, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( typeof children !== 'function' && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarState ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\treturn (\n\t\t<BaseToolbarItem\n\t\t\t{ ...accessibleToolbarState }\n\t\t\t{ ...allProps }\n\t\t\tas={ Component }\n\t\t>\n\t\t\t{ children }\n\t\t</BaseToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarItem );\n","const ToolbarButtonContainer = ( props ) => (\n\t<div className={ props.className }>{ props.children }</div>\n);\nexport default ToolbarButtonContainer;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\n\nfunction ToolbarButton(\n\t{\n\t\tcontainerClassName,\n\t\tclassName,\n\t\textraProps,\n\t\tchildren,\n\t\ttitle,\n\t\tisActive,\n\t\tisDisabled,\n\t\t...props\n\t},\n\tref\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ props.icon }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ props.shortcut }\n\t\t\t\t\tdata-subscript={ props.subscript }\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tif ( props.onClick ) {\n\t\t\t\t\t\t\tprops.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ classnames( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarButton );\n","const ToolbarGroupContainer = ( { className, children, ...props } ) => (\n\t<div className={ className } { ...props }>\n\t\t{ children }\n\t</div>\n);\nexport default ToolbarGroupContainer;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../dropdown-menu';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarItem from '../toolbar-item';\n\nfunction ToolbarGroupCollapsed( { controls = [], toggleProps, ...props } ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tconst renderDropdownMenu = ( internalToggleProps ) => (\n\t\t<DropdownMenu\n\t\t\tcontrols={ controls }\n\t\t\ttoggleProps={ {\n\t\t\t\t...internalToggleProps,\n\t\t\t\t'data-toolbar-item': true,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n\n\tif ( accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarItem { ...toggleProps }>{ renderDropdownMenu }</ToolbarItem>\n\t\t);\n\t}\n\n\treturn renderDropdownMenu( toggleProps );\n}\n\nexport default ToolbarGroupCollapsed;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarButton from '../toolbar-button';\nimport ToolbarGroupContainer from './toolbar-group-container';\nimport ToolbarGroupCollapsed from './toolbar-group-collapsed';\nimport ToolbarContext from '../toolbar-context';\n\n/**\n * Renders a collapsible group of controls\n *\n * The `controls` prop accepts an array of sets. A set is an array of controls.\n * Controls have the following shape:\n *\n * ```\n * {\n *   icon: string,\n *   title: string,\n *   subscript: string,\n *   onClick: Function,\n *   isActive: boolean,\n *   isDisabled: boolean\n * }\n * ```\n *\n * For convenience it is also possible to pass only an array of controls. It is\n * then assumed this is the only set.\n *\n * Either `controls` or `children` is required, otherwise this components\n * renders nothing.\n *\n * @param {Object}    props               Component props.\n * @param {Array}     [props.controls]    The controls to render in this toolbar.\n * @param {WPElement} [props.children]    Any other things to render inside the toolbar besides the controls.\n * @param {string}    [props.className]   Class to set on the container div.\n * @param {boolean}   [props.isCollapsed] Turns ToolbarGroup into a dropdown menu.\n * @param {string}    [props.title]       ARIA label for dropdown menu if is collapsed.\n */\nfunction ToolbarGroup( {\n\tcontrols = [],\n\tchildren,\n\tclassName,\n\tisCollapsed,\n\ttitle,\n\t...props\n} ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ( ! controls || ! controls.length ) && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst finalClassName = classnames(\n\t\t// Unfortunately, there's legacy code referencing to `.components-toolbar`\n\t\t// So we can't get rid of it\n\t\taccessibleToolbarState\n\t\t\t? 'components-toolbar-group'\n\t\t\t: 'components-toolbar',\n\t\tclassName\n\t);\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets = controls;\n\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\tcontrolSets = [ controlSets ];\n\t}\n\n\tif ( isCollapsed ) {\n\t\treturn (\n\t\t\t<ToolbarGroupCollapsed\n\t\t\t\tlabel={ title }\n\t\t\t\tcontrols={ controlSets }\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tchildren={ children }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroupContainer className={ finalClassName } { ...props }>\n\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tkey={ [ indexOfSet, indexOfControl ].join() }\n\t\t\t\t\t\tcontainerClassName={\n\t\t\t\t\t\t\tindexOfSet > 0 && indexOfControl === 0\n\t\t\t\t\t\t\t\t? 'has-left-divider'\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...control }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ToolbarGroupContainer>\n\t);\n}\n\nexport default ToolbarGroup;\n","import { a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport { createComponent } from 'reakit-system/createComponent';\nimport { createHook } from 'reakit-system/createHook';\nimport 'reakit-utils/shallowEqual';\nimport 'react';\nimport 'reakit-utils/useForkRef';\nimport 'reakit-utils/isButton';\nimport { useWarning } from 'reakit-warning';\nimport 'reakit-utils/useLiveRef';\nimport 'reakit-utils/isSelfTarget';\nimport 'reakit-utils/useIsomorphicEffect';\nimport 'reakit-utils/hasFocusWithin';\nimport 'reakit-utils/isPortalEvent';\nimport 'reakit-utils/dom';\nimport 'reakit-utils/tabbable';\nimport '../Role/Role.js';\nimport '../Tabbable/Tabbable.js';\nimport { useCreateElement } from 'reakit-system/useCreateElement';\nimport 'reakit-utils/getDocument';\nimport 'reakit-utils/fireBlurEvent';\nimport 'reakit-utils/fireKeyboardEvent';\nimport 'reakit-utils/canUseDOM';\nimport 'reakit-utils/getNextActiveElementOnBlur';\nimport '../reverse-30eaa122.js';\nimport '../getCurrentId-5aa9849e.js';\nimport '../findEnabledItemById-8ddca752.js';\nimport '../__keys-6742f591.js';\nimport '../userFocus-e16425e3.js';\nimport { useComposite } from '../Composite/Composite.js';\nimport { T as TOOLBAR_KEYS } from '../__keys-ae468c11.js';\n\nvar useToolbar = createHook({\n  name: \"Toolbar\",\n  compose: useComposite,\n  keys: TOOLBAR_KEYS,\n  useProps: function useProps(options, htmlProps) {\n    return _objectSpread2({\n      role: \"toolbar\",\n      \"aria-orientation\": options.orientation\n    }, htmlProps);\n  }\n});\nvar Toolbar = createComponent({\n  as: \"div\",\n  useHook: useToolbar,\n  useCreateElement: function useCreateElement$1(type, props, children) {\n    process.env.NODE_ENV !== \"production\" ? useWarning(!props[\"aria-label\"] && !props[\"aria-labelledby\"], \"You should provide either `aria-label` or `aria-labelledby` props.\", \"See https://reakit.io/docs/toolbar\") : void 0;\n    return useCreateElement(type, props, children);\n  }\n});\n\nexport { Toolbar, useToolbar };\n","/**\n * External dependencies\n */\nimport { useToolbarState, Toolbar } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarContainer( { label, ...props }, ref ) {\n\t// https://reakit.io/docs/basic-concepts/#state-hooks\n\t// Passing baseId for server side rendering (which includes snapshots)\n\t// If an id prop is passed to Toolbar, toolbar items will use it as a base for their ids\n\tconst toolbarState = useToolbarState( {\n\t\tloop: true,\n\t\tbaseId: props.id,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarState }>\n\t\t\t<Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...toolbarState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport default forwardRef( ToolbarContainer );\n","import { _ as _objectWithoutPropertiesLoose, a as _objectSpread2 } from '../_rollupPluginBabelHelpers-1f0bf8c2.js';\nimport 'react';\nimport 'reakit-utils/useIsomorphicEffect';\nimport { useSealedState } from 'reakit-utils/useSealedState';\nimport 'reakit-utils/getDocument';\nimport '../reverse-30eaa122.js';\nimport '../getCurrentId-5aa9849e.js';\nimport '../findEnabledItemById-8ddca752.js';\nimport '../Id/IdProvider.js';\nimport 'reakit-utils/applyState';\nimport '../Id/IdState.js';\nimport { useCompositeState } from '../Composite/CompositeState.js';\n\nfunction useToolbarState(initialState) {\n  if (initialState === void 0) {\n    initialState = {};\n  }\n\n  var _useSealedState = useSealedState(initialState),\n      _useSealedState$orien = _useSealedState.orientation,\n      orientation = _useSealedState$orien === void 0 ? \"horizontal\" : _useSealedState$orien,\n      sealed = _objectWithoutPropertiesLoose(_useSealedState, [\"orientation\"]);\n\n  return useCompositeState(_objectSpread2({\n    orientation: orientation\n  }, sealed));\n}\n\nexport { useToolbarState };\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport ToolbarGroup from '../toolbar-group';\nimport ToolbarContainer from './toolbar-container';\n\n/**\n * Renders a toolbar.\n *\n * To add controls, simply pass `ToolbarButton` components as children.\n *\n * @param {Object} props             Component props.\n * @param {string} [props.className] Class to set on the container div.\n * @param {string} [props.label]     ARIA label for toolbar container.\n * @param {Object} ref               React Element ref.\n */\nfunction Toolbar( { className, label, ...props }, ref ) {\n\tif ( ! label ) {\n\t\tdeprecated( 'Using Toolbar without label prop', {\n\t\t\tsince: '5.6',\n\t\t\talternative: 'ToolbarGroup component',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/components/toolbar/',\n\t\t} );\n\t\treturn <ToolbarGroup { ...props } className={ className } />;\n\t}\n\t// `ToolbarGroup` already uses components-toolbar for compatibility reasons.\n\tconst finalClassName = classnames(\n\t\t'components-accessible-toolbar',\n\t\tclassName\n\t);\n\treturn (\n\t\t<ToolbarContainer\n\t\t\tclassName={ finalClassName }\n\t\t\tlabel={ label }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( Toolbar );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../dropdown-menu';\n\nfunction ToolbarDropdownMenu( props, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\tisAlternate: true,\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarDropdownMenu );\n","/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport {\n\tStyledField as BaseControlField,\n\tStyledHelp as BaseControlHelp,\n\tWrapper as BaseControlWrapper,\n} from '../base-control/styles/base-control-styles';\nimport { LabelWrapper } from '../input-control/styles/input-control-styles';\nimport { COLORS, CONFIG, rtl } from '../utils';\nimport { space } from '../ui/utils/space';\n\nconst toolsPanelGrid = {\n\tcolumns: ( columns: number ) => css`\n\t\tgrid-template-columns: ${ `repeat( ${ columns }, minmax(0, 1fr) )` };\n\t`,\n\tspacing: css`\n\t\tcolumn-gap: ${ space( 2 ) };\n\t\trow-gap: ${ space( 4 ) };\n\t`,\n\titem: {\n\t\tfullWidth: css`\n\t\t\tgrid-column: 1 / -1;\n\t\t`,\n\t},\n};\n\nexport const ToolsPanel = ( columns: number ) => css`\n\t${ toolsPanelGrid.columns( columns ) }\n\t${ toolsPanelGrid.spacing }\n\n\tborder-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 300 ] };\n\tmargin-top: -1px;\n\tpadding: ${ space( 4 ) };\n`;\n\n/**\n * Items injected into a ToolsPanel via a virtual bubbling slot will require\n * an inner dom element to be injected. The following rule allows for the\n * CSS grid display to be re-established.\n */\n\nexport const ToolsPanelWithInnerWrapper = ( columns: number ) => {\n\treturn css`\n\t\t> div:not( :first-of-type ) {\n\t\t\tdisplay: grid;\n\t\t\t${ toolsPanelGrid.columns( columns ) }\n\t\t\t${ toolsPanelGrid.spacing }\n\t\t\t${ toolsPanelGrid.item.fullWidth }\n\t\t}\n\t`;\n};\n\nexport const ToolsPanelHiddenInnerWrapper = css`\n\t> div:not( :first-of-type ) {\n\t\tdisplay: none;\n\t}\n`;\n\nexport const ToolsPanelHeader = css`\n\t${ toolsPanelGrid.item.fullWidth }\n\tgap: ${ space( 2 ) };\n\n\t/**\n\t * The targeting of dropdown menu component classes here is a temporary\n\t * measure only.\n\t *\n\t * The following styles should be replaced once the DropdownMenu has been\n\t * refactored and can be targeted via component interpolation.\n\t */\n\t.components-dropdown-menu {\n\t\tmargin: ${ space( -1 ) } 0;\n\t\tline-height: 0;\n\t}\n\t&&&& .components-dropdown-menu__toggle {\n\t\tpadding: 0;\n\t\tmin-width: ${ space( 6 ) };\n\t}\n`;\n\nexport const ToolsPanelHeading = css`\n\tfont-size: inherit;\n\tfont-weight: 500;\n\tline-height: normal;\n\n\t/* Required to meet specificity requirements to ensure zero margin */\n\t&& {\n\t\tmargin: 0;\n\t}\n`;\n\nexport const ToolsPanelItem = css`\n\t${ toolsPanelGrid.item.fullWidth }\n\n\t/* Clear spacing in and around controls added as panel items. */\n\t/* Remove when they can be addressed via context system. */\n\t& > div,\n\t& > fieldset {\n\t\tpadding-bottom: 0;\n\t\tmargin-bottom: 0;\n\t\tmax-width: 100%;\n\t}\n\n\t/* Remove BaseControl components margins and leave spacing to grid layout */\n\t&& ${ BaseControlWrapper } {\n\t\tmargin-bottom: 0;\n\n\t\t/**\n\t\t * To maintain proper spacing within a base control, the field's bottom\n\t\t * margin should only be removed when there is no help text included and\n\t\t * it is therefore the last-child.\n\t\t */\n\t\t${ BaseControlField }:last-child {\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t}\n\n\t${ BaseControlHelp } {\n\t\tmargin-bottom: 0;\n\t}\n\n\t/**\n\t * Standardize InputControl and BaseControl labels with other labels when\n\t * inside ToolsPanel.\n\t *\n\t * This is a temporary fix until the different control components have their\n\t * labels normalized.\n\t */\n\t&& ${ LabelWrapper } {\n\t\tlabel {\n\t\t\tline-height: 1.4em;\n\t\t}\n\t}\n`;\n\nexport const ToolsPanelItemPlaceholder = css`\n\tdisplay: none;\n`;\n\nexport const DropdownMenu = css`\n\tmin-width: 200px;\n`;\n\nexport const ResetLabel = styled.span`\n\tcolor: var( --wp-admin-theme-color-darker-10 );\n\tfont-size: 11px;\n\tfont-weight: 500;\n\tline-height: 1.4;\n\t${ rtl( { marginLeft: space( 3 ) } ) }\n\ttext-transform: uppercase;\n`;\n\nexport const DefaultControlsItem = css`\n\tcolor: ${ COLORS.gray[ 900 ] };\n\n\t&&[aria-disabled='true'] {\n\t\tcolor: ${ COLORS.gray[ 700 ] };\n\t\topacity: 1;\n\n\t\t&:hover {\n\t\t\tcolor: ${ COLORS.gray[ 700 ] };\n\t\t}\n\n\t\t${ ResetLabel } {\n\t\t\topacity: 0.3;\n\t\t}\n\t}\n`;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ToolsPanelContext as ToolsPanelContextType } from './types';\n\nconst noop = () => undefined;\n\nexport const ToolsPanelContext = createContext< ToolsPanelContextType >( {\n\tmenuItems: { default: {}, optional: {} },\n\thasMenuItems: false,\n\tisResetting: false,\n\tshouldRenderPlaceholderItems: false,\n\tregisterPanelItem: noop,\n\tderegisterPanelItem: noop,\n\tflagItemCustomization: noop,\n\tareAllOptionalControlsHidden: true,\n} );\n\nexport const useToolsPanelContext = () =>\n\tuseContext< ToolsPanelContextType >( ToolsPanelContext );\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { check, moreVertical, plus } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport MenuGroup from '../../menu-group';\nimport MenuItem from '../../menu-item';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { useToolsPanelHeader } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { ResetLabel } from '../styles';\nimport type {\n\tToolsPanelControlsGroupProps,\n\tToolsPanelHeaderProps,\n} from '../types';\n\nconst DefaultControlsGroup = ( {\n\titemClassName,\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\tconst resetSuffix = <ResetLabel aria-hidden>{ __( 'Reset' ) }</ResetLabel>;\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Defaults' ) }>\n\t\t\t{ items.map( ( [ label, hasValue ] ) => {\n\t\t\t\tif ( hasValue ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t__( 'Reset %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsuffix={ resetSuffix }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\taria-disabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst OptionalControlsGroup = ( {\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t{ items.map( ( [ label, isSelected ] ) => {\n\t\t\t\tconst itemLabel = isSelected\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control being hidden and reset e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Hide and reset %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t  )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control to display e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Show %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t  );\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\ticon={ isSelected && check }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tlabel={ itemLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s hidden and reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s is now visible' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst ToolsPanelHeader = (\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\tlabel: labelText,\n\t\tmenuItems,\n\t\tresetAll,\n\t\ttoggleItem,\n\t\t...headerProps\n\t} = useToolsPanelHeader( props );\n\n\tif ( ! labelText ) {\n\t\treturn null;\n\t}\n\n\tconst defaultItems = Object.entries( menuItems?.default || {} );\n\tconst optionalItems = Object.entries( menuItems?.optional || {} );\n\tconst dropDownMenuIcon = areAllOptionalControlsHidden ? plus : moreVertical;\n\tconst dropDownMenuLabelText = sprintf(\n\t\t// translators: %s: The name of the tool e.g. \"Color\" or \"Typography\".\n\t\t_x( '%s options', 'Button label to reveal tool panel options' ),\n\t\tlabelText\n\t);\n\tconst dropdownMenuDescriptionText = areAllOptionalControlsHidden\n\t\t? __( 'All options are currently hidden' )\n\t\t: undefined;\n\n\tconst canResetAll = [ ...defaultItems, ...optionalItems ].some(\n\t\t( [ , isSelected ] ) => isSelected\n\t);\n\n\treturn (\n\t\t<HStack { ...headerProps } ref={ forwardedRef }>\n\t\t\t<Heading level={ 2 } className={ headingClassName }>\n\t\t\t\t{ labelText }\n\t\t\t</Heading>\n\t\t\t{ hasMenuItems && (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ticon={ dropDownMenuIcon }\n\t\t\t\t\tlabel={ dropDownMenuLabelText }\n\t\t\t\t\tmenuProps={ { className: dropdownMenuClassName } }\n\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\tisSmall: true,\n\t\t\t\t\t\tdescribedBy: dropdownMenuDescriptionText,\n\t\t\t\t\t} }\n\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<DefaultControlsGroup\n\t\t\t\t\t\t\t\titems={ defaultItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t\titemClassName={ defaultControlsItemClassName }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<OptionalControlsGroup\n\t\t\t\t\t\t\t\titems={ optionalItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t/>\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\taria-disabled={ ! canResetAll }\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\tif ( canResetAll ) {\n\t\t\t\t\t\t\t\t\t\t\tresetAll();\n\t\t\t\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'All options reset' ),\n\t\t\t\t\t\t\t\t\t\t\t\t'assertive'\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{ __( 'Reset all' ) }\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) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) }\n\t\t</HStack>\n\t);\n};\n\nconst ConnectedToolsPanelHeader = contextConnect(\n\tToolsPanelHeader,\n\t'ToolsPanelHeader'\n);\n\nexport default ConnectedToolsPanelHeader;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useToolsPanelContext } from '../context';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ToolsPanelHeaderProps } from '../types';\n\nexport function useToolsPanelHeader(\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >\n) {\n\tconst { className, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'ToolsPanelHeader'\n\t);\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\treturn cx( styles.ToolsPanelHeader, className );\n\t}, [ className, cx ] );\n\n\tconst dropdownMenuClassName = useMemo( () => {\n\t\treturn cx( styles.DropdownMenu );\n\t}, [ cx ] );\n\n\tconst headingClassName = useMemo( () => {\n\t\treturn cx( styles.ToolsPanelHeading );\n\t}, [ cx ] );\n\n\tconst defaultControlsItemClassName = useMemo( () => {\n\t\treturn cx( styles.DefaultControlsItem );\n\t}, [ cx ] );\n\n\tconst { menuItems, hasMenuItems, areAllOptionalControlsHidden } =\n\t\tuseToolsPanelContext();\n\n\treturn {\n\t\t...otherProps,\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\tmenuItems,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type {\n\tToolsPanelItem,\n\tToolsPanelMenuItemKey,\n\tToolsPanelMenuItems,\n\tToolsPanelMenuItemsConfig,\n\tToolsPanelProps,\n} from '../types';\n\nconst DEFAULT_COLUMNS = 2;\n\nconst generateMenuItems = ( {\n\tpanelItems,\n\tshouldReset,\n\tcurrentMenuItems,\n}: ToolsPanelMenuItemsConfig ) => {\n\tconst menuItems: ToolsPanelMenuItems = { default: {}, optional: {} };\n\n\tpanelItems.forEach( ( { hasValue, isShownByDefault, label } ) => {\n\t\tconst group = isShownByDefault ? 'default' : 'optional';\n\n\t\t// If a menu item for this label already exists, do not overwrite its value.\n\t\t// This can cause default controls that have been flagged as customized to\n\t\t// lose their value.\n\t\tconst existingItemValue = currentMenuItems?.[ group ]?.[ label ];\n\t\tconst value =\n\t\t\texistingItemValue !== undefined ? existingItemValue : hasValue();\n\n\t\tmenuItems[ group ][ label ] = shouldReset ? false : value;\n\t} );\n\n\treturn menuItems;\n};\n\nconst isMenuItemTypeEmpty = (\n\tobj?: ToolsPanelMenuItems[ ToolsPanelMenuItemKey ]\n) => obj && Object.keys( obj ).length === 0;\n\nexport function useToolsPanel(\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tresetAll,\n\t\tpanelId,\n\t\thasInnerWrapper,\n\t\tshouldRenderPlaceholderItems,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToolsPanel' );\n\n\tconst isResetting = useRef( false );\n\tconst wasResetting = isResetting.current;\n\n\t// `isResetting` is cleared via this hook to effectively batch together\n\t// the resetAll task. Without this, the flag is cleared after the first\n\t// control updates and forces a rerender with subsequent controls then\n\t// believing they need to reset, unfortunately using stale data.\n\tuseEffect( () => {\n\t\tif ( wasResetting ) {\n\t\t\tisResetting.current = false;\n\t\t}\n\t}, [ wasResetting ] );\n\n\t// Allow panel items to register themselves.\n\tconst [ panelItems, setPanelItems ] = useState< ToolsPanelItem[] >( [] );\n\n\tconst registerPanelItem = useCallback(\n\t\t( item: ToolsPanelItem ) => {\n\t\t\tsetPanelItems( ( items ) => {\n\t\t\t\tconst newItems = [ ...items ];\n\t\t\t\t// If an item with this label has already been registered, remove it\n\t\t\t\t// first. This can happen when an item is moved between the default\n\t\t\t\t// and optional groups.\n\t\t\t\tconst existingIndex = newItems.findIndex(\n\t\t\t\t\t( oldItem ) => oldItem.label === item.label\n\t\t\t\t);\n\t\t\t\tif ( existingIndex !== -1 ) {\n\t\t\t\t\tnewItems.splice( existingIndex, 1 );\n\t\t\t\t}\n\t\t\t\treturn [ ...newItems, item ];\n\t\t\t} );\n\t\t},\n\t\t[ setPanelItems ]\n\t);\n\n\t// Panels need to deregister on unmount to avoid orphans in menu state.\n\t// This is an issue when panel items are being injected via SlotFills.\n\tconst deregisterPanelItem = useCallback(\n\t\t( label: string ) => {\n\t\t\t// When switching selections between components injecting matching\n\t\t\t// controls, e.g. both panels have a \"padding\" control, the\n\t\t\t// deregistration of the first panel doesn't occur until after the\n\t\t\t// registration of the next.\n\t\t\tsetPanelItems( ( items ) => {\n\t\t\t\tconst newItems = [ ...items ];\n\t\t\t\tconst index = newItems.findIndex(\n\t\t\t\t\t( item ) => item.label === label\n\t\t\t\t);\n\t\t\t\tif ( index !== -1 ) {\n\t\t\t\t\tnewItems.splice( index, 1 );\n\t\t\t\t}\n\t\t\t\treturn newItems;\n\t\t\t} );\n\t\t},\n\t\t[ setPanelItems ]\n\t);\n\n\t// Manage and share display state of menu items representing child controls.\n\tconst [ menuItems, setMenuItems ] = useState< ToolsPanelMenuItems >( {\n\t\tdefault: {},\n\t\toptional: {},\n\t} );\n\n\t// Setup menuItems state as panel items register themselves.\n\tuseEffect( () => {\n\t\tsetMenuItems( ( prevState ) => {\n\t\t\tconst items = generateMenuItems( {\n\t\t\t\tpanelItems,\n\t\t\t\tshouldReset: false,\n\t\t\t\tcurrentMenuItems: prevState,\n\t\t\t} );\n\t\t\treturn items;\n\t\t} );\n\t}, [ generateMenuItems, panelItems, setMenuItems ] );\n\n\t// Force a menu item to be checked.\n\t// This is intended for use with default panel items. They are displayed\n\t// separately to optional items and have different display states,\n\t// we need to update that when their value is customized.\n\tconst flagItemCustomization = useCallback(\n\t\t( label: string, group: ToolsPanelMenuItemKey = 'default' ) => {\n\t\t\tsetMenuItems( ( items ) => {\n\t\t\t\tconst newState = {\n\t\t\t\t\t...items,\n\t\t\t\t\t[ group ]: {\n\t\t\t\t\t\t...items[ group ],\n\t\t\t\t\t\t[ label ]: true,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn newState;\n\t\t\t} );\n\t\t},\n\t\t[ setMenuItems ]\n\t);\n\n\t// Whether all optional menu items are hidden or not must be tracked\n\t// in order to later determine if the panel display is empty and handle\n\t// conditional display of a plus icon to indicate the presence of further\n\t// menu items.\n\tconst [ areAllOptionalControlsHidden, setAreAllOptionalControlsHidden ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\tisMenuItemTypeEmpty( menuItems?.default ) &&\n\t\t\t! isMenuItemTypeEmpty( menuItems?.optional )\n\t\t) {\n\t\t\tconst allControlsHidden = ! Object.entries(\n\t\t\t\tmenuItems.optional\n\t\t\t).some( ( [ , isSelected ] ) => isSelected );\n\t\t\tsetAreAllOptionalControlsHidden( allControlsHidden );\n\t\t}\n\t}, [ menuItems, setAreAllOptionalControlsHidden ] );\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\tconst wrapperStyle =\n\t\t\thasInnerWrapper &&\n\t\t\tstyles.ToolsPanelWithInnerWrapper( DEFAULT_COLUMNS );\n\t\tconst emptyStyle =\n\t\t\tisMenuItemTypeEmpty( menuItems?.default ) &&\n\t\t\tareAllOptionalControlsHidden &&\n\t\t\tstyles.ToolsPanelHiddenInnerWrapper;\n\n\t\treturn cx(\n\t\t\tstyles.ToolsPanel( DEFAULT_COLUMNS ),\n\t\t\twrapperStyle,\n\t\t\temptyStyle,\n\t\t\tclassName\n\t\t);\n\t}, [\n\t\tareAllOptionalControlsHidden,\n\t\tclassName,\n\t\tcx,\n\t\thasInnerWrapper,\n\t\tmenuItems,\n\t] );\n\n\t// Toggle the checked state of a menu item which is then used to determine\n\t// display of the item within the panel.\n\tconst toggleItem = useCallback(\n\t\t( label: string ) => {\n\t\t\tconst currentItem = panelItems.find(\n\t\t\t\t( item ) => item.label === label\n\t\t\t);\n\n\t\t\tif ( ! currentItem ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst menuGroup = currentItem.isShownByDefault\n\t\t\t\t? 'default'\n\t\t\t\t: 'optional';\n\n\t\t\tconst newMenuItems = {\n\t\t\t\t...menuItems,\n\t\t\t\t[ menuGroup ]: {\n\t\t\t\t\t...menuItems[ menuGroup ],\n\t\t\t\t\t[ label ]: ! menuItems[ menuGroup ][ label ],\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tsetMenuItems( newMenuItems );\n\t\t},\n\t\t[ menuItems, panelItems, setMenuItems ]\n\t);\n\n\t// Resets display of children and executes resetAll callback if available.\n\tconst resetAllItems = useCallback( () => {\n\t\tif ( typeof resetAll === 'function' ) {\n\t\t\tisResetting.current = true;\n\n\t\t\t// Collect available reset filters from panel items.\n\t\t\tconst filters: Array< () => void > = [];\n\t\t\tpanelItems.forEach( ( item ) => {\n\t\t\t\tif ( item.resetAllFilter ) {\n\t\t\t\t\tfilters.push( item.resetAllFilter );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tresetAll( filters );\n\t\t}\n\n\t\t// Turn off display of all non-default items.\n\t\tconst resetMenuItems = generateMenuItems( {\n\t\t\tpanelItems,\n\t\t\tshouldReset: true,\n\t\t} );\n\t\tsetMenuItems( resetMenuItems );\n\t}, [\n\t\tgenerateMenuItems,\n\t\tisResetting.current,\n\t\tpanelItems,\n\t\tresetAll,\n\t\tsetMenuItems,\n\t] );\n\n\t// Assist ItemGroup styling when there are potentially hidden placeholder\n\t// items by identifying first & last items that are toggled on for display.\n\tconst getFirstVisibleItemLabel = ( items: ToolsPanelItem[] ) => {\n\t\tconst optionalItems = menuItems.optional || {};\n\t\tconst firstItem = items.find(\n\t\t\t( item ) => item.isShownByDefault || !! optionalItems[ item.label ]\n\t\t);\n\n\t\treturn firstItem?.label;\n\t};\n\n\tconst firstDisplayedItem = getFirstVisibleItemLabel( panelItems );\n\tconst lastDisplayedItem = getFirstVisibleItemLabel(\n\t\t[ ...panelItems ].reverse()\n\t);\n\n\tconst panelContext = useMemo(\n\t\t() => ( {\n\t\t\tareAllOptionalControlsHidden,\n\t\t\tderegisterPanelItem,\n\t\t\tfirstDisplayedItem,\n\t\t\tflagItemCustomization,\n\t\t\thasMenuItems: !! panelItems.length,\n\t\t\tisResetting: isResetting.current,\n\t\t\tlastDisplayedItem,\n\t\t\tmenuItems,\n\t\t\tpanelId,\n\t\t\tregisterPanelItem,\n\t\t\tshouldRenderPlaceholderItems,\n\t\t\t__experimentalFirstVisibleItemClass,\n\t\t\t__experimentalLastVisibleItemClass,\n\t\t} ),\n\t\t[\n\t\t\tareAllOptionalControlsHidden,\n\t\t\tderegisterPanelItem,\n\t\t\tfirstDisplayedItem,\n\t\t\tflagItemCustomization,\n\t\t\tisResetting.current,\n\t\t\tlastDisplayedItem,\n\t\t\tmenuItems,\n\t\t\tpanelId,\n\t\t\tpanelItems,\n\t\t\tregisterPanelItem,\n\t\t\tshouldRenderPlaceholderItems,\n\t\t\t__experimentalFirstVisibleItemClass,\n\t\t\t__experimentalLastVisibleItemClass,\n\t\t]\n\t);\n\n\treturn {\n\t\t...otherProps,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\tclassName: classes,\n\t};\n}\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelProps } from '../types';\n\nconst ToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\nconst ConnectedToolsPanel = contextConnect( ToolsPanel, 'ToolsPanel' );\n\nexport default ConnectedToolsPanel;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelItem } from './hook';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelItemProps } from '../types';\n\n// This wraps controls to be conditionally displayed within a tools panel. It\n// prevents props being applied to HTML elements that would make them invalid.\nconst ToolsPanelItem = (\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\t...toolsPanelItemProps\n\t} = useToolsPanelItem( props );\n\n\tif ( ! isShown ) {\n\t\treturn shouldRenderPlaceholder ? (\n\t\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef } />\n\t\t) : null;\n\t}\n\n\treturn (\n\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef }>\n\t\t\t{ children }\n\t\t</View>\n\t);\n};\n\nconst ConnectedToolsPanelItem = contextConnect(\n\tToolsPanelItem,\n\t'ToolsPanelItem'\n);\n\nexport default ConnectedToolsPanelItem;\n","/**\n * WordPress dependencies\n */\nimport { usePrevious } from '@wordpress/compose';\nimport { useCallback, useEffect, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as styles from '../styles';\nimport { useToolsPanelContext } from '../context';\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ToolsPanelItemProps } from '../types';\n\nexport function useToolsPanelItem(\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\thasValue,\n\t\tisShownByDefault,\n\t\tlabel,\n\t\tpanelId,\n\t\tresetAllFilter,\n\t\tonDeselect,\n\t\tonSelect,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ToolsPanelItem' );\n\n\tconst {\n\t\tpanelId: currentPanelId,\n\t\tmenuItems,\n\t\tregisterPanelItem,\n\t\tderegisterPanelItem,\n\t\tflagItemCustomization,\n\t\tisResetting,\n\t\tshouldRenderPlaceholderItems: shouldRenderPlaceholder,\n\t\tfirstDisplayedItem,\n\t\tlastDisplayedItem,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t} = useToolsPanelContext();\n\n\tconst hasValueCallback = useCallback( hasValue, [ panelId ] );\n\tconst resetAllFilterCallback = useCallback( resetAllFilter, [ panelId ] );\n\tconst previousPanelId = usePrevious( currentPanelId );\n\n\tconst hasMatchingPanel =\n\t\tcurrentPanelId === panelId || currentPanelId === null;\n\n\t// Registering the panel item allows the panel to include it in its\n\t// automatically generated menu and determine its initial checked status.\n\tuseEffect( () => {\n\t\tif ( hasMatchingPanel && previousPanelId !== null ) {\n\t\t\tregisterPanelItem( {\n\t\t\t\thasValue: hasValueCallback,\n\t\t\t\tisShownByDefault,\n\t\t\t\tlabel,\n\t\t\t\tresetAllFilter: resetAllFilterCallback,\n\t\t\t\tpanelId,\n\t\t\t} );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\t( previousPanelId === null && !! currentPanelId ) ||\n\t\t\t\tcurrentPanelId === panelId\n\t\t\t) {\n\t\t\t\tderegisterPanelItem( label );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tcurrentPanelId,\n\t\thasMatchingPanel,\n\t\tisShownByDefault,\n\t\tlabel,\n\t\thasValueCallback,\n\t\tpanelId,\n\t\tpreviousPanelId,\n\t\tresetAllFilterCallback,\n\t] );\n\n\tconst isValueSet = hasValue();\n\tconst wasValueSet = usePrevious( isValueSet );\n\n\t// If this item represents a default control it will need to notify the\n\t// panel when a custom value has been set.\n\tuseEffect( () => {\n\t\tif ( isShownByDefault && isValueSet && ! wasValueSet ) {\n\t\t\tflagItemCustomization( label );\n\t\t}\n\t}, [ isValueSet, wasValueSet, isShownByDefault, label ] );\n\n\t// Note: `label` is used as a key when building menu item state in\n\t// `ToolsPanel`.\n\tconst menuGroup = isShownByDefault ? 'default' : 'optional';\n\tconst isMenuItemChecked = menuItems?.[ menuGroup ]?.[ label ];\n\tconst wasMenuItemChecked = usePrevious( isMenuItemChecked );\n\n\t// Determine if the panel item's corresponding menu is being toggled and\n\t// trigger appropriate callback if it is.\n\tuseEffect( () => {\n\t\tif ( isResetting || ! hasMatchingPanel ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isMenuItemChecked && ! isValueSet && ! wasMenuItemChecked ) {\n\t\t\tonSelect?.();\n\t\t}\n\n\t\tif ( ! isMenuItemChecked && wasMenuItemChecked ) {\n\t\t\tonDeselect?.();\n\t\t}\n\t}, [\n\t\thasMatchingPanel,\n\t\tisMenuItemChecked,\n\t\tisResetting,\n\t\tisValueSet,\n\t\twasMenuItemChecked,\n\t] );\n\n\t// The item is shown if it is a default control regardless of whether it\n\t// has a value. Optional items are shown when they are checked or have\n\t// a value.\n\tconst isShown = isShownByDefault\n\t\t? menuItems?.[ menuGroup ]?.[ label ] !== undefined\n\t\t: isMenuItemChecked;\n\n\tconst cx = useCx();\n\tconst classes = useMemo( () => {\n\t\tconst placeholderStyle =\n\t\t\tshouldRenderPlaceholder &&\n\t\t\t! isShown &&\n\t\t\tstyles.ToolsPanelItemPlaceholder;\n\t\tconst firstItemStyle =\n\t\t\tfirstDisplayedItem === label && __experimentalFirstVisibleItemClass;\n\t\tconst lastItemStyle =\n\t\t\tlastDisplayedItem === label && __experimentalLastVisibleItemClass;\n\t\treturn cx(\n\t\t\tstyles.ToolsPanelItem,\n\t\t\tplaceholderStyle,\n\t\t\tclassName,\n\t\t\tfirstItemStyle,\n\t\t\tlastItemStyle\n\t\t);\n\t}, [\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\tclassName,\n\t\tcx,\n\t\tfirstDisplayedItem,\n\t\tlastDisplayedItem,\n\t\t__experimentalFirstVisibleItemClass,\n\t\t__experimentalLastVisibleItemClass,\n\t] );\n\n\treturn {\n\t\t...otherProps,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\tclassName: classes,\n\t};\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nconst RovingTabIndexContext = createContext();\nexport const useRovingTabIndexContext = () =>\n\tuseContext( RovingTabIndexContext );\nexport const RovingTabIndexProvider = RovingTabIndexContext.Provider;\n","/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { RovingTabIndexProvider } from './roving-tab-index-context';\n\n/**\n * Provider for adding roving tab index behaviors to tree grid structures.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/components/src/tree-grid/README.md\n *\n * @param {Object}    props          Component props.\n * @param {WPElement} props.children Children to be rendered\n */\nexport default function RovingTabIndex( { children } ) {\n\tconst [ lastFocusedElement, setLastFocusedElement ] = useState();\n\n\t// Use `useMemo` to avoid creation of a new object for the providerValue\n\t// on every render. Only create a new object when the `lastFocusedElement`\n\t// value changes.\n\tconst providerValue = useMemo(\n\t\t() => ( { lastFocusedElement, setLastFocusedElement } ),\n\t\t[ lastFocusedElement ]\n\t);\n\n\treturn (\n\t\t<RovingTabIndexProvider value={ providerValue }>\n\t\t\t{ children }\n\t\t</RovingTabIndexProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param {Element} rowElement The DOM element representing the row.\n *\n * @return {?Array} The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\tif ( ! focusablesInRow || ! focusablesInRow.length ) {\n\t\treturn;\n\t}\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/components/src/tree-grid/README.md\n * @param {Object}    props                      Component props.\n * @param {WPElement} props.children             Children to be rendered.\n * @param {Function}  props.onExpandRow          Callback to fire when row is expanded.\n * @param {Function}  props.onCollapseRow        Callback to fire when row is collapsed.\n * @param {Function}  props.onFocusRow           Callback to fire when moving focus to a different row.\n * @param {string}    props.applicationAriaLabel Label to use for the application role.\n * @param {Object}    ref                        A ref to the underlying DOM table element.\n */\nfunction TreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t},\n\tref\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! [ UP, DOWN, LEFT, RIGHT, HOME, END ].includes( keyCode )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\t\t\tif ( ! treeGridElement.contains( activeElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow = activeElement.closest( '[role=\"row\"]' );\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf( activeElement );\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( [ LEFT, RIGHT ].includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? 1,\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' ),\n\t\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t\t) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the rightmost cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[\n\t\t\t\t\t\t\t\tfocusableItems.length - 1\n\t\t\t\t\t\t\t]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ UP, DOWN ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ HOME, END ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\nexport default forwardRef( TreeGrid );\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nfunction TreeGridRow(\n\t{ children, level, positionInSet, setSize, isExpanded, ...props },\n\tref\n) {\n\treturn (\n\t\t// Disable reason: Due to an error in the ARIA 1.1 specification, the\n\t\t// aria-posinset and aria-setsize properties are not supported on row\n\t\t// elements. This is being corrected in ARIA 1.2. Consequently, the\n\t\t// linting rule fails when validating this markup.\n\t\t//\n\t\t// eslint-disable-next-line jsx-a11y/role-supports-aria-props\n\t\t<tr\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\trole=\"row\"\n\t\t\taria-level={ level }\n\t\t\taria-posinset={ positionInSet }\n\t\t\taria-setsize={ setSize }\n\t\t\taria-expanded={ isExpanded }\n\t\t>\n\t\t\t{ children }\n\t\t</tr>\n\t);\n}\n\nexport default forwardRef( TreeGridRow );\n","/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\n\nexport default forwardRef( function RovingTabIndexItem(\n\t{ children, as: Component, ...props },\n\tforwardedRef\n) {\n\tconst localRef = useRef();\n\tconst ref = forwardedRef || localRef;\n\tconst { lastFocusedElement, setLastFocusedElement } =\n\t\tuseRovingTabIndexContext();\n\tlet tabIndex;\n\n\tif ( lastFocusedElement ) {\n\t\ttabIndex = lastFocusedElement === ref.current ? 0 : -1;\n\t}\n\n\tconst onFocus = ( event ) => setLastFocusedElement( event.target );\n\tconst allProps = { ref, tabIndex, onFocus, ...props };\n\n\tif ( typeof children === 'function' ) {\n\t\treturn children( allProps );\n\t}\n\n\treturn <Component { ...allProps }>{ children }</Component>;\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\n\nexport default forwardRef( function TreeGridItem(\n\t{ children, ...props },\n\tref\n) {\n\treturn (\n\t\t<RovingTabIndexItem ref={ ref } { ...props }>\n\t\t\t{ children }\n\t\t</RovingTabIndexItem>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TreeGridItem from './item';\n\nexport default forwardRef( function TreeGridCell(\n\t{ children, withoutGridItem = false, ...props },\n\tref\n) {\n\treturn (\n\t\t<td { ...props } role=\"gridcell\">\n\t\t\t{ withoutGridItem ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<TreeGridItem ref={ ref }>{ children }</TreeGridItem>\n\t\t\t) }\n\t\t</td>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * @type {import('react').MouseEventHandler<HTMLDivElement>}\n */\nfunction stopPropagation( event ) {\n\tevent.stopPropagation();\n}\n\nexport default forwardRef( ( { children, ...props }, ref ) => {\n\tdeprecated( 'wp.components.IsolatedEventContainer', {\n\t\tsince: '5.7',\n\t} );\n\n\t// Disable reason: this stops certain events from propagating outside of the component.\n\t// - onMouseDown is disabled as this can cause interactions with other DOM elements.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<div { ...props } ref={ ref } onMouseDown={ stopPropagation }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n} );\n","// @ts-nocheck\n/**\n * External dependencies\n */\nimport { useSnapshot } from 'valtio';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\n\nexport default function useSlotFills( name ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst fills = useSnapshot( registry.fills, { sync: true } );\n\t// The important bit here is that this call ensures that the hook\n\t// only causes a re-render if the \"fills\" of a given slot name\n\t// change change, not any fills.\n\treturn fills.get( name );\n}\n","/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { rtl } from '../utils';\n\nexport const ZStackView = styled.div`\n\tdisplay: flex;\n\tposition: relative;\n`;\n\nexport const ZStackChildView = styled.div< {\n\tisLayered: boolean;\n\toffsetAmount: number;\n\tzIndex: number;\n} >`\n\t${ ( { isLayered, offsetAmount } ) =>\n\t\tisLayered\n\t\t\t? css( rtl( { marginLeft: offsetAmount } )() )\n\t\t\t: css( rtl( { right: offsetAmount * -1 } )() ) }\n\n\t${ ( { isLayered } ) =>\n\t\tisLayered ? positionAbsolute : positionRelative }\n\n\t${ ( { zIndex } ) => css( { zIndex } ) }\n`;\n\nconst positionAbsolute = css`\n\tposition: absolute;\n`;\n\nconst positionRelative = css`\n\tposition: relative;\n`;\n","/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { isValidElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport { contextConnect, useContextSystem } from '../ui/context';\nimport { ZStackView, ZStackChildView } from './styles';\nimport type { ZStackProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nfunction UnconnectedZStack(\n\tprops: WordPressComponentProps< ZStackProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tisLayered = true,\n\t\tisReversed = false,\n\t\toffset = 0,\n\t\t...otherProps\n\t} = useContextSystem( props, 'ZStack' );\n\n\tconst validChildren = getValidChildren( children );\n\tconst childrenLastIndex = validChildren.length - 1;\n\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst zIndex = isReversed ? childrenLastIndex - index : index;\n\t\tconst offsetAmount = offset * index;\n\n\t\tconst key = isValidElement( child ) ? child.key : index;\n\n\t\treturn (\n\t\t\t<ZStackChildView\n\t\t\t\tisLayered={ isLayered }\n\t\t\t\toffsetAmount={ offsetAmount }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t\tkey={ key }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</ZStackChildView>\n\t\t);\n\t} );\n\n\treturn (\n\t\t<ZStackView\n\t\t\t{ ...otherProps }\n\t\t\tclassName={ className }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ clonedChildren }\n\t\t</ZStackView>\n\t);\n}\n\n/**\n * `ZStack` allows you to stack things along the Z-axis.\n *\n * ```jsx\n * import { __experimentalZStack as ZStack } from '@wordpress/components';\n *\n * function Example() {\n *   return (\n *     <ZStack offset={ 20 } isLayered>\n *       <ExampleImage />\n *       <ExampleImage />\n *       <ExampleImage />\n *     </ZStack>\n *   );\n * }\n * ```\n */\nexport const ZStack = contextConnect( UnconnectedZStack, 'ZStack' );\n\nexport default ZStack;\n","/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t],\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t],\n};\n\nexport function useNavigateRegions( shortcuts = defaultShortcuts ) {\n\tconst ref = useRef();\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current.querySelectorAll( '[role=\"region\"]' )\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\tconst selectedIndex = regions.indexOf(\n\t\t\tref.current.ownerDocument.activeElement\n\t\t);\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) =>\n\t\t\t(\n\t\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t\t<Component { ...props } />\n\t\t\t\t</div>\n\t\t\t),\n\t'navigateRegions'\n);\n","/**\n * WordPress dependencies\n */\nimport {\n\tcreateHigherOrderComponent,\n\tuseConstrainedTabbing,\n} from '@wordpress/compose';\n\nconst withConstrainedTabbing = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\tfunction ComponentWithConstrainedTabbing( props ) {\n\t\t\tconst ref = useConstrainedTabbing();\n\t\t\treturn (\n\t\t\t\t<div ref={ ref } tabIndex={ -1 }>\n\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t'withConstrainedTabbing'\n);\n\nexport default withConstrainedTabbing;\n","/**\n * External dependencies\n */\nimport { every, isEqual } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nexport default ( mapNodeToProps ) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component {\n\t\t\tconstructor() {\n\t\t\t\tsuper( ...arguments );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\t\t\t\t\tif ( ! isEqual( newFallbackStyles, fallbackStyles ) ) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted: !! every( newFallbackStyles ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","/**\n * External dependencies\n */\nimport { without } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param {string} hookName Hook name exposed to be used by filters.\n *\n * @return {Function} Higher-order component factory.\n */\nexport default function withFilters( hookName ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t *\n\t\t * @type {?Component}\n\t\t */\n\t\tlet FilteredComponent;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters( hookName, OriginalComponent );\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tconstructor() {\n\t\t\t\tsuper( ...arguments );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances = without(\n\t\t\t\t\tFilteredComponentRenderer.instances,\n\t\t\t\t\tthis\n\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters( hookName, OriginalComponent );\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param {string} updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent, useFocusReturn } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Returns true if the given object is component-like. An object is component-\n * like if it is an instance of wp.element.Component, or is a function.\n *\n * @param {*} object Object to test.\n *\n * @return {boolean} Whether object is component-like.\n */\nfunction isComponentLike( object ) {\n\treturn object instanceof Component || typeof object === 'function';\n}\n\n/**\n * Higher Order Component used to be used to wrap disposable elements like\n * sidebars, modals, dropdowns. When mounting the wrapped component, we track a\n * reference to the current active element so we know where to restore focus\n * when the component is unmounted.\n *\n * @param {(WPComponent|Object)} options The component to be enhanced with\n *                                       focus return behavior, or an object\n *                                       describing the component and the\n *                                       focus return characteristics.\n *\n * @return {Function} Higher Order Component with the focus restauration behaviour.\n */\nexport default createHigherOrderComponent( ( options ) => {\n\tconst HoC =\n\t\t( { onFocusReturn } = {} ) =>\n\t\t( WrappedComponent ) => {\n\t\t\tconst WithFocusReturn = ( props ) => {\n\t\t\t\tconst ref = useFocusReturn( onFocusReturn );\n\t\t\t\treturn (\n\t\t\t\t\t<div ref={ ref }>\n\t\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t};\n\n\t\t\treturn WithFocusReturn;\n\t\t};\n\n\tif ( isComponentLike( options ) ) {\n\t\tconst WrappedComponent = options;\n\t\treturn HoC()( WrappedComponent );\n\t}\n\n\treturn HoC( options );\n}, 'withFocusReturn' );\n\nexport const Provider = ( { children } ) => {\n\tdeprecated( 'wp.components.FocusReturnProvider component', {\n\t\tsince: '5.7',\n\t\thint: 'This provider is not used anymore. You can just remove it from your codebase',\n\t} );\n\n\treturn children;\n};\n","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * @param {WPComponent} OriginalComponent Original component.\n *\n * @return {WPComponent} Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component( props, ref ) {\n\t\tconst [ noticeList, setNoticeList ] = useState( [] );\n\n\t\tconst noticeOperations = useMemo( () => {\n\t\t\t/**\n\t\t\t * Function passed down as a prop that adds a new notice.\n\t\t\t *\n\t\t\t * @param {Object} notice Notice to add.\n\t\t\t */\n\t\t\tconst createNotice = ( notice ) => {\n\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t? notice\n\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\n\t\t\t\t/**\n\t\t\t\t * Function passed as a prop that adds a new error notice.\n\t\t\t\t *\n\t\t\t\t * @param {string} msg Error message of the notice.\n\t\t\t\t */\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Removes a notice by id.\n\t\t\t\t *\n\t\t\t\t * @param {string} id Id of the notice to remove.\n\t\t\t\t */\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\n\t\t\t\t/**\n\t\t\t\t * Removes all notices\n\t\t\t\t */\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef;\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n} );\n"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","util","elem","container","config","nodeType","getWindow","allowHorizontalScroll","onlyScrollIfNeeded","alignWithTop","alignWithLeft","offsetTop","offsetLeft","offsetBottom","offsetRight","undefined","isWin","isWindow","isFramed","frameElement","elemOffset","offset","eh","outerHeight","ew","outerWidth","containerOffset","ch","cw","containerScroll","diffTop","diffBottom","win","winScroll","ww","wh","document","scrollingElement","body","height","width","left","scrollLeft","top","scrollTop","clientHeight","clientWidth","parseFloat","css","_extends","assign","target","source","_typeof","Symbol","iterator","obj","constructor","getScroll","w","ret","method","d","documentElement","getScrollLeft","getScrollTop","getOffset","el","pos","box","x","y","doc","ownerDocument","docElem","getBoundingClientRect","clientLeft","clientTop","getClientPosition","defaultView","parentWindow","_RE_NUM_NO_PX","RegExp","RE_POS","getComputedStyleX","each","arr","fn","isBorderBoxFn","window","getComputedStyle","name","computedStyle_","val","computedStyle","getPropertyValue","test","style","rsLeft","pixelLeft","BOX_MODELS","swap","options","callback","old","getPBMWidth","props","which","value","prop","j","cssProp","domUtils","getWH","extra","viewportWidth","viewportHeight","docWidth","docHeight","borderBoxValue","offsetWidth","offsetHeight","isBorderBox","cssBoxValue","Number","borderBoxValueOrIsBorderBox","padding","slice","refWin","Math","max","documentElementProp","compatMode","cssShow","position","visibility","display","getWHIgnoreDisplay","args","v","first","charAt","toUpperCase","includeMargin","node","current","setOffset","clone","overflow","scrollTo","for","monadic","cache","serializer","cacheKey","computedValue","get","this","set","variadic","assemble","context","strategy","serialize","bind","strategyDefault","create","serializerDefault","JSON","stringify","ObjectWithoutPrototypeCache","has","cacheDefault","strategies","GradientParser","parse","tokens","input","error","msg","err","Error","matchDefinition","matchGradient","matchLinearOrientation","matchListRadialOrientations","gradientType","pattern","orientationMatcher","matchCall","captures","orientation","scan","type","colorStops","matchListing","matchColorStop","result","match","radialOrientations","lookaheadCache","radialOrientation","matchRadialOrientation","ellipse","circle","radialType","matchLength","matchExtentKeyword","matchDistance","at","positioning","matchPositioning","matchAtPosition","defaultPosition","location","matcher","color","matchNumber","captureIndex","regexp","blankCaptures","exec","consume","size","substr","code","ast","combineChunks","fillInChunks","findAll","findChunks","autoEscape","caseSensitive","defaultFindChunks","sanitize","searchWords","textToHighlight","chunksToHighlight","chunks","totalLength","sort","second","start","reduce","processedChunks","nextChunk","prevChunk","pop","end","endIndex","highlight","defaultSanitize","filter","searchWord","replace","regex","index","lastIndex","allChunks","append","forEach","chunk","string","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","concat","targetStatics","sourceStatics","descriptor","e","head","tail","memoized","len","searchCache","next","prev","maxSize","clear","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","symbol","any","arrayOf","element","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","b","c","f","g","h","k","l","m","n","p","q","r","t","a","u","$$typeof","typeOf","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isValidElementType","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","characterMap","chars","allAccents","firstAccent","removeAccents","remove","is","useState","useEffect","useLayoutEffect","useDebugValue","getSnapshot","createElement","inst","useSyncExternalStore","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","o","enumerable","toStringTag","_defineProperty","configurable","writable","ownKeys","enumerableOnly","symbols","sym","_objectSpread2","getOwnPropertyDescriptors","defineProperties","excluded","sourceKeys","indexOf","_arrayLikeToArray","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","minLen","from","_unsupportedIterableToArray","done","TypeError","_window","SystemContext","createContext","useCreateElement","children","useContext","isRenderProp","isPlainObject","_proto$constructor","proto","__deprecatedSplitProps","picked","omitted","_i","_propsKeys","splitProps","state","_deprecatedSplitProp","restPicked","shallowEqual","objA","objB","aKeys","bKeys","_aKeys","normalizePropsAreEqual","propsAreEqual","createComponent","_ref","as","useHook","shouldMemo","memo","_ref$propsAreEqual","unstable_propsAreEqual","_ref$keys","__keys","_ref$useCreateElement","useCreateElement$1","Comp","_ref2","ref","_ref2$as","_as$render","_splitProps","_options","htmlProps","_useHook","wrapElement","elementProps","asKeys","asOptions","allProps","_element","forwardRef","useToken","token","defaultValue","createHook","_options$useState","_composedHooks$","composedHooks","compose","__useOptions","hookOptions","useOptions","hookName","_step","_iterator","unstable_ignoreUseOptions","useProps","useComposeOptions","useComposeProps","_step2","_iterator2","hook","finalHTMLProps","definedHTMLProps","composedKeys","setRef","useForkRef","refA","refB","useMemo","getDocument","canUseDOM","Boolean","checkIsBrowser","useIsomorphicEffect","useLiveRef","useRef","isSelfTarget","event","currentTarget","activeElement","nodeName","contains","parent","child","hasFocusWithin","activeDescendant","getAttribute","id","querySelector","isPortalEvent","buttonInputTypes","isButton","tagName","isUA","navigator","userAgent","useRole","prevSystem","unstable_system","prevProps","nextSystem","nextProps","isSafariOrFirefoxOnMac","focusIfNeeded","selectors","matches","msMatchesSelector","webkitMatchesSelector","htmlElement","getClientRects","isVisible","isFocusable","focus","getTabIndex","trulyDisabled","nativeTabbable","supportsDisabled","htmlTabIndex","useDisableEvent","htmlEventRef","disabled","useCallback","_htmlEventRef$current","defaultPrevented","stopPropagation","preventDefault","useTabbable","htmlRef","tabIndex","htmlOnClickCapture","onClickCapture","htmlOnMouseDownCapture","onMouseDownCapture","htmlOnMouseDown","onMouseDown","htmlOnKeyPressCapture","onKeyPressCapture","htmlStyle","onClickCaptureRef","onMouseDownCaptureRef","onMouseDownRef","onKeyPressCaptureRef","focusable","_React$useState","setNativeTabbable","_React$useState2","setSupportsDisabled","pointerEvents","tabbable","supportsDisabledAttribute","_onMouseDownRef$curre","raf","requestAnimationFrame","removeEventListener","focusImmediately","cancelAnimationFrame","addEventListener","once","capture","useClickable","_ref$unstable_clickOn","unstable_clickOnEnter","_ref$unstable_clickOn2","unstable_clickOnSpace","htmlOnKeyDown","onKeyDown","htmlOnKeyUp","onKeyUp","active","setActive","onKeyDownRef","onKeyUpRef","_onKeyDownRef$current","metaKey","isEnter","isSpace","isTrusted","isNativeClick","click","_onKeyUpRef$current","findFirstEnabledItem","items","excludeId","find","item","getCurrentId","passedId","_findFirstEnabledItem","currentId","COMPOSITE_KEYS","COMPOSITE_GROUP_KEYS","COMPOSITE_ITEM_KEYS","userFocus","setUserFocus","isTextField","isTextInput","HTMLInputElement","selectionStart","isTextArea","isContentEditable","contentEditable","hasFocus","generateRandomString","prefix","random","unstable_IdContext","unstable_useId","generateId","suffix","unstable_idCountRef","baseId","createEvent","eventInit","Event","initEvent","bubbles","cancelable","setTextFieldValue","HTMLTextAreaElement","_Object$getOwnPropert","setValue","dispatchEvent","fireEvent","getWidget","itemElement","useCompositeItem","prevCurrentId","prevMoves","unstable_moves","nextCurrentId","nextMoves","unstable_hasActiveWidget","_options$items2","_ref$tabIndex","htmlOnFocus","onFocus","htmlOnBlurCapture","onBlurCapture","htmlOnClick","onClick","isCurrentItem","isCurrentItemRef","hasFocusedComposite","_options$items","useItem","onFocusRef","onBlurCaptureRef","onClickRef","shouldTabIndex","unstable_virtual","_options$registerItem","registerItem","_options$unregisterIt","unregisterItem","_onFocusRef$current","_options$setCurrentId","shouldFocusComposite","targetIsAnotherItem","setCurrentId","composite","getElementById","_temp","preventScroll","_ref$isActive","isActive","ensureFocus","_onBlurCaptureRef$cur","isVertical","isHorizontal","isGrid","groupId","action","ArrowUp","up","ArrowRight","ArrowDown","down","ArrowLeft","previous","Home","_options$first","_options$previous","ctrlKey","End","_options$last","_options$next","last","PageUp","_options$up","_options$first2","PageDown","_options$down","_options$last2","widget","_widget","_onClickRef$current","CompositeItem","split","includes","reference","floating","s","right","bottom","async","platform","rects","elements","boundary","rootBoundary","elementContext","altBoundary","getClippingRect","contextElement","getDocumentElement","convertOffsetParentRelativeRectToViewportRelativeRect","rect","offsetParent","getOffsetParent","min","placement","getDimensions","R","A","P","T","O","L","D","E","C","data","centerOffset","main","cross","middlewareData","initialPlacement","mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment","flip","overflows","isRTL","every","reset","map","alignmentAxis","alert","setInterval","toLowerCase","userAgentData","brands","brand","version","HTMLElement","ShadowRoot","overflowX","overflowY","transform","perspective","contain","willChange","round","visualViewport","Node","pageXOffset","pageYOffset","assignedSlot","parentNode","host","hasAttribute","removeAttribute","W","H","scrollWidth","scrollHeight","direction","getRootNode","getElementRects","deepEqual","useFloating","middleware","whileElementsMounted","setData","latestMiddleware","setLatestMiddleware","cleanupRef","dataRef","whileElementsMountedRef","useLatestRef","update","then","isMountedRef","runElementMountCallback","cleanupFn","setReference","setFloating","refs","arrow","extendStatics","setPrototypeOf","__proto__","__extends","String","__","__assign","__rest","propertyIsEnumerable","ar","to","pack","MotionConfigContext","transformPagePoint","isStatic","reducedMotion","prefersReducedMotion","hasDetected","useReducedMotion","matchMedia","motionMediaQuery_1","setReducedMotionPreferences","addListener","initPrefersReducedMotion","createDefinition","propNames","isEnabled","some","featureDefinitions","measureLayout","animation","exit","drag","hover","tap","pan","inView","LazyContext","strict","featureNames","numFeatures","MotionContext","isBrowser","useIsomorphicLayoutEffect","isVariantLabels","isVariantLabel","resolveVariantFromProps","custom","currentValues","currentVelocity","_a","variants","resolveVariant","visualElement","getProps","forEachValue","getCurrent","velocity","getVelocity","checkIfControllingVariants","animate","initial","whileHover","whileDrag","whileTap","whileFocus","checkIfVariantNode","variantLabelsAsDependency","useConstant","init","defaultTimestep","getCurrentTime","performance","now","Date","onNextFrame","setTimeout","useDefaultElapsed","runNextFrame","isProcessing","delta","timestamp","stepsOrder","steps","acc","toRun","toRunNextFrame","numToRun","flushNextFrame","toKeepAlive","WeakSet","step","schedule","keepAlive","immediate","addToCurrentFrame","buffer","add","cancel","splice","delete","process","frameData","createRenderStep","sync","startLoop","cancelSync","flushSync","processStep","stepId","processFrame","getFrameData","mix","progress","velocityPerSecond","frameDuration","addUniqueItem","removeItem","SubscriptionManager","subscriptions","handler","_this","notify","numSubscriptions","getSize","MotionValue","timeDelta","lastUpdated","updateSubscribers","velocityUpdateSubscribers","renderSubscribers","canTrackVelocity","updateAndNotify","scheduleVelocityCheck","velocityCheck","hasAnimated","isNaN","onChange","subscription","clearListeners","onRenderRequest","attach","passiveEffect","getPrevious","stop","Promise","resolve","stopAnimation","clearAnimation","isAnimating","destroy","motionValue","isMotionValue","clamp","calcAngularFreq","undampedFreq","dampingRatio","sqrt","durationKeys","physicsKeys","isSpringType","spring","restSpeed","restDelta","stiffness","damping","mass","duration","isResolvedFromDuration","springOptions","derived","bounce","envelope","derivative","exponentialDecay","exp","pow","initialGuess","approximateRoot","findSpring","getSpringOptions","resolveSpring","zero","resolveVelocity","createSpring","initialVelocity","initialDelta","undampedAngularFreq","abs","angularFreq","sin","cos","dampedAngularFreq","freqForT","sinh","cosh","isBelowVelocityThreshold","isBelowDisplacementThreshold","flipTarget","needsInterpolation","_t","toFromDifference","toFixed","floatRegex","colorRegex","singleColorRegex","isString","alpha","scale","isColorString","testProp","startsWith","splitColor","aName","bName","cName","clampRgbUnit","rgbUnit","rgba","red","green","blue","alpha$1","hex","parseInt","createUnitType","unit","endsWith","degrees","percent","px","vh","vw","progressPercentage","hsla","hue","saturation","lightness","hueToRgb","hslaToRgba","mixLinearColor","fromExpo","toExpo","colorTypes","getColorType","notAnimatable","mixColor","fromColorType","toColorType","fromColor","toColor","blended","colorToken","numberToken","analyse","values","numColors","colors","numbers","tokenised","createTransformer","numValues","output","convertNumbersToZero","complex","_b","_c","_d","getAnimatableNone","parsed","transformer","isNum","combineFunctions","pipe","transformers","getMixer","origin","mixComplex","mixArray","blendValue","fromThis","mixObject","numNumbers","numRGB","numHSL","template","originStats","targetStats","mixNumber","interpolate","isClamp","ease","mixer","inputLength","reverse","mixers","customMixer","mixerFactory","numMixers","easingFunction","createMixers","interpolator","fastInterpolate","lastInputIndex","mixerIndex","foundMixerIndex","progressInRange","slowInterpolate","reverseEasing","easing","mirrorEasing","createBackIn","power","linear","easeIn","easeOut","easeInOut","circIn","acos","circOut","circInOut","backIn","backOut","backInOut","anticipate","backEasing","createAnticipate","bounceOut","p2","bounceIn","defaultEasing","keyframes","times","convertOffsetToTimes","_value","defaultOffset","createInterpolator","types","timeConstant","modifyTarget","amplitude","ideal","loopElapsed","elapsed","delay","framesync","passTimestamp","autoplay","driver","repeat","repeatMax","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate","driverControls","latest","interpolateFromNumber","repeatCount","computedDuration","isComplete","isForwardPlayback","animator","Set","detectAnimationFromOptions","hasRepeatDelayElapsed","reverseElapsed","secondsToMilliseconds","seconds","a1","a2","calcBezier","getSlope","kSampleStepSize","cubicBezier","mX1","mY1","mX2","mY2","sampleValues","Float32Array","aX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","binarySubdivide","getTForX","easingLookup","bounceInOut","easingDefinitionToFunction","isAnimatable","isKeyframesTarget","underDampedSpring","criticallyDampedSpring","linearTween","defaultTransitions","z","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","opacity","backgroundColor","maxDefaults","applyDefaultFilter","functionRegex","functions","numberValueTypes","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","maxWidth","maxHeight","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","transformPerspective","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","defaultValueTypes","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","WebkitFilter","getDefaultValueType","defaultValueType","resolveFinalValueInKeyframes","getPopmotionAnimationOptions","transition","valueKey","transitionFactory","hydrateKeyframes","when","delayChildren","staggerChildren","staggerDirection","isTransitionDefined","yoyo","loop","isEasingArray","convertTransitionToAnimationOptions","isZero","getZeroUnit","potentialUnitType","getValueTransition","startAnimation","delayTimer","controls","valueTransition","isTargetAnimatable","isOriginAnimatable","bounceStiffness","bounceDamping","currentAnimation","isOutOfBounds","boundaryNearest","startSpring","heading","checkBoundary","inertia","finalTarget","getAnimation","getDelayFromTransition","clearTimeout","borders","numBorders","asNumber","isPx","getRadius","radiusName","easeCrossfadeIn","compress","easeCrossfadeOut","copyAxisInto","axis","originAxis","copyBoxInto","originBox","isIdentityScale","hasScale","hasTransform","hasTranslate","scalePoint","point","originPoint","applyPointDelta","translate","boxScale","applyAxisDelta","applyBoxDelta","translateAxis","transformAxis","transforms","scaleKey","originKey","axisOrigin","xKeys","yKeys","transformBox","isPoint","isPoint3D","distance1D","xDelta","yDelta","zDelta","calcLength","isNear","maxDistance","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","calcRelativeAxisPosition","layout","calcRelativePosition","removePointDelta","removeAxisTransforms","sourceAxis","removeAxisDelta","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","boxEquals","NodeStack","members","scheduleRender","prevLead","lead","promote","relegate","indexOfNode","findIndex","member","isPresent","preserveFollowOpacity","show","instance","resumeFrom","preserveOpacity","snapshot","latestValues","animationValues","isShared","root","isUpdating","isLayoutDirty","crossfade","hide","exitAnimationComplete","_e","onExitComplete","resumingFrom","removeLeadSnapshot","scaleCorrectors","buildProjectionTransform","treeScale","latestTransform","xTranslate","yTranslate","eachAxis","transformAxes","transformProps","sortTransformProps","operationKey","axesKey","transformPropSet","isTransformProp","transformOriginProps","isTransformOriginProp","compareByDepth","depth","FlatTree","isDirty","resolveMotionValue","unwrappedValue","toValue","globalProjectionState","hasAnimatedSinceResize","hasEverUpdated","createProjectionNode","attachResizeListener","defaultParent","measureScroll","resetTransform","ProjectionNode","isTreeAnimating","isAnimationBlocked","updateManuallyBlocked","updateBlockedByResize","isSVG","needsReset","shouldResetTransform","eventHandlers","Map","potentialNodes","checkUpdateFailed","clearAllSnapshots","updateProjection","nodes","resolveTargetDelta","calcProjection","hasProjected","animationProgress","sharedNodes","path","registerPotentialNode","notifyListeners","subscriptionManager","hasListeners","mount","SVGElement","layoutId","getInstance","unblockTimeout_1","resizeUnblockUpdate_1","finishAnimation","registerSharedNode","_f","hasLayoutChanged","hasRelativeTargetChanged","newLayout","isTreeAnimationBlocked","relativeTarget","layoutTransition","getDefaultTransition","defaultLayoutTransition","onLayoutAnimationComplete","targetChanged","targetLayout","hasOnlyRelativeTargetChanged","setAnimationOrigin","animationOptions","shouldReduceMotion","isLead","unmount","willUpdate","getStack","preRender","blockUpdate","unblockUpdate","isUpdateBlocked","startUpdate","resetRotation","shouldNotifyListeners","updateScroll","transformTemplate","prevTransformTemplateValue","updateSnapshot","didUpdate","clearMeasurements","mountNodeEarly","resetTransformStyle","updateLayout","notifyLayoutUpdate","clearSnapshot","removeLeadSnapshots","scheduleUpdateProjection","scheduleCheckAfterUnmount","measured","measure","removeTransform","removeElementScroll","roundBox","alwaysMeasureLayout","prevLayout","actual","layoutCorrected","projectionDelta","notifyLayoutMeasure","layoutScroll","scroll","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","measureViewportBox","boxWithoutScroll","scroll_1","applyTransform","transformOnly","withTransforms","boxWithoutTransform","setTargetDelta","targetDelta","setOptions","relativeParent","getClosestProjectingParent","relativeTargetOrigin","targetWithTransforms","attemptToResolveRelativeTarget","pendingAnimation","getLead","treePath","isSharedTransition","treeLength","applyTreeDeltas","projectionDeltaWithTransform","prevTreeScaleX","prevTreeScaleY","prevProjectionTransform","projectionTransform","notifyAll","snapshotLatestValues","mixedValues","relativeLayout","isSharedLayoutAnimation","isOnlyMember","shouldCrossfadeOpacity","hasOpacityCrossfade","mixTargetDelta","mixAxisDelta","mixAxis","mixBox","follow","opacityExit","borderLabel","followRadius","leadRadius","mixValues","completeAnimation","applyTransformsToTarget","initialPromotionConfig","shouldPreserveFollowOpacity","stack","getPrevLead","hasRotate","resetValues","getStaticValue","setStaticValue","syncRender","getProjectionStyles","styleProp","styles","emptyStyles","valuesToRender","_g","transformOrigin","_h","correct","applyTo","corrected","num","resetTree","layout_1","measuredLayout","animationType","axisSnapshot","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","onBeforeLayoutMeasure","notifyBeforeLayoutMeasure","searchNode","roundAxis","LayoutGroupContext","SwitchLayoutGroupContext","VisualElementHandler","_super","getSnapshotBeforeUpdate","updateProps","componentDidUpdate","setProps","preloadedFeatures","createVisualElement","projectionNodeConstructor","useRender","useVisualState","Component","features","loadFeatures","externalRef","layoutGroupId","useLayoutId","inherit","getCurrentTreeVariants","useCreateMotionContext","projectionId","visualState","reducedMotionPreference","lazyContext","presenceContext","visualElementRef","renderer","presenceId","blockInitialAnimation","animationState","animateChanges","notifyUnmount","useVisualElement","ProjectionNodeConstructor","dragConstraints","projection","getLatestValues","useProjection","name_1","useFeatures","Provider","useMotionRef","createMotionProxy","createConfig","customMotionComponentConfig","Proxy","componentCache","_target","lowercaseSVGElements","isSVGComponent","isForcedMotionValue","translateAlias","isCSSVariable","getValueAsType","buildHTMLStyles","vars","transformKeys","hasTransformOrigin","transformIsNone","valueType","valueAsType","transformIsDefault","enableHardwareAcceleration","allowTransformNone","transformString","transformHasZ","numTransformKeys","trim","buildTransform","buildTransformOrigin","copyRawValuesOnly","useHTMLProps","useInitialMotionValues","transformValues","useStyle","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","validMotionProps","isValidMotionProp","isValidProp","shouldForward","require","calcOrigin","dashKeys","camelKeys","buildSVGAttrs","attrX","attrY","pathLength","pathSpacing","pathOffset","attrs","dimensions","pxOriginX","pxOriginY","calcSVGTransformOrigin","spacing","useDashCase","buildSVGPath","createSvgRenderState","useSVGProps","visualProps","rawStyles","createUseRender","forwardMotionProps","filteredProps","isDom","filterProps","CAMEL_CASE_PATTERN","camelToDash","str","renderHTML","setProperty","camelCaseAttributes","renderSVG","renderState","setAttribute","scrapeMotionValuesFromProps","newValues","isAnimationControls","makeState","createRenderState","onMount","makeLatestValues","makeUseVisualState","scrapeMotionValues","motionValues","isControllingVariants","isVariantNode","initialAnimationIsBlocked","variantToSet","resolved","transitionEnd","valueTarget","AnimationType","svgMotionConfig","getBBox","htmlMotionConfig","addDomEvent","eventName","useDomEvent","isMouseEvent","PointerEvent","pointerType","MouseEvent","isTouchEvent","touches","defaultPagePoint","pageX","pageY","pointFromTouch","pointType","changedTouches","pointFromMouse","extractEventInfo","wrapHandler","shouldFilterPrimaryPointer","eventHandler","listener","button","mouseEventNames","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","pointerenter","pointerleave","touchEventNames","getPointerEventName","onpointerdown","ontouchstart","onmousedown","addPointerEvent","usePointerEvent","createLock","lock","globalHorizontalLock","globalVerticalLock","getGlobalLock","openHorizontal_1","openVertical_1","isDragActive","openGestureLock","createHoverEvent","info","Hover","isNodeOrChild","parentElement","useUnmountEffect","observerCallbacks","WeakMap","observers","fireObserverCallback","entry","fireAllObserverCallbacks","entries","thresholdNames","all","useIntersectionObserver","shouldObserve","rootMargin","amount","threshold","rootInteresectionObserver","lookupRoot","rootObservers","IntersectionObserver","initIntersectionObserver","observe","unobserve","observeIntersection","isIntersecting","isInView","hasEnteredView","InView","onViewportEnter","onViewportLeave","useMissingIntersectionObserver","fallback","makeRenderlessComponent","gestureAnimations","whileInView","viewport","onTap","onTapStart","onTapCancel","hasPressListeners","isPressing","cancelPointerEndListeners","removePointerEndListener","checkPointerEnd","Tap","onPointerUp","onPointerCancel","Focus","onHoverStart","onHoverEnd","counter","incrementId","useId","usePresence","register","shallowCompare","prevLength","isZeroValueString","testValueType","dimensionValueTypes","findDimensionValueType","valueTypes","findValueType","setMotionValue","hasValue","getValue","addValue","getOriginFromTransition","animateVariant","variant","transitionOverride","animateTarget","getChildAnimations","variantChildren","forwardDelay","animations","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","notifyAnimationComplete","animateChildren","makeTargetAnimatable","animationTypeState","getState","shouldBlockAnimation","setTarget","sortNodePosition","protectedKeys","needsAnimating","shouldBlock","variantPriorityOrder","Animate","Drag","Exit","reversePriorityOrder","numAnimationTypes","createAnimationState","notifyAnimationStart","resolvedDefinition","animateVisualElement","animateList","createTypeState","allAnimatedKeys","isInitialRender","buildResolvedTypeValues","changedActiveType","getVariantContext","removedKeys","encounteredKeys","removedVariantIndex","Infinity","_loop_1","typeState","propIsVariant","activeDelta","isInherited","manuallyAnimateOnMount","prevProp","variantDidChange","checkVariantsDidChange","shouldAnimateType","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","fallbackAnimation_1","fallbackTarget","getBaseTarget","shouldAnimate","isAnimated","setAnimateFunction","makeAnimator","subscribe","safeToRemove","PanSession","handlers","startEvent","lastMoveEvent","lastMoveEventInfo","updatePoint","getPanInfo","history","isPanStarted","isDistancePastThreshold","onStart","onMove","handlePointerMove","transformPoint","buttons","handlePointerUp","onEnd","onSessionEnd","panInfo","initialInfo","onSessionStart","removeListeners","updateHandlers","subtractPoint","lastDevicePoint","startDevicePoint","timestampedPoint","lastPoint","time","calcRelativeAxisConstraints","calcViewportAxisConstraints","layoutAxis","constraintsAxis","defaultElastic","resolveAxisElastic","dragElastic","minLabel","maxLabel","resolvePointElastic","label","convertBoundingBoxToBox","topLeft","bottomRight","transformBoxPoints","elementDragControls","VisualElementDragControls","openGlobalLock","isDragging","currentDirection","constraints","hasMutatedConstraints","elastic","originEvent","snapToCursor","panSession","dragPropagation","onDragStart","resolveConstraints","getAxisMotionValue","measuredAxis","dragDirectionLock","onDirectionLock","onDrag","lockThreshold","getCurrentDirection","updateAxis","getTransformPagePoint","onDragEnd","_point","shouldDrag","axisValue","prevConstraints","resolveRefConstraints","layoutBox","calcRelativeConstraints","resolveDragElastic","relativeConstraints","rebaseAxisConstraints","onMeasureDragConstraints","constraintsElement","constraintsBox","rootProjectionNode","viewportBox","measurePageBox","measuredConstraints","calcViewportConstraints","userConstraints","convertBoxToBoundingBox","dragMomentum","dragTransition","dragSnapToOrigin","onDragTransitionEnd","momentumAnimations","startAxisValueAnimation","dragKey","scalePositionWithinConstraints","boxProgress","sourceLength","targetLength","addListeners","stopPointerListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","onPan","onPanStart","onPanEnd","onPanSessionStart","hasPanEvents","groupDragControls","dragControls","names","treeType","build","renderInstance","readValueFromInstance","removeValueFromRenderState","removeFromVariantTree","isMounted","lifecycles","managers","propSubscriptions","clearAllListeners","manager","updatePropListeners","on","propListener","createLifecycles","valueSubscriptions","prevMotionValues","baseTarget","triggerBuild","notifyUpdate","bindToMotionValue","removeOnChange","latestValue","removeOnRenderRequest","initialMotionValues","newInstance","addVariantChild","closestVariantNode","getClosestVariantNode","other","getLayoutId","setVisibility","canMutate","removeValue","readValue","setBaseTarget","newProps","nextValue","prevValue","existingValue","updateMotionValuesFromProps","getVariant","startAtParent","context_1","numVariantProps","variantProps","cssVariableRegex","getVariableValue","parseCSSVariable","BoundingBoxDimension","positionalKeys","isPositionalKey","setAndResetVelocity","isNumOrPxType","getPosFromMatrix","matrix","getTranslateFromMatrix","pos2","pos3","_bbox","matrix3d","nonTranslationalTransformKeys","positionalValues","unitConversion","hasPositionalKey","targetPositionalKeys","removedTransformValues","hasAttemptedToRemoveTransformValues","changedValueTypeKeys","toType","fromType","numKeyframes","fromIndex","removedTransforms","removeNonTranslationalTransform","convertedTarget","changedKeys","originBbox","elementComputedStyle","targetBbox","convertChangedValueTypes","checkAndConvertChangedValueTypes","htmlConfig","domElement","defaultType","compareDocumentPosition","restoreTransform","mutableState","getOrigin","newValueKeys","numNewValues","targetValue","checkTargetForNewValues","resolveCSSVariables","parseDomVariant","htmlVisualElement","svgVisualElement","pixelsToPercent","pixels","correctBorderRadius","varToken","correctBoxShadow","original","containsCSSVariables","cssVariables","shadow","xScale","yScale","averageScale","i_1","cssVariable","MeasureLayoutWithContext","componentDidMount","correctors","layoutGroup","switchLayoutGroup","defaultScaleCorrectors","group","layoutDependency","componentWillUnmount","promoteContext","deregister","boxShadow","layoutFeatures","DocumentProjectionNode","passive","documentNode","featureBundle","motion","baseConfig","SVG","xmlns","viewBox","Path","icon","className","extraProps","iconClass","additionalProps","isValidElement","Dashicon","cloneElement","appliedProps","ComponentsContext","useComponentsContext","useContextSystemBridge","parentContext","valueRef","effect","deps","mounted","isEqual","useUpdateEffect","merge","ContextSystemProvider","contextValue","CONNECT_STATIC_NAMESPACE","getStyledClassNameFromKey","memoize","namespace","kebabCase","StyleSheet","_insertTag","tag","before","tags","insertionPoint","nextSibling","prepend","firstChild","insertBefore","isSpeedy","speedy","ctr","nonce","_proto","hydrate","insert","rule","appendChild","createTextNode","createStyleElement","sheet","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","flush","removeChild","fromCharCode","replacement","indexof","search","charCodeAt","begin","line","column","character","characters","return","copy","peek","caret","alloc","dealloc","delimit","delimiter","whitespace","escaping","count","commenter","identifier","MS","MOZ","WEBKIT","COMMENT","DECLARATION","KEYFRAMES","hash","compile","rules","rulesets","pseudo","points","declarations","atrule","property","variable","scanning","ampersand","comment","declaration","ruleset","post","identifierWithPointTracking","fixedElements","compat","isImplicitRule","toRules","getRules","parentRules","removeLabel","defaultStylisPlugins","ssrStyles","querySelectorAll","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","currentSheet","collection","finalizingPlugins","selector","serialized","shouldCache","stylis","registered","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","order","orphans","tabSize","widows","zoom","WebkitLineClamp","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeWidth","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","processStyleValue","p1","cursor","handleInterpolation","mergedProps","interpolation","__emotion_styles","anim","_key","interpolated","createStringFromObject","previousCursor","cached","labelPattern","stringMode","strings","raw","identifierName","EmotionCacheContext","CacheProvider","registeredStyles","rawClassName","isStringTag","insertWithoutScoping","classnames","cls","toAdd","_createEmotion","_len","cx","_len4","_key4","injectGlobal","_len3","_key3","_len2","_key2","ids","getRegisteredStyles","isSerializedStyles","useCx","innerCx","insertStyles","useContextSystem","contextSystemProps","contextProps","finalComponentProps","_overrides","overrideProps","otherContextProps","initialMergedProps","rendered","renderChildren","contextConnect","WrappedComponent","forwardsRef","mergedNamespace","_contextConnect","getConnectNamespace","namespaces","hasConnectNamespace","visuallyHidden","border","clip","WebkitClipPath","clipPath","wordWrap","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","Styled","finalTag","classInterpolations","theme","finalShouldForwardProp","ele","possiblyStyleElement","withComponent","nextTag","nextOptions","View","forwardedRef","disabledEventsOnDisabledButton","Button","href","isSmall","isPressed","isBusy","isDestructive","iconPosition","iconSize","showTooltip","tooltipPosition","shortcut","text","__experimentalIsFocusable","describedBy","isDefault","isPrimary","isSecondary","isTertiary","isLink","otherProps","computedVariant","deprecated","since","alternative","useDeprecatedProps","instanceId","useInstanceId","hasChildren","Tag","tagProps","disabledEvent","shouldShowTooltip","descriptionId","describedById","previousScrollTop","setLocked","locked","methodName","classList","lockCounter","registerSlot","unregisterSlot","registerFill","unregisterFill","getSlot","getFills","FillComponent","slot","SlotFillContext","setSlot","useSlot","forceUpdate","fillProps","createPortal","isFunction","maybeFunc","SlotComponent","super","isUnmounted","bindNode","fills","fillChildren","Children","childIndex","childKey","isEmptyElement","OWN_KEYS_SYMBOL","TRACK_MEMO_SYMBOL","GET_ORIGINAL_SYMBOL","getProto","objectsToTrack","isObjectToTrack","isObject","unfrozenCache","getOriginalObject","affected","proxyCache","frozen","isFrozen","handlerAndState","origObj","recordUsage","skipWithOwnKeys","trackObject","used","createProxy","Reflect","deleteProperty","newProxy","unfrozen","descriptors","desc","isOwnKeysChanged","prevObj","nextObj","prevKeys","nextKeys","isChanged","hit","changed","markToTrack","mark","refSet","VERSION","LISTENERS","SNAPSHOT","proxyFunction","objectIs","canProxy","ArrayBuffer","PROMISE_RESULT","PROMISE_ERROR","snapshotCache","createSnapshot","receiver","snapshot2","errorOrPromise","freeze","versionHolder","proxyFunction2","initialObject","found","listeners","op","nextVersion","propListeners","getPropListener","newOp","popPropListener","baseObject","proxyObject","childListeners","deleted","hasPrevValue","catch","buildProxyFunction","console","warn","useSnapshot","notifyInSync","lastSnapshot","lastAffected","inRender","currSnapshot","unsub","promise","ops","nextSnapshot","currAffected","pathList","list","seen","walk","useAffectedDebugValue","proxyMap","record","toJSON","cb","seal","slots","updateSlot","registry","slotRef","fillRef","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","rng","uuid","byteToHex","buf","rnds","uuidCache","memoizedCreateCacheWithContainer","createCache","useForceUpdate","setState","Fill","rerender","wrappedChildren","useMergeRefs","SlotFillProvider","valRef","isShallowEqual","slotFills","useSlotRegistry","hasFills","previousSlot","triggerListeners","forceUpdateSlot","slotInstance","Slot","bubblesVirtually","createSlotFill","__unstableName","POSITION_TO_PLACEMENT","middle","PLACEMENT_TO_ANIMATION_ORIGIN","getFrameOffset","iframeRect","getSide","getMainAxisFromPlacement","getCrossAxis","limitShift","middlewareArguments","checkMainAxis","checkCrossAxis","coords","mainAxisCoord","crossAxisCoord","rawOffset","computedOffset","additionalFrameOffset","frameOffset","limitMin","limitMax","isOriginSide","SLOT_NAME","ArrowTriangle","role","vectorEffect","AnimatedWrapper","receivedInlineStyles","hasAnimatedOnce","setHasAnimatedOnce","motionInlineStyles","otherMotionProps","translateProp","translateDirection","placementToMotionAnimationProps","onAnimationComplete","computedAnimationProps","div","slotNameContext","Popover","headerTitle","onClose","noArrow","isAlternate","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","shift","__unstableForcePosition","__unstableShift","anchorRef","anchorRect","getAnchorRect","range","contentProps","computedFlipProp","computedResizeProp","shouldShift","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","frameOffsetRef","offsetMiddleware","flipMiddleware","sizeProps","firstElementChild","availableHeight","availableWidth","limiter","customLimitShift","slotName","onDialogClose","dialogRef","dialogProps","useDialog","__unstableOnClose","referenceCallbackRef","computedPlacement","arrowData","referenceParam","floatingParam","updateParam","ancestorScroll","ancestorResize","elementResize","animationFrame","ResizeObserver","disconnect","autoUpdate","arrowCallbackRef","resultingReferenceOwnerDoc","fallbackDocument","startContainer","getReferenceOwnerDocument","resultingReferenceElement","referenceElement","topRect","bottomRect","DOMRect","getReferenceElement","updateFrameOffset","mergedFloatingRef","content","close","isFinite","__unstableSlotNameProvider","displayText","ariaLabel","TOOLTIP_DELAY","eventCatcher","getDisabledElement","childrenWithPopover","mergedRefs","getRegularElement","emitToChild","isMouseDown","setIsMouseDown","isOver","setIsOver","delayedSetIsOver","useDebounce","popoverAnchor","setPopoverAnchor","existingChildRef","mergedChildRefs","createMouseDown","cancelIsMouseDown","createMouseUp","createMouseEvent","createToggleIsOver","isDelayed","_isOver","clearOnUnmount","onMouseEnter","onMouseLeave","onBlur","grandchildren","getElementWithPopover","concatChildren","addPopoverToGrandchildren","GRID","ALIGNMENT_LABEL","ALIGNMENTS","flat","transformValue","getItemId","prefixId","grad","turn","rad","PI","floor","M","$","isValid","brightness","isDark","isLight","toHex","toRgb","toRgbString","toHsl","toHslString","toHsv","invert","saturate","desaturate","grayscale","lighten","darken","S","white","bisque","cadetblue","chartreuse","chocolate","coral","antiquewhite","aqua","azure","whitesmoke","papayawhip","plum","blanchedalmond","black","gold","goldenrod","gainsboro","cornsilk","cornflowerblue","burlywood","aquamarine","beige","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkkhaki","darkgray","darkgreen","darkgrey","peachpuff","darkmagenta","darkred","darkorchid","darkorange","darkslateblue","gray","darkslategray","darkslategrey","deeppink","deepskyblue","wheat","firebrick","floralwhite","ghostwhite","darkviolet","magenta","dodgerblue","grey","honeydew","hotpink","blueviolet","forestgreen","lawngreen","indianred","indigo","fuchsia","brown","maroon","mediumblue","lightcoral","darkturquoise","lightcyan","ivory","lightyellow","lightsalmon","lightseagreen","linen","mediumaquamarine","lemonchiffon","lime","khaki","mediumseagreen","limegreen","mediumspringgreen","lightskyblue","lightblue","midnightblue","lightpink","mistyrose","moccasin","mintcream","lightslategray","lightslategrey","navajowhite","navy","mediumvioletred","powderblue","palegoldenrod","oldlace","paleturquoise","mediumturquoise","mediumorchid","rebeccapurple","lightsteelblue","mediumslateblue","thistle","tan","orchid","mediumpurple","purple","pink","skyblue","springgreen","palegreen","yellow","slateblue","lavenderblush","peru","palevioletred","violet","teal","slategray","slategrey","aliceblue","darkseagreen","darkolivegreen","greenyellow","seagreen","seashell","tomato","silver","sienna","lavender","lightgreen","orange","orangered","steelblue","royalblue","turquoise","yellowgreen","salmon","saddlebrown","sandybrown","rosybrown","darksalmon","lightgoldenrodyellow","snow","lightgrey","lightgray","dimgray","dimgrey","olivedrab","olive","toName","closest","hexValue","colord","extend","namesPlugin","GRAY","UI","background","backgroundDisabled","borderHover","borderFocus","borderDisabled","textDisabled","textDark","darkGrayPlaceholder","lightGrayPlaceholder","COLORS","ui","reduceMotion","rootBase","Root","Row","pointBase","pointActive","Point","Cell","tooltipText","CellView","useSealedState","initialState","groupItems","groups","_loop","flatten","grid","flattened","row","findEnabledItemById","applyState","argument","currentValue","isUpdater","unstable_useIdState","initialBaseId","idCountRef","setBaseId","isElementPreceding","element1","element2","DOCUMENT_POSITION_PRECEDING","findDOMIndex","currentItem","getMaxLength","rows","maxLength","verticalizeItems","verticalized","fillGroups","previousItem","nullItem","getItemsInGroup","horizontal","vertical","addItemAtIndex","sortBasedOnDOMPosition","pairs","isOrderDifferent","indexA","indexB","elementA","elementB","_ref3","setItemsBasedOnDOMPosition","setItems","sortedItems","useSortBasedOnDOMPosition","previousItems","_firstItem$ref$curren","firstItem","nextItems","_ret","getCommonParent","observer","timeout","useTimeoutObserver","reducer","virtual","rtl","wrap","pastIds","moves","includesBaseElement","unstable_includesBaseElement","initialVirtual","initialRTL","initialOrientation","initialCurrentId","initialLoop","initialWrap","initialShift","hasSetCurrentId","_group","_id","nextGroups","_item","_group2","_r$ref$current","nextItem","_index","nextState","_id2","nextPastIds","pastId","_nextState","nextId","_id3","filteredPastIds","_nextPastIds","_nextState2","_item2","allItems","currentIndex","_nextItems","nextItemsInGroup","allTheWay","_nextItem2","oppositeOrientation","getOppositeOrientation","canLoop","canWrap","hasNullItem","shouldInsertNullItem","placeItemsAfter","_nextItem3","_nextItem4","_nextId","_nextItem","_hasNullItem","_nextState3","verticalItems","_hasNullItem2","_nextState4","_shouldShift","_verticalItems","_hasNullItem3","_nextState5","_nextState6","useAction","useCompositeState","_useSealedState","_useSealedState$unsta","_useSealedState$rtl","_useSealedState$loop","_useSealedState$wrap","_useSealedState$shift","idState","_React$useReducer","useReducer","_React$useReducer$","dispatch","hasActiveWidget","setHasActiveWidget","isUnmountedRef","useIsUnmountedRef","unstable_setHasActiveWidget","registerGroup","unregisterGroup","move","unstable_setVirtual","setRTL","setOrientation","setLoop","setWrap","setShift","unstable_setIncludesBaseElement","createFocusEvent","FocusEvent","fireBlurEvent","defaultAllowed","bubbleInit","isIE11","useKeyboardEventProxy","htmlEventHandler","eventHandlerRef","_eventHandlerRef$curr","canProxyKeyboardEvent","currentElement","KeyboardEvent","initKeyboardEvent","altKey","shiftKey","createKeyboardEvent","isItem","useComposite","htmlOnFocusCapture","onFocusCapture","htmlOnKeyDownCapture","onKeyDownCapture","htmlOnKeyUpCapture","onKeyUpCapture","previousElementRef","onFocusCaptureRef","scheduleUserFocus","currentItemRef","scheduled","_currentItemRef$curre","useScheduleUserFocus","activeElementRef","elementRef","useActiveElementRef","_onFocusCaptureRef$cu","previousActiveElement","relatedTarget","previousActiveElementWasItem","nextActiveElement","getNextActiveElementOnBlur","nextActiveElementIsItem","_options$groups","keyMap","_options$move","tabbableHTMLProps","Composite","useGroup","_","useCompositeGroup","prevCurrentItem","nextCurrentItem","prevGroupId","nextGroupId","_options$registerGrou","_options$unregisterGr","CompositeGroup","gridTemplateRows","disablePointerEvents","CellBase","BASE_SIZE","noop","AlignmentMatrixControl","immutableDefaultValue","useBaseId","cells","cell","cellId","getDefaultOrigin","getAnimateClassName","yAxis","xAxis","useIsMounted","Icon","alignIndex","getAlignmentIndex","align","PresenceChild","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","e_1","__values","e_1_1","getChildKey","AnimatePresence","exitBeforeEnter","forcedRenderCount","setForcedRenderCount","forceRender","forceRenderLayoutGroup","filteredChildren","filtered","onlyElements","childrenToRender","exiting","presentChildren","allChildren","updateChildLookup","presentKeys","targetKeys","numPresent","insertionIndex","removeIndex","presentChild","FlexContext","flexItemDisplay","Flex","Item","block","ItemsColumn","ItemsRow","useFlexItem","displayProp","isBlock","sx","contextDisplay","Base","flexBlockProps","useFlexBlock","flexItemProps","breakpoints","useBreakpointIndex","defaultIndex","RangeError","onResize","newValue","bp","useResponsiveValue","space","asInt","CSS","supports","useFlex","directionProp","expanded","gap","justify","isReversed","isColumn","isReverse","base","alignItems","flexDirection","flexWrap","justifyContent","Truncate","isValueDefined","getDefinedValue","fallbackValue","ensureNumber","stringToNumber","TRUNCATE_ELLIPSIS","TRUNCATE_TYPE","auto","none","TRUNCATE_DEFAULT_PROPS","ellipsis","ellipsizeMode","limit","numberOfLines","truncateMiddle","word","headLength","tailLength","wordLength","frontLength","backLength","truncateStr","useTruncate","truncatedContent","words","truncateHead","truncateTail","truncateContent","shouldTruncate","colorComputationNode","getComputedBackgroundColor","getColorComputationNode","computedColor","CONTROL_PROPS","controlSurfaceColor","controlTextActiveColor","controlPaddingX","controlPaddingXLarge","controlPaddingXSmall","controlBackgroundColor","controlBorderRadius","controlBorderColor","controlBoxShadow","controlBorderColorHover","controlBoxShadowFocus","controlDestructiveBorderColor","controlHeight","controlHeightXSmall","controlHeightSmall","controlHeightLarge","controlHeightXLarge","TOGGLE_GROUP_CONTROL_PROPS","toggleGroupControlBackgroundColor","toggleGroupControlBorderColor","toggleGroupControlBackdropBackgroundColor","toggleGroupControlBackdropBorderColor","toggleGroupControlBackdropBoxShadow","toggleGroupControlButtonColorActive","colorDivider","colorScrollbarThumb","colorScrollbarThumbHover","colorScrollbarTrack","elevationIntensity","radiusBlockUi","borderWidthFocus","borderWidthTab","spinnerSize","fontSize","fontSizeH1","fontSizeH2","fontSizeH3","fontSizeH4","fontSizeH5","fontSizeH6","fontSizeInputMobile","fontSizeMobile","fontSizeSmall","fontSizeXSmall","fontLineHeightBase","fontWeightHeading","gridBase","cardBorderRadius","cardPaddingXSmall","cardPaddingSmall","cardPaddingMedium","cardPaddingLarge","surfaceBackgroundColor","surfaceBackgroundSubtleColor","surfaceBackgroundTintColor","surfaceBorderColor","surfaceBorderBoldColor","surfaceBorderSubtleColor","surfaceBackgroundTertiaryColor","surfaceColor","transitionDuration","transitionDurationFast","transitionDurationFaster","transitionDurationFastest","transitionTimingFunction","transitionTimingFunctionControl","Text","CONFIG","positive","destructive","muted","highlighterText","upperCase","memoizedLowercaseProps","mapped","PRESET_FONT_SIZES","caption","footnote","largeTitle","subheadline","title","HEADING_FONT_SIZES","flatMap","getFontSize","ratio","getHeadingFontSize","headingSize","useText","adjustLineHeightForInnerControls","highlightEscape","highlightCaseSensitive","highlightWords","highlightSanitize","letterSpacing","lineHeightProp","optimizeReadabilityFor","truncate","weight","isHighlighter","isCaption","activeClassName","activeIndex","activeStyle","highlightClassName","highlightStyle","highlightTag","unhighlightClassName","unhighlightStyle","HighlightTag","highlightStyles","highlightIndex","highlightClassNames","textContent","highlightClass","createHighlighterText","finalEllipsizeMode","truncateProps","getLineHeight","textAlign","optimalTextColor","isOptimalTextColorDark","getOptimalTextColor","getOptimalTextShade","textProps","baseLabelTypography","LOWER_LEFT_REGEXP","LOWER_RIGHT_REGEXP","UPPER_LEFT_REGEXP","UPPER_RIGHT_REGEXP","getConvertedKey","convertLTRToRTL","ltrStyles","fromEntries","rtlStyles","watch","rootFocusedStyles","isFocused","Container","__unstableInputWidth","labelPosition","getSizeConfig","inputSize","__next36pxDefaultSize","sizes","minHeight","small","Input","defaultArrowStyles","activeDragCursorStyles","dragCursor","paddingInlineStart","paddingInlineEnd","BaseLabel","Label","LabelWrapper","FlexItem","BackdropUI","borderStyle","Prefix","Suffix","MemoizedBackdrop","hideLabelFromVision","htmlFor","InputBase","idProp","useUniqueId","hideLabel","prefixSuffixContextValue","InputControlPrefixWrapper","InputControlSuffixWrapper","getUIFlexProps","V","toVector","v1","v2","sub","addTo","subTo","rubberband","dimension","constant","rubberbandIfOutOfBounds","EVENT_TYPE_MAP","pointer","change","mouse","touch","gesture","capitalize","pointerCaptureEvents","parseProp","eventKey","substring","captureKey","device","isTouch","getValueEvent","targetTouches","getTouchList","pointerId","valueEvent","pointerValues","clientX","clientY","chain","fns","assignDefault","CoordinatesEngine","ctrl","computeValues","computeInitial","shared","eventStore","gestureEventStores","timeoutStore","gestureTimeoutStores","sharedConfig","ingKey","_active","_blocked","_force","intentional","_movement","_distance","_direction","_delta","_bounds","elapsedTime","_movementBound","movement","timeStamp","lastOffset","startTime","_values","_initial","compute","dt","pointerIds","touchIds","pointerLockElement","payload","getEventDetails","pressed","_absoluteDelta","_m0","_m1","t0","t1","hasCustomTransform","sign","v0","intent","bounds","setup","previousOffset","computeOffset","absoluteDelta","ox","oy","x0","x1","y0","y1","Vx","Vy","Rx","Ry","X0","X1","Y0","Y1","computeRubberband","computeMovement","emit","clean","triggerAllEvents","aliasKey","dx","dy","selectAxis","lockDirection","restrictVectorToAxis","identity","commonConfigResolver","enabled","_k","coordinatesConfigResolver","_v","KEYS_DELTA_MAP","factor","isTouchScreen","maxTouchPoints","SUPPORT","GestureEvent","supportsGestureEvents","touchscreen","pointerLock","dragConfigResolver","useTouch","preventScrollAxis","pointerCapture","pointerButtons","filterTaps","tapsThreshold","swipe","scaleBounds","angleBounds","_scaleBounds","_angleBounds","mouseOnly","hoverConfigResolver","ConfigResolverMap","engine","resolver","_pointerId","_pointerActive","_keyboardActive","_preventScroll","_delayed","canceled","boundRect","targetRect","pointerClean","pointerDown","setEventIds","setPointerCapture","setupPointer","setupScrollPrevention","setupDelayTrigger","startPointerDrag","pointerMove","movementX","movementY","pointerUp","hasPointerCapture","releasePointerCapture","_unused","dirx","diry","vx","vy","mx","my","svx","svy","sy","sdt","pointerClick","requestPointerLock","exitPointerLock","persist","persistEvent","keyDown","deltaFn","keyUp","bindFunction","enter","leave","sharedConfigResolver","eventOptions","_excluded","resolveWith","resolvers","EventStore","_ctrl","deviceProps","toDomEventType","_listeners","TimeoutStore","ms","_timeouts","Controller","internalHandlers","setupGesture","wheel","pinch","_event$currentTarget","_event$currentTarget$","getCurrentTargetTouchList","applyHandlers","nativeHandlers","applyConfig","gestureKey","rest","sourceSymbolKeys","_objectWithoutProperties","_config","_targetEventStore","gestures","bindToProps","handlerProp","withPassiveOption","isNative","_options$capture","_options$passive","actionKey","toHandlerProp","useRecognizers","initialStateReducer","initialInputControlState","initialValue","isDragEnabled","isPressEnterToChange","CHANGE","COMMIT","CONTROL","DRAG_END","DRAG_START","DRAG","INVALIDATE","PRESS_DOWN","PRESS_ENTER","PRESS_UP","RESET","mergeInitialState","inputControlStateReducer","composedStateReducers","actions","_event","ForwardedComponent","dragDirection","dragThreshold","onValidate","setIsFocused","stateReducer","valueProp","commit","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","onChangeHandler","createChangeEvent","createKeyEvent","createDragEvent","currentState","refProps","useInputControlStateReducer","wasDirtyOnBlur","getDragCursor","useDragCursor","handleOnCommit","dragGestureProps","useDrag","dragProps","dragging","handleOnMouseDown","validity","valid","InputControl","__unstableStateReducer","draftHookProps","refPreviousValue","draft","setDraft","previousValue","isStale","useDraft","htmlArrowStyles","hideHTMLArrows","getNumber","sum","getPrecision","baseValue","roundClamp","stepValue","precision","rounded","clampedValue","NumberControl","stateReducerProp","isShiftStepEnabled","required","shiftStep","typeProp","isStepAny","baseStep","constrainValue","stepOverride","autoComplete","inputMode","baseState","inputControlActionTypes","enableShift","incrementalValue","isEmptyString","isValueEmpty","diff","subtract","modifier","directionModifier","ceil","applyEmptyValue","numberControlStateReducer","deprecatedBottomMargin","__nextHasNoMarginBottom","CircleRoot","CircleIndicatorWrapper","CircleIndicator","CIRCLE_SIZE","angleCircleRef","angleCircleCenter","previousCursorValue","changeAngleToPosition","centerX","centerY","pointX","pointY","angleInRadians","atan2","angleInDeg","getAngle","startDrag","useDragging","setAngleCircleCenter","onDragMove","isDefined","Spacer","spacerProps","marginX","marginY","paddingX","paddingY","useSpacer","AnglePickerControl","hint","unprocessedValue","inputValue","ALL_UNICODE_DASH_CHARACTERS","normalizeTextString","toLocaleLowerCase","escapeRegExp","useAutocomplete","onReplace","completers","contentRef","debouncedSpeak","speak","selectedIndex","setSelectedIndex","filteredOptions","setFilteredOptions","filterValue","setFilterValue","autocompleter","setAutocompleter","AutocompleterUI","setAutocompleterUI","backspacing","select","option","getOptionCompletion","isDisabled","completion","triggerPrefix","toInsert","html","renderToString","insertCompletion","isCollapsed","getTextContent","textAfterSelection","completer","allowContext","lastIndexOf","textWithoutTrigger","mismatch","hasOneTriggerWord","matchingWhileBackspacing","safeTrigger","query","useItems","isDebounced","loadOptions","debounce","optionsData","keyedOptions","optionData","optionIndex","getOptionLabel","keywords","getOptionKeywords","isOptionDisabled","maxResults","keyword","filterOptions","getDefaultUseItems","listBoxId","onChangeOptions","onSelect","onReset","useAnchor","editableContentElement","getAutoCompleterUI","selectedKey","activeId","popover","sprintf","_n","announce","useAutocompleteProps","useRefEffect","_onKeyDown","Autocomplete","isSelected","mobileTextMinFontSize","font","FONT","boxSizingReset","Wrapper","StyledField","labelStyles","StyledLabel","StyledHelp","StyledVisualLabel","BaseControl","help","VisualLabel","BorderBoxControl","LinkedBorderControl","BorderBoxStyleWithFallback","CenteredBorderControl","isLinked","buttonProps","useBorderBoxControlLinkedButton","link","linkOff","rtlWatchResult","borderLeft","borderRight","useBorderBoxControlVisualizer","fillRule","clipRule","ValueInput","baseUnitLabelStyles","selectSize","large","UnitLabel","UnitSelect","focusBoxShadow","borderControl","wrapperWidth","UnitControlWrapper","borderControlPopoverControls","swatchSize","borderControlPopoverContent","borderColorIndicator","resetButton","borderControlStylePicker","borderStyleButton","BORDER_STYLES","lineSolid","lineDashed","lineDotted","buttonClassName","useBorderControlStylePicker","colorValue","Dropdown","renderContent","renderToggle","contentClassName","popoverProps","onToggle","fallbackPopoverAnchor","setFallbackPopoverAnchor","containerRef","isOpen","setIsOpen","onStateChange","useObservableState","popoverPropsHaveAnchor","dialog","derivedProps","Select","DownArrowWrapper","InputControlSuffixWrapperWithClickThrough","chevronDown","SelectControl","multiple","helpId","selectedOptions","selected","defaultOptions","internalState","setInternalState","hasCurrentState","floatClamp","rangeHeight","marks","BeforeIconWrapper","AfterIconWrapper","Rail","railColor","Track","trackColor","MarksWrapper","Mark","isFilled","MarkLabel","thumbColor","ThumbWrapper","Thumb","thumbSize","InputRange","Tooltip","InputNumber","ActionRightWrapper","RangeMark","labelClasses","RangeRail","restProps","Marks","stepProp","marksData","placedMarks","offsetStyle","useMarks","SimpleTooltip","inputRef","renderTooltipContent","setPosition","setTooltipPosition","useTooltipPosition","RangeControl","UnforwardedRangeControl","afterIcon","allowReset","beforeIcon","colorProp","currentInput","initialPosition","onMouseMove","resetFallbackValue","showTooltipProp","withInputField","settings","useControlledState","useControlledRangeValue","isResetPendent","hasTooltip","hasInputField","setShowTooltip","isCurrentlyFocused","isThumbFocused","isValueReset","inputSliderValue","rangeFillValue","fillValueOffset","wrapperClasses","enableTooltip","handleOnReset","resetValue","onChangeResetValue","H_ALIGNMENTS","bottomLeft","center","edge","stretch","topRight","V_ALIGNMENTS","getValidChildren","useHStack","alignment","getAlignmentProps","clonedChildren","childElement","hStackProps","NumberControlWrapper","InputControlContainer","InnerSelectControl","InnerRangeControl","interactiveHueStyles","AuxiliaryColorArtefactWrapper","AuxiliaryColorArtefactHStackHeader","HStack","ColorInputWrapper","ColorfulWrapper","CopyButton","getWindowScroll","isHTMLElement","getNodeName","getWindowScrollBarX","isScrollParent","_getComputedStyle","getCompositeRect","elementOrVirtualElement","isFixed","isOffsetParentAnElement","offsets","getNodeScroll","getLayoutRect","getParentNode","getScrollParent","listScrollParents","scrollParent","isBody","updatedList","isTableElement","getTrueOffsetParent","currentNode","getContainingBlock","basePlacements","popper","variationPlacements","modifierPhases","modifiers","visited","requires","requiresIfExists","dep","depModifier","DEFAULT_OPTIONS","areValidElements","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","pending","orderedModifiers","modifiersData","attributes","effectCleanupFns","isDestroyed","cleanupModifierEffects","scrollParents","merged","phase","orderModifiers","existing","_ref3$options","_state$elements","_state$orderedModifie","_state$orderedModifie2","onFirstUpdate","_options$scroll","_options$resize","getBasePlacement","getVariation","computeOffsets","basePlacement","variation","commonX","commonY","unsetSides","mapToStyles","_Object$assign2","popperRect","gpuAcceleration","adaptive","roundOffsets","dpr","devicePixelRatio","roundOffsetsByDPR","_ref3$x","_ref3$y","hasX","hasY","sideX","sideY","_Object$assign","commonStyles","_ref4","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","popperOffsets","initialStyles","attribute","_options$offset","invertDistance","skidding","distanceAndSkiddingToXY","_data$state$placement","getOppositePlacement","matched","getOppositeVariationPlacement","rootNode","isShadowRoot","isSameNode","rectToClientRect","getClientRectFromMixedType","clippingParent","getViewportRect","getInnerBoundingClientRect","getDocumentRect","mergePaddingObject","paddingObject","expandToHashMap","hashMap","detectOverflow","_options$placement","_options$boundary","_options$rootBoundary","_options$elementConte","_options$altBoundary","_options$padding","altContext","clippingClientRect","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","_skip","_options$mainAxis","_options$altAxis","altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","computeAutoPlacement","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","fittingPlacement","within","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","tetherOffsetValue","mainSide","altSide","additive","maxLen","arrowElement","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_mainSide","_altSide","_offset","_preventedOffset","_state$modifiersData$","minProp","maxProp","endDiff","startDiff","clientSize","centerToReference","axisProp","_options$element","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","eventListeners","isSafari","prevStyles","usePopoverState","_useSealedState$gutte","gutter","_useSealedState$place","sealedPlacement","unstable_flip","sealedOffset","unstable_offset","_useSealedState$unsta2","unstable_preventOverflow","_useSealedState$unsta3","unstable_fixed","fixed","_useSealedState$modal","modal","sealed","referenceRef","popoverRef","originalPlacement","place","setPlacement","_React$useState4","popoverStyles","setPopoverStyles","_React$useState5","arrowStyles","setArrowStyles","initialModal","disclosure","lastValue","_useSealedState$visib","visible","initialVisible","_useSealedState$anima","animated","initialAnimated","setVisible","setAnimated","_React$useState3","animating","setAnimating","lastVisible","visibleHasChanged","toggle","useDisclosureState","setModal","disclosureRef","unstable_disclosureRef","useDialogState","updateState","_arrowRef$current","_popper$current","unstable_referenceRef","unstable_popoverRef","unstable_arrowRef","unstable_popoverStyles","unstable_arrowStyles","unstable_update","unstable_originalPlacement","globalState","currentTooltipId","TOOLTIP_STATE_KEYS","TOOLTIP_KEYS","useTooltipReference","htmlOnBlur","htmlOnMouseEnter","htmlOnMouseLeave","onBlurRef","onMouseEnterRef","onMouseLeaveRef","_options$show","_onBlurRef$current","_options$hide","_onMouseEnterRef$curr","_options$show2","_onMouseLeaveRef$curr","_options$hide2","TooltipReference","TooltipContext","useDisclosureContent","htmlOnTransitionEnd","onTransitionEnd","htmlOnAnimationEnd","onAnimationEnd","setTransition","hidden","onTransitionEndRef","onAnimationEndRef","_options$stopAnimatio","_onTransitionEndRef$c","_onAnimationEndRef$cu","DisclosureContent","getBodyElement","PortalContext","hostNode","__className","globallyHideTooltipOnEscape","__selector","useTooltip","_ref$unstable_portal","unstable_portal","htmlWrapElement","_options$unstable_pop","asProp","TooltipContent","TooltipPopoverView","noOutline","TooltipShortcut","Shortcut","tooltip","ConnectedTooltip","animationDuration","unstable_timeout","initialTimeout","showTimeout","hideTimeout","_usePopoverState","clearTimeouts","unstable_setTimeout","useTooltipState","referenceProps","ColorCopyButton","colorType","copiedColor","setCopiedColor","copyTimer","copyRef","useCopyToClipboard","InputWithSlider","abbreviation","RgbInput","enableAlpha","nextR","nextG","nextB","trunc","nextA","HslInput","nextH","nextS","nextL","HexInput","nativeEvent","inputType","ColorInput","useEventCallback","callbackRef","getRelativePosition","preventDefaultMove","Interactive","React","onKey","onMoveCallback","onKeyCallback","hasTouch","handleMove","toggleDocumentEvents","handleMoveEnd","toggleEvent","self","keyCode","handleMoveStart","handleKeyDown","onTouchStart","formatClassName","Pointer","nodeClassName","digits","hsvaToHsla","hh","hsvaToHslString","hsva","hsvaToHslaString","hsvaToRgba","rgbaStringToHsva","rgbaString","rgbaToHsva","rgbStringToHsva","Hue","interaction","aria-label","aria-valuetext","Saturation","containerStyle","equalColorString","useColorManipulation","colorModel","onChangeCallback","toHsva","updateHsva","equal","newHsva","newColor","equalColorObjects","fromHsva","handleChange","params","styleElement","useStyleSheet","innerHTML","__webpack_nonce__","ColorPicker","defaultColor","Alpha","gradientStyle","backgroundImage","AlphaColorPicker","RgbaStringColorPicker","RgbStringColorPicker","Picker","rgbColor","nextColor","useControlledValue","ConnectedColorPicker","copyFormat","divProps","setColor","safeColordColor","debouncedSetColor","setColorType","nextColorType","getColorFromLegacyProps","transformColorStringToLegacyColor","colordColor","rgb","hsv","hsl","oldHue","LegacyAdapter","onChangeComplete","legacyChangeHandler","disableAlpha","isLegacyProps","CircularOptionPicker","Option","selectedIconProps","optionButton","ButtonAction","DropdownLinkAction","dropdownProps","linkText","vStackProps","useVStack","headerProps","level","a11yProps","useHeading","ColorHeading","Heading","DropdownContentWrapperDiv","paddingSize","paddingValues","medium","SinglePalette","clearColor","colorOptions","contrast","MultiplePalettes","colorPalette","CustomColorPickerDropdown","isRenderedInSidebar","receivedPopoverProps","ColorPalette","clearable","disableCustomColors","__experimentalHasMultipleOrigins","__experimentalIsRenderedInSidebar","showMultiplePalettes","valueWithoutLeadingHash","buttonLabelName","currentValueIsCssVariable","normalizedCurrentValue","colorPalettes","paletteColors","colorName","extractColorNameFromCurrentValue","customColorAccessibleLabel","luminance","isReadable","isWeb","Platform","allUnits","a11yLabel","em","_x","rem","vmin","vmax","ex","cm","mm","in","pc","pt","ALL_CSS_UNITS","CSS_UNITS","DEFAULT_UNIT","getParsedQuantityAndUnit","rawValue","fallbackUnit","allowedUnits","parseQuantityAndUnitFromRawValue","hasUnits","units","trimmedValue","quantityToReturn","parsedQuantity","unitMatch","matchedUnit","unitToReturn","getValidParsedQuantityAndUnit","fallbackQuantity","parsedUnit","useCustomUnits","availableUnits","defaultValues","customUnitsToReturn","allowedUnitValues","filterUnitsWithSettings","parsedDefaultValue","useBorderControlDropdown","previousStyleSelection","widthValue","hasZeroWidth","indicatorClassName","indicatorWrapperClassName","fallbackColor","colorIndicatorBorder","popoverControlsClassName","popoverContentClassName","resetButtonClassName","onColorChange","onStyleChange","ConnectedBorderControlDropdown","showDropdownHeader","enableStyle","__unstablePopoverProps","colorObject","hasMultipleColorOrigins","matchedColor","getColorObject","toggleAriaLabel","isStyleEnabled","getToggleAriaLabel","showResetButton","dropdownPosition","closeSmall","UnitSelectControl","isUnitSelectTabbable","isTabbable","unitValue","UnitControl","unitControlProps","disableUnits","isResetValueOnUnitChange","onChangeProp","onUnitChange","unitProp","unitsProp","onBlurProp","nonNullValueProp","legacyUnit","unitsToReturn","currentUnit","unshift","getUnitsWithCurrentUnit","setUnit","refParsedQuantity","mayUpdateUnit","validParsedQuantity","validParsedUnit","changeProps","unitControlStateReducer","inputSuffix","nextUnitValue","activeUnit","nextQuantityValue","onChangeValue","BorderLabel","BorderControl","innerWrapperClassName","inputWidth","onBorderChange","onSliderChange","onWidthChange","placeholder","sliderClassName","widthUnit","withSlider","isCompact","shouldSanitizeBorder","originalWidthUnit","hadPreviousZeroWidth","colorSelection","setColorSelection","styleSelection","setStyleSelection","newBorder","hasNoWidth","hasNoColor","sanitizeBorder","newWidth","newWidthValue","parsedValue","updatedBorder","widthStyle","heightStyle","useBorderControl","spaced","gridProps","columnGap","isInline","rowGap","templateColumns","templateRows","gridTemplateColumns","alignmentProps","gridClasses","gridRowGap","gridColumnGap","verticalAlign","useGrid","centeredClassName","popoverPlacement","popoverOffset","rightAlignedClassName","useBorderBoxControlSplitControls","sharedBorderControlProps","mergedRef","UNITED_VALUE_REGEX","sides","borderProps","isEmptyBorder","isDefinedBorder","hasSplitBorders","hasMixedBorders","shorthandBorders","getShorthandBorderStyle","fallbackBorder","fallbackStyle","fallbackWidth","useBorderBoxControl","mixedBorders","splitBorders","linkedValue","widths","allColorsMatch","allStylesMatch","allWidthsMatch","currentMode","maxCount","mode","toParse","numParsed","parseCSSUnitValue","getCommonBorder","splitValue","getSplitBorders","setIsLinked","linkedControlClassName","onLinkedChange","isCompleteBorder","changes","updated","getBorderDiff","updatedBorders","filteredResult","onSplitChange","toggleLinked","ConnectedBorderBoxControl","Header","HeaderControlWrapper","LayoutContainer","Layout","unitControlBorderRadiusStyles","isFirst","isLast","isOnly","unitControlMarginStyles","BaseUnitControl","BoxUnitControl","onHoverOn","onHoverOff","bindHoverGesture","useHover","hovering","LABELS","mixed","DEFAULT_VALUES","ALL_SIDES","getAllValue","selectedUnits","availableSides","normalizeSides","parsedQuantitiesAndUnits","allParsedQuantities","allParsedUnits","commonQuantity","commonUnit","getAllUnitFallback","isValuesMixed","allValue","isMixed","isValuesDefined","getInitialSide","splitOnAxis","initialSide","filteredSides","newSides","applyValueToSides","AllInputControl","setSelectedUnits","allPlaceholder","isNumeric","nextValues","newUnits","BoxInputControls","createHandleOnFocus","createHandleOnHoverOn","createHandleOnHoverOff","createHandleOnChange","handleOnChange","createHandleOnUnitChange","only","computedUnit","groupedSides","AxialInputControls","selectedUnit","Viewbox","Stroke","VerticalStroke","HorizontalStroke","TopStroke","RightStroke","BottomStroke","LeftStroke","BoxControlIcon","hasSide","isSideDisabled","LinkedButton","defaultInputProps","BoxControl","inputProps","valuesProp","setValues","inputValues","hasInitialValue","hasOneSide","setIsDirty","setSide","headingId","inputControlProps","nextSide","Elevation","getBoxShadow","elevationProps","isInteractive","hoverValue","activeValue","useElevation","adjustedBorderRadius","Card","Footer","Content","Body","Media","Divider","boxShadowless","borderless","xSmallCardPadding","cardPaddings","xSmall","extraSmall","shady","Surface","getBorders","borderBottom","borderTop","primary","secondary","tertiary","customBackgroundSize","surfaceBackgroundSize","dottedBackground1","surfaceBackgroundSizeDotted","dottedBackground2","gridBackgroundCombined","dottedBackgroundCombined","getDotted","getGrid","useSurface","backgroundSize","elevation","isBorderless","isRounded","isElevated","propsToReturn","computedElevation","useCard","elevationBorderRadius","elevationClassName","contextProviderValue","CardBody","CardHeader","CardFooter","scrollableScrollbar","Scrollable","smoothScroll","scrollX","scrollY","scrollAuto","scrollableProps","scrollDirection","useScrollable","isScrollable","isShady","useCardBody","useSeparator","_ref$orientation","Separator","MARGIN_DIRECTIONS","DividerView","marginStart","marginEnd","dividerProps","useCardDivider","footerProps","useCardFooter","useCardHeader","cardMediaProps","useCardMedia","CheckboxControl","checked","indeterminate","showCheckedIcon","setShowCheckedIcon","showIndeterminateIcon","setShowIndeterminateIcon","ClipboardButton","onCopy","onFinishCopy","timeoutId","unstyledButton","itemWrapper","bordered","separated","spacedAround","baseFontHeight","paddingYSmall","paddingYLarge","itemSizes","ItemGroupContext","useItemGroupContext","isBordered","isSeparated","sizeProp","useItemGroup","contextSize","clampPercent","updateControlPoint","newPoint","updateControlPointPosition","newPosition","initialIndex","minDistance","minPosition","maxPosition","isOverlapping","updateControlPointColor","getHorizontalRelativeGradientPosition","mouseXCoordinate","containerElement","absolutePositionValue","ControlPointButton","GradientColorPickerDropdown","mergedClassName","ControlPoints","disableRemove","gradientPickerDomRef","ignoreMarkerPosition","controlPoints","onStartControlPointChange","onStopControlPointChange","controlPointMoveState","relativePosition","significantMoveHappened","cleanEventListeners","listenersActivated","cleanEventListenersRef","pointIndex","removeControlPoint","InsertPoint","onOpenInserter","onCloseInserter","insertPosition","alreadyInsertedPoint","setAlreadyInsertedPoint","plus","updateControlPointColorByPosition","nextIndex","newPoints","addControlPoint","customGradientBarReducer","customGradientBarReducerInitialState","CustomGradientBar","hasGradient","disableInserter","gradientMarkersContainerDomRef","gradientBarState","gradientBarStateDispatch","onMouseEnterAndMove","isMovingInserter","isInsertingControlPoint","DEFAULT_GRADIENT","HORIZONTAL_GRADIENT_ORIENTATION","GRADIENT_OPTIONS","DIRECTIONAL_ORIENTATION_ANGLE_MAP","serializeGradientColorStop","serializeGradientColor","serializeGradientPosition","serializeGradient","serializedOrientation","serializeGradientOrientation","colorStop1","colorStop2","hasUnsupportedLength","getStopCssColor","colorStop","SelectWrapper","FlexBlock","AccessoryWrapper","GradientAnglePicker","gradientAST","angle","newAngle","GradientTypePicker","restGradientAST","onSetRadialGradient","CustomGradientPicker","__nextHasNoMargin","gradientParser","getGradientAstWithDefault","getLinearGradientRepresentation","newControlPoints","getGradientAstWithControlPoints","SingleOrigin","clearGradient","gradients","gradientOptions","gradient","MultipleOrigin","gradientSet","GradientPicker","disableCustomGradients","deprecatedMarginSpacerProps","MENU_ITEM_ROLES","NavigableContainer","bindContainer","getFocusableContext","getFocusableIndex","onlyBrowserTabstops","focusables","directIndex","cycle","eventToOffset","onNavigate","stopNavigationEvents","stopImmediatePropagation","targetRole","targetHasMenuItemRole","isTab","total","cycleValue","forwardedNavigableContainer","evt","mergeProps","dropdownMenuProps","menu","toggleProps","menuProps","disableOpenOnArrowDown","noIcons","controlSets","mergedPopoverProps","mergedToggleProps","openOnArrowDown","mergedMenuProps","controlSet","indexOfSet","control","indexOfControl","IndicatorStyled","NameInputControl","InputBackdropUI","PaletteItem","NameContainer","PaletteHeading","PaletteActionsContainer","PaletteHStackHeader","PaletteEditStyles","DoneButton","RemoveButton","DEFAULT_COLOR","NameInput","canOnlyChangeValues","isEditing","onStartEditing","onRemove","onStopEditing","slugPrefix","isGradient","focusOutsideProps","useFocusOutside","nextName","slug","newGradient","isTemporaryElement","PaletteEditListView","editingElement","setEditingElement","elementsReference","newElements","debounceOnChange","newElement","_currentElement","EMPTY_ARRAY","PaletteEdit","paletteLabel","emptyMessage","canReset","setIsEditing","isAdding","hasElements","tempOptionName","temporaryNameRegex","getNameForPosition","moreVertical","deprecatedDefaultSize","InputWrapperFlex","TokenInput","selectedSuggestionIndex","setHasFocus","handleMouseDown","scrollIntoView","onHover","suggestions","displayTransform","__experimentalRenderItem","scrollingIntoView","setScrollingIntoView","listRef","listNode","scrollView","handleHover","suggestion","handleClick","matchText","transformedSuggestion","indexOfMatch","suggestionBeforeMatch","suggestionMatch","suggestionAfterMatch","computeSuggestionMatch","createHigherOrderComponent","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","DetectOutside","withFocusOutside","ComboboxControl","onFilterValueChange","messages","currentOption","currentLabel","selectedSuggestion","setSelectedSuggestion","setIsExpanded","inputHasFocus","setInputHasFocus","setInputValue","inputContainer","matchingSuggestions","startsWithMatch","containsMatch","onSuggestionSelected","newSelectedSuggestion","handleArrowNavigation","hasMatchingSuggestions","hasSelectedMatchingSuggestions","message","LIVE_REGION_ARIA_ROLES","hiddenElements","isHidden","openModalCount","Modal","bodyOpenClassName","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","describedby","onRequestClose","closeButtonLabel","overlayClassName","contentLabel","isFullScreen","__experimentalHideHeader","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","hasScrolledContent","setHasScrolledContent","unhiddenElement","elementShouldBeHidden","onContentContainerScroll","onScroll","wrapper","isOpenProp","onConfirm","onCancel","confirmButtonText","cancelButtonText","wrapperClassName","shouldSelfClose","setShouldSelfClose","isIsOpenSet","handleEvent","handleEnter","cancelLabel","confirmLabel","canOverflow","skipOverflowHiddenElements","frame","alignNearest","scrollingEdgeStart","scrollingEdgeEnd","scrollingSize","scrollingBorderStart","scrollingBorderEnd","elementEdgeStart","elementEdgeEnd","elementSize","idCounter","isOrContainsNode","callAllEventHandlers","preventDownshiftDefault","handleRefs","prevState","isControlledProp","normalizeArrowKey","getNextWrappingIndex","moveAmount","baseIndex","itemCount","getItemNodeFromIndex","circular","itemsLastIndex","newIndex","nonDisabledNewIndex","getNextNonDisabledIndex","currentElementNode","targetWithinDownshift","downshiftElements","checkActiveElement","contextNode","cleanupStatus","documentProp","getStatusDiv","statusDiv","dropdownDefaultStateValues","highlightedIndex","selectedItem","updateA11yStatus","getA11yMessage","status","useElementIds","_ref$id","labelId","menuId","toggleButtonId","inputId","elementIdsRef","isAcceptedCharacterKey","capitalizeString","useEnhancedReducer","prevStateRef","actionRef","enhancedReducer","_useReducer","propsRef","dispatchWithProps","newState","invokeOnChangeHandler","callOnChangeProps","itemToString","getA11ySelectionMessage","selectionParameters","itemToStringLocal","menuNode","windowWithViewport","scrollMode","inline","frames","innerWidth","innerHeight","viewportX","viewportY","targetHeight","targetWidth","targetTop","targetRight","targetBottom","targetLeft","targetBlock","targetInline","computations","frameStyle","blockScroll","inlineScroll","scrollbarWidth","scrollbarHeight","circularNavigation","environment","getDefaultValue","propKey","defaultStateValues","defaultPropKey","getInitialValue","initialPropKey","getHighlightedIndexOnOpen","initialHighlightedIndex","defaultHighlightedIndex","useA11yMessageSetter","dependencyArray","isInitialMount","highlightedItem","resultCount","useControlPropsValidator","getItemIndexByCharacterKey","keysSoFar","lowerCasedKeysSoFar","offsetIndex","defaultProps$1","getA11yStatusMessage","previousResultCount","validatePropTypes","stateChangeTypes$1","MenuKeyDownArrowDown","MenuKeyDownArrowUp","MenuKeyDownEscape","MenuKeyDownHome","MenuKeyDownEnd","MenuKeyDownEnter","MenuKeyDownSpaceButton","MenuKeyDownCharacter","MenuBlur","MenuMouseLeave","ItemMouseMove","ItemClick","ToggleButtonClick","ToggleButtonKeyDownArrowDown","ToggleButtonKeyDownArrowUp","ToggleButtonKeyDownCharacter","FunctionToggleMenu","FunctionOpenMenu","FunctionCloseMenu","FunctionSetHighlightedIndex","FunctionSelectItem","FunctionSetInputValue","FunctionReset","downshiftSelectReducer","lowercasedKey","itemIndex","_lowercasedKey","_inputValue","stateChangeTypes","downshiftCommonReducer","useSelect","userProps","initialIsOpen","defaultIsOpen","_useControlledReducer","_useEnhancedReducer","useControlledReducer","getInitialState","toggleButtonRef","menuRef","itemRefs","shouldBlurRef","clearTimeoutRef","elementIds","previousResultCountRef","isInitialMountRef","shouldScrollRef","menuElement","scrollIntoViewProp","useScrollIntoView","outerDispatch","mouseAndTouchTrackersRef","downshiftElementRefs","handleBlur","isTouchMove","onMouseUp","onTouchMove","onTouchEnd","useMouseAndTouchTracker","setGetterPropCallInfo","toggleButtonKeyDownHandlers","menuKeyDownHandlers","Escape","Enter","toggleMenu","closeMenu","openMenu","setHighlightedIndex","newHighlightedIndex","selectItem","newSelectedItem","newInputValue","getLabelProps","labelProps","getMenuProps","_temp2","_extends2","_ref$refKey","refKey","_ref2$suppressRefErro","suppressRefError","latestState","getToggleButtonProps","_temp3","_temp4","_extends3","_ref3$refKey","_ref4$suppressRefErro","toggleButtonNode","getItemProps","_temp5","_extends4","_ref5","_ref5$refKey","_latest$current","latestProps","getItemIndex","itemProps","itemNode","backCompatMinWidth","__nextUnconstrainedWidth","InputBaseWithBackCompatMinWidth","CustomSelectControl","onSelectedItemChange","_selectedItem","initialSelectedItem","onKeyDownHandler","__experimentalHint","toInteger","dirtyNumber","NaN","requiredArgs","toDate","argStr","getTime","addDays","dirtyDate","dirtyAmount","date","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","startOfWeek","dirtyOptions","locale","localeWeekStartsOn","weekStartsOn","defaultWeekStartsOn","day","getDay","setHours","addWeeks","days","addYears","endOfMonth","month","eachDayOfInterval","dirtyInterval","interval","startDate","endDate","endTime","dates","currentDate","startOfMonth","endOfWeek","getDaysInMonth","year","monthIndex","lastDayOfMonth","dirtyLeftDate","dirtyRightDate","dateLeft","dateRight","dirtyMonth","dateWithDesiredMonth","Month","Day","inRange","dirtyDateToCompare","dateToCompare","isAfter","isBefore","clearTime","hours","minutes","setMinutes","setSeconds","milliseconds","setMilliseconds","useLilius","SUNDAY","viewing","initialViewing","initialSelected","numberOfMonths","setViewing","viewToday","startOfDay","viewMonth","viewPreviousMonth","subMonths","viewNextMonth","viewYear","dirtyYear","setYear","viewPreviousYear","subYears","viewNextYear","setSelected","replaceExisting","selectedItems","deselect","selectRange","deselectRange","calendar","eachMonthOfInterval","startDateWeek","endDateWeek","weeks","currentWeek","eachWeekOfInterval","week","clearSelected","isDate","addMilliseconds","subMilliseconds","MILLISECONDS_IN_DAY","startOfUTCISOWeek","getUTCDay","setUTCDate","getUTCDate","setUTCHours","getUTCISOWeekYear","getUTCFullYear","fourthOfJanuaryOfNextYear","setUTCFullYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCISOWeekYear","fourthOfJanuary","MILLISECONDS_IN_WEEK","getDefaultOptions","startOfUTCWeek","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","getUTCWeekYear","_options$firstWeekCon","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfUTCWeekYear","firstWeek","addLeadingZeros","formatters","signedYear","getUTCMonth","dayPeriodEnumValue","getUTCHours","getUTCMinutes","getUTCSeconds","numberOfDigits","getUTCMilliseconds","G","localize","era","ordinalNumber","lightFormatters","Y","signedWeekYear","weekYear","Q","quarter","getUTCWeek","I","isoWeek","getUTCISOWeek","dayOfYear","setUTCMonth","startOfYearTimestamp","difference","getUTCDayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","dayPeriod","B","K","X","_localize","timezoneOffset","_originalDate","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","originalDate","dirtyDelimiter","absOffset","dateLongFormatter","formatLong","timeLongFormatter","dateTimeFormat","matchResult","datePattern","timePattern","dateTime","getTimezoneOffsetInMilliseconds","utcDate","UTC","getHours","getMinutes","getSeconds","getMilliseconds","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","format","formatDistanceLocale","lessThanXSeconds","one","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","defaultWidth","formats","full","long","short","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","argumentCallback","rem100","narrow","abbreviated","wide","am","pm","midnight","noon","morning","afternoon","evening","night","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchedString","parsePatterns","defaultParseWidth","findKey","valueCallback","predicate","parsePattern","parseResult","formatDistance","tokenValue","addSuffix","comparison","formatRelative","_date","_baseDate","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_options$locale2","_options$locale2$opti","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","defaultLocale","formatterOptions","firstCharacter","longFormatter","cleanEscapedString","formatter","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","isSameMonth","dirtyDateLeft","dirtyDateRight","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","Navigator","NavigatorHeading","Calendar","DayOfWeek","DayButton","isToday","hasEvents","inputToDate","TIMEZONELESS_FORMAT","isFocusAllowed","isInvalid","numEvents","getDayLabel","dateI18n","getSettings","localizedDate","events","isInvalidDate","onMonthPreviewed","setFocusable","isFocusWithinCalendar","setIsFocusWithinCalendar","prevCurrentDate","setPrevCurrentDate","arrowRight","arrowLeft","nextFocusable","subWeeks","startOfMinute","Fieldset","TimeWrapper","baseInput","HoursInput","TimeSeparator","MinutesInput","MonthSelectWrapper","MonthSelect","DayInput","YearInput","TimeZone","timezone","getDateSettings","userTimezoneOffset","offsetSymbol","zoneAbbr","abbr","timezoneDetail","from12hTo24h","isPm","buildPadInputStateReducer","pad","padStart","is12Hour","currentTime","buildNumberControlChangeCallback","numberValue","newDate","buildAmPmChangeCallback","parsedHours","dirtyHours","dayField","monthField","VStack","CalendarHelp","DateTimePicker","__nextRemoveHelpButton","__nextRemoveResetButton","calendarHelpIsVisible","setCalendarHelpIsVisible","sizesTable","selectLabel","theSize","findSizeBySlug","theSizes","formatSizesAsOptions","disabledStyles","Context","Consumer","ContentWrapper","Disabled","useDisabled","bodyClass","Draggable","onDragOver","cloneClassname","elementId","transferData","__experimentalTransferDataType","transferDataType","__experimentalDragComponent","dragComponent","dragComponentRef","cleanup","onDraggableStart","dataTransfer","cloneWrapper","dragImage","setDragImage","clonedDragComponent","elementRect","elementWrapper","elementTopOffset","elementLeftOffset","clonePadding","cloneNode","cursorLeft","cursorTop","throttledDragOver","throttle","nextX","nextY","timerId","onDraggableEnd","onFilesDrop","onHTMLDrop","onDrop","isDraggingOverDocument","setIsDraggingOverDocument","isDraggingOverElement","setIsDraggingOverElement","setType","useDropZone","files","getFilesFromDataTransfer","getData","_type","onDragEnter","onDragLeave","disableMotion","upload","DropZoneProvider","getGradientFromCSSColors","stops","swatch","ColorOption","labels","newColors","PLACEHOLDER_VALUES","CustomDuotoneBar","newColorStops","getColorsFromColorStops","unsetable","duotonePalette","disableCustomDuotone","defaultDark","defaultLight","getDefaultColors","palette","isUnset","unsetOption","StyledIcon","rel","optimizedRel","isInternalAnchor","external","INITIAL_BOUNDS","VIDEO_EXTENSIONS","getExtension","filename","parts","fractionToPercentage","fraction","MediaWrapper","MediaContainer","MediaPlaceholder","StyledUnitControl","extraHelpTextMargin","hasHelpText","ControlWrapper","GridView","showOverlay","GridLine","GridLineX","GridLineY","FocalPointPickerControls","valueX","valueY","FocalPointUnitControl","FocalPointWrapper","PointerIconSVG","PointerIconPathOutline","PointerIconPathFill","FocalPoint","FocalPointPickerGrid","alt","autoPlay","src","onLoad","mediaRef","isVideo","isVideoType","onLoadedData","FocalPointPicker","resolvePoint","url","setPoint","showGridOverlay","setShowGridOverlay","endDrag","dragAreaRef","getValueWithinDragArea","setBounds","refUpdateBounds","updateBounds","getFinalValue","resolvedValue","roundToTwoDecimalPlaces","focalPointPosition","FocusableIframe","iframeRef","useFocusableIframe","useRadioState","RADIO_STATE_KEYS","RADIO_KEYS","RadioGroup","BackdropView","VisualLabelWrapper","containerWidth","isAdaptiveWidth","setLeft","setWidth","canAnimate","setCanAnimate","renderBackdrop","setRenderBackdrop","containerNode","targetNode","dimensionsRequestId","parentX","animationRequestId","ToggleGroupControlContext","ToggleGroupControl","__experimentalIsBorderless","resizeListener","useResizeObserver","radio","usePrevious","toggleGroupControlSize","getChecked","fireChange","useRadio","_options$value","_ref$unstable_checkOn","unstable_checkOnFocus","htmlOnChange","isNativeRadio","setIsNativeRadio","onChangeRef","initialChecked","useInitialChecked","_onChangeRef$current","_options$setState","Radio","LabelView","labelBlock","buttonView","ButtonContentView","separatorActive","isIcon","buttonActive","WithToolTip","ToggleGroupControlOptionBase","toggleGroupControlContext","radioProps","labelViewClasses","optionLabel","DEFAULT_FONT_SIZE_OPTION","CUSTOM_FONT_SIZE","CUSTOM_FONT_SIZE_OPTION","FONT_SIZES_ALIASES","isSimpleCssValue","HeaderLabel","HeaderHint","Controls","ResetButton","MaybeVStack","FontSizePicker","fallbackFontSize","fontSizes","disableCustomFontSizes","withReset","noUnitsValue","isPixelValue","fontSizesContainComplexValues","sizeArg","shouldUseSelectControl","useSelectControl","optionsArray","getSelectOptions","labelAliases","getToggleGroupOptions","getFontSizeOptions","selectedOption","getSelectedOption","isCustomValue","showCustomValueControl","setShowCustomValueControl","headerHint","numericValue","splitValueAndUnitFromSize","currentFontSizeSR","nextSize","accept","openFileDialog","Token","onClickRemove","termPosition","termsCount","tokenClasses","transformedValue","termPositionAndCount","deprecatedPaddings","hasTokens","TokensAndInputWrapperFlex","FormTokenField","autoCapitalize","maxSuggestions","saveTransform","onInputChange","tokenizeOnSpace","added","removed","__experimentalInvalid","__experimentalExpandOnFocus","__experimentalValidateInput","__experimentalShowHowTo","__experimentalAutoSelectFirstMatch","incompleteTokenValue","setIncompleteTokenValue","inputOffsetFromEnd","setInputOffsetFromEnd","setIsActive","setSelectedSuggestionIndex","selectedSuggestionScroll","setSelectedSuggestionScroll","prevSuggestions","tokensAndInput","inputHasValidValue","onContainerTouched","onTokenClickRemove","deleteToken","onInputChangeHandler","separator","addNewTokens","handleDeleteKey","_deleteToken","isInputEmpty","deleteTokenBeforeInput","getIndexOfInput","deleteTokenAfterInput","moveInputToIndex","addCurrentToken","getMatchingSuggestions","getSelectedSuggestion","addNewToken","tokensToAdd","getTokenValue","valueContainsToken","newTokens","searchValue","_suggestions","_maxSuggestions","_saveTransform","normalizedValue","updateSuggestions","resetSelectedSuggestion","inputHasMinimumChars","shouldExpandIfFocuses","renderToken","suggestionsDidUpdate","tokenFieldProps","prevInputOffsetFromEnd","handleLeftArrowKey","handleRightArrowKey","handleEscapeKey","onKeyPress","charCode","components","renderInput","renderTokensAndInput","PageControlIcon","Circle","cy","PageControl","currentPage","numberOfPages","setCurrentPage","page","Guide","finishButtonText","onFinish","pages","guideContainer","canGoBack","canGoForward","goBack","goForward","image","GuidePage","KeyboardShortcut","bindGlobal","useKeyboardShortcut","shortcuts","MenuGroup","hideSeparator","MenuItemsChoice","choices","ROOT_MENU","NavigationContext","activeItem","activeMenu","setActiveMenu","isMenuEmpty","navigationTree","getItem","addItem","menus","getMenu","addMenu","removeMenu","childMenu","traverseMenu","useNavigationContext","SearchControl","searchRef","NavigationUI","MenuUI","MenuBackButtonUI","MenuTitleUI","MenuTitleActionsUI","MenuTitleSearchUI","GroupTitleUI","ItemBaseUI","ItemUI","ItemIconUI","ItemBadgeUI","ItemTitleUI","useNavigationTreeNodes","setNodes","getNode","addNode","newNode","removeNode","removedNode","remainingNodes","Navigation","onActivateMenu","setMenu","slideOrigin","setSlideOrigin","setChildMenu","getChildMenu","startMenu","queue","parentMenu","menuToCheck","isEmpty","useCreateNavigationTree","defaultSlideOrigin","slideInOrigin","animateClassName","backButtonLabel","parentMenuTitle","chevronRight","chevronLeft","animationDirection","NavigationGroupContext","uniqueId","NavigationGroup","_isVisible","groupTitleId","NavigationItemBaseContent","badge","NavigationMenuContext","useNavigationMenuContext","normalizeInput","NavigationItemBase","itemId","isMenuActive","isItemVisible","normalizedSearch","useNavigationTreeItem","NavigationItem","navigateToMenu","hideIfTargetMenuEmpty","isText","navigationIcon","baseProps","withSpokenMessages","onCloseSearch","onSearch","delayedFocus","resultsFoundMessage","NavigationMenuTitle","hasSearch","titleAction","isSearching","setIsSearching","searchButtonRef","menuTitleId","searchButtonLabel","searchIcon","NavigationSearchNoResultsFound","resultsCount","NavigationMenu","onBackButtonClick","setControlledSearch","controlledSearch","isSearchDebouncing","uncontrolledSearch","setUncontrolledSearch","useNavigationTreeMenu","isControlledSearch","NavigatorContext","goTo","ConnectedNavigatorProvider","initialPath","locationHistory","setLocationHistory","isBack","navigatorContextValue","isInitial","ConnectedNavigatorScreen","isMatch","escapeAttribute","wrapperRef","previousLocation","isInitialLocation","elementToFocus","focusTargetSelector","firstTabbable","mergedWrapperRef","animatedProps","navigatorButtonProps","attributeName","escapedPath","useNavigator","attrName","attrValue","useNavigatorButton","navigatorBackButtonProps","useNavigatorBackButton","getDefaultPoliteness","spokenMessage","politeness","__unstableHTML","onDismiss","useSpokenMessage","RawHTML","buttonCustomClasses","noDefaultClasses","notices","removeNotice","notice","restNotice","header","PanelBodyTitle","isOpened","chevronUp","initialOpen","opened","scrollAfterOpen","setIsOpened","nodeRef","scrollBehavior","scrollAfterOpenRef","behavior","PanelRow","PlaceholderIllustration","preserveAspectRatio","instructions","preview","isColumnLayout","withIllustration","modifierClassNames","fieldsetClasses","buildTermsTree","flatTerms","flatTermsWithParentAndChildren","term","termsByParent","groupBy","null","fillWithChildren","terms","tree","treeNode","unescapeString","noOptionLabel","selectedId","CategorySelect","categoriesList","selectedCategoryId","termsTree","AuthorSelect","authorList","selectedAuthorId","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","QueryControls","categorySuggestions","selectedCategories","numberOfItems","orderBy","maxItems","minItems","onCategoryChange","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","newOrderBy","newOrder","radioContext","RadioContext","defaultChecked","radioState","ButtonGroup","RadioControl","Resizer","onResizeStart","replaceStyles","DEFAULT_SIZE","snap","hasDirection","dir","findClosestSnap","snapArray","snapGap","closestGapIndex","curr","searchStr","getStringSize","getPixelSize","parentSize","calculateNewMax","minWidth","definedProps","baseClassName","Resizable","resizable","parentLeft","parentTop","resizableLeft","resizableRight","resizableTop","resizableBottom","appendBase","removeBase","isResizing","propsSize","backgroundStyle","flexBasis","defaultSize","orgWidth","orgHeight","orgPosition","getParentSize","wrapChanged","bindEvents","unbindEvents","createSizeForCssProperty","newSize","kind","calculateNewMaxFromBoundary","boundWidth","boundHeight","boundsByDirection","widthByDirection","heightByDirection","parent_1","calculateNewSizeFromDirection","resizeRatio","lockAspectRatio","lockAspectRatioExtraHeight","lockAspectRatioExtraWidth","newHeight","extraHeight","extraWidth","calculateNewSizeFromAspectRatio","computedMinWidth","computedMaxWidth","computedMinHeight","computedMaxHeight","extraMinWidth","extraMaxWidth","extraMinHeight","extraMaxHeight","lockedMinWidth","lockedMaxWidth","lockedMinHeight","lockedMaxHeight","setBoundingClientRect","parent_2","parentRect","top_1","parent_3","flexDir","TouchEvent","boundaryMax","newGridWidth","newGridHeight","onResizeStop","updateSize","renderResizer","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","handleComponent","resizers","extendsProps","sizeStyle","boxSizing","POSITIONS","corner","TooltipWrapper","LabelText","showLabel","isBottom","isCorner","labelStyle","CURSOR_OFFSET_TOP","fadeTimeout","labelRef","showPx","isAxisControlled","moveX","setMoveX","moveY","setMoveY","heightRef","widthRef","moveTimeoutRef","debounceUnsetMoveXY","didWidthChange","didHeightChange","labelUnit","getSizeLabel","useResizeLabel","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","HANDLE_STYLES_OVERRIDES","HANDLE_STYLES","showHandle","__experimentalShowTooltip","__experimentalTooltipProps","tooltipProps","naturalWidth","naturalHeight","containerResizeListener","imageStyle","TagName","observeAndResizeJS","Sandbox","scripts","setHeight","isFrameAccessible","contentDocument","trySandbox","forceRerender","htmlDoc","lang","dangerouslySetInnerHTML","__html","open","write","tryNoForceSandbox","checkMessageForResize","iframe","contentWindow","sandbox","explicitDismiss","dismissMe","timeoutHandle","snackbarContentClassnames","onActionClick","SNACKBAR_VARIANTS","SNACKBAR_REDUCE_MOTION_VARIANTS","isReducedMotion","spinAnimation","insertable","StyledSpinner","commonPathProps","SpinnerTrack","SpinnerIndicator","Spinner","surfaceProps","TabButton","tabId","TabPanel","tabs","initialTabName","activeClass","selectedTab","_childIndex","tab","tabKey","TextControl","inputStyleNeutral","inputStyleFocus","inputControl","StyledTextarea","TextareaControl","trimmedHighlightText","createInterpolateElement","tip","ToggleControl","helpLabel","TOOLBAR_KEYS","ToolbarItem","accessibleToolbarState","ToolbarContext","containerClassName","toolbarItemProps","subscript","renderDropdownMenu","internalToggleProps","finalClassName","useToolbar","Toolbar","toolbarState","_useSealedState$orien","useToolbarState","toolsPanelGrid","fullWidth","ToolsPanelHiddenInnerWrapper","ToolsPanelHeader","ToolsPanelHeading","ToolsPanelItem","BaseControlWrapper","BaseControlField","BaseControlHelp","ToolsPanelItemPlaceholder","DropdownMenu","ResetLabel","DefaultControlsItem","ToolsPanelContext","menuItems","optional","hasMenuItems","isResetting","shouldRenderPlaceholderItems","registerPanelItem","deregisterPanelItem","flagItemCustomization","areAllOptionalControlsHidden","useToolsPanelContext","DefaultControlsGroup","itemClassName","toggleItem","resetSuffix","OptionalControlsGroup","itemLabel","defaultControlsItemClassName","dropdownMenuClassName","headingClassName","labelText","resetAll","useToolsPanelHeader","defaultItems","optionalItems","dropDownMenuIcon","dropDownMenuLabelText","dropdownMenuDescriptionText","canResetAll","generateMenuItems","panelItems","shouldReset","currentMenuItems","isShownByDefault","existingItemValue","isMenuItemTypeEmpty","panelContext","resetAllItems","toolsPanelProps","panelId","hasInnerWrapper","__experimentalFirstVisibleItemClass","__experimentalLastVisibleItemClass","wasResetting","setPanelItems","newItems","existingIndex","oldItem","setMenuItems","setAreAllOptionalControlsHidden","allControlsHidden","wrapperStyle","emptyStyle","menuGroup","newMenuItems","filters","resetAllFilter","resetMenuItems","getFirstVisibleItemLabel","firstDisplayedItem","lastDisplayedItem","useToolsPanel","isShown","shouldRenderPlaceholder","toolsPanelItemProps","onDeselect","currentPanelId","hasValueCallback","resetAllFilterCallback","previousPanelId","hasMatchingPanel","isValueSet","wasValueSet","isMenuItemChecked","wasMenuItemChecked","useToolsPanelItem","RovingTabIndexContext","RovingTabIndexProvider","RovingTabIndex","lastFocusedElement","setLastFocusedElement","providerValue","getRowFocusables","rowElement","focusablesInRow","sequential","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","UP","DOWN","LEFT","RIGHT","HOME","END","treeGridElement","activeRow","currentColumnIndex","canExpandCollapse","cannotFocusNextColumn","parentRow","focusableItems","currentRowIndex","nextRowIndex","focusablesInNextRow","positionInSet","setSize","localRef","withoutGridItem","useSlotFills","ZStackView","ZStackChildView","isLayered","offsetAmount","positionAbsolute","positionRelative","ZStack","validChildren","childrenLastIndex","defaultShortcuts","useNavigateRegions","isFocusingRegions","setIsFocusingRegions","focusRegion","regions","nextRegion","clickRef","isKeyboardEvent","mapNodeToProps","fallbackStyles","grabStylesCompleted","bindRef","grabFallbackStyles","newFallbackStyles","wrappedComponent","withFilters","OriginalComponent","FilteredComponent","FilteredComponentRenderer","applyFilters","instances","addAction","onHooksUpdated","without","removeAction","throttledForceUpdate","updatedHookName","HoC","onFocusReturn","noticeList","setNoticeList","noticeOperations","createNotice","noticeToAdd","createErrorNotice","removeAllNotices","propsOut","noticeUI"],"sourceRoot":""}

Zerion Mini Shell 1.0