@vireo-ai/trellis-ui 0.1.61 → 0.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/package.json +14 -35
- package/packages/client/src/components/accordion/styles.css +21 -9
- package/packages/client/src/components/badge/styles.css +12 -0
- package/packages/client/src/components/button/styles.css +31 -5
- package/packages/client/src/components/card/styles.css +16 -0
- package/packages/client/src/components/checkbox/styles.css +29 -5
- package/packages/client/src/components/date-picker/styles.css +22 -17
- package/packages/client/src/components/field/styles.css +16 -16
- package/packages/client/src/components/input/styles.css +1 -0
- package/packages/client/src/components/keybinding/styles.css +9 -2
- package/packages/client/src/components/menu/styles.css +13 -0
- package/packages/client/src/components/panels/styles.css +12 -2
- package/packages/client/src/components/scroll-area/styles.css +169 -2
- package/packages/client/src/components/select/styles.css +28 -8
- package/packages/client/src/components/sidebar/styles.css +218 -0
- package/packages/client/src/components/slider/styles.css +57 -0
- package/packages/client/src/components/tabs/styles.css +26 -24
- package/packages/client/src/components/toast/styles.css +31 -0
- package/packages/client/src/directives/sortable.css +5 -0
- package/packages/client/src/runtime/drag-and-drop/resize-handle.css +2 -2
- package/packages/client/src/styles/components.css +8 -4
- package/packages/client/src/styles/fonts/fira-code/5.3.0/LICENSE +93 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/download.json +47 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/font.css +62 -0
- package/packages/client/src/styles/fonts/fira-code/5.3.0/resource.json +82 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/LICENSE +93 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/download.json +47 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/font.css +62 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
- package/packages/client/src/styles/fonts/inter/5.3.0/resource.json +82 -0
- package/packages/client/src/styles/generated/theme-fonts.css +3 -3
- package/packages/client/src/styles/generated/theme-palette.css +1001 -634
- package/packages/client/src/styles/generated/theme-runtime.css +905 -580
- package/packages/client/src/styles/generated-sources.css +1 -1
- package/packages/client/src/styles/layout.css +88 -0
- package/packages/client/src/styles/recipes/action.css +4 -16
- package/packages/client/src/styles/recipes/disabled.css +8 -0
- package/packages/client/src/styles/recipes/option.css +0 -44
- package/packages/client/src/styles/recipes/selection.css +28 -39
- package/packages/client/src/styles/theme-support.css +19 -42
- package/packages/client/src/styles/typography.css +26 -0
- package/packages/client/types/assets/bridge.d.ts +1 -2
- package/packages/client/types/capabilities/collection.d.ts +7 -0
- package/packages/client/types/capabilities/collection.entry.generated.d.ts +3 -0
- package/packages/client/types/capabilities/shortcut.d.ts +4 -3
- package/packages/client/types/components/accordion/machine.d.ts +4 -4
- package/packages/client/types/components/app/contract.d.ts +5 -5
- package/packages/client/types/components/badge/contract.d.ts +1 -0
- package/packages/client/types/components/box/contract.d.ts +17 -12
- package/packages/client/types/components/box/index.d.ts +1 -1
- package/packages/client/types/components/button/contract.d.ts +3 -2
- package/packages/client/types/components/card/contract.d.ts +27 -16
- package/packages/client/types/components/checkbox/contract.d.ts +13 -13
- package/packages/client/types/components/common.d.ts +13 -11
- package/packages/client/types/components/container/contract.d.ts +4 -3
- package/packages/client/types/components/data-grid/contract.d.ts +3 -2
- package/packages/client/types/components/date-picker/contract.d.ts +2 -2
- package/packages/client/types/components/date-picker/machine.d.ts +11 -11
- package/packages/client/types/components/dropdown/contract.d.ts +1 -1
- package/packages/client/types/components/dropdown/machine.d.ts +5 -3
- package/packages/client/types/components/field/contract.d.ts +4 -4
- package/packages/client/types/components/file-upload/contract.d.ts +3 -3
- package/packages/client/types/components/file-upload/machine.d.ts +4 -4
- package/packages/client/types/components/flex/contract.d.ts +10 -8
- package/packages/client/types/components/frame/contract.d.ts +14 -11
- package/packages/client/types/components/grid/contract.d.ts +8 -7
- package/packages/client/types/components/image/contract.d.ts +1 -0
- package/packages/client/types/components/input/contract.d.ts +1 -0
- package/packages/client/types/components/input/machine.d.ts +2 -2
- package/packages/client/types/components/layout.d.ts +91 -35
- package/packages/client/types/components/menu/contract.d.ts +27 -10
- package/packages/client/types/components/modal/contract.d.ts +22 -5
- package/packages/client/types/components/panels/contract.d.ts +2 -2
- package/packages/client/types/components/panels/index.d.ts +2 -1
- package/packages/client/types/components/panels/machine.d.ts +9 -8
- package/packages/client/types/components/radio/contract.d.ts +8 -8
- package/packages/client/types/components/scroll-area/contract.d.ts +1 -20
- package/packages/client/types/components/section/contract.d.ts +4 -3
- package/packages/client/types/components/select/contract.d.ts +3 -3
- package/packages/client/types/components/select/machine.d.ts +13 -13
- package/packages/client/types/components/select/presentation.d.ts +1 -0
- package/packages/client/types/components/sidebar/contract.d.ts +26 -8
- package/packages/client/types/components/sidebar/groups.d.ts +4 -0
- package/packages/client/types/components/sidebar/index.d.ts +5 -4
- package/packages/client/types/components/slider/contract.d.ts +1 -0
- package/packages/client/types/components/slider/machine.d.ts +10 -5
- package/packages/client/types/components/stack/contract.d.ts +10 -8
- package/packages/client/types/components/switch/contract.d.ts +8 -8
- package/packages/client/types/components/table/contract.d.ts +6 -5
- package/packages/client/types/components/tabs/index.d.ts +2 -1
- package/packages/client/types/components/tabs/machine.d.ts +2 -2
- package/packages/client/types/components/textarea/contract.d.ts +1 -1
- package/packages/client/types/components/toast/machine.d.ts +2 -2
- package/packages/client/types/components/tooltip/contract.d.ts +13 -13
- package/packages/client/types/components/tooltip/machine.d.ts +3 -7
- package/packages/client/types/core.d.ts +2 -0
- package/packages/client/types/directives/anchor.d.ts +1 -0
- package/packages/client/types/directives/animate.d.ts +3 -0
- package/packages/client/types/directives/collection.d.ts +9 -0
- package/packages/client/types/directives/index.d.ts +2 -2
- package/packages/client/types/docs/transition-docs.d.ts +0 -2
- package/packages/client/types/motion/animate.d.ts +7 -2
- package/packages/client/types/motion/config.d.ts +118 -0
- package/packages/client/types/motion/feedback.d.ts +3 -0
- package/packages/client/types/motion/index.d.ts +8 -107
- package/packages/client/types/motion/layout.d.ts +25 -0
- package/packages/client/types/motion/lifecycle.d.ts +10 -0
- package/packages/client/types/motion/owned.d.ts +15 -4
- package/packages/client/types/motion/properties.d.ts +17 -0
- package/packages/client/types/motion/recipe.d.ts +8 -75
- package/packages/client/types/motion/reduced-motion.d.ts +7 -8
- package/packages/client/types/motion/registry.d.ts +37 -0
- package/packages/client/types/motion/resize-preview.d.ts +26 -0
- package/packages/client/types/motion/resize.d.ts +3 -1
- package/packages/client/types/motion/size.d.ts +7 -4
- package/packages/client/types/runtime/anchored-popover.d.ts +11 -2
- package/packages/client/types/runtime/collection-navigation.d.ts +12 -4
- package/packages/client/types/runtime/control-size.d.ts +4 -0
- package/packages/client/types/runtime/drag-and-drop/index.d.ts +10 -3
- package/packages/client/types/runtime/drag-and-drop/sortable/ghost.d.ts +2 -1
- package/packages/client/types/runtime/engine/fragment.d.ts +2 -1
- package/packages/client/types/runtime/engine/stream.d.ts +5 -9
- package/packages/client/types/runtime/focus.d.ts +3 -1
- package/packages/client/types/runtime/index.d.ts +1 -1
- package/packages/client/types/runtime/layout-participant.d.ts +10 -9
- package/packages/client/types/runtime/layout-task.d.ts +9 -0
- package/packages/client/types/runtime/morph-engine.d.ts +1 -0
- package/packages/client/types/runtime/option-data.d.ts +2 -1
- package/packages/client/types/runtime/preferences.d.ts +14 -0
- package/packages/client/types/runtime/scroll-area-schema.d.ts +23 -0
- package/packages/client/types/runtime/ui.d.ts +3 -5
- package/packages/client/types/runtime/virtualizer-schema.d.ts +3 -1
- package/packages/client/types/runtime/virtualizer-size.d.ts +7 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-B7apK0M-.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge.js +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +984 -1132
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js → anchor-DXCLxWw-.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{anchor-B-CbpFFU.js.map → anchor-DXCLxWw-.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/anchor.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection-CSrnChwy.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/collection.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-DlgeSL0c.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{resizable-Ctqx_OoS.js.map → resizable-DlgeSL0c.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-Qa2EByIB.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{shortcut-D2NgvMgw.js.map → shortcut-Qa2EByIB.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{sortable-CbIOS4Lm.js → sortable-Do3a0LA9.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/{sortable-CbIOS4Lm.js.map → sortable-Do3a0LA9.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-BqejlBjS.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-DPMSJ1AR.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BFvGIAs8.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bm1phXnj.js +5 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bm1phXnj.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-et2se66r.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-DnEHZCqy.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/control-size-BcDu1m1N.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-de7TruDm.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-DdiMUeJM.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-MzcgNRti.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-zFOeeob-.js +6 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{element-adapter-native-data-key-DrqJDAVH.js.map → element-adapter-native-data-key-zFOeeob-.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/feedback-DP_ydw-J.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/floating-ui.dom-B05VsV_p.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js → focus-BvBkrIcj.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-pk_lz9sg.js.map → focus-BvBkrIcj.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-DYfME-Rk.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{focus-scope-BrYxsrhc.js.map → focus-scope-DYfME-Rk.js.map} +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-DVphuQVV.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/frame-DsKHMcuL.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/hover-CqeHOHpJ.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/identity-BMTQyLbq.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-mHPk9rxi.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-task-B6P8q7BH.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/layout-wLgk8rAu.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-Do4tL7nc.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/option-data-Du9mqQPo.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preferences-BZyZ-kK6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/preload-helper-BZ1Pz5am.js +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-DRGrWivx.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/resize-preview-hnUhGcMX.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/scroll-area-schema-DZgYyysJ.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/size-DAtboz8G.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{styles-CQDZhwd_.js → styles-BvLCjUXV.js} +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-BvLCjUXV.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CZ7fEQL2.js +4 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CZ7fEQL2.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-size-CTy2gO64.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DGWRKBdw.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-DA4Ii46-.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-omt0I9Rh.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Dm3rQfQ_.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-Dm3rQfQ_.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-CtTM4Gf6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-B4dcq4bn.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-BEMZqp_I.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-BeqlTp38.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DCluNmYW.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-DkPKkwlt.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-aSuqkRen.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-2UqpKKXs.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-DjUHW-EE.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-DYn805Mg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-C4TtKM8_.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-gAYZVe11.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-SBruA-pr.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-C3hjgwMw.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-b0T3yohM.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-B08DRTzI.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CO-1hVz6.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-BlPgZVqW.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-CDbYmlUb.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-Dxht5Hhg.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-Ck_ZV7RN.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-BfCjewp3.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CX4J7tsN.js +2 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-CX4J7tsN.js.map +1 -0
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +2 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +297 -441
- package/packages/theme-engine/README.md +70 -18
- package/packages/theme-engine/THEME_AUTHORING.md +34 -0
- package/packages/theme-engine/dist/trellis.js +544 -279
- package/packages/theme-engine/fonts/fira-code/5.3.0/LICENSE +93 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/download.json +47 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-cyrillic-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-greek-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-ext-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-latin-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/fira-code-symbols2-wght-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/font.css +62 -0
- package/packages/theme-engine/fonts/fira-code/5.3.0/resource.json +82 -0
- package/packages/theme-engine/fonts/inter/5.3.0/LICENSE +93 -0
- package/packages/theme-engine/fonts/inter/5.3.0/download.json +47 -0
- package/packages/theme-engine/fonts/inter/5.3.0/font.css +62 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-cyrillic-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-greek-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-ext-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-latin-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/inter-vietnamese-standard-normal.woff2 +0 -0
- package/packages/theme-engine/fonts/inter/5.3.0/resource.json +82 -0
- package/packages/theme-engine/generated/knobs/v1/color-alpha.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-foundations.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-ink.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-lighting.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-normalization.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/color-ramps.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/composition.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/depth.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/edges.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/index.json +398 -85
- package/packages/theme-engine/generated/knobs/v1/manifest.json +16 -52
- package/packages/theme-engine/generated/knobs/v1/radii.json +50 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-actions.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-disabled.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-disclosure.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-intents.json +856 -37
- package/packages/theme-engine/generated/knobs/v1/semantic-scrim.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-selection.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/semantic-structure.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/sizing-anatomy.json +4 -4
- package/packages/theme-engine/generated/knobs/v1/sizing-controls.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/sizing-measures.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/spacing.json +2 -2
- package/packages/theme-engine/generated/knobs/v1/substrates.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/surfaces.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/typography-anatomy.json +1 -1
- package/packages/theme-engine/generated/knobs/v1/typography-fonts.json +158 -40
- package/packages/theme-engine/generated/knobs/v1/typography-scale.json +1 -1
- package/packages/theme-engine/generated/schemas/theme-config-v1.json +57 -36
- package/packages/theme-engine/generated/schemas/theme-manifest-v1.json +10 -37
- package/packages/theme-engine/skills/create-trellis-theme/SKILL.md +4 -5
- package/packages/client/src/components/app/styles.css +0 -1
- package/packages/client/src/components/brand/styles.css +0 -8
- package/packages/client/src/styles/motion.css +0 -26
- package/packages/client/src/styles/static.css +0 -3
- package/packages/client/types/assets/full-runtime.generated.d.ts +0 -2
- package/packages/client/types/capabilities/motion.d.ts +0 -6
- package/packages/client/types/capabilities/motion.entry.generated.d.ts +0 -3
- package/packages/client/types/cdn.d.ts +0 -2
- package/packages/client/types/components/entry.generated.d.ts +0 -37
- package/packages/client/types/directives/bounds.d.ts +0 -4
- package/packages/client/types/directives/layout.d.ts +0 -3
- package/packages/client/types/index.d.ts +0 -8
- package/packages/client/types/motion/bounds.d.ts +0 -20
- package/packages/client/types/motion/controller.d.ts +0 -33
- package/packages/client/types/motion/flip.d.ts +0 -14
- package/packages/client/types/motion/plan.d.ts +0 -52
- package/packages/client/types/motion/stream.d.ts +0 -18
- package/packages/client/types/motion/targets.d.ts +0 -23
- package/packages/client/types/motion/view.d.ts +0 -27
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis-103fb43eb5e1.css +0 -14030
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +0 -14030
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min-584dec82495c.css +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/bridge-COxhbtRZ.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion-CKiK3BQA.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/resizable-Ctqx_OoS.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut-D2NgvMgw.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/alpine-machine-CE2UN4Qu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/bridge-DMrvM3JE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-anchor-lhqk7hfo.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-motion-B32HePGn.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-resizable-ByUbMIHF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-DZUQHJ3A.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js +0 -5
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-sortable-Bl6ng6Hd.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/collection-navigation-hTbwy6oQ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/common-CBK89mIt.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/controller-C8xqwkr0.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/core-BxNepYBE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/cursor-data-source-Do0FfF4Z.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/dismissable-layer-BROE-Ln2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/element-adapter-native-data-key-DrqJDAVH.js +0 -6
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-7hdXmBLE.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BCTWp6Xu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BQNpmLZO.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BRaKxvab.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BZWdGtgg.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BnqcHAaF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-BzLNUDzF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CC6pQ0nu.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CEfr2bmw.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CL4bjCqf.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CVWqQEed.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C_SxTqg5.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cbyseoex.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cf2hKkwA.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CfYgsDun.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Cl8rInnJ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Ct9H8Hlf.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-D2es_Wi2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DQtFqG0K.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-EqHVGr1d.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-FCDgmA0s.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-HqE8R7N1.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-J0oGNBzS.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-O0hEhk-2.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-oJwO9fIY.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-xjydizn-.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/flip-BKThFI4L.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-scope-BrYxsrhc.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/fragment-9OT0mn7F.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/machine-CNnHDbyo.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js +0 -3
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/motion-RwlK04Cy.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/pdd-BG5sXFGF.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/styles-CQDZhwd_.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js +0 -4
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-Bg44ZmC3.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion-DpoqsP_I.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/button-Dnf0aKac.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/checkbox-BpFFtrfY.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid-CCPYnOuT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker-BCkP5gtC.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/direct-upload-DaT6-YFL.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown-Cc84envj.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/field-CtQbyblj.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/file-upload-DARtpJDT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/formset-CPO4XZkB.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/import-mapper-C-3lKsKm.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index-DRH3gncZ.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/input-BKEbDkKa.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding-RIi2q1IT.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal-MUHGUsup.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels-DNAroAhk.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/radio-DrGFMWGq.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area-CyUCAbgG.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select-BjLF548F.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar-GpvEBW3K.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/slider-OztnTlqr.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/switch-CZ7aiASg.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/table-G3G5d2Eo.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs-bq7j1uwx.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast-DkP0-rBO.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip-OITEWczP.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer-CkRX2qVO.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core-Z4zMCScs.js +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index-DAz_hKiB.js.map +0 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +0 -2
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis-ecb43dfd3b7b.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min-ecb43dfd3b7b.js +0 -11
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +0 -11
- package/packages/theme-engine/generated/knobs/v1/motion.json +0 -128
package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/properties-D8pFWF8g.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties-D8pFWF8g.js","names":["getAnimatableNone","mixNumber","mixNumber","mixNumber","mixNumber","buildTransform","mixNumber","buildTransform","getValueTransition","getValueTransition","getComputedStyle","mixNumber","getValueTransition","getComputedStyle"],"sources":["../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/array.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/clamp.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/errors.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/is-numerical-string.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/is-object.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/is-zero-value-string.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/memo.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/pipe.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/progress.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/subscription-manager.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/time-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/velocity-per-second.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/wrap.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/back.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/anticipate.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/circ.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/ease.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs","../../../../../../../../../node_modules/.pnpm/motion-utils@14.1.1/node_modules/motion-utils/dist/es/easing/utils/map.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/utils.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/hex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/complex/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/number.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/color.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/complex.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/mix/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/spring.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/interpolate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/int.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/maps/number.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/dom/style-set.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/supports/flags.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/supports/memo.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/active-animations.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/auto.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/test.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/value/types/dimensions.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/border-radius.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/waapi/utils/px-values.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/animate/effects.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/is-html-element.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/utils/create-dom-effect.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/MotionValueState.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/style/transform.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/style/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/attr/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/svg/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/projection/utils/measure.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/animate/element.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/effects/prop/index.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/dom/style-computed.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/render/store.mjs","../../../../../../../../../node_modules/.pnpm/motion-dom@14.3.0/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/sequence/create.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animate/subject.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animate/index.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs","../../../../../../../../../node_modules/.pnpm/framer-motion@14.3.0/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs","../../../../../../../../client/src/motion/animate.ts","../../../../../../../../client/src/motion/reduced-motion.ts","../../../../../../../../client/src/motion/owned.ts","../../../../../../../../client/src/motion/config.ts","../../../../../../../../client/src/motion/recipe.ts","../../../../../../../../client/src/motion/subject.ts","../../../../../../../../client/src/motion/properties.ts"],"sourcesContent":["function addUniqueItem(arr, item) {\n if (arr.indexOf(item) === -1)\n arr.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n if (index > -1)\n arr.splice(index, 1);\n}\n// Adapted from array-move\nfunction moveItem([...arr], fromIndex, toIndex) {\n const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;\n if (startIndex >= 0 && startIndex < arr.length) {\n const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;\n const [item] = arr.splice(fromIndex, 1);\n arr.splice(endIndex, 0, item);\n }\n return arr;\n}\n\nexport { addUniqueItem, moveItem, removeItem };\n//# sourceMappingURL=array.mjs.map\n","const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n//# sourceMappingURL=clamp.mjs.map\n","import { formatErrorMessage } from './format-error-message.mjs';\n\nlet warning = () => { };\nlet invariant = () => { };\nif (typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n warning = (check, message, errorCode) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(formatErrorMessage(message, errorCode));\n }\n };\n invariant = (check, message, errorCode) => {\n if (!check) {\n throw new Error(formatErrorMessage(message, errorCode));\n }\n };\n}\n\nexport { invariant, warning };\n//# sourceMappingURL=errors.mjs.map\n","/**\n * Check if value is a numerical string, ie a string that is purely a number eg \"100\" or \"-100.1\"\n */\nconst isNumericalString = (v) => /^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(v);\n\nexport { isNumericalString };\n//# sourceMappingURL=is-numerical-string.mjs.map\n","const isObject = (value) => typeof value === \"object\" && value !== null;\n\nexport { isObject };\n//# sourceMappingURL=is-object.mjs.map\n","/**\n * Check if the value is a zero value string like \"0px\" or \"0%\"\n */\nconst isZeroValueString = (v) => /^0[^.\\s]+$/u.test(v);\n\nexport { isZeroValueString };\n//# sourceMappingURL=is-zero-value-string.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n//# sourceMappingURL=memo.mjs.map\n","/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst pipe = (...transformers) => transformers.reduce((a, b) => (v) => b(a(v)));\n\nexport { pipe };\n//# sourceMappingURL=pipe.mjs.map\n","/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const range = to - from;\n return range ? (value - from) / range : 1;\n};\n\nexport { progress };\n//# sourceMappingURL=progress.mjs.map\n","import { addUniqueItem, removeItem } from './array.mjs';\n\nclass SubscriptionManager {\n constructor() {\n this.subscriptions = [];\n }\n add(handler) {\n addUniqueItem(this.subscriptions, handler);\n return () => this.remove(handler);\n }\n remove(handler) {\n removeItem(this.subscriptions, handler);\n }\n notify(a, b, c) {\n const 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 (let 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 const handler = this.subscriptions[i];\n handler && handler(a, b, c);\n }\n }\n }\n getSize() {\n return this.subscriptions.length;\n }\n clear() {\n this.subscriptions.length = 0;\n }\n}\n\nexport { SubscriptionManager };\n//# sourceMappingURL=subscription-manager.mjs.map\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n//# sourceMappingURL=time-conversion.mjs.map\n","/*\n Convert velocity into velocity per second\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst velocityPerSecond = (velocity, frameDuration) => frameDuration ? velocity * (1000 / frameDuration) : 0;\n\nexport { velocityPerSecond };\n//# sourceMappingURL=velocity-per-second.mjs.map\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n//# sourceMappingURL=wrap.mjs.map\n","import { noop } from '../noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Gaëtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n\n t is found for a given x with Newton-Raphson, safeguarded by a bisection\n bracket: whenever a Newton step would leave the bracket (near flat parts\n of the curve), it bisects instead. This converges to full precision in\n ~5 iterations on typical curves, so output is smooth rather than snapped\n to a fixed bisection grid. The slope is estimated with a forward\n difference, and the lookup table is omitted, to save bytes.\n\n x = 0 and x = 1 return exactly 0 and 1. x outside [0, 1] starts outside\n the bracket, so it bisects towards the nearer end and saturates to within\n ~1e-12 of 0 or 1.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n// Bernstein form, so it is exactly 0 at t = 0 and exactly 1 at t = 1.\nconst calcBezier = (t, a1, a2) => t * (3 * (1 - t) * ((1 - t) * a1 + t * a2) + t * t);\n/*#__NO_SIDE_EFFECTS__*/\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n return (x) => {\n let lowerBound = 0;\n let upperBound = 1;\n let t = x;\n for (let i = 0;; i++) {\n // If t is outside the bracket, because x is out of range or a\n // Newton step overshot where the slope is ~0, bisect instead.\n if (!(t >= lowerBound && t <= upperBound)) {\n t = (lowerBound + upperBound) / 2;\n }\n const currentX = calcBezier(t, mX1, mX2) - x;\n if (currentX * currentX < 1e-28 || i === 40)\n break;\n currentX > 0 ? (upperBound = t) : (lowerBound = t);\n // Newton-Raphson step, with dx/dt from a forward difference\n t -=\n (currentX * 1e-7) /\n (calcBezier(t + 1e-7, mX1, mX2) - x - currentX);\n }\n return calcBezier(t, mY1, mY2);\n };\n}\n\nexport { cubicBezier };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n//# sourceMappingURL=mirror.mjs.map\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\n/*#__NO_SIDE_EFFECTS__*/\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n//# sourceMappingURL=reverse.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n//# sourceMappingURL=back.mjs.map\n","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => p >= 1\n ? 1\n : (p *= 2) < 1\n ? 0.5 * backIn(p)\n : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n//# sourceMappingURL=anticipate.mjs.map\n","import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n//# sourceMappingURL=circ.mjs.map\n","import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n//# sourceMappingURL=ease.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\n//# sourceMappingURL=is-easing-array.mjs.map\n","import { wrap } from '../../wrap.mjs';\nimport { isEasingArray } from './is-easing-array.mjs';\n\n/*#__NO_SIDE_EFFECTS__*/\nfunction getEasingForSegment(easing, i) {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\n//# sourceMappingURL=get-easing-for-segment.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n//# sourceMappingURL=is-bezier-definition.mjs.map\n","import { invariant } from '../../errors.mjs';\nimport { noop } from '../../noop.mjs';\nimport { anticipate } from '../anticipate.mjs';\nimport { backOut, backInOut, backIn } from '../back.mjs';\nimport { circOut, circInOut, circIn } from '../circ.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { easeOut, easeInOut, easeIn } from '../ease.mjs';\nimport { isBezierDefinition } from './is-bezier-definition.mjs';\n\nconst easingLookup = {\n linear: noop,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n};\nconst isValidEasing = (easing) => {\n return typeof easing === \"string\";\n};\nconst easingDefinitionToFunction = (definition) => {\n if (isBezierDefinition(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, \"cubic-bezier-length\");\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (isValidEasing(definition)) {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, \"invalid-easing-type\");\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\n//# sourceMappingURL=map.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { frameData } from './frame-data.mjs';\n\nlet now;\nfunction clearTime() {\n now = undefined;\n}\n/**\n * An eventloop-synchronous alternative to performance.now().\n *\n * Ensures that time measurements remain consistent within a synchronous context.\n * Usually calling performance.now() twice within the same synchronous context\n * will return different values which isn't useful for animations when we're usually\n * trying to sync animations to the same frame.\n */\nconst time = {\n now: () => {\n if (now === undefined) {\n time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming\n ? frameData.timestamp\n : performance.now());\n }\n return now;\n },\n set: (newTime) => {\n now = newTime;\n queueMicrotask(clearTime);\n },\n};\n\nexport { time };\n//# sourceMappingURL=sync-time.mjs.map\n","// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n//# sourceMappingURL=sanitize.mjs.map\n","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n/**\n * Check if a value contains a CSS variable anywhere (e.g. inside calc()).\n * Unlike isCSSVariableToken which checks if the value IS a var() token,\n * this checks if the value CONTAINS var() somewhere in the string.\n */\nfunction containsCSSVariable(value) {\n if (typeof value !== \"string\")\n return false;\n // Strip comments to avoid false positives\n return value.split(\"/*\")[0].includes(\"var(--\");\n}\n\nexport { containsCSSVariable, isCSSVariableName, isCSSVariableToken };\n//# sourceMappingURL=is-css-variable.mjs.map\n","import { clamp } from 'motion-utils';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n//# sourceMappingURL=index.mjs.map\n","const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n//# sourceMappingURL=float-regex.mjs.map\n","function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n//# sourceMappingURL=is-nullish.mjs.map\n","const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n//# sourceMappingURL=single-color-regex.mjs.map\n","import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\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//# sourceMappingURL=utils.mjs.map\n","import { clamp } from 'motion-utils';\nimport { number, alpha } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ 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//# sourceMappingURL=rgba.mjs.map\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 we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\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: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n//# sourceMappingURL=hex.mjs.map\n","/*#__NO_SIDE_EFFECTS__*/\nconst createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = /*@__PURE__*/ (() => ({\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n}))();\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n//# sourceMappingURL=units.mjs.map\n","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { splitColor, isColorString } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ 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//# sourceMappingURL=hsla.mjs.map\n","import { 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 typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n getAnimatableNone: (v) => {\n const parsed = color.parse(v);\n parsed.alpha = 0;\n return color.transform(parsed);\n },\n};\n\nexport { color };\n//# sourceMappingURL=index.mjs.map\n","const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n//# sourceMappingURL=color-regex.mjs.map\n","import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\n/**\n * Non-global copies of the token regexes so test() can use .test()\n * (no match array, stops at the first token) without lastIndex state.\n */\nconst hasFloat = /*@__PURE__*/ new RegExp(floatRegex.source);\nconst hasColor = /*@__PURE__*/ new RegExp(colorRegex.source, \"i\");\nfunction test(v) {\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (hasFloat.test(v) || hasColor.test(v)));\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`.\n// The lookahead skips digits in function names, like the 3 in matrix3d(.\nconst complexRegex = /var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?![a-z]*\\()/giu;\n/**\n * Whether analyseComplexValue(value) would find any values, without\n * tokenising the string. CSS variables are resolved before this is\n * used, so it's enough to look for a number or a color.\n */\nfunction hasComplexValues(value) {\n const asString = value.toString();\n return hasFloat.test(asString) || hasColor.test(asString);\n}\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction buildTransformer({ split, types }) {\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nfunction createTransformer(source) {\n return buildTransformer(analyseComplexValue(source));\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : color.test(v) ? color.getAnimatableNone(v) : v;\n/**\n * Convert a parsed value to its zero equivalent, but preserve numbers\n * that act as divisors in CSS calc() expressions.\n *\n * analyseComplexValue extracts numbers from CSS strings and puts the\n * surrounding text into a `split` template array. For example:\n * \"calc(var(--gap) / 5)\" → values: [var(--gap), 5]\n * split: [\"calc(\", \" / \", \")\"]\n *\n * When building a zero-equivalent for animation, naively zeroing all\n * numbers turns the divisor into 0 → \"calc(var(--gap) / 0)\" → NaN.\n * We detect this by checking whether the text preceding a number\n * (split[i]) ends with \"/\" — the CSS calc division operator.\n */\nconst convertToZero = (value, splitBefore) => {\n if (typeof value === \"number\") {\n return splitBefore?.trim().endsWith(\"/\") ? value : 0;\n }\n return convertNumbersToZero(value);\n};\nfunction getAnimatableNone(v) {\n const info = analyseComplexValue(v);\n const transformer = buildTransformer(info);\n return transformer(info.values.map((value, i) => convertToZero(value, info.split[i])));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex, hasComplexValues };\n//# sourceMappingURL=index.mjs.map\n","// Adapted from https://gist.github.com/mjackson/5311256\nfunction 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//# sourceMappingURL=hsla-to-rgba.mjs.map\n","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n//# sourceMappingURL=immediate.mjs.map\n","/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n//# sourceMappingURL=number.mjs.map\n","import { warning } from 'motion-utils';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { hslaToRgba } from '../../value/types/color/hsla-to-rgba.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber } from './number.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n if (!type) {\n warning(false, `'${color}' is not an animatable color. Use the equivalent color code instead.`, \"color-not-animatable\");\n return false;\n }\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n//# sourceMappingURL=color.mjs.map\n","const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n//# sourceMappingURL=visibility.mjs.map\n","import { pipe, warning } from 'motion-utils';\nimport { isCSSVariableToken } from '../../animation/utils/is-css-variable.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { mixColor } from './color.mjs';\nimport { mixImmediate } from './immediate.mjs';\nimport { mixNumber as mixNumber$1 } from './number.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[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 matchOrder(origin, target) {\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = origin.values[originIndex] ?? 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), 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.`, \"complex-values-different\");\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n//# sourceMappingURL=complex.mjs.map\n","import { sanitize } from '../../value/types/utils/sanitize.mjs';\nimport { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\n/**\n * A single number with an optional unit, e.g. \"50%\", \"-10px\", \".5em\".\n * Exponents don't match, so they fall through to the complex mixer.\n */\nconst unitValue = /^(-?(?:\\d+(?:\\.\\d*)?|\\.\\d+))([a-z%]*)$/iu;\n/**\n * Most CSS values Motion mixes are a single number with a unit. Mixing\n * these directly produces the same output as the complex mixer\n * (\"25%\", \"0.33333px\") without tokenising both strings.\n */\nfunction mixUnit(from, to) {\n const a = unitValue.exec(from);\n if (!a)\n return;\n const b = unitValue.exec(to);\n if (!b || a[2] !== b[2])\n return;\n const unit = a[2];\n const origin = parseFloat(a[1]);\n const target = parseFloat(b[1]);\n return (p) => sanitize(mixNumber(origin, target, p)) + unit;\n}\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n if (typeof from === \"string\" && typeof to === \"string\") {\n const mixer = mixUnit(from, to);\n if (mixer)\n return mixer;\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n//# sourceMappingURL=index.mjs.map\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData } from '../../frameloop/frame-data.mjs';\nimport { cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n","const generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n//# sourceMappingURL=linear.mjs.map\n","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator, timeStep = 50, maxDuration = maxGeneratorDuration, keyframes) {\n let duration = 0;\n let state = generator.next(duration);\n keyframes?.push(state.value);\n while (!state.done && duration < maxDuration) {\n duration += timeStep;\n state = generator.next(duration);\n keyframes?.push(state.value);\n }\n return duration >= maxDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n//# sourceMappingURL=calc-duration.mjs.map\n","import { millisecondsToSeconds } from 'motion-utils';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n /**\n * The easing is generated over 0 - scale, but velocity is in the\n * value's own units, so scale it to match. Otherwise an interrupted\n * spring hands off the wrong speed, or direction. Keyframes with\n * units (colours, filters, mixed units) give NaN, which is falsy,\n * so their velocity passes through unscaled.\n */\n const { keyframes: k, velocity: v } = options;\n const delta = k && k[k.length - 1] - k[0];\n const generator = createGenerator({\n ...options,\n velocity: v && delta ? (v * scale) / delta : v,\n keyframes: [0, scale],\n });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n//# sourceMappingURL=create-generator-easing.mjs.map\n","import { millisecondsToSeconds, secondsToMilliseconds, warning, clamp } from 'motion-utils';\nimport { generateLinearEasing } from '../waapi/utils/linear.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.mjs';\nimport { createGeneratorEasing } from './utils/create-generator-easing.mjs';\n\nconst springDefaults = {\n // Default spring physics\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n // Default duration/bounce-based options\n duration: 800, // in ms\n bounce: 0.3,\n visualDuration: 0.3, // in seconds\n // Rest thresholds\n restSpeed: {\n granular: 0.01,\n default: 2,\n },\n restDelta: {\n granular: 0.005,\n default: 0.5,\n },\n // Limits\n minDuration: 0.01, // in seconds\n maxDuration: 10.0, // in seconds\n minDamping: 0.05,\n};\n/**\n * Maps bounce to a damping ratio as SwiftUI does: 0 is critically damped, and\n * it approaches undamped towards 1 and infinitely overdamped towards -1. Both\n * ends are limited so the spring still moves and settles.\n */\nconst bounceToDampingRatio = (bounce) => bounce < 0\n ? 1 / Math.max(1 + bounce, springDefaults.minDamping)\n : Math.max(1 - bounce, springDefaults.minDamping);\n/**\n * Scales an overdamped spring's undamped frequency so that, at its defining\n * time, it has as far left to go as the critically damped spring that's\n * criticalFreqTime radians in by then. A negative bounce then changes the\n * shape of the curve, not when it arrives. 1 at a damping ratio of 1, so\n * there's no jump at a bounce of 0.\n *\n * Solved by Newton on the remaining distance (times fast - slow), which is\n * convex from criticalFreqTime onwards. criticalFreqTime is always below the\n * answer, so it converges from below without overshooting.\n */\nfunction overdampedFreqScale(dampingRatio, criticalFreqTime) {\n if (!(dampingRatio > 1))\n return 1;\n const root = Math.sqrt(dampingRatio * dampingRatio - 1);\n const slow = dampingRatio - root;\n const fast = dampingRatio + root;\n const target = 2 * root * Math.exp(-criticalFreqTime) * (1 + criticalFreqTime);\n return (approximateRoot((freqTime) => fast * Math.exp(-slow * freqTime) -\n slow * Math.exp(-fast * freqTime) -\n target, (freqTime) => Math.exp(-fast * freqTime) - Math.exp(-slow * freqTime), criticalFreqTime) / criticalFreqTime);\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\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}\n/**\n * This is ported from the Framer implementation of duration-based spring resolution.\n */\nconst safeMin = 0.001;\n/**\n * Assumes zero initial velocity and the default mass: time-defined springs\n * ignore inherited velocity and only resolve without valid physics. Returns\n * NaN physics when the root search doesn't converge.\n */\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\", \"spring-duration-limit\");\n const dampingRatio = bounceToDampingRatio(bounce);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (exponentialDecay / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const e = dampingRatio *\n dampingRatio *\n undampedFreq *\n undampedFreq *\n duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(undampedFreq * undampedFreq, dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * -e * f) / g;\n };\n }\n else {\n /**\n * Critically-damped spring. Overdamped springs reuse this root,\n * scaled below.\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = undampedFreq * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = -undampedFreq * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const criticalFreq = approximateRoot(envelope, derivative, initialGuess);\n const undampedFreq = criticalFreq *\n overdampedFreqScale(dampingRatio, criticalFreq * duration);\n const stiffness = undampedFreq * undampedFreq;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(stiffness),\n duration: secondsToMilliseconds(duration),\n };\n}\n/**\n * Spring physics must be finite. stiffness and mass are also divisors so must\n * be positive, whereas a damping of 0 is a valid, perpetually oscillating\n * spring. Relational rather than Number.isFinite so numeric strings still\n * coerce.\n */\nconst isValidPhysics = (value, canBeZero) => (canBeZero ? value >= 0 : value > 0) && value < Infinity;\n/**\n * Returns value if it's usable spring physics, otherwise undefined so callers\n * fall back to the default. An explicit `undefined`, e.g. from a forwarded\n * optional prop, must fall back too. Invalid physics would otherwise resolve\n * to NaN spring values that never report done.\n */\nfunction resolvePhysics(value, canBeZero) {\n if (isValidPhysics(value, canBeZero))\n return value;\n if (process.env.NODE_ENV !== \"production\") {\n warning(value === undefined, \"Spring stiffness and mass must be positive, damping 0 or greater\", \"spring-invalid-physics\");\n }\n return undefined;\n}\nfunction getSpringOptions(options) {\n /**\n * Resolve physics before choosing between physics- and duration-based\n * resolution, so an invalid stiffness doesn't also silently discard a\n * valid duration/bounce.\n */\n const validStiffness = resolvePhysics(options.stiffness);\n const validDamping = resolvePhysics(options.damping, true);\n const validMass = resolvePhysics(options.mass);\n const springOptions = {\n ...options,\n stiffness: validStiffness ?? springDefaults.stiffness,\n damping: validDamping ?? springDefaults.damping,\n mass: validMass ?? springDefaults.mass,\n isResolvedFromDuration: false,\n // stiffness/damping/mass overrides duration/bounce\n isTimeDefined: (validStiffness ?? validDamping ?? validMass) === undefined &&\n (options.duration !== undefined || options.bounce !== undefined),\n };\n if (springOptions.isTimeDefined) {\n if (options.visualDuration) {\n const dampingRatio = bounceToDampingRatio(options.bounce || 0);\n const root = ((2 * Math.PI) / (options.visualDuration * 1.2)) *\n overdampedFreqScale(dampingRatio, (2 * Math.PI) / 1.2);\n springOptions.stiffness = root * root;\n springOptions.damping =\n 2 * dampingRatio * Math.sqrt(springOptions.stiffness);\n }\n else {\n Object.assign(springOptions, findSpring(springOptions));\n springOptions.isResolvedFromDuration = true;\n }\n /**\n * Time options can degenerate: a NaN bounce gives a NaN damping, an\n * infinite visualDuration a 0 stiffness, and findSpring NaN for both\n * when it doesn't converge. Replace the two together, so the\n * relationship duration resolution establishes between them is never\n * left half-overwritten.\n */\n if (!isValidPhysics(springOptions.stiffness) ||\n !isValidPhysics(springOptions.damping, true)) {\n springOptions.stiffness = springDefaults.stiffness;\n springOptions.damping = springDefaults.damping;\n }\n }\n return springOptions;\n}\nfunction spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {\n const options = typeof optionsOrVisualDuration !== \"object\"\n ? {\n visualDuration: optionsOrVisualDuration,\n keyframes: [0, 1],\n bounce,\n }\n : optionsOrVisualDuration;\n const origin = options.keyframes[0];\n const target = options.keyframes[options.keyframes.length - 1];\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = { done: false, value: origin };\n const { stiffness, damping, mass, duration, isResolvedFromDuration, isTimeDefined, } = getSpringOptions({ ...options });\n /**\n * Time-defined springs ignore inherited velocity. Velocity from\n * interrupted animations causes massive oscillation on small-range\n * animations.\n */\n const inheritVelocity = (velocity) => isTimeDefined ? 0 : -millisecondsToSeconds(velocity);\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\n const decay = dampingRatio * undampedAngularFreq;\n /**\n * Everything that changes when the spring is retargeted: written by\n * retarget() and update(), read by the resolvers. Grouped on one object,\n * like the coefficients (c) below. Writing doubles to object fields\n * measured marginally faster than to captured let variables in optimised\n * code; neither allocates, so this is a grouping choice, not a GC one.\n */\n const s = {\n target,\n delta: target - origin,\n velocity: inheritVelocity(options.velocity || 0) || 0,\n restSpeed: 0,\n restDelta: 0,\n };\n /**\n * If we're working on a granular scale, use smaller defaults for determining\n * when the spring is finished.\n *\n * These defaults have been selected empirically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const setRestThresholds = () => {\n const isGranularScale = Math.abs(s.delta) < 5;\n s.restSpeed =\n options.restSpeed ||\n (isGranularScale\n ? springDefaults.restSpeed.granular\n : springDefaults.restSpeed.default);\n s.restDelta =\n options.restDelta ||\n (isGranularScale\n ? springDefaults.restDelta.granular\n : springDefaults.restDelta.default);\n };\n setRestThresholds();\n let resolveSpring;\n let resolveVelocity;\n /**\n * Derives the coefficients that depend on origin, target and initial\n * velocity. Called once now and again whenever the spring is retargeted.\n */\n let update;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n /**\n * A is the position coefficient, sinC/cosC the coefficients of the\n * analytical derivative (px/ms). The exp/sin/cos terms depend only\n * on t, so they're memoized by t independently of the target: a\n * spring retargeted every frame samples the same t each frame and\n * skips the transcendentals entirely.\n */\n const c = { A: 0, sinC: 0, cosC: 0, t: -1, env: 0, sin: 0, cos: 0 };\n update = () => {\n c.A = (s.velocity + decay * s.delta) / angularFreq;\n c.sinC = decay * c.A + s.delta * angularFreq;\n c.cosC = decay * s.delta - c.A * angularFreq;\n };\n const sample = (t) => {\n if (t !== c.t) {\n c.t = t;\n c.env = Math.exp(-decay * t);\n c.sin = Math.sin(angularFreq * t);\n c.cos = Math.cos(angularFreq * t);\n }\n };\n // Underdamped spring\n resolveSpring = (t) => {\n sample(t);\n return s.target - c.env * (c.A * c.sin + s.delta * c.cos);\n };\n resolveVelocity = (t) => {\n sample(t);\n return c.env * (c.sinC * c.sin + c.cosC * c.cos);\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => s.target -\n Math.exp(-undampedAngularFreq * t) *\n (s.delta + (s.velocity + undampedAngularFreq * s.delta) * t);\n // Analytical derivative of critically damped spring (px/ms)\n const c = { C: 0 };\n update = () => {\n c.C = s.velocity + undampedAngularFreq * s.delta;\n };\n resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *\n (undampedAngularFreq * c.C * t - s.velocity);\n }\n else {\n /**\n * Overdamped spring: the sum of a slow and a fast decaying\n * exponential, so no term can overflow however heavily it's damped.\n */\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n const slow = decay - dampedAngularFreq;\n const fast = decay + dampedAngularFreq;\n /**\n * Physics-defined springs keep a non-physical limit: once\n * dampedAngularFreq * t passes 300, both terms decay at the damping\n * rate. Heavily overdamped drag springs (dragElastic: 0,\n * dragTransition) rely on this to settle almost at once rather than\n * creep at stiffness / damping. Negative bounce needs the exact\n * curve, so time-defined springs are exempt.\n */\n const limit = isTimeDefined ? Infinity : 300 / dampedAngularFreq;\n const decayAt = (rate, t) => Math.exp(t > limit ? -rate * limit - decay * (t - limit) : -rate * t);\n const c = { S: 0, F: 0 };\n update = () => {\n const P = (s.velocity + decay * s.delta) / dampedAngularFreq;\n c.S = (s.delta + P) / 2;\n c.F = (s.delta - P) / 2;\n };\n resolveSpring = (t) => s.target - c.S * decayAt(slow, t) - c.F * decayAt(fast, t);\n // Analytical derivative of overdamped spring (px/ms)\n resolveVelocity = (t) => slow * c.S * decayAt(slow, t) + fast * c.F * decayAt(fast, t);\n }\n update();\n const calculatedDuration = isResolvedFromDuration ? duration || null : null;\n const generator = {\n calculatedDuration,\n /**\n * Aim the spring at a new target from its current position and\n * velocity, reusing the resolved physics and closures.\n */\n retarget: (keyframes, newVelocity) => {\n s.target = keyframes[keyframes.length - 1];\n s.delta = s.target - keyframes[0];\n s.velocity = inheritVelocity(newVelocity);\n // Default thresholds depend on the scale of the new delta\n if (!(options.restSpeed && options.restDelta))\n setRestThresholds();\n // Invalidate any duration lazily cached by JSAnimation\n generator.calculatedDuration = calculatedDuration;\n state.done = false;\n update();\n },\n velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n const currentVelocity = secondsToMilliseconds(resolveVelocity(t));\n state.done =\n Math.abs(currentVelocity) <= s.restSpeed &&\n Math.abs(s.target - current) <= s.restDelta;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? s.target : current;\n return state;\n },\n toString: () => {\n const easingDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n const easing = generateLinearEasing((progress) => generator.next(easingDuration * progress).value, easingDuration, 30);\n return easingDuration + \"ms \" + easing;\n },\n toTransition: () => { },\n };\n return generator;\n}\nspring.applyToOptions = (options) => {\n const generatorOptions = createGeneratorEasing(options, 100, spring);\n options.ease = generatorOptions.ease;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n return options;\n};\n\nexport { spring };\n//# sourceMappingURL=spring.mjs.map\n","import { spring } from './spring.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => v < min || v > max;\n const nearestBoundary = (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 let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : target + delta;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n /**\n * The friction curve is target + calcDelta(t), so its exact\n * derivative is -calcDelta(t) / timeConstant in units/ms,\n * converted here to the units/second expected by spring.\n */\n velocity: (-calcDelta(t) / timeConstant) * 1000,\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n","import { invariant, clamp, MotionGlobalConfig, noop, pipe, progress } from 'motion-utils';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || MotionGlobalConfig.mix || mix;\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] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revisit this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\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\", \"range-length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n//# sourceMappingURL=interpolate.mjs.map\n","import { progress } from 'motion-utils';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n//# sourceMappingURL=fill.mjs.map\n","import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n//# sourceMappingURL=default.mjs.map\n","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n//# sourceMappingURL=time.mjs.map\n","import { easeInOut, isEasingArray, easingDefinitionToFunction, MotionGlobalConfig, clamp } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { mix } from '../../utils/mix/index.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease) || easeInOut;\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Fast setup path for two keyframes one easing.\n */\n if (keyframeValues.length === 2 &&\n !Array.isArray(easingFunctions) &&\n (!times ||\n times.length !== 2 ||\n (times[0] === 0 && times[1] === 1))) {\n const [origin, target] = keyframeValues;\n const mixer = origin === target\n ? undefined\n : (MotionGlobalConfig.mix || mix)(origin, target);\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mixer\n ? mixer(easingFunctions(duration > 0 ? clamp(0, 1, t / duration) : 1))\n : target;\n state.done = t >= duration;\n return state;\n },\n };\n }\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n","import { velocityPerSecond } from 'motion-utils';\n\nconst velocitySampleDuration = 5; // ms\nfunction getGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n/**\n * A generator's velocity at time t in units/second: analytical where the\n * generator provides it (springs), otherwise by finite difference. Before\n * the animation has started this is its initial velocity.\n */\nfunction calcGeneratorVelocity(generator, t, initialVelocity = 0) {\n if (t <= 0)\n return initialVelocity;\n return generator.velocity\n ? generator.velocity(t)\n : getGeneratorVelocity((s) => generator.next(s).value, t, generator.next(t).value);\n}\n\nexport { calcGeneratorVelocity, getGeneratorVelocity };\n//# sourceMappingURL=velocity.mjs.map\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe, speed = 1) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const useFirstKeyframe = speed < 0 || (repeat && repeatType !== \"loop\" && repeat % 2 === 1);\n const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n//# sourceMappingURL=get-final.mjs.map\n","import { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { spring } from '../generators/spring.mjs';\n\nconst transitionTypeMap = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nfunction replaceTransitionType(transition) {\n if (typeof transition.type === \"string\") {\n transition.type = transitionTypeMap[transition.type];\n }\n}\n\nexport { replaceTransitionType };\n//# sourceMappingURL=replace-transition-type.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\n\n/**\n * If an animation's keyframes resolve, or its first frame renders, more than\n * this long after its start time, it starts from then instead. While we prefer\n * to \"start\" an animation as soon as it's triggered, this avoids a visual jump\n * into it after main thread work.\n *\n * Manual timing steps frames by however long it likes, so never lags.\n */\nconst MAX_START_DELAY = 40;\nconst resolveStartTime = (startTime, now) => now - startTime > MAX_START_DELAY && !MotionGlobalConfig.useManualTiming\n ? now\n : startTime;\n\nexport { resolveStartTime };\n//# sourceMappingURL=resolve-start-time.mjs.map\n","import { frameData } from '../../frameloop/frame-data.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\n\nfunction baseRecord(kind, animation) {\n return {\n kind,\n animation,\n timestamp: time.now(),\n frameTimestamp: frameData.timestamp,\n frameIsProcessing: frameData.isProcessing,\n };\n}\n/**\n * Notify an optional inspector without adding a public Motion API.\n *\n * The record is a raw firehose: the live animation handle, the concrete\n * animation's internal options object untouched (timing fields in\n * internal milliseconds, name/keyframes/element/motionValue still\n * attached), a timestamp and the raw frameloop state at notify time.\n * All interpretation belongs to the consumer behind\n * globalThis.__MOTION_INSPECT__.\n */\nfunction notifyAnimationStart(animation, options, transition) {\n const notify = globalThis.__MOTION_INSPECT__;\n if (!notify)\n return;\n try {\n notify({\n ...baseRecord(\"animation-start\", animation),\n options: transition ? { ...options, ...transition } : options,\n });\n }\n catch { }\n}\n/**\n * Layout animations drive a projection node's progress rather than a\n * property, so the record forwards the live node itself: it carries the\n * DOM instance, the layout options (layoutId) and the progress handle.\n * Fired inside the frame.update that starts the animation, so nodes\n * animating in the same layout commit share frameTimestamp.\n */\nfunction notifyLayoutAnimationStart(animation, node) {\n const notify = globalThis.__MOTION_INSPECT__;\n if (!notify)\n return;\n try {\n notify({\n ...baseRecord(\"layout-animation-start\", animation),\n node,\n });\n }\n catch { }\n}\n\nexport { notifyAnimationStart, notifyLayoutAnimationStart };\n//# sourceMappingURL=notify-inspector.mjs.map\n","class WithPromise {\n constructor() {\n this.isResolved = false;\n }\n get finished() {\n if (!this._finished) {\n this._finished = this.isResolved\n ? Promise.resolve()\n : new Promise((resolve) => {\n this._resolve = resolve;\n });\n }\n return this._finished;\n }\n updateFinished() {\n this._finished = this._resolve = undefined;\n this.isResolved = false;\n }\n notifyFinished() {\n this.isResolved = true;\n this._resolve?.();\n }\n /**\n * Allows the animation to be awaited.\n *\n * @deprecated Use `finished` instead.\n */\n then(onResolve, onReject) {\n return this.finished.then(onResolve, onReject);\n }\n}\n\nexport { WithPromise };\n//# sourceMappingURL=WithPromise.mjs.map\n","import { invariant, pipe, clamp, millisecondsToSeconds, secondsToMilliseconds } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { mix } from '../utils/mix/index.mjs';\nimport { frameloopDriver } from './drivers/frame.mjs';\nimport { inertia } from './generators/inertia.mjs';\nimport { keyframes } from './generators/keyframes.mjs';\nimport { calcGeneratorDuration } from './generators/utils/calc-duration.mjs';\nimport { calcGeneratorVelocity } from './generators/utils/velocity.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { resolveStartTime } from './utils/resolve-start-time.mjs';\nimport { notifyAnimationStart } from './utils/notify-inspector.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\n\nconst percentToProgress = (percent) => percent / 100;\nconst round = (value) => Math.round(value * 10000) / 10000;\nclass JSAnimation extends WithPromise {\n constructor(options) {\n super();\n this.state = \"idle\";\n this.startTime = null;\n this.isStopped = false;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * Reusable state object for the delay phase to avoid\n * allocating a new object every frame.\n */\n this.delayState = {\n done: false,\n value: undefined,\n };\n /**\n * This method is bound to the instance to fix a pattern where\n * animation.stop is returned as a reference from a useEffect.\n */\n this.stop = () => {\n const { motionValue } = this.options;\n if (motionValue && motionValue.updatedAt !== time.now()) {\n this.tick(time.now());\n }\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n this.options.onStop?.();\n };\n this.options = options;\n this.initAnimation();\n this.play();\n if (options.autoplay === false)\n this.pause();\n notifyAnimationStart(this, this.options);\n }\n initAnimation() {\n const { options } = this;\n replaceTransitionType(options);\n const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = options;\n let { keyframes: keyframes$1 } = options;\n const generatorFactory = type || keyframes;\n if (process.env.NODE_ENV !== \"production\" &&\n generatorFactory !== keyframes) {\n invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`, \"spring-two-frames\");\n }\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory(keyframes$1 === options.keyframes\n ? options\n : { ...options, keyframes: keyframes$1 });\n /**\n * If we have a mirror repeat type we need to create a second generator that outputs the\n * mirrored (not reversed) animation and later ping pong between the two generators.\n */\n if (repeatType === \"mirror\") {\n this.mirroredGenerator = generatorFactory({\n ...options,\n keyframes: [...keyframes$1].reverse(),\n velocity: -velocity,\n });\n }\n /**\n * If duration is undefined and we have repeat options,\n * we need to calculate a duration from the generator.\n *\n * We set it to the generator itself to cache the duration.\n * Any timeline resolver will need to have already precalculated\n * the duration by this step.\n */\n if (generator.calculatedDuration === null) {\n generator.calculatedDuration = calcGeneratorDuration(generator);\n }\n const { calculatedDuration } = generator;\n this.calculatedDuration = calculatedDuration;\n this.resolvedDuration = calculatedDuration + repeatDelay;\n this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;\n this.generator = generator;\n }\n updateTime(timestamp) {\n const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;\n // Update currentTime\n if (this.holdTime !== null) {\n this.currentTime = this.holdTime;\n }\n else {\n // Rounding the time because floating point arithmetic is not always accurate, e.g. 3000.367 - 1000.367 =\n // 2000.0000000000002. This is a problem when we are comparing the currentTime with the duration, for\n // example.\n this.currentTime = animationTime;\n }\n }\n tick(timestamp, sample = false) {\n const { generator, totalDuration, calculatedDuration } = this;\n if (this.startTime === null)\n return generator.next(0);\n const { delay = 0, keyframes, type, onUpdate, finalKeyframe, } = this.options;\n if (this.startTime === this.pendingStartTime) {\n this.startTime = resolveStartTime(this.startTime, timestamp);\n }\n this.pendingStartTime = undefined;\n /**\n * requestAnimationFrame timestamps can come through as lower than\n * the startTime as set by performance.now(). Here we prevent this,\n * though in the future it could be possible to make setting startTime\n * a pending operation that gets resolved here.\n */\n if (this.speed > 0) {\n this.startTime = Math.min(this.startTime, timestamp);\n }\n else if (this.speed < 0) {\n this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);\n }\n if (sample) {\n this.currentTime = timestamp;\n }\n else {\n this.updateTime(timestamp);\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);\n const isInDelayPhase = this.playbackSpeed >= 0\n ? timeWithoutDelay < 0\n : timeWithoutDelay > totalDuration;\n this.currentTime = Math.max(timeWithoutDelay, 0);\n // If this animation has finished, set the current time to the total duration.\n if (this.state === \"finished\" && this.holdTime === null) {\n this.currentTime = totalDuration;\n }\n const state = this.generate(this.currentTime, isInDelayPhase);\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.playbackSpeed >= 0\n ? this.currentTime >= totalDuration\n : this.currentTime <= 0;\n }\n const isAnimationFinished = this.holdTime === null &&\n (this.state === \"finished\" || (this.state === \"running\" && done));\n // TODO: The exception for inertia could be cleaner here\n if (isAnimationFinished && type !== inertia) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n /**\n * This animation's time, including delay, at a timestamp.\n */\n at(timestamp) {\n return (this.holdTime ??\n round((timestamp - this.startTime) * this.playbackSpeed));\n }\n /**\n * The value at a timestamp, without changing this animation's state.\n * If resolved, it ends at the last resolved keyframe, which is in the\n * same unit as the others, rather than at finalKeyframe.\n */\n sampleAt(timestamp, resolved) {\n const { options, totalDuration } = this;\n const t = this.at(timestamp) - (options.delay || 0);\n return t >= totalDuration && options.type !== inertia\n ? getFinalKeyframe(options.keyframes, options, resolved ? undefined : options.finalKeyframe)\n : this.generate(Math.max(t, 0), t < 0).value;\n }\n /**\n * The generator's state `currentTime` ms after the delay, without\n * changing the animation's own state.\n */\n generate(currentTime, isInDelayPhase) {\n const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, } = this;\n const { keyframes, repeat, repeatType, repeatDelay } = this.options;\n let elapsed = currentTime;\n let frameGenerator = generator;\n if (repeat) {\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = Math.min(currentTime, totalDuration) / resolvedDuration;\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n iterationProgress === 1 && currentIteration--;\n currentIteration = Math.min(currentIteration, repeat + 1);\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const isOddIteration = Boolean(currentIteration % 2);\n if (isOddIteration) {\n if (repeatType === \"reverse\") {\n iterationProgress = 1 - iterationProgress;\n if (repeatDelay) {\n iterationProgress -= repeatDelay / resolvedDuration;\n }\n }\n else if (repeatType === \"mirror\") {\n frameGenerator = mirroredGenerator;\n }\n }\n elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;\n }\n /**\n * If we're in negative time, set state as the initial keyframe.\n * This prevents delay: x, duration: 0 animations from finishing\n * instantly.\n */\n let state;\n if (isInDelayPhase) {\n this.delayState.value = keyframes[0];\n state = this.delayState;\n }\n else {\n state = frameGenerator.next(elapsed);\n }\n if (mixKeyframes && !isInDelayPhase) {\n state.value = mixKeyframes(state.value);\n }\n return state;\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.finished.then(resolve, reject);\n }\n get duration() {\n return millisecondsToSeconds(this.calculatedDuration);\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(this.currentTime);\n }\n set time(newTime) {\n newTime = secondsToMilliseconds(newTime);\n this.currentTime = newTime;\n if (this.startTime === null ||\n this.holdTime !== null ||\n this.playbackSpeed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.playbackSpeed;\n }\n if (this.driver) {\n this.driver.start(false);\n }\n else {\n this.startTime = 0;\n this.state = \"paused\";\n this.holdTime = newTime;\n this.tick(newTime);\n }\n }\n /**\n * Returns the generator's velocity at the current time in units/second.\n * Uses the analytical derivative when available (springs), avoiding\n * the MotionValue's frame-dependent velocity estimation.\n */\n getGeneratorVelocity() {\n return calcGeneratorVelocity(this.generator, this.currentTime, this.options.velocity);\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n if (hasChanged && this.driver) {\n this.updateTime(time.now());\n }\n this.playbackSpeed = newSpeed;\n if (hasChanged && this.driver) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n this.options.onPlay?.();\n const now = this.driver.now();\n if (this.state === \"finished\") {\n this.updateFinished();\n this.startTime = now;\n }\n else if (this.holdTime !== null) {\n this.startTime = now - this.holdTime / (this.playbackSpeed || 1);\n }\n else if (!this.startTime) {\n this.startTime = startTime ?? (this.pendingStartTime = now);\n }\n if (this.state === \"finished\" && this.speed < 0) {\n this.startTime += this.calculatedDuration;\n }\n this.holdTime = null;\n /**\n * Set playState to running only after we've used it in\n * the previous logic.\n */\n this.state = \"running\";\n this.driver.start();\n }\n pause() {\n this.state = \"paused\";\n this.updateTime(time.now());\n this.holdTime = this.currentTime;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.notifyFinished();\n this.teardown();\n this.state = \"finished\";\n this.options.onComplete?.();\n }\n cancel() {\n this.holdTime = null;\n this.startTime = 0;\n this.tick(0);\n this.teardown();\n this.options.onCancel?.();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.startTime = this.holdTime = null;\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(sampleTime) {\n this.startTime = 0;\n return this.tick(sampleTime, true);\n }\n attachTimeline(timeline) {\n if (this.options.allowFlatten) {\n this.options.type = \"keyframes\";\n this.options.ease = \"linear\";\n this.initAnimation();\n }\n this.driver?.stop();\n return timeline.observe(this);\n }\n}\n// Legacy function support\nfunction animateValue(options) {\n return new JSAnimation(options);\n}\n\nexport { JSAnimation, animateValue, round };\n//# sourceMappingURL=JSAnimation.mjs.map\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\n\n/**\n * Properties that should default to 1 or 100%\n */\nconst maxDefaults = new Set([\"brightness\", \"contrast\", \"saturate\", \"opacity\"]);\nfunction applyDefaultFilter(v) {\n const [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 = /\\b([a-z-]*)\\(.*?\\)/gu;\nconst filter = {\n ...complex,\n getAnimatableNone: (v) => {\n const functions = v.match(functionRegex);\n return functions ? functions.map(applyDefaultFilter).join(\" \") : v;\n },\n};\n\nexport { filter };\n//# sourceMappingURL=filter.mjs.map\n","import { complex } from './index.mjs';\n\nconst mask = {\n ...complex,\n getAnimatableNone: (v) => {\n const parsed = complex.parse(v);\n const transformer = complex.createTransformer(v);\n return transformer(parsed.map((v) => typeof v === \"number\" ? 0 : typeof v === \"object\" ? { ...v, alpha: 1 } : v));\n },\n};\n\nexport { mask };\n//# sourceMappingURL=mask.mjs.map\n","import { number } from './numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n//# sourceMappingURL=int.mjs.map\n","import { alpha, scale } from '../numbers/index.mjs';\nimport { px, progressPercentage, degrees } from '../numbers/units.mjs';\n\nconst transformValueTypes = {\n rotate: degrees,\n /**\n * Internal channel for `transition.path` orientToPath. Composed onto\n * `rotate` at the transform-build sites so the user's `rotate` is\n * never read or overwritten. Not part of `transformPropOrder`.\n */\n pathRotation: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n 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};\n\nexport { transformValueTypes };\n//# sourceMappingURL=transform.mjs.map\n","import { int } from '../int.mjs';\nimport { alpha } from '../numbers/index.mjs';\nimport { px } from '../numbers/units.mjs';\nimport { transformValueTypes } from './transform.mjs';\n\nconst numberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: 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 top: px,\n right: px,\n bottom: px,\n left: px,\n inset: px,\n insetBlock: px,\n insetBlockStart: px,\n insetBlockEnd: px,\n insetInline: px,\n insetInlineStart: px,\n insetInlineEnd: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n paddingBlock: px,\n paddingBlockStart: px,\n paddingBlockEnd: px,\n paddingInline: px,\n paddingInlineStart: px,\n paddingInlineEnd: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n marginBlock: px,\n marginBlockStart: px,\n marginBlockEnd: px,\n marginInline: px,\n marginInlineStart: px,\n marginInlineEnd: px,\n // Typography\n fontSize: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n ...transformValueTypes,\n zIndex: int,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n//# sourceMappingURL=number.mjs.map\n","import { color } from '../color/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { numberValueTypes } from './number.mjs';\n\n/**\n * A map of default value types for common values\n */\nconst defaultValueTypes = {\n ...numberValueTypes,\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n filter,\n WebkitFilter: filter,\n mask,\n WebkitMask: mask,\n};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n//# sourceMappingURL=defaults.mjs.map\n","import { complex } from '../complex/index.mjs';\nimport { filter } from '../complex/filter.mjs';\nimport { mask } from '../complex/mask.mjs';\nimport { getDefaultValueType } from '../maps/defaults.mjs';\n\nconst customTypes = /*@__PURE__*/ new Set([filter, mask]);\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (!customTypes.has(defaultValueType))\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n//# sourceMappingURL=animatable-none.mjs.map\n","function fillWildcards(keyframes) {\n for (let i = 1; i < keyframes.length; i++) {\n keyframes[i] ?? (keyframes[i] = keyframes[i - 1]);\n }\n}\n\nexport { fillWildcards };\n//# sourceMappingURL=fill-wildcards.mjs.map\n","const radToDeg = (rad) => (rad * 180) / Math.PI;\nconst rotate = (v) => {\n const angle = radToDeg(Math.atan2(v[1], v[0]));\n return rebaseAngle(angle);\n};\nconst matrix2dParsers = {\n x: 4,\n y: 5,\n translateX: 4,\n translateY: 5,\n scaleX: 0,\n scaleY: 3,\n scaleZ: () => 1,\n scale: (v) => (Math.abs(v[0]) + Math.abs(v[3])) / 2,\n rotate,\n rotateZ: rotate,\n skewX: (v) => radToDeg(Math.atan(v[1])),\n skewY: (v) => radToDeg(Math.atan(v[2])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[2])) / 2,\n};\nconst rebaseAngle = (angle) => {\n angle = angle % 360;\n if (angle < 0)\n angle += 360;\n return angle;\n};\nconst rotateZ = rotate;\nconst scaleX = (v) => Math.hypot(v[0], v[1]);\nconst scaleY = (v) => Math.hypot(v[4], v[5]);\nconst matrix3dParsers = {\n x: 12,\n y: 13,\n z: 14,\n translateX: 12,\n translateY: 13,\n translateZ: 14,\n scaleX,\n scaleY,\n scaleZ: (v) => Math.hypot(v[8], v[9], v[10]),\n scale: (v) => (scaleX(v) + scaleY(v)) / 2,\n rotateX: (v) => rebaseAngle(radToDeg(Math.atan2(v[6], v[5]))),\n rotateY: (v) => rebaseAngle(radToDeg(Math.atan2(-v[2], v[0]))),\n rotateZ,\n rotate: rotateZ,\n skewX: (v) => radToDeg(Math.atan(v[4])),\n skewY: (v) => radToDeg(Math.atan(v[1])),\n skew: (v) => (Math.abs(v[1]) + Math.abs(v[4])) / 2,\n};\nfunction defaultTransformValue(name) {\n return name.includes(\"scale\") ? 1 : 0;\n}\nfunction parseValueFromTransform(transform, name) {\n if (!transform || transform === \"none\") {\n return defaultTransformValue(name);\n }\n const matrix3dMatch = transform.match(/^matrix3d\\(([-\\d.e\\s,]+)\\)$/u);\n let parsers;\n let match;\n if (matrix3dMatch) {\n parsers = matrix3dParsers;\n match = matrix3dMatch;\n }\n else {\n const matrix2dMatch = transform.match(/^matrix\\(([-\\d.e\\s,]+)\\)$/u);\n parsers = matrix2dParsers;\n match = matrix2dMatch;\n }\n if (!match) {\n return defaultTransformValue(name);\n }\n const valueParser = parsers[name];\n const values = match[1].split(\",\").map(convertTransformToNumber);\n return typeof valueParser === \"function\"\n ? valueParser(values)\n : values[valueParser];\n}\nconst readTransformValue = (instance, name) => {\n const { transform = \"none\" } = getComputedStyle(instance);\n return parseValueFromTransform(transform, name);\n};\nfunction convertTransformToNumber(value) {\n return parseFloat(value.trim());\n}\n\nexport { defaultTransformValue, parseValueFromTransform, readTransformValue };\n//# sourceMappingURL=parse-transform.mjs.map\n","/**\n * Generate a list of every possible transform key.\n */\nconst transformPropOrder = [\n \"transformPerspective\",\n \"x\",\n \"y\",\n \"z\",\n \"translateX\",\n \"translateY\",\n \"translateZ\",\n \"scale\",\n \"scaleX\",\n \"scaleY\",\n \"scaleZ\",\n \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n *\n * `pathRotation` is a transform for routing purposes (skipped from raw\n * style application, wired to the transform composite, flags transform\n * dirty) but is intentionally NOT in `transformPropOrder` — it is\n * composed onto `rotate` at the build sites, not serialized in its own\n * slot, and must stay out of the order-array consumers (parse-transform,\n * unit-conversion, keys-position).\n */\nconst transformProps = /*@__PURE__*/ (() => new Set([...transformPropOrder, \"pathRotation\"]))();\n\nexport { transformPropOrder, transformProps };\n//# sourceMappingURL=keys-transform.mjs.map\n","import { parseValueFromTransform } from '../../../render/dom/parse-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst isNumOrPxType = (v) => v === number || v === px;\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\n/**\n * Reset any bounding box-changing transforms so the element can be\n * measured. Returns the values to restore. Values already at their\n * default don't change the box, so they're left alone: an element with\n * only `rotate: 0` doesn't need to be re-rendered before measuring.\n */\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n const current = value.get();\n const reset = key.startsWith(\"scale\") ? 1 : 0;\n if (current === reset)\n return;\n removedTransforms.push([key, current]);\n value.set(reset);\n }\n });\n return removedTransforms;\n}\n/**\n * Values that can only be measured from the bounding box. Elements with\n * these values need bounding box-changing transforms removed first.\n */\nconst boxDependentValues = new Set([\"bottom\", \"right\"]);\n/**\n * Computed width/height is already in pixels and unaffected by\n * transforms. It's \"auto\" for elements without a layout box (e.g. inline),\n * in which case we fall back to measuring the bounding box.\n */\nfunction measureDimension(computed, measureBox, axis, paddingStart, paddingEnd, boxSizing) {\n const px = parseFloat(computed);\n if (!isNaN(px))\n return px;\n const { min, max } = measureBox()[axis];\n const size = max - min;\n return boxSizing === \"border-box\"\n ? size\n : size - parseFloat(paddingStart) - parseFloat(paddingEnd);\n}\nconst positionalValues = {\n // Dimensions\n width: ({ width, paddingLeft = \"0\", paddingRight = \"0\", boxSizing }, measureBox) => measureDimension(width, measureBox, \"x\", paddingLeft, paddingRight, boxSizing),\n height: ({ height, paddingTop = \"0\", paddingBottom = \"0\", boxSizing }, measureBox) => measureDimension(height, measureBox, \"y\", paddingTop, paddingBottom, boxSizing),\n top: ({ top }) => parseFloat(top),\n left: ({ left }) => parseFloat(left),\n bottom: ({ top }, measureBox) => {\n const { y } = measureBox();\n return parseFloat(top) + (y.max - y.min);\n },\n right: ({ left }, measureBox) => {\n const { x } = measureBox();\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: ({ transform }) => parseValueFromTransform(transform, \"x\"),\n y: ({ transform }) => parseValueFromTransform(transform, \"y\"),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { boxDependentValues, isNumOrPxType, positionalValues, removeNonTranslationalTransform };\n//# sourceMappingURL=unit-conversion.mjs.map\n","import { isNumericalString, isZeroValueString } from 'motion-utils';\nimport { complex } from '../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../value/types/utils/animatable-none.mjs';\nimport { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { boxDependentValues, removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = [];\n const elementsToMeasure = new Set();\n const elementsToUntransform = new Set();\n toResolve.forEach((resolver) => {\n if (!resolver.needsMeasurement)\n return;\n resolversToMeasure.push(resolver);\n elementsToMeasure.add(resolver.element);\n if (boxDependentValues.has(resolver.name)) {\n elementsToUntransform.add(resolver.element);\n }\n });\n const transformsToRestore = new Map();\n /**\n * Write pass\n * Values measured from the bounding box need bounding box-changing\n * transforms removed first. Values read from computed style don't.\n */\n elementsToUntransform.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\n/**\n * Normalise a value read from the subject into an animation origin: a\n * number read as a string (\"0\", \"200\") becomes a number, and a value\n * that isn't animatable (e.g. \"none\") but whose target is becomes an\n * animatable zero in the shape of the target.\n */\nfunction readOrigin(value, name, target) {\n if (typeof value === \"string\") {\n if (isNumericalString(value) || isZeroValueString(value)) {\n return parseFloat(value);\n }\n else if (!complex.test(value) && complex.test(target)) {\n return getAnimatableNone(name, target);\n }\n }\n return value ?? undefined;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = readOrigin(element.readValue(name, finalKeyframe), name, finalKeyframe);\n if (valueAsRead !== undefined) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n//# sourceMappingURL=KeyframesResolver.mjs.map\n","const isCSSVar = (name) => name.startsWith(\"--\");\n\nexport { isCSSVar };\n//# sourceMappingURL=is-css-var.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction setStyle(element, name, value) {\n isCSSVar(name)\n ? element.style.setProperty(name, value)\n : (element.style[name] = value);\n}\n\nexport { setStyle };\n//# sourceMappingURL=style-set.mjs.map\n","/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {};\n\nexport { supportsFlags };\n//# sourceMappingURL=flags.mjs.map\n","import { memo } from 'motion-utils';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => supportsFlags[supportsFlag] ?? memoized();\n}\n\nexport { memoSupports };\n//# sourceMappingURL=memo.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsScrollTimeline = /* @__PURE__ */ memoSupports(() => window.ScrollTimeline !== undefined, \"scrollTimeline\");\nconst supportsViewTimeline = /* @__PURE__ */ memoSupports(() => window.ViewTimeline !== undefined, \"viewTimeline\");\n\nexport { supportsScrollTimeline, supportsViewTimeline };\n//# sourceMappingURL=scroll-timeline.mjs.map\n","import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n//# sourceMappingURL=linear-easing.mjs.map\n","const cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { cubicBezierAsString };\n//# sourceMappingURL=cubic-bezier.mjs.map\n","import { cubicBezierAsString } from './cubic-bezier.mjs';\n\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\n\nexport { supportedWaapiEasing };\n//# sourceMappingURL=supported.mjs.map\n","import { isBezierDefinition } from 'motion-utils';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from '../utils/linear.mjs';\nimport { cubicBezierAsString } from './cubic-bezier.mjs';\nimport { supportedWaapiEasing } from './supported.mjs';\n\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\") {\n return supportsLinearEasing()\n ? generateLinearEasing(easing, duration)\n : \"ease-out\";\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { mapEasingToNativeEasing };\n//# sourceMappingURL=map-easing.mjs.map\n","import { mapEasingToNativeEasing } from './easing/map-easing.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeOut\", times, } = {}, pseudoElement = undefined) {\n const keyframeOptions = {\n [valueName]: keyframes,\n };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n const options = {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n };\n if (pseudoElement)\n options.pseudoElement = pseudoElement;\n return element.animate(keyframeOptions, options);\n}\n\nexport { startWaapiAnimation };\n//# sourceMappingURL=start-waapi-animation.mjs.map\n","function isGenerator(type) {\n return typeof type === \"function\" && \"applyToOptions\" in type;\n}\n\nexport { isGenerator };\n//# sourceMappingURL=is-generator.mjs.map\n","import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\n\nfunction applyGeneratorOptions({ type, ...options }) {\n if (isGenerator(type) && supportsLinearEasing()) {\n return type.applyToOptions(options);\n }\n else {\n options.duration ?? (options.duration = 300);\n options.ease ?? (options.ease = \"easeOut\");\n }\n return options;\n}\n\nexport { applyGeneratorOptions };\n//# sourceMappingURL=apply-generator.mjs.map\n","import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { notifyAnimationStart } from './utils/notify-inspector.mjs';\nimport { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';\nimport { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';\n\n/**\n * NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.\n */\nclass NativeAnimation extends WithPromise {\n constructor(options) {\n super();\n this.finishedTime = null;\n this.isStopped = false;\n /**\n * Tracks a manually-set start time that takes precedence over WAAPI's\n * dynamic startTime. This is cleared when play() or time setter is called,\n * allowing WAAPI to take over timing.\n */\n this.manualStartTime = null;\n if (!options)\n return;\n const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;\n this.isPseudoElement = Boolean(pseudoElement);\n this.allowFlatten = allowFlatten;\n this.options = options;\n invariant(typeof options.type !== \"string\", `Mini animate() doesn't support \"type\" as a string.`, \"mini-spring\");\n const transition = applyGeneratorOptions(options);\n this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);\n if (transition.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = () => {\n this.finishedTime = this.time;\n if (!pseudoElement) {\n const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);\n if (this.updateMotionValue) {\n this.updateMotionValue(keyframe);\n }\n /**\n * If we can, we want to commit the final style as set by the user,\n * rather than the computed keyframe value supplied by the animation.\n * We always do this, even when a motion value is present, to prevent\n * a visual flash in Firefox where the WAAPI animation's fill is removed\n * during cancel() before the scheduled render can apply the correct value.\n */\n setStyle(element, name, keyframe);\n this.animation.cancel();\n }\n onComplete?.();\n this.notifyFinished();\n };\n notifyAnimationStart(this, options, transition);\n }\n play() {\n if (this.isStopped)\n return;\n this.manualStartTime = null;\n this.animation.play();\n if (this.state === \"finished\") {\n this.updateFinished();\n }\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.finish?.();\n }\n cancel() {\n try {\n this.animation.cancel();\n }\n catch (e) { }\n }\n stop() {\n if (this.isStopped)\n return;\n this.isStopped = true;\n const { state } = this;\n if (state === \"idle\" || state === \"finished\") {\n return;\n }\n if (this.updateMotionValue) {\n this.updateMotionValue();\n }\n else {\n this.commitStyles();\n }\n if (!this.isPseudoElement)\n this.cancel();\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * In this method, we commit styles back to the DOM before cancelling\n * the animation.\n *\n * This is designed to be overridden by NativeAnimationExtended, which\n * will create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to also correctly calculate velocity for any subsequent animation\n * while deferring the commit until the next animation frame.\n */\n commitStyles() {\n const element = this.options?.element;\n if (!this.isPseudoElement && element?.isConnected) {\n this.animation.commitStyles?.();\n }\n }\n get duration() {\n const duration = this.animation.effect?.getComputedTiming?.().duration || 0;\n return millisecondsToSeconds(Number(duration));\n }\n get iterationDuration() {\n const { delay = 0 } = this.options || {};\n return this.duration + millisecondsToSeconds(delay);\n }\n get time() {\n return millisecondsToSeconds(Number(this.animation.currentTime) || 0);\n }\n set time(newTime) {\n const wasFinished = this.finishedTime !== null;\n this.manualStartTime = null;\n this.finishedTime = null;\n this.animation.currentTime = secondsToMilliseconds(newTime);\n if (wasFinished) {\n this.animation.pause();\n }\n }\n /**\n * The playback speed of the animation.\n * 1 = normal speed, 2 = double speed, 0.5 = half speed.\n */\n get speed() {\n return this.animation.playbackRate;\n }\n set speed(newSpeed) {\n // Allow backwards playback after finishing\n if (newSpeed < 0)\n this.finishedTime = null;\n this.animation.playbackRate = newSpeed;\n }\n get state() {\n return this.finishedTime !== null\n ? \"finished\"\n : this.animation.playState;\n }\n get startTime() {\n return this.manualStartTime ?? Number(this.animation.startTime);\n }\n set startTime(newStartTime) {\n this.manualStartTime = this.animation.startTime = newStartTime;\n }\n /**\n * Attaches a timeline to the animation, for instance the `ScrollTimeline`.\n */\n attachTimeline({ timeline, onAttach, observe, }) {\n if (this.allowFlatten) {\n this.animation.effect?.updateTiming({ easing: \"linear\" });\n }\n this.animation.onfinish = null;\n if (timeline && supportsScrollTimeline()) {\n this.animation.timeline = timeline;\n onAttach?.(this.animation);\n return noop;\n }\n else {\n return observe(this);\n }\n }\n}\n\nexport { NativeAnimation };\n//# sourceMappingURL=NativeAnimation.mjs.map\n","import { circInOut, backInOut, anticipate } from 'motion-utils';\n\nconst unsupportedEasingFunctions = {\n anticipate,\n backInOut,\n circInOut,\n};\nfunction isUnsupportedEase(key) {\n return key in unsupportedEasingFunctions;\n}\nfunction replaceStringEasing(transition) {\n if (typeof transition.ease === \"string\" &&\n isUnsupportedEase(transition.ease)) {\n transition.ease = unsupportedEasingFunctions[transition.ease];\n }\n}\n\nexport { replaceStringEasing };\n//# sourceMappingURL=unsupported-easing.mjs.map\n","import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * The animation's time now, in ms. Wall-clock rather than WAAPI's\n * currentTime while running, as under CPU load currentTime may not\n * reflect the actual elapsed time, causing incorrect sampling and\n * visual jumps.\n */\n elapsed() {\n return this.state === \"running\"\n ? (time.now() - this.startTime) * this.speed\n : this.time * 1000;\n }\n /**\n * The value at a time, from a renderless JS animation.\n */\n sample(sampleTime) {\n if (!this.sampler) {\n const { motionValue, onUpdate, onComplete, onPlay, onStop, element, ...options } = this.options;\n /**\n * Stop it straight away so its driver doesn't run every frame.\n * It can still be sampled.\n */\n this.sampler = new JSAnimation({ ...options, autoplay: false });\n this.sampler.stop();\n }\n return this.sampler.sample(Math.max(0, sampleTime)).value;\n }\n /**\n * The value now, as WAAPI doesn't set the motion value while it runs.\n */\n liveValue() {\n const { state } = this;\n if (state === \"running\" || state === \"paused\") {\n return this.sample(this.elapsed());\n }\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * sample a renderless JS animation twice to calculate its current\n * value, \"previous\" value, and therefore allow Motion to calculate\n * velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, element, name } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const { speed } = this;\n const sampleTime = this.elapsed();\n const delta = this.state === \"running\" && speed\n ? clamp(0, sampleDelta, sampleTime)\n : 0;\n const current = this.sample(sampleTime);\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(this.sample(sampleTime - delta * Math.sign(speed)), current, delta / Math.abs(speed || 1));\n }\n}\n\nexport { NativeAnimationExtended, sampleDelta };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n","import { complex } from '../../value/types/complex/index.mjs';\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 */\nconst isAnimatable = (value, name) => {\n // If the list of keys that might be non-animatable grows, replace with Set\n if (name === \"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) || value === \"0\") && // 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//# sourceMappingURL=is-animatable.mjs.map\n","import { warning } from 'motion-utils';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { isAnimatable } from './is-animatable.mjs';\n\nfunction hasKeyframesChanged(keyframes) {\n const current = keyframes[0];\n if (keyframes.length === 1)\n return true;\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] !== current)\n return true;\n }\n}\nfunction canAnimate(keyframes, name, type, velocity) {\n /**\n * Check if we're able to animate between the start and end keyframes,\n * and throw a warning if we're attempting to animate between one that's\n * animatable and another that isn't.\n */\n const originKeyframe = keyframes[0];\n if (originKeyframe === null) {\n return false;\n }\n /**\n * These aren't traditionally animatable but we do support them.\n * In future we could look into making this more generic or replacing\n * this function with mix() === mixImmediate\n */\n if (name === \"display\" || name === \"visibility\")\n return true;\n const targetKeyframe = keyframes[keyframes.length - 1];\n const isOriginAnimatable = isAnimatable(originKeyframe, name);\n const isTargetAnimatable = isAnimatable(targetKeyframe, name);\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n // Only build the message when we're going to warn\n isOriginAnimatable !== isTargetAnimatable &&\n warning(false, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". \"${isOriginAnimatable ? targetKeyframe : originKeyframe}\" is not an animatable value.`, \"value-not-animatable\");\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n//# sourceMappingURL=can-animate.mjs.map\n","function makeAnimationInstant(options) {\n options.duration = 0;\n options.type = \"keyframes\";\n}\n\nexport { makeAnimationInstant };\n//# sourceMappingURL=make-animation-instant.mjs.map\n","/**\n * A list of values that can be hardware-accelerated.\n */\nconst acceleratedValues = new Set([\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"transform\",\n \"backgroundColor\",\n]);\n\nexport { acceleratedValues };\n//# sourceMappingURL=accelerated-values.mjs.map\n","const browserColorFunctions = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\\(/;\nfunction hasBrowserOnlyColors(keyframes) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"string\" &&\n browserColorFunctions.test(keyframes[i])) {\n return true;\n }\n }\n return false;\n}\n\nexport { hasBrowserOnlyColors };\n//# sourceMappingURL=is-browser-color.mjs.map\n","import { memo } from 'motion-utils';\nimport { acceleratedValues } from '../utils/accelerated-values.mjs';\nimport { hasBrowserOnlyColors } from '../utils/is-browser-color.mjs';\n\nconst colorProperties = new Set([\n \"color\",\n \"backgroundColor\",\n \"outlineColor\",\n \"fill\",\n \"stroke\",\n \"borderColor\",\n \"borderTopColor\",\n \"borderRightColor\",\n \"borderBottomColor\",\n \"borderLeftColor\",\n]);\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\nfunction supportsBrowserAnimation(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type, keyframes, } = options;\n /**\n * Most values can't be accelerated at all, so check the name before\n * looking at the element or its props.\n */\n if (!name ||\n !(acceleratedValues.has(name) || colorProperties.has(name))) {\n return false;\n }\n const subject = motionValue?.owner?.current;\n /**\n * We use instanceof checks instead of isHTMLElement()/isSVGElement()\n * because we explicitly **don't** want elements in different timing\n * contexts (i.e. popups) to be accelerated, as it's not possible to sync\n * these animations properly with those driven from the main window\n * frameloop.\n */\n if (!(subject instanceof HTMLElement) &&\n !(subject instanceof SVGElement)) {\n return false;\n }\n const { onUpdate, transformTemplate } = motionValue.owner.getProps();\n return (supportsWaapi() &&\n /**\n * Force WAAPI for color properties with browser-only color formats\n * (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.\n */\n (acceleratedValues.has(name) ||\n (colorProperties.has(name) &&\n hasBrowserOnlyColors(keyframes))) &&\n (name !== \"transform\" || !transformTemplate) &&\n /**\n * If we're outputting values to onUpdate then we can't use WAAPI as there's\n * no way to read the value from WAAPI every frame.\n */\n !onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n}\n\nexport { supportsBrowserAnimation, supportsWaapi };\n//# sourceMappingURL=waapi.mjs.map\n","/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nconst getValueAsType = (value, type) => {\n return type && typeof value === \"number\"\n ? type.transform(value)\n : value;\n};\n\nexport { getValueAsType };\n//# sourceMappingURL=get-as-type.mjs.map\n","import { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { transformPropOrder } from '../../utils/keys-transform.mjs';\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n transformPerspective: \"perspective\",\n};\nconst numTransforms = transformPropOrder.length;\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(latestValues, transform, transformTemplate) {\n // The transform string we're going to build into.\n let transformString = \"\";\n let transformIsDefault = true;\n /**\n * Loop over all possible transforms in order, adding the ones that\n * are present to the transform string.\n */\n for (let i = 0; i < numTransforms; i++) {\n const key = transformPropOrder[i];\n const value = latestValues[key];\n if (value === undefined)\n continue;\n let valueIsDefault = true;\n if (typeof value === \"number\") {\n valueIsDefault = value === (key.startsWith(\"scale\") ? 1 : 0);\n }\n else {\n const parsed = parseFloat(value);\n valueIsDefault = key.startsWith(\"scale\") ? parsed === 1 : parsed === 0;\n }\n if (!valueIsDefault || transformTemplate) {\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (!valueIsDefault) {\n transformIsDefault = false;\n const transformName = translateAlias[key] || key;\n transformString += `${transformName}(${valueAsType}) `;\n }\n if (transformTemplate) {\n transform[key] = valueAsType;\n }\n }\n }\n // `pathRotation` composes onto `rotate` as a separate additive term so\n // the user's `rotate` is never clobbered. Deliberately not a slot in\n // `transformPropOrder`.\n const pathRotation = latestValues.pathRotation;\n if (pathRotation) {\n transformIsDefault = false;\n transformString += `rotate(${getValueAsType(pathRotation, numberValueTypes.pathRotation)}) `;\n }\n transformString = transformString.trim();\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 (transformIsDefault) {\n transformString = \"none\";\n }\n return transformString;\n}\n\nexport { buildTransform, translateAlias };\n//# sourceMappingURL=build-transform.mjs.map\n","const transformGroups = new WeakMap();\n\nexport { transformGroups };\n//# sourceMappingURL=groups.mjs.map\n","import { isBezierDefinition, millisecondsToSeconds, clamp, progress } from 'motion-utils';\nimport { frame } from '../../../frameloop/frame.mjs';\nimport { frameData } from '../../../frameloop/frame-data.mjs';\nimport { time } from '../../../frameloop/sync-time.mjs';\nimport { buildTransform, translateAlias } from '../../../render/html/utils/build-transform.mjs';\nimport { transformPropOrder } from '../../../render/utils/keys-transform.mjs';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\nimport { numberValueTypes } from '../../../value/types/maps/number.mjs';\nimport { getValueAsType } from '../../../value/types/utils/get-as-type.mjs';\nimport { frameloopDriver } from '../../drivers/frame.mjs';\nimport { keyframes } from '../../generators/keyframes.mjs';\nimport { defaultOffset } from '../../keyframes/offsets/default.mjs';\nimport { JSAnimation, round } from '../../JSAnimation.mjs';\nimport { sampleDelta } from '../../NativeAnimationExtended.mjs';\nimport { cubicBezierAsString } from '../easing/cubic-bezier.mjs';\nimport { supportedWaapiEasing } from '../easing/supported.mjs';\nimport { supportsWaapi } from '../supports/waapi.mjs';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { transformGroups } from './groups.mjs';\n\n/**\n * Sample at the interruption sampling rate, up to a cap for long\n * animations.\n */\nconst maxSamples = 200;\n/**\n * How far values may stray from the WAAPI animation: as a fraction of\n * each value's change when they share an easing, otherwise in px or deg,\n * or for scale.\n */\nconst easingTolerance = 0.001;\nconst sampleTolerance = 0.1;\nconst scaleTolerance = 0.001;\n/**\n * If an outside write, or a seek the WAAPI animation can't follow,\n * happens again within this window, the group is being driven every\n * frame (scrubbing, drag), which is cheaper on the main thread than\n * rebuilding the WAAPI animation every frame.\n */\nconst churnWindow = 100;\n/**\n * Named easings that are the same cubic-bezier in JS and CSS.\n */\nconst isNativeEasing = (ease) => /^(linear|ease(In|Out|InOut))$/.test(ease);\nconst byTime = (a, b) => a - b;\n/**\n * n + 1 evenly spaced timestamps, from one timestamp to another.\n */\nconst spread = (from, to, n) => {\n const result = [];\n for (let i = 0; i <= n; i++)\n result.push(mixNumber(from, to, i / n));\n return result;\n};\nconst getOwner = (options) => options.motionValue.owner;\nconst getGroup = (element) => transformGroups.get(element);\nconst read = (owner, key) => owner.latestValues ? owner.latestValues[key] : owner.getValue(key)?.get();\n/**\n * Whether this animation should join its element's transform group.\n * Animations that can't be accelerated still join, so the group knows\n * to stay on the main thread while they run. Browsers without linear()\n * easing stay on the main thread.\n */\nconst canGroupTransform = ({ name, motionValue, }) => name &&\n transformPropOrder.includes(name) &&\n motionValue?.owner?.current instanceof HTMLElement &&\n supportsWaapi() &&\n supportsLinearEasing();\nfunction canAccelerateTransform(options) {\n const owner = getOwner(options);\n const { onUpdate, transformTemplate } = owner.getProps();\n return (\n /**\n * A handoff from an optimised appear animation is already running\n * on its own WAAPI animation. onUpdate needs every value, every\n * frame.\n */\n !options.isHandoff &&\n !onUpdate &&\n !options.hasOnUpdate &&\n /**\n * transformTemplate could output anything.\n */\n !transformTemplate &&\n options.type !== \"inertia\" &&\n /**\n * A literal transform, or pathRotation, replaces or adds to the\n * transform we'd build. styleEffect builds its own as \"none\".\n */\n (read(owner, \"transform\") || \"none\") === \"none\" &&\n !read(owner, \"pathRotation\") &&\n /**\n * Layout animations write transform every frame.\n */\n !owner.projection?.isProjecting());\n}\nclass TransformAnimation extends JSAnimation {\n constructor(options) {\n const element = getOwner(options).current;\n const { driver = frameloopDriver } = options;\n /**\n * Before JSAnimation replaces the type with its generator.\n */\n const canAccelerate = canAccelerateTransform(options);\n /**\n * The driver ticks on the main thread only once the group has\n * moved there. Until then, starting or stopping tells the group to\n * update its WAAPI animation.\n */\n options.driver = (update) => {\n const js = driver(update);\n return {\n js,\n now: js.now,\n start: (keepAlive = true) => {\n const group = getGroup(element);\n const isJS = !group || group.isJS;\n /**\n * keepAlive is false when seeking. Seeking the WAAPI\n * animation is free, but if a seek needs a rebuild and\n * keeps happening, the group moves to the main thread.\n */\n isJS\n ? js.start(keepAlive)\n : group.schedule(false, !keepAlive);\n },\n stop: () => {\n js.stop();\n const group = getGroup(element);\n group?.schedule(!group.isFinishing);\n },\n };\n };\n super(options);\n this.canAccelerate = canAccelerate;\n /**\n * stop is bound in JSAnimation, so wrap it rather than override.\n * Before stopping, set the motion value to where the WAAPI\n * animation is now, with velocity, for the next animation to\n * start from.\n */\n const { stop } = this;\n this.stop = () => {\n this.isAccelerated() && this.sync();\n stop();\n };\n }\n get group() {\n return getGroup(getOwner(this.options).current);\n }\n get js() {\n return this.driver?.js;\n }\n get name() {\n return this.options.name;\n }\n /**\n * When this stops moving, or, if it repeats forever, when it starts\n * repeating, and how long each repeat takes. Held (paused, or at\n * speed 0) animations never stop moving.\n */\n timing() {\n const { startTime, speed, totalDuration } = this;\n const { delay = 0, repeatType } = this.options;\n return this.holdTime !== null\n ? [Infinity, 0]\n : totalDuration === Infinity\n ? [\n startTime + delay / speed,\n (this.resolvedDuration * (repeatType === \"loop\" ? 1 : 2)) /\n speed || 1,\n ]\n : [startTime + (delay + totalDuration) / speed, 0];\n }\n /**\n * Whether this is running, or paused, on the compositor.\n */\n isAccelerated() {\n const { group, state } = this;\n return (group?.tracks.has(this) &&\n !group.isJS &&\n this.canAccelerate &&\n (state === \"running\" || state === \"paused\"));\n }\n /**\n * The value now, while this runs on the compositor and so doesn't\n * set its motion value every frame.\n */\n liveValue() {\n return this.isAccelerated() ? this.sampleAt(time.now()) : undefined;\n }\n /**\n * If this is a two-keyframe tween whose easing WAAPI runs exactly,\n * when it starts and stops moving, and that easing.\n */\n tween() {\n const { keyframes: keyframes$1, type, ease, times, repeat, delay = 0 } = this.options;\n const easing = isBezierDefinition(ease)\n ? cubicBezierAsString(ease)\n : isNativeEasing(ease) && supportedWaapiEasing[ease];\n if (easing &&\n !repeat &&\n !times &&\n keyframes$1.length === 2 &&\n type === keyframes &&\n this.holdTime === null) {\n const start = this.startTime + delay / this.speed;\n return [start, start + this.resolvedDuration / this.speed, easing];\n }\n }\n /**\n * The timestamps between two timestamps where this reaches a\n * keyframe or starts a repeat, where it can turn or jump.\n */\n boundaries(from, to) {\n const { startTime, speed, resolvedDuration, options } = this;\n const { delay = 0, repeat = 0, repeatDelay = 0, repeatType, times, keyframes: keyframes$1, type, } = options;\n const offsets = (type || keyframes) === keyframes\n ? times || defaultOffset(keyframes$1)\n : [0, 1];\n const start = startTime + delay / speed;\n const result = [];\n if (this.holdTime !== null || !(resolvedDuration > 0))\n return result;\n for (let i = Math.max(0, Math.floor(((from - start) * speed) / resolvedDuration)); i <= repeat; i++) {\n const iterationStart = start + (i * resolvedDuration) / speed;\n if (iterationStart > to)\n break;\n for (const offset of offsets) {\n const t = iterationStart +\n ((i % 2 && repeatType && repeatType !== \"loop\"\n ? 1 - offset\n : offset) *\n (resolvedDuration - repeatDelay)) /\n speed;\n t > from && t < to && result.push(t);\n }\n }\n return result;\n }\n /**\n * The value at a timestamp, as a number.\n */\n numberAt(timestamp) {\n return parseFloat(this.sampleAt(timestamp, true));\n }\n /**\n * Write the current value, and velocity, to the motion value.\n */\n sync() {\n const now = time.now();\n this.options.motionValue.setWithVelocity(this.sampleAt(now - sampleDelta, true), this.sampleAt(now, true), sampleDelta);\n }\n play() {\n /**\n * A stopped animation (one that was interrupted) can't play again,\n * so it mustn't join the group.\n */\n if (this.isStopped)\n return;\n (this.group || createGroup(getOwner(this.options))).tracks.add(this);\n super.play();\n }\n pause() {\n super.pause();\n if (this.isAccelerated()) {\n this.sync();\n this.group.schedule(false);\n }\n }\n /**\n * JSAnimation finishes on its next tick, which only happens on the\n * main thread, so finish now.\n */\n complete() {\n super.complete();\n const { group } = this;\n group && !group.isJS && this.canAccelerate && this.tick(time.now());\n }\n /**\n * Without a tick to rebase it, a held time still includes the delay,\n * so take it off here, as a JS animation does on its next tick.\n */\n get time() {\n if (this.isAccelerated()) {\n return millisecondsToSeconds(clamp(0, this.totalDuration, this.at(time.now()) - (this.options.delay || 0)));\n }\n return super.time;\n }\n set time(newTime) {\n super.time = newTime;\n }\n /**\n * Scroll timelines set time every frame, so run these on the main\n * thread.\n */\n attachTimeline(timeline) {\n this.canAccelerate = false;\n this.group?.demote(true);\n return super.attachTimeline(timeline);\n }\n}\nfunction createGroup(owner) {\n const element = owner.current;\n const tracks = new Set();\n const byKey = new Map();\n /**\n * Transforms that aren't animating, as built into the WAAPI animation.\n */\n let statics = {};\n /**\n * The transforms in the WAAPI animation, in order.\n */\n let keys = [];\n let built = new Map();\n let segments = [];\n let needsBuild = false;\n let isScheduled = false;\n let hasChurned = false;\n let lastChurn = -Infinity;\n const has = (key) => {\n for (const track of tracks)\n if (track.name === key)\n return true;\n };\n /**\n * The transform values at a timestamp or, without one, from the\n * motion values. Animations that don't repeat forever are sampled no\n * earlier than settled, so a loop that starts from an earlier cycle\n * boundary holds them at their end.\n */\n const valuesAt = (timestamp, settled) => {\n const values = {};\n for (const key of timestamp === undefined ? transformPropOrder : keys) {\n const track = byKey.get(key);\n const value = timestamp === undefined\n ? read(owner, key)\n : track\n ? track.sampleAt(settled > timestamp && !track.timing()[1]\n ? settled\n : timestamp)\n : statics[key];\n if (value !== undefined)\n values[key] = value;\n }\n return values;\n };\n /**\n * Build the transform at a timestamp. Unlike buildTransform, every key\n * is written, even at its default, so each keyframe has the same list\n * of functions and the browser interpolates them one by one.\n */\n const compose = (timestamp, settled) => {\n let transform = \"\";\n const values = valuesAt(timestamp, settled);\n for (const key in values) {\n transform +=\n (translateAlias[key] || key) +\n \"(\" +\n getValueAsType(values[key], numberValueTypes[key]) +\n \") \";\n }\n return transform || \"none\";\n };\n /**\n * Write the transform as an inline style, as the renderer would.\n */\n const commit = (values = valuesAt()) => {\n element.style.transform = buildTransform(values, {});\n };\n /**\n * Cancel the WAAPI animations, by default first committing the\n * transform. The renderer writes its own version on its next render.\n */\n const stop = (shouldCommit = true) => {\n shouldCommit && commit();\n segments.forEach(({ animation }) => animation.cancel());\n segments = [];\n };\n const add = (animation, offset, end = Infinity) => {\n const segment = { animation, offset, end };\n animation.startTime = time.now() + offset;\n /**\n * Animations finish when the WAAPI animation reaches their end.\n * Once a loop has taken over, the finished animation isn't needed.\n */\n if (end < Infinity) {\n animation.onfinish = () => {\n segment.isDone = true;\n if (segments.some((s) => s.end === Infinity)) {\n animation.cancel();\n segments = segments.filter((s) => s !== segment);\n }\n group.schedule(false);\n };\n }\n /**\n * Something else cancelled it, so carry on on the main thread.\n */\n animation.oncancel = () => segments.includes(segment) && group.demote();\n segments.push(segment);\n };\n /**\n * Where a value jumps between two timestamps, as when a repeat starts\n * again: the timestamps either side of the jump, or none if it moves\n * there continuously.\n */\n const jumpAt = (value, a, b) => {\n const change = (x, y) => Math.abs(value(y) - value(x));\n const size = change(a, b);\n while (b - a > 0.01) {\n const mid = (a + b) / 2;\n change(a, mid) > change(mid, b) ? (b = mid) : (a = mid);\n }\n return change(a, b) > size / 2 ? [a, b] : [];\n };\n /**\n * If every moving animation follows the same eased progress between\n * two timestamps, the easing that describes it.\n */\n const getEasing = (moving, from, to, bounds) => {\n const samples = Math.min(maxSamples, Math.max(2, Math.ceil((to - from) / sampleDelta)));\n /**\n * Too many keyframes or repeats to follow with this many samples.\n */\n if (bounds.length * 4 > samples)\n return;\n const at = spread(from, to, samples).concat(bounds).sort(byTime);\n const position = (t) => progress(from, to, t);\n let shared;\n let progressAt;\n for (const track of moving) {\n const values = at.map((t) => track.numberAt(t));\n const [first] = values;\n const range = values[values.length - 1] - first;\n const progress = values.map((value) => range ? (value - first) / range : value - first);\n /**\n * A value that doesn't change, like one still in its delay,\n * fits any easing. One that changes but ends where it started\n * fits none.\n */\n if (!range) {\n if (progress.some((p) => !(Math.abs(p) <= easingTolerance))) {\n return;\n }\n }\n else if (!shared) {\n shared = progress;\n progressAt = (t) => (track.numberAt(t) - first) / range;\n }\n else if (progress.some((p, i) => !(Math.abs(p - shared[i]) <= easingTolerance))) {\n return;\n }\n }\n if (!shared ||\n shared.every((p, i) => Math.abs(p - position(at[i])) <= easingTolerance)) {\n return \"linear\";\n }\n /**\n * A repeat that starts again jumps back, which takes two points at\n * the same position.\n */\n const points = [];\n const point = (t, p = progressAt(t)) => points.push(round(p) + \" \" + round(position(t) * 100) + \"%\");\n shared.forEach((p, i) => {\n i &&\n Math.abs(p - shared[i - 1]) > 0.2 &&\n jumpAt(progressAt, at[i - 1], at[i]).forEach((t) => point(t));\n point(at[i], p);\n });\n return \"linear(\" + points + \")\";\n };\n /**\n * Sample timestamps between two timestamps, closer together where the\n * moving animations curve.\n */\n const sample = (moving, from, to, bounds) => {\n const times = [from];\n /**\n * Values that aren't numbers, like calc(), are left to the\n * browser to interpolate.\n */\n const isStraight = (a, b) => moving.every((track) => !(Math.abs(track.numberAt((a + b) / 2) -\n (track.numberAt(a) + track.numberAt(b)) / 2) >\n (track.name.startsWith(\"scale\")\n ? scaleTolerance\n : sampleTolerance)));\n const split = (a, b, depth) => {\n if (b - a < 1 || isStraight(a, b)) {\n times.push(b);\n }\n else if (depth < 4) {\n split(a, (a + b) / 2, depth + 1);\n split((a + b) / 2, b, depth + 1);\n }\n else {\n /**\n * Keyframes either side of a jump, like a repeat starting\n * again, so it doesn't play as a quick sweep.\n */\n for (const track of moving) {\n times.push(...jumpAt((t) => track.numberAt(t), a, b));\n }\n times.push(b);\n }\n };\n /**\n * Split at least every 100ms, and at every keyframe and repeat,\n * either side of where a value can jump.\n */\n const ends = spread(from, to, Math.ceil((to - from) / 100));\n for (const t of bounds)\n ends.push(t, Math.min(t + 0.01, to));\n let start = from;\n for (const end of ends.sort(byTime)) {\n end > start && split(start, end, 0);\n start = end;\n }\n return times.sort(byTime);\n };\n /**\n * If every moving animation is the same tween, started together, as\n * happens for the values of one animate() call or transition, when\n * they move and their native easing.\n */\n const getTween = (moving) => {\n let shared;\n for (const track of moving) {\n const tween = track.tween();\n if (!tween ||\n shared?.some((v, i) => i < 2\n ? Math.abs(tween[i] - v) > 1\n : tween[i] !== v)) {\n return;\n }\n shared = tween;\n }\n return shared;\n };\n /**\n * A WAAPI animation of the composed transform between two timestamps.\n */\n const run = (moving, from, to, options = { fill: \"both\" }, settled, nativeEasing) => {\n const bounds = moving.flatMap((track) => track.boundaries(from, to));\n const easing = nativeEasing || getEasing(moving, from, to, bounds);\n const times = easing ? [from, to] : sample(moving, from, to, bounds);\n const transform = times.map((t) => compose(t, settled));\n let keyframes = { transform };\n if (!easing) {\n keyframes.offset = times.map((t) => progress(from, to, t));\n }\n /**\n * If nothing moves, don't hold a transform, which, even at its\n * default, would make the element a containing block. The empty\n * animation still finishes the animations.\n */\n if (transform.every((t) => t === transform[0])) {\n commit(valuesAt(from, settled));\n keyframes = null;\n }\n return element.animate(keyframes, {\n ...options,\n duration: to - from,\n easing: easing || \"linear\",\n });\n };\n /**\n * Replace the WAAPI animations with ones built from now. Returns\n * undefined if the animations can't be composed.\n */\n const animate = (now) => {\n /**\n * The finite part runs until the last finite animation (or the\n * last delay) ends. Infinitely repeating animations then continue\n * as one looping WAAPI animation, which needs them to share a\n * cycle.\n */\n let end = now;\n let cycle = 0;\n let cycleStart = 0;\n const moving = [];\n const looping = [];\n const ends = new Set();\n byKey.clear();\n built = new Map();\n for (const track of tracks) {\n byKey.set(track.name, track);\n const [trackEnd, trackCycle] = track.timing();\n const isHeld = trackEnd === Infinity;\n built.set(track, [track.at(now), track.speed, isHeld]);\n /**\n * Held animations don't move, so keep their motion values up\n * to date, as a JSAnimation would on a seek.\n */\n if (isHeld) {\n track.sync();\n continue;\n }\n if (track.speed < 0)\n return;\n if (trackCycle) {\n if (cycle) {\n const phase = (trackEnd - cycleStart) / trackCycle;\n if (Math.abs(trackCycle - cycle) > 1 ||\n Math.abs(phase - Math.round(phase)) * cycle > 1) {\n return;\n }\n }\n else {\n cycle = trackCycle;\n cycleStart = trackEnd;\n }\n looping.push(track);\n }\n else {\n ends.add(trackEnd);\n }\n moving.push(track);\n end = Math.max(end, trackEnd);\n }\n statics = {};\n /**\n * Transforms that aren't animating are left out at their default.\n */\n keys = transformPropOrder.filter((key) => {\n if (byKey.has(key))\n return true;\n const value = (statics[key] = read(owner, key));\n return (value !== undefined &&\n parseFloat(value) !==\n (key.startsWith(\"scale\") ? 1 : 0));\n });\n stop(false);\n /**\n * Values that share one tween are one WAAPI animation of it, with\n * two keyframes and its own easing, from when they started.\n */\n const tween = !cycle && getTween(moving);\n try {\n if (tween && tween[1] > now) {\n const [from, to, easing] = tween;\n add(run(moving, from, to, undefined, undefined, easing), from - now, to - from);\n }\n else if (end > now) {\n add(run(moving, now, end), 0, end - now);\n /**\n * Animations that end sooner finish on the events of\n * empty animations that end with them.\n */\n ends.forEach((trackEnd) => trackEnd < end - 1 &&\n add(element.animate(null, {\n duration: trackEnd - now,\n }), 0, trackEnd - now));\n }\n if (cycle) {\n /**\n * Build one cycle from a cycle boundary, so it repeats\n * seamlessly, and start it part way through.\n */\n const from = cycleStart + Math.floor((end - cycleStart) / cycle) * cycle;\n add(run(looping, from, from + cycle, {\n iterations: Infinity,\n iterationStart: (end - from) / cycle,\n /**\n * It must not fill backwards over the finite part\n * that runs before it.\n */\n fill: \"forwards\",\n }, end), end - now);\n }\n }\n catch {\n return;\n }\n /**\n * Everything is held, so hold it with an inline style instead.\n */\n segments.length || stop();\n return true;\n };\n /**\n * If every animation has been paused, played, seeked or sped up\n * together since the WAAPI animation was built, do the same to it.\n * Returns false if it needs rebuilding instead.\n */\n const retime = (now) => {\n let elapsed;\n let rate = 0;\n for (const track of tracks) {\n const state = built.get(track);\n if (!state)\n return false;\n const [builtTime, builtSpeed, wasHeld] = state;\n const trackTime = track.at(now);\n const isHeld = track.timing()[0] === Infinity;\n if (wasHeld) {\n if (isHeld && trackTime === builtTime)\n continue;\n return false;\n }\n const trackElapsed = (trackTime - builtTime) / builtSpeed;\n const trackRate = isHeld ? 0 : track.speed / builtSpeed;\n if (elapsed === undefined) {\n elapsed = trackElapsed;\n rate = trackRate;\n }\n else if (Math.abs(trackElapsed - elapsed) > 1 ||\n trackRate !== rate) {\n return false;\n }\n }\n if (elapsed === undefined)\n return true;\n if (!segments.length)\n return false;\n for (const { offset, end, isDone } of segments) {\n const local = elapsed - offset;\n if (end < Infinity &&\n (isDone ? local < end - 1 : local < 0 || local >= end)) {\n return false;\n }\n }\n for (const { animation, offset, isDone } of segments) {\n if (isDone)\n continue;\n const local = elapsed - offset;\n if (rate) {\n animation.playbackRate = rate;\n animation.startTime = now - local / rate;\n }\n else {\n animation.pause();\n animation.currentTime = local;\n }\n }\n return true;\n };\n const build = () => {\n const now = time.now();\n /**\n * Finish the animations that have reached their end, which the\n * WAAPI animation has already rendered.\n */\n if (!group.isJS) {\n group.isFinishing = true;\n tracks.forEach((track) => {\n const [trackEnd, trackCycle] = track.timing();\n if (track.state === \"running\" &&\n track.speed > 0 &&\n !trackCycle &&\n trackEnd <= now + 1) {\n track.complete();\n /**\n * From now it's checked for outside writes like any\n * other static transform. If the WAAPI animation never\n * rendered it (it was instant), rebuild with its value.\n */\n statics[track.name] = read(owner, track.name);\n built.has(track) || (needsBuild = true);\n }\n });\n group.isFinishing = false;\n }\n isScheduled = false;\n tracks.forEach(({ state }, track) => {\n if (state === \"idle\" || state === \"finished\")\n tracks.delete(track);\n });\n if (!tracks.size) {\n transformGroups.delete(element);\n group.isJS || stop();\n return;\n }\n for (const track of tracks) {\n if (!track.canAccelerate)\n return group.demote(true);\n }\n /**\n * Everything that kept the group on the main thread has finished,\n * so move the remaining animations back to the compositor.\n */\n if (group.isJS) {\n group.isJS = false;\n needsBuild = true;\n tracks.forEach((track) => track.js?.stop());\n }\n const shouldBuild = needsBuild;\n const churned = hasChurned;\n needsBuild = hasChurned = false;\n if (shouldBuild || !retime(now)) {\n if (churned) {\n if (now - lastChurn < churnWindow)\n return group.demote();\n lastChurn = now;\n }\n if (!animate(now))\n return group.demote();\n }\n };\n const group = {\n tracks,\n isJS: false,\n isFinishing: false,\n schedule(build_, isChurn) {\n needsBuild || (needsBuild = build_);\n hasChurned || (hasChurned = !!isChurn);\n /**\n * Build in this frame's render step, so it's in place before\n * anything reads the DOM in postRender, or straight after the\n * current task outside of a frame.\n */\n if (!isScheduled) {\n isScheduled = true;\n frameData.isProcessing\n ? frame.render(build, false, true)\n : queueMicrotask(build);\n }\n },\n /**\n * An outside write. Rebuild once, but if it keeps happening, move\n * to the main thread.\n */\n check() {\n if (group.isJS)\n return;\n for (const key in statics) {\n if (read(owner, key) !== statics[key] && !has(key)) {\n return group.schedule(true, true);\n }\n }\n },\n demote(canReturn) {\n if (group.isJS)\n return;\n /**\n * Unless only another animation is holding the group on the\n * main thread, these animations stay there until they end.\n */\n tracks.forEach((track) => {\n track.isAccelerated() && track.sync();\n canReturn || (track.canAccelerate = false);\n });\n group.isJS = true;\n built = new Map();\n stop();\n tracks.forEach((track) => track.state === \"running\" && track.js?.start());\n },\n };\n transformGroups.set(element, group);\n return group;\n}\n\nexport { TransformAnimation, canGroupTransform };\n//# sourceMappingURL=TransformAnimation.mjs.map\n","import { MotionGlobalConfig } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { getFinalKeyframe } from './keyframes/get-final.mjs';\nimport { KeyframeResolver, flushKeyframeResolvers } from './keyframes/KeyframesResolver.mjs';\nimport { NativeAnimationExtended } from './NativeAnimationExtended.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { makeAnimationInstant } from './utils/make-animation-instant.mjs';\nimport { resolveStartTime } from './utils/resolve-start-time.mjs';\nimport { WithPromise } from './utils/WithPromise.mjs';\nimport { supportsBrowserAnimation } from './waapi/supports/waapi.mjs';\nimport { canGroupTransform, TransformAnimation } from './waapi/transforms/TransformAnimation.mjs';\n\nclass AsyncMotionValueAnimation extends WithPromise {\n constructor(options) {\n super();\n /**\n * Bound to support return animation.stop pattern\n */\n this.stop = () => {\n if (this._animation) {\n this._animation.stop();\n this.stopTimeline?.();\n }\n this.keyframeResolver?.cancel();\n };\n this.createdAt = time.now();\n const { keyframes, name, motionValue, element } = options;\n /**\n * animateMotionValue builds a fresh options object per value, so\n * it's completed in place as keyframes resolve rather than copied.\n */\n const optionsWithDefaults = options;\n optionsWithDefaults.autoplay ?? (optionsWithDefaults.autoplay = true);\n optionsWithDefaults.delay ?? (optionsWithDefaults.delay = 0);\n optionsWithDefaults.type ?? (optionsWithDefaults.type = \"keyframes\");\n optionsWithDefaults.repeat ?? (optionsWithDefaults.repeat = 0);\n optionsWithDefaults.repeatDelay ?? (optionsWithDefaults.repeatDelay = 0);\n optionsWithDefaults.repeatType ?? (optionsWithDefaults.repeatType = \"loop\");\n const KeyframeResolver$1 = element?.KeyframeResolver || KeyframeResolver;\n this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);\n this.keyframeResolver?.scheduleResolve();\n }\n onKeyframesResolved(keyframes, finalKeyframe, options, sync) {\n this.keyframeResolver = undefined;\n const { name, type, velocity, delay, isHandoff, onUpdate } = options;\n this.resolvedAt = time.now();\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n let canAnimateValue = true;\n if (!canAnimate(keyframes, name, type, velocity)) {\n canAnimateValue = false;\n if (MotionGlobalConfig.instantAnimations || !delay) {\n onUpdate?.(getFinalKeyframe(keyframes, options, finalKeyframe));\n }\n keyframes[0] = keyframes[keyframes.length - 1];\n makeAnimationInstant(options);\n options.repeat = 0;\n }\n const { onComplete } = options;\n options.finalKeyframe = finalKeyframe;\n options.keyframes = keyframes;\n /**\n * JSAnimation and NativeAnimation call onComplete exactly when\n * their own `finished` resolves, so this replaces a promise chain\n * per value with a callback.\n */\n options.onComplete = () => {\n onComplete?.();\n this.notifyFinished();\n };\n /**\n * Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via\n * WAAPI. Therefore, this animation must be JS to ensure it runs \"under\" the\n * optimised animation.\n *\n * Also skip WAAPI when keyframes aren't animatable, as the resolved\n * values may not be valid CSS and would trigger browser warnings.\n */\n const useWaapi = canAnimateValue && !isHandoff && supportsBrowserAnimation(options);\n /**\n * Independent transforms (x, scale etc) on an HTML element are\n * composed into one WAAPI transform animation per element.\n */\n const isGroupedTransform = !useWaapi && canGroupTransform(options);\n /**\n * Resolve startTime for the animation. A startTime passed in options\n * (an optimised appear handoff syncing to its WAAPI animation) takes\n * precedence.\n *\n * *Ideally*, we would use the createdAt time as t=0 as the following\n * frame would then be the first frame of the animation in progress,\n * which would feel snappier. If keyframes resolved on a later frame,\n * and long after creation, we start from then instead.\n *\n * If they resolved immediately, a JSAnimation picks its own start\n * time and resolves it the same way on its first frame, so every\n * animation started in that moment stays in sync. WAAPI has no frame\n * of ours to do that on.\n */\n if (sync &&\n (useWaapi ||\n isGroupedTransform ||\n this.resolvedAt !== this.createdAt)) {\n options.startTime ?? (options.startTime = resolveStartTime(this.createdAt, this.resolvedAt));\n }\n let animation;\n if (useWaapi) {\n /**\n * The resolver needed the VisualElement, WAAPI needs the DOM\n * element. JSAnimation reads neither, so this is safe to\n * leave in place if we fall back to it.\n */\n options.element = options.motionValue?.owner?.current;\n try {\n animation = new NativeAnimationExtended(options);\n }\n catch {\n animation = new JSAnimation(options);\n }\n }\n else if (isGroupedTransform) {\n animation = new TransformAnimation(options);\n }\n else {\n animation = new JSAnimation(options);\n }\n if (this.pendingTimeline) {\n this.stopTimeline = animation.attachTimeline(this.pendingTimeline);\n this.pendingTimeline = undefined;\n }\n this._animation = animation;\n }\n get finished() {\n return this._animation ? this._animation.finished : super.finished;\n }\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n /**\n * The value now, if the animation runs on the compositor.\n */\n liveValue() {\n return this._animation?.liveValue?.();\n }\n get animation() {\n if (!this._animation) {\n this.keyframeResolver?.resume();\n flushKeyframeResolvers();\n }\n return this._animation;\n }\n get duration() {\n return this.animation.duration;\n }\n get iterationDuration() {\n return this.animation.iterationDuration;\n }\n get time() {\n return this.animation.time;\n }\n set time(newTime) {\n this.animation.time = newTime;\n }\n get speed() {\n return this.animation.speed;\n }\n get state() {\n return this.animation.state;\n }\n set speed(newSpeed) {\n this.animation.speed = newSpeed;\n }\n get startTime() {\n return this.animation.startTime;\n }\n attachTimeline(timeline) {\n if (this._animation) {\n this.stopTimeline = this.animation.attachTimeline(timeline);\n }\n else {\n this.pendingTimeline = timeline;\n }\n return () => this.stop();\n }\n play() {\n this.animation.play();\n }\n pause() {\n this.animation.pause();\n }\n complete() {\n this.animation.complete();\n }\n cancel() {\n if (this._animation) {\n this.animation.cancel();\n }\n this.keyframeResolver?.cancel();\n }\n}\n\nexport { AsyncMotionValueAnimation };\n//# sourceMappingURL=AsyncMotionValueAnimation.mjs.map\n","class GroupAnimation {\n constructor(animations) {\n // Bound to accommodate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n return Promise.all(this.animations.map((animation) => animation.finished));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline) {\n const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get state() {\n return this.getAll(\"state\");\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n return getMax(this.animations, \"duration\");\n }\n get iterationDuration() {\n return getMax(this.animations, \"iterationDuration\");\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\nfunction getMax(animations, propName) {\n let max = 0;\n for (let i = 0; i < animations.length; i++) {\n const value = animations[i][propName];\n if (value !== null && value > max) {\n max = value;\n }\n }\n return max;\n}\n\nexport { GroupAnimation };\n//# sourceMappingURL=GroupAnimation.mjs.map\n","import { GroupAnimation } from './GroupAnimation.mjs';\n\nclass GroupAnimationWithThen extends GroupAnimation {\n then(onResolve, _onReject) {\n return this.finished.finally(onResolve).then(() => { });\n }\n}\n\nexport { GroupAnimationWithThen };\n//# sourceMappingURL=GroupAnimationWithThen.mjs.map\n","const animationMaps = new WeakMap();\nconst animationMapKey = (name, pseudoElement = \"\") => `${name}:${pseudoElement}`;\nfunction getAnimationMap(element) {\n let map = animationMaps.get(element);\n if (!map) {\n map = new Map();\n animationMaps.set(element, map);\n }\n return map;\n}\n\nexport { animationMapKey, getAnimationMap };\n//# sourceMappingURL=active-animations.mjs.map\n","import { warnOnce, SubscriptionManager, velocityPerSecond } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\n/**\n * Maximum time between the value of two frames, beyond which we\n * assume the velocity has since been 0.\n */\nconst MAX_VELOCITY_DELTA = 30;\nconst isFloat = (value) => {\n return !isNaN(parseFloat(value));\n};\nconst collectMotionValues = {\n current: undefined,\n};\n/**\n * `MotionValue` is used to track the state and velocity of motion values.\n *\n * @public\n */\nclass MotionValue {\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 constructor(init, options = {}) {\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 = null;\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n this.updateAndNotify = (v) => {\n const currentTime = time.now();\n /**\n * If we're updating the value during another frame or eventloop\n * than the previous frame, then the we set the previous frame value\n * to current.\n */\n if (this.updatedAt !== currentTime) {\n this.setPrevFrameValue();\n }\n this.prev = this.current;\n this.setCurrent(v);\n // Update update subscribers\n if (this.current !== this.prev) {\n this.notifyChange();\n if (this.dependents) {\n for (const dependent of this.dependents) {\n dependent.dirty();\n }\n }\n }\n };\n this.hasAnimated = false;\n this.setCurrent(init);\n this.owner = options.owner;\n }\n setCurrent(current) {\n this.current = current;\n this.updatedAt = time.now();\n if (this.canTrackVelocity === null && current !== undefined) {\n this.canTrackVelocity = isFloat(this.current);\n }\n }\n setPrevFrameValue(prevFrameValue = this.current) {\n this.prevFrameValue = prevFrameValue;\n this.prevUpdatedAt = this.updatedAt;\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.on(\"change\", updateOpacity)\n * const unsubscribeY = y.on(\"change\", updateOpacity)\n *\n * return () => {\n * unsubscribeX()\n * unsubscribeY()\n * }\n * }, [])\n *\n * return <motion.div style={{ x }} />\n * }\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 * @deprecated\n */\n onChange(subscription) {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on(\"change\", callback).`);\n }\n return this.on(\"change\", subscription);\n }\n on(eventName, callback) {\n var _a;\n if (eventName === \"change\")\n return this.onChangeSubscribe(callback);\n return ((_a = this.events)[eventName] || (_a[eventName] = new SubscriptionManager())).add(callback);\n }\n onChangeSubscribe(callback) {\n const { events } = this;\n if (!events.change && !this.changeSubscriber) {\n this.changeSubscriber = callback;\n }\n else {\n if (!events.change) {\n events.change = new SubscriptionManager();\n events.change.add(this.changeSubscriber);\n this.changeSubscriber = undefined;\n }\n events.change.add(callback);\n }\n return () => {\n if (this.changeSubscriber === callback) {\n this.changeSubscriber = undefined;\n }\n else {\n events.change?.remove(callback);\n }\n this.stopIfUnobserved();\n };\n }\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n stopIfUnobserved() {\n frame.read(() => {\n if (!this.changeSubscriber && !this.events.change?.getSize()) {\n this.stop();\n }\n });\n }\n clearListeners() {\n this.changeSubscriber = undefined;\n for (const eventManagers in this.events) {\n this.events[eventManagers].clear();\n }\n }\n /**\n * Attaches a passive effect to the `MotionValue`.\n */\n attach(passiveEffect, stopPassiveEffect) {\n this.passiveEffect = passiveEffect;\n this.stopPassiveEffect = stopPassiveEffect;\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 set(v) {\n if (!this.passiveEffect) {\n this.updateAndNotify(v);\n }\n else {\n this.passiveEffect(v, this.updateAndNotify);\n }\n }\n setWithVelocity(prev, current, delta) {\n this.set(current);\n this.prev = undefined;\n this.prevFrameValue = prev;\n this.prevUpdatedAt = this.updatedAt - delta;\n }\n /**\n * Set the state of the `MotionValue`, stopping any active animations,\n * effects, and resets velocity to `0`.\n */\n jump(v, endAnimation = true) {\n this.updateAndNotify(v);\n this.prev = v;\n this.prevUpdatedAt = this.prevFrameValue = undefined;\n endAnimation && this.stop();\n if (this.stopPassiveEffect)\n this.stopPassiveEffect();\n }\n dirty() {\n this.notifyChange();\n }\n notifyChange() {\n const { current, changeSubscriber } = this;\n /**\n * One or the other exists. Subscribing during the direct\n * subscriber's call moves it into a new manager, which must not\n * then be notified for the same change.\n */\n if (changeSubscriber) {\n changeSubscriber(current);\n }\n else {\n this.events.change?.notify(current);\n }\n }\n addDependent(dependent) {\n if (!this.dependents) {\n this.dependents = new Set();\n }\n this.dependents.add(dependent);\n }\n removeDependent(dependent) {\n if (this.dependents) {\n this.dependents.delete(dependent);\n }\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n *\n * @public\n */\n get() {\n if (collectMotionValues.current) {\n collectMotionValues.current.push(this);\n }\n /**\n * A value animating on the compositor isn't updated every frame,\n * so read it from its animation.\n */\n const sampled = this.animation?.liveValue?.();\n return sampled === undefined ? this.current : sampled;\n }\n /**\n * The value as last set. Unlike get(), this doesn't read an animation\n * running on the compositor, which renders the value itself.\n */\n getCurrent() {\n return this.current;\n }\n /**\n * @public\n */\n getPrevious() {\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 getVelocity() {\n const currentTime = time.now();\n if (!this.canTrackVelocity ||\n this.prevFrameValue === undefined ||\n currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {\n return 0;\n }\n const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);\n // Casts because of parseFloat's poor typing\n return velocityPerSecond(parseFloat(this.current) -\n parseFloat(this.prevFrameValue), delta);\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 start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n /**\n * Complete synchronously via the callback rather than chaining a\n * second promise per animation. Guard against animations that\n * complete before startAnimation has returned.\n */\n let isComplete = false;\n let animation;\n // eslint-disable-next-line prefer-const -- read by the callback before assignment when completing synchronously\n animation = startAnimation(() => {\n isComplete = true;\n this.events.animationComplete?.notify();\n if (this.animation === animation)\n this.clearAnimation();\n resolve();\n });\n if (!isComplete)\n this.animation = animation;\n this.events.animationStart?.notify();\n });\n }\n /**\n * Stop the currently active animation.\n *\n * @public\n */\n stop() {\n if (this.animation) {\n this.animation.stop();\n if (this.events.animationCancel) {\n this.events.animationCancel.notify();\n }\n }\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n *\n * @public\n */\n isAnimating() {\n return !!this.animation;\n }\n clearAnimation() {\n // Assign rather than delete to keep the object's shape stable\n this.animation = undefined;\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 destroy() {\n this.dependents?.clear();\n this.events.destroy?.notify();\n this.clearListeners();\n this.stop();\n if (this.stopPassiveEffect) {\n this.stopPassiveEffect();\n }\n }\n}\nfunction motionValue(init, options) {\n return new MotionValue(init, options);\n}\n\nexport { MotionValue, collectMotionValues, motionValue };\n//# sourceMappingURL=index.mjs.map\n","/**\n * If `transition` has `inherit: true`, shallow-merge it with\n * `parentTransition` (child keys win) and strip the `inherit` key.\n * Otherwise return `transition` unchanged.\n */\nfunction resolveTransition(transition, parentTransition) {\n if (transition?.inherit && parentTransition) {\n const { inherit: _, ...rest } = transition;\n return { ...parentTransition, ...rest };\n }\n return transition;\n}\n\nexport { resolveTransition };\n//# sourceMappingURL=resolve-transition.mjs.map\n","import { resolveTransition } from './resolve-transition.mjs';\n\nfunction getValueTransition(transition, key) {\n const valueTransition = transition?.[key] ??\n transition?.[\"default\"] ??\n transition;\n if (valueTransition !== transition) {\n return resolveTransition(valueTransition, transition);\n }\n return valueTransition;\n}\n\nexport { getValueTransition };\n//# sourceMappingURL=get-value-transition.mjs.map\n","import { transformProps } from '../../render/utils/keys-transform.mjs';\n\nconst underDampedSpring = {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restSpeed: 10,\n};\nconst criticallyDampedSpring = (target) => ({\n type: \"spring\",\n stiffness: 550,\n damping: target === 0 ? 2 * Math.sqrt(550) : 30,\n restSpeed: 10,\n});\nconst keyframesTransition = {\n type: \"keyframes\",\n duration: 0.8,\n};\n/**\n * Default easing curve is a slightly shallower version of\n * the default browser easing curve.\n */\nconst ease = {\n type: \"keyframes\",\n ease: [0.25, 0.1, 0.35, 1],\n duration: 0.3,\n};\nconst getDefaultTransition = (valueKey, { keyframes }) => {\n if (keyframes.length > 2) {\n return keyframesTransition;\n }\n else if (transformProps.has(valueKey)) {\n return valueKey.startsWith(\"scale\")\n ? criticallyDampedSpring(keyframes[1])\n : underDampedSpring;\n }\n return ease;\n};\n\nexport { getDefaultTransition };\n//# sourceMappingURL=default-transitions.mjs.map\n","const orchestrationKeys = new Set([\n \"when\",\n \"delay\",\n \"delayChildren\",\n \"staggerChildren\",\n \"staggerDirection\",\n \"repeat\",\n \"repeatType\",\n \"repeatDelay\",\n \"from\",\n \"elapsed\",\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(transition) {\n for (const key in transition) {\n if (!orchestrationKeys.has(key))\n return true;\n }\n return false;\n}\n\nexport { isTransitionDefined };\n//# sourceMappingURL=is-transition-defined.mjs.map\n","import { secondsToMilliseconds, MotionGlobalConfig } from 'motion-utils';\nimport { AsyncMotionValueAnimation } from '../AsyncMotionValueAnimation.mjs';\nimport { JSAnimation } from '../JSAnimation.mjs';\nimport { getValueTransition } from '../utils/get-value-transition.mjs';\nimport { makeAnimationInstant } from '../utils/make-animation-instant.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getFinalKeyframe } from '../keyframes/get-final.mjs';\nimport { isTransitionDefined } from '../utils/is-transition-defined.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {\n const valueTransition = getValueTransition(transition, name) || {};\n /**\n * Most transition values are currently completely overwritten by value-specific\n * transitions. In the future it'd be nicer to blend these transitions. But for now\n * delay actually does inherit from the root transition if not value-specific.\n */\n const delay = valueTransition.delay || transition.delay || 0;\n /**\n * Elapsed isn't a public transition option but can be passed through from\n * optimized appear effects in milliseconds.\n */\n let { elapsed = 0 } = transition;\n elapsed = elapsed - secondsToMilliseconds(delay);\n const options = {\n keyframes: Array.isArray(target) ? target : [null, target],\n ease: \"easeOut\",\n velocity: value.getVelocity(),\n ...valueTransition,\n delay: -elapsed,\n onUpdate: (v) => {\n value.set(v);\n valueTransition.onUpdate && valueTransition.onUpdate(v);\n },\n onComplete: () => {\n onComplete();\n valueTransition.onComplete && valueTransition.onComplete();\n },\n name,\n motionValue: value,\n element: isHandoff ? undefined : element,\n hasOnUpdate: !!valueTransition.onUpdate,\n };\n /**\n * If there's no transition defined for this value, we can generate\n * unique transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n Object.assign(options, getDefaultTransition(name, options));\n }\n /**\n * Both WAAPI and our internal animation functions use durations\n * as defined by milliseconds, while our external API defines them\n * as seconds.\n */\n options.duration && (options.duration = secondsToMilliseconds(options.duration));\n options.repeatDelay && (options.repeatDelay = secondsToMilliseconds(options.repeatDelay));\n /**\n * Support deprecated way to set initial value. Prefer keyframe syntax.\n */\n if (options.from !== undefined) {\n options.keyframes[0] = options.from;\n }\n let shouldSkip = false;\n if (options.type === false ||\n (options.duration === 0 && !options.repeatDelay)) {\n makeAnimationInstant(options);\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (MotionGlobalConfig.instantAnimations ||\n MotionGlobalConfig.skipAnimations ||\n element?.shouldSkipAnimations ||\n valueTransition.skipAnimations) {\n shouldSkip = true;\n makeAnimationInstant(options);\n options.delay = 0;\n }\n /**\n * If the transition type or easing has been explicitly set by the user\n * then we don't want to allow flattening the animation.\n */\n options.allowFlatten = !valueTransition.type && !valueTransition.ease;\n /**\n * If we can or must skip creating the animation, and apply only\n * the final keyframe, do so. We also check once keyframes are resolved but\n * this early check prevents the need to create an animation at all.\n */\n if (shouldSkip && !isHandoff && value.get() !== undefined) {\n const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);\n if (finalKeyframe !== undefined) {\n frame.update(() => {\n options.onUpdate(finalKeyframe);\n options.onComplete();\n });\n return;\n }\n }\n return valueTransition.isSync\n ? new JSAnimation(options)\n : new AsyncMotionValueAnimation(options);\n};\n\nexport { animateMotionValue };\n//# sourceMappingURL=motion-value.mjs.map\n","import { invariant, isNumericalString } from 'motion-utils';\nimport { isCSSVariableToken } from './is-css-variable.mjs';\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 */\nconst splitCSSVariableRegex = \n// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words\n/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;\nfunction parseCSSVariable(current) {\n const match = splitCSSVariableRegex.exec(current);\n if (!match)\n return [,];\n const [, token1, token2, fallback] = match;\n return [`--${token1 ?? token2}`, fallback];\n}\nconst maxDepth = 4;\nfunction getVariableValue(current, element, depth = 1) {\n invariant(depth <= maxDepth, `Max CSS variable fallback depth detected in property \"${current}\". This may indicate a circular fallback dependency.`, \"max-css-var-depth\");\n const [token, fallback] = parseCSSVariable(current);\n // No CSS variable detected\n if (!token)\n return;\n // Attempt to read this CSS variable off the element\n const resolved = window.getComputedStyle(element).getPropertyValue(token);\n if (resolved) {\n const trimmed = resolved.trim();\n return isNumericalString(trimmed) ? parseFloat(trimmed) : trimmed;\n }\n return isCSSVariableToken(fallback)\n ? getVariableValue(fallback, element, depth + 1)\n : fallback;\n}\n\nexport { getVariableValue, parseCSSVariable };\n//# sourceMappingURL=css-variables-conversion.mjs.map\n","import { transformPropOrder } from './keys-transform.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n ...transformPropOrder,\n]);\n\nexport { positionalKeys };\n//# sourceMappingURL=keys-position.mjs.map\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n//# sourceMappingURL=is-motion-value.mjs.map\n","function camelToDash(str) {\n return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);\n}\n\nexport { camelToDash };\n//# sourceMappingURL=camel-to-dash.mjs.map\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n//# sourceMappingURL=auto.mjs.map\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n//# sourceMappingURL=test.mjs.map\n","import { auto } from './auto.mjs';\nimport { number } from './numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from './numbers/units.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of value types commonly used for dimensions\n */\nconst dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];\n/**\n * Tests a dimensional value against the list of dimension ValueTypes\n */\nconst findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));\n\nexport { dimensionValueTypes, findDimensionValueType };\n//# sourceMappingURL=dimensions.mjs.map\n","import { isZeroValueString } from 'motion-utils';\n\nfunction isNone(value) {\n if (typeof value === \"number\") {\n return value === 0;\n }\n else if (value !== null) {\n return value === \"none\" || value === \"0\" || isZeroValueString(value);\n }\n else {\n return true;\n }\n}\n\nexport { isNone };\n//# sourceMappingURL=is-none.mjs.map\n","import { hasComplexValues } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../../value/types/utils/animatable-none.mjs';\n\n/**\n * If we encounter keyframes like \"none\" or \"0\" and we also have keyframes like\n * \"#fff\" or \"200px 200px\" we want to find a keyframe to serve as a template for\n * the \"none\" keyframes. In this case \"#fff\" or \"200px 200px\" - then these get turned into\n * zero equivalents, i.e. \"#fff0\" or \"0px 0px\".\n */\nconst invalidTemplates = new Set([\"auto\", \"none\", \"0\"]);\nfunction makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name) {\n let i = 0;\n let animatableTemplate = undefined;\n while (i < unresolvedKeyframes.length && !animatableTemplate) {\n const keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\" &&\n !invalidTemplates.has(keyframe) &&\n hasComplexValues(keyframe)) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n /**\n * A zero-valued template like \"0%\" is already its own\n * animatable none, so there's nothing to derive.\n */\n if (unresolvedKeyframes[noneIndex] === animatableTemplate)\n continue;\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n//# sourceMappingURL=make-none-animatable.mjs.map\n","import { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { findDimensionValueType } from '../../value/types/dimensions.mjs';\nimport { getVariableValue } from '../utils/css-variables-conversion.mjs';\nimport { containsCSSVariable, isCSSVariableToken } from '../utils/is-css-variable.mjs';\nimport { KeyframeResolver } from './KeyframesResolver.mjs';\nimport { isNone } from './utils/is-none.mjs';\nimport { makeNoneKeyframesAnimatable } from './utils/make-none-animatable.mjs';\nimport { positionalValues, isNumOrPxType } from './utils/unit-conversion.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, true);\n }\n /**\n * Keyframes that don't need reading from the DOM, or measuring,\n * resolve straight away rather than in the frame loop's batched read.\n */\n scheduleResolve() {\n if (this.canReadNow()) {\n this.readKeyframes();\n if (!this.needsMeasurement)\n return this.complete();\n }\n super.scheduleResolve();\n }\n canReadNow() {\n const { unresolvedKeyframes, element, motionValue } = this;\n const origin = unresolvedKeyframes[0] ?? motionValue?.get();\n if (!element?.current || origin === undefined)\n return false;\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (containsCSSVariable(i ? unresolvedKeyframes[i] : origin)) {\n return false;\n }\n }\n return true;\n }\n readKeyframes() {\n const { unresolvedKeyframes, element, name } = this;\n if (!element || !element.current)\n return;\n super.readKeyframes();\n /**\n * If any keyframe is a CSS variable, we need to find its value by sampling the element\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n let keyframe = unresolvedKeyframes[i];\n if (typeof keyframe === \"string\") {\n keyframe = keyframe.trim();\n if (isCSSVariableToken(keyframe)) {\n const resolved = getVariableValue(keyframe, element.current);\n if (resolved !== undefined) {\n unresolvedKeyframes[i] = resolved;\n }\n if (i === unresolvedKeyframes.length - 1) {\n this.finalKeyframe = keyframe;\n }\n }\n }\n }\n /**\n * Resolve \"none\" values. We do this potentially twice - once before and once after measuring keyframes.\n * This could be seen as inefficient but it's a trade-off to avoid measurements in more situations, which\n * have a far bigger performance impact.\n */\n this.resolveNoneKeyframes();\n /**\n * Check to see if unit type has changed. If so schedule jobs that will\n * temporarily set styles to the destination keyframes.\n * Skip if we have more than two keyframes or this isn't a positional value.\n * TODO: We can throw if there are multiple keyframes and the value type changes.\n */\n if (!positionalKeys.has(name) || unresolvedKeyframes.length !== 2) {\n return;\n }\n const [origin, target] = unresolvedKeyframes;\n // Two numbers share a unit, so skip the value type search.\n if (typeof origin === \"number\" && typeof target === \"number\")\n return;\n const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\n /**\n * If one keyframe contains embedded CSS variables (e.g. in calc()) and the other\n * doesn't, we need to measure to convert to pixels. This handles GitHub issue #3410.\n */\n const originHasVar = containsCSSVariable(origin);\n const targetHasVar = containsCSSVariable(target);\n if (originHasVar !== targetHasVar && positionalValues[name]) {\n this.needsMeasurement = true;\n return;\n }\n /**\n * Either we don't recognise these value types or we can animate between them.\n */\n if (originType === targetType)\n return;\n /**\n * If both values are numbers or pixels, we can animate between them by\n * converting them to numbers.\n */\n if (isNumOrPxType(originType) && isNumOrPxType(targetType)) {\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n const value = unresolvedKeyframes[i];\n if (typeof value === \"string\") {\n unresolvedKeyframes[i] = parseFloat(value);\n }\n }\n }\n else if (positionalValues[name]) {\n /**\n * Else, the only way to resolve this is by measuring the element.\n */\n this.needsMeasurement = true;\n }\n }\n resolveNoneKeyframes() {\n const { unresolvedKeyframes, name } = this;\n const noneKeyframeIndexes = [];\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null ||\n isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\n }\n measure() {\n const { element, name } = this;\n return positionalValues[name](window.getComputedStyle(element.current), () => element.measureViewportBox());\n }\n measureInitialState() {\n const { element, unresolvedKeyframes, name } = this;\n if (!element || !element.current)\n return;\n if (name === \"height\") {\n this.suspendedScrollY = window.pageYOffset;\n }\n this.measuredOrigin = this.measure();\n unresolvedKeyframes[0] = this.measuredOrigin;\n // Set final key frame to measure after next render\n const measureKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (measureKeyframe !== undefined) {\n this.motionValue?.jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n const { element, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n this.motionValue?.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = this.measure();\n if (finalKeyframe !== null && this.finalKeyframe === undefined) {\n this.finalKeyframe = finalKeyframe;\n }\n // If we removed transform values, reapply them before the next render\n if (this.removedTransforms?.length) {\n this.removedTransforms.forEach(([unsetTransformName, unsetTransformValue]) => {\n element\n .getValue(unsetTransformName)\n .set(unsetTransformValue);\n });\n }\n this.resolveNoneKeyframes();\n }\n}\n\nexport { DOMKeyframesResolver };\n//# sourceMappingURL=DOMKeyframesResolver.mjs.map\n","/**\n * The four corner-radius longhands. Shared so the projection mixer, scale\n * corrector, WAAPI px-value set and view-transition crop pass don't each carry\n * their own copy. Order is irrelevant - every consumer mixes/corrects/animates\n * each corner independently.\n */\nconst cornerRadiusProps = [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\",\n \"borderBottomLeftRadius\",\n];\n\nexport { cornerRadiusProps };\n//# sourceMappingURL=border-radius.mjs.map\n","import { cornerRadiusProps } from '../../../utils/border-radius.mjs';\n\nconst pxValues = new Set([\n // Border props\n \"borderWidth\",\n \"borderTopWidth\",\n \"borderRightWidth\",\n \"borderBottomWidth\",\n \"borderLeftWidth\",\n \"borderRadius\",\n ...cornerRadiusProps,\n // Positioning props\n \"width\",\n \"maxWidth\",\n \"height\",\n \"maxHeight\",\n \"top\",\n \"right\",\n \"bottom\",\n \"left\",\n \"inset\",\n \"insetBlock\",\n \"insetBlockStart\",\n \"insetBlockEnd\",\n \"insetInline\",\n \"insetInlineStart\",\n \"insetInlineEnd\",\n // Spacing props\n \"padding\",\n \"paddingTop\",\n \"paddingRight\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingBlock\",\n \"paddingBlockStart\",\n \"paddingBlockEnd\",\n \"paddingInline\",\n \"paddingInlineStart\",\n \"paddingInlineEnd\",\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginBlock\",\n \"marginBlockStart\",\n \"marginBlockEnd\",\n \"marginInline\",\n \"marginInlineStart\",\n \"marginInlineEnd\",\n // Typography\n \"fontSize\",\n // Misc\n \"backgroundPositionX\",\n \"backgroundPositionY\",\n]);\n\nexport { pxValues };\n//# sourceMappingURL=px-values.mjs.map\n","import { pxValues } from '../../waapi/utils/px-values.mjs';\n\nfunction applyPxDefaults(keyframes, name) {\n for (let i = 0; i < keyframes.length; i++) {\n if (typeof keyframes[i] === \"number\" && pxValues.has(name)) {\n keyframes[i] = keyframes[i] + \"px\";\n }\n }\n}\n\nexport { applyPxDefaults };\n//# sourceMappingURL=apply-px-defaults.mjs.map\n","import { invariant, removeItem } from 'motion-utils';\nimport { positionalKeys } from '../../render/utils/keys-position.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Effects registered via `animate.addEffect()`, most recent first.\n */\nconst effects = [];\nfunction addEffect(effect) {\n invariant(typeof effect.test === \"function\" && typeof effect.read === \"function\", \"Effects passed to animate.addEffect() need test() and read().\", \"effect-missing-test\");\n removeEffect(effect);\n effects.unshift(effect);\n}\nfunction removeEffect(effect) {\n removeItem(effects, effect);\n}\nfunction findEffect(subject) {\n return effects.find((effect) => effect.test(subject));\n}\n/**\n * Animate each key in `keyframes` on the motion value `getValue` returns\n * for it. `element` is what the keyframe resolver uses to read, render\n * and measure the subject when the effect defers resolution to it.\n */\nfunction animateValues(getValue, keyframes, transition = {}, element) {\n const animations = [];\n const { velocity } = transition;\n const reduceMotion = transition.reduceMotion ?? element?.shouldReduceMotion;\n for (const key in keyframes) {\n if (key === \"transition\" || key === \"transitionEnd\")\n continue;\n const target = keyframes[key];\n if (target === undefined)\n continue;\n const value = getValue(key);\n /**\n * If the value is already at the defined target, skip the animation.\n * We still re-assert the value via frame.update to take precedence\n * over any stale transitionEnd callbacks from previous animations.\n */\n const current = value.get();\n if (current !== undefined &&\n !value.isAnimating() &&\n !Array.isArray(target) &&\n target === current &&\n !velocity) {\n frame.update(() => value.set(target));\n continue;\n }\n value.start(animateMotionValue(key, value, target, reduceMotion && positionalKeys.has(key)\n ? { type: false }\n : transition, element));\n value.animation &&\n animations.push(value.animation);\n }\n const { transitionEnd } = keyframes;\n if (transitionEnd) {\n const applyTransitionEnd = () => frame.update(() => {\n for (const key in transitionEnd) {\n getValue(key).set(transitionEnd[key]);\n }\n });\n animations.length\n ? Promise.all(animations).then(applyTransitionEnd)\n : applyTransitionEnd();\n }\n return animations;\n}\n/**\n * Animate the keys of `subject` via `effect`. Motion values are created on\n * first animation and bound to the subject through the effect for the\n * rest of its life.\n *\n * Without `element`, a new value is seeded synchronously from the first\n * keyframe or `effect.read()`. With it, the value starts undefined and the\n * keyframe resolver reads the subject (batched, with unit conversion by\n * measurement) via `element`.\n */\nfunction animateEffectSubject(effect, subject, keyframes, transition, element) {\n return animateValues((key) => {\n let value = effect.get(subject, key);\n if (!value) {\n let initial;\n if (!element) {\n const target = keyframes[key];\n initial =\n firstKeyframe(target) ??\n effect.read(subject, key, target);\n invariant(initial !== undefined, `\"${key}\" can't be read from the animated subject. Provide [from, to] keyframes.`, \"effect-unreadable-value\");\n }\n value = motionValue(initial, { owner: element });\n effect(subject, { [key]: value });\n }\n return value;\n }, keyframes, transition, element);\n}\nfunction firstKeyframe(target) {\n const first = Array.isArray(target) ? target[0] : undefined;\n return first === null ? undefined : first;\n}\n\nexport { addEffect, animateEffectSubject, animateValues, findEffect, removeEffect };\n//# sourceMappingURL=effects.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an HTML element in a way\n * that works across iframes\n */\nfunction isHTMLElement(element) {\n return (isObject(element) &&\n \"offsetHeight\" in element &&\n !(\"ownerSVGElement\" in element));\n}\n\nexport { isHTMLElement };\n//# sourceMappingURL=is-html-element.mjs.map\n","import { isObject } from 'motion-utils';\n\n/**\n * Checks if an element is an SVG element in a way\n * that works across iframes\n */\nfunction isSVGElement(element) {\n return isObject(element) && \"ownerSVGElement\" in element;\n}\n\nexport { isSVGElement };\n//# sourceMappingURL=is-svg-element.mjs.map\n","function resolveElements(elementOrSelector, scope, selectorCache) {\n if (elementOrSelector == null) {\n return [];\n }\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n root = scope.current;\n }\n const elements = selectorCache?.[elementOrSelector] ??\n root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector).filter((element) => element != null);\n}\n\nexport { resolveElements };\n//# sourceMappingURL=resolve-elements.mjs.map\n","import { resolveElements } from '../../utils/resolve-elements.mjs';\n\nfunction createSelectorEffect(subjectEffect) {\n const effect = (subject, values) => {\n const elements = resolveElements(subject);\n const subscriptions = [];\n for (const element of elements) {\n const remove = subjectEffect(element, values);\n subscriptions.push(remove);\n }\n return () => {\n for (const remove of subscriptions)\n remove();\n };\n };\n const { test, read, get, flush, state } = subjectEffect;\n return Object.assign(effect, {\n test,\n read,\n get: get,\n flush,\n state,\n });\n}\n\nexport { createSelectorEffect };\n//# sourceMappingURL=create-dom-effect.mjs.map\n","import { frame } from '../frameloop/frame.mjs';\n\nclass MotionValueState {\n /**\n * @param step - The frameloop step renders are scheduled in. Defaults\n * to `frame.render`. Effects that feed a render loop running in\n * `frame.render` (GPU scenes) should write in `frame.preRender`.\n */\n constructor(step = frame.render) {\n this.step = step;\n this.values = new Map();\n /**\n * Renders scheduled for the next flush, usually one or two (values\n * bound to the same computed render, e.g. `x` and `y` to `transform`,\n * share an entry). Tracked with a count rather than truncating the\n * array so no backing store is reallocated every frame. Kept per\n * state so pending writes can be flushed synchronously before the\n * subject is measured.\n */\n this.pending = [];\n this.numPending = 0;\n /**\n * Run the pending renders. Resetting the count first means a render\n * scheduled while flushing lands in the next frame, as with the\n * frameloop itself.\n */\n this.flush = () => {\n const { pending, numPending } = this;\n this.numPending = 0;\n for (let i = 0; i < numPending; i++)\n pending[i]();\n };\n }\n /**\n * @param render - Writes the value to the subject. Renders read the\n * motion value directly rather than a cached copy, so there is one\n * place a value lives.\n * @param computed - A value already in this state (e.g. `transform`)\n * whose render should run whenever `value` changes.\n */\n set(name, value, render, computed) {\n this.values.get(name)?.onRemove();\n if (computed) {\n for (const entry of this.values.values()) {\n if (entry.value === computed)\n render = entry.render;\n }\n }\n const onChange = () => render && this.schedule(render);\n /**\n * Values created ahead of a DOM read start out undefined and\n * have nothing to render until they're set.\n */\n value.get() !== undefined && onChange();\n const cancelOnChange = value.on(\"change\", onChange);\n const onRemove = () => {\n cancelOnChange();\n render && !computed && this.cancel(render);\n /**\n * A later set() of the same name has already removed this\n * entry, so leave the one that replaced it.\n */\n this.values.get(name)?.onRemove === onRemove &&\n this.values.delete(name);\n };\n this.values.set(name, {\n value,\n render: computed ? undefined : render,\n onRemove,\n });\n return onRemove;\n }\n get(name) {\n return this.values.get(name)?.value;\n }\n /**\n * Detach every value from this state and return them, so another\n * renderer can take them over. The state stays cached by its effect,\n * so the bound transforms are reset too rather than leaking into\n * values bound later.\n */\n release() {\n const values = new Map();\n this.values.forEach((entry, name) => {\n values.set(name, entry.value);\n entry.onRemove();\n });\n this.transformKeys = this.transformValues = undefined;\n return values;\n }\n schedule(render) {\n const { pending, numPending } = this;\n for (let i = 0; i < numPending; i++) {\n if (pending[i] === render)\n return;\n }\n numPending || this.step(this.flush);\n pending[this.numPending++] = render;\n }\n cancel(render) {\n const { pending } = this;\n for (let i = 0; i < this.numPending; i++) {\n if (pending[i] === render) {\n pending[i] = pending[--this.numPending];\n return;\n }\n }\n }\n}\n\nexport { MotionValueState };\n//# sourceMappingURL=MotionValueState.mjs.map\n","import { MotionValueState } from '../MotionValueState.mjs';\n\nfunction createEffect(addValue, { step, ...options } = {}) {\n const stateCache = new WeakMap();\n const effect = (subject, values) => {\n const state = stateCache.get(subject) ?? new MotionValueState(step);\n stateCache.set(subject, state);\n const subscriptions = [];\n for (const key in values) {\n const value = values[key];\n const remove = addValue(subject, state, key, value);\n subscriptions.push(remove);\n }\n return () => {\n for (const cancel of subscriptions)\n cancel();\n };\n };\n return Object.assign(effect, options, {\n get: (subject, key) => stateCache.get(subject)?.get(key),\n flush: (subject) => stateCache.get(subject)?.flush(),\n state: (subject) => stateCache.get(subject),\n });\n}\n\nexport { createEffect };\n//# sourceMappingURL=create-effect.mjs.map\n","import { translateAlias } from '../../render/html/utils/build-transform.mjs';\nimport { transformValueTypes } from '../../value/types/maps/transform.mjs';\nimport { getValueAsType } from '../../value/types/utils/get-as-type.mjs';\n\n/**\n * Cache of `translateX(`-style openers so each render is a few string\n * concatenations rather than a template per transform.\n */\nconst openers = {};\nfunction buildTransform(state) {\n let transform = \"\";\n const { transformKeys: keys = [], transformValues: values = {} } = state;\n /**\n * Loop over the bound transforms in order, adding the ones that\n * aren't at their default value to the transform string.\n */\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = values[key].getCurrent();\n if (value === undefined)\n continue;\n const parsed = typeof value === \"number\" ? value : parseFloat(value);\n if (parsed !== (key.startsWith(\"scale\") ? 1 : 0)) {\n transform +=\n (transform && \" \") +\n (openers[key] ||\n (openers[key] = (translateAlias[key] || key) + \"(\")) +\n getValueAsType(value, transformValueTypes[key]) +\n \")\";\n }\n }\n // See build-transform.ts: additive `rotate()` so user `rotate` isn't\n // clobbered. Not a `transformPropOrder` slot.\n const pathRotation = state.get(\"pathRotation\")?.get();\n if (pathRotation) {\n transform +=\n (transform && \" \") +\n \"rotate(\" +\n getValueAsType(pathRotation, transformValueTypes.pathRotation) +\n \")\";\n }\n return transform || \"none\";\n}\n\nexport { buildTransform };\n//# sourceMappingURL=transform.mjs.map\n","import { transformGroups } from '../../animation/waapi/transforms/groups.mjs';\nimport { isCSSVar } from '../../render/dom/is-css-var.mjs';\nimport { readTransformValue } from '../../render/dom/parse-transform.mjs';\nimport { transformProps, transformPropOrder } from '../../render/utils/keys-transform.mjs';\nimport { isHTMLElement } from '../../utils/is-html-element.mjs';\nimport { isSVGElement } from '../../utils/is-svg-element.mjs';\nimport { MotionValue } from '../../value/index.mjs';\nimport { numberValueTypes } from '../../value/types/maps/number.mjs';\nimport { getValueAsType } from '../../value/types/utils/get-as-type.mjs';\nimport { createSelectorEffect } from '../utils/create-dom-effect.mjs';\nimport { createEffect } from '../utils/create-effect.mjs';\nimport { buildTransform } from './transform.mjs';\n\nconst originProps = new Set([\"originX\", \"originY\", \"originZ\"]);\n/**\n * A bound value in its default unit, e.g. `originX: 50` -> `\"50%\"`.\n */\nconst styleValue = (state, key) => getValueAsType(state.get(key)?.get(), numberValueTypes[key]);\nconst addStyleValue = (element, state, key, value) => {\n let render = undefined;\n let computed = undefined;\n if (transformProps.has(key)) {\n if (key !== \"pathRotation\") {\n const keys = (state.transformKeys ?? (state.transformKeys = []));\n (state.transformValues ?? (state.transformValues = {}))[key] = value;\n if (!keys.includes(key)) {\n keys.push(key);\n keys.sort((a, b) => transformPropOrder.indexOf(a) -\n transformPropOrder.indexOf(b));\n }\n }\n if (!state.get(\"transform\")) {\n // If this is an HTML element, we need to set the transform-box to fill-box\n // to normalise the transform relative to the element's bounding box\n if (!isHTMLElement(element) && !state.get(\"transformBox\")) {\n addStyleValue(element, state, \"transformBox\", new MotionValue(\"fill-box\"));\n }\n state.set(\"transform\", new MotionValue(\"none\"), () => {\n transformGroups.get(element)?.check();\n element.style.transform = buildTransform(state);\n });\n }\n computed = state.get(\"transform\");\n }\n else if (originProps.has(key)) {\n if (!state.get(\"transformOrigin\")) {\n state.set(\"transformOrigin\", new MotionValue(\"\"), () => {\n const originX = styleValue(state, \"originX\") ?? \"50%\";\n const originY = styleValue(state, \"originY\") ?? \"50%\";\n const originZ = styleValue(state, \"originZ\") ?? 0;\n element.style.transformOrigin = `${originX} ${originY} ${originZ}`;\n });\n }\n computed = state.get(\"transformOrigin\");\n }\n else if (isCSSVar(key)) {\n render = () => {\n element.style.setProperty(key, value.getCurrent());\n };\n }\n else {\n render = () => {\n element.style[key] = getValueAsType(value.getCurrent(), numberValueTypes[key]);\n };\n }\n return state.set(key, value, render, computed);\n};\nconst isStyleSubject = (subject) => isHTMLElement(subject) || isSVGElement(subject);\n/**\n * Reads the current value of a style from the element, as the initial\n * keyframe when `animate()` targets an element via this effect. Transforms\n * are parsed out of the computed matrix; everything else is the computed\n * style. Units aren't converted to match the target keyframes. A style\n * the browser can't report is 0, as a VisualElement reports it.\n */\nconst readStyleValue = (element, key) => {\n if (transformProps.has(key)) {\n return readTransformValue(element, key);\n }\n const computedStyle = getComputedStyle(element);\n const value = isCSSVar(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key];\n return (typeof value === \"string\" && value.trim()) || 0;\n};\n/**\n * The per-element effect `animate()` binds through, so HTML values share\n * state with a direct `styleEffect()` call. The exported `styleEffect`\n * is this wrapped to also accept selectors.\n */\nconst styleSubjectEffect = /*@__PURE__*/ createEffect(addStyleValue, {\n test: isStyleSubject,\n read: readStyleValue,\n});\nconst styleEffect = \n/*@__PURE__*/ createSelectorEffect(styleSubjectEffect);\n\nexport { addStyleValue, originProps, readStyleValue, styleEffect, styleSubjectEffect };\n//# sourceMappingURL=index.mjs.map\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Values rendered via style rather than as attributes. This must include\n * every value WAAPI can accelerate, as WAAPI writes its final value to\n * style, which would otherwise override later attribute writes.\n */\nconst cssStyleProperties = [\n \"transform\",\n \"opacity\",\n \"clipPath\",\n \"filter\",\n \"offsetDistance\",\n \"offsetPath\",\n \"offsetRotate\",\n \"offsetAnchor\",\n];\n/**\n * Build SVG visual attributes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate, styleProp) {\n buildHTMLStyles(state, latest, transformTemplate);\n /**\n * For svg tags we just want to make sure viewBox is animatable and treat all the styles\n * as normal HTML tags.\n */\n if (isSVGTag) {\n if (state.style.viewBox) {\n state.attrs.viewBox = state.style.viewBox;\n }\n return;\n }\n state.attrs = state.style;\n state.style = {};\n const { attrs, style } = state;\n for (const key of cssStyleProperties) {\n if (attrs[key] !== undefined) {\n style[key] = attrs[key];\n delete attrs[key];\n }\n }\n if (style.transform || attrs.transformOrigin) {\n style.transformOrigin = attrs.transformOrigin ?? \"50% 50%\";\n delete attrs.transformOrigin;\n }\n if (style.transform) {\n /**\n * SVG's element transform-origin uses its own median as a reference.\n * Therefore, transformBox becomes a fill-box\n */\n style.transformBox = styleProp?.transformBox ?? \"fill-box\";\n delete attrs.transformBox;\n }\n // Render attrX/attrY/attrScale as attributes\n if (attrX !== undefined)\n attrs.x = attrX;\n if (attrY !== undefined)\n attrs.y = attrY;\n if (attrScale !== undefined)\n attrs.scale = attrScale;\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, cssStyleProperties };\n//# sourceMappingURL=build-attrs.mjs.map\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\nimport { numberValueTypes } from '../../value/types/maps/number.mjs';\nimport { getValueAsType } from '../../value/types/utils/get-as-type.mjs';\nimport { createSelectorEffect } from '../utils/create-dom-effect.mjs';\nimport { createEffect } from '../utils/create-effect.mjs';\n\nfunction canSetAsProperty(element, name) {\n if (!(name in element))\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), name) ||\n Object.getOwnPropertyDescriptor(element, name);\n // Check if it has a setter\n return descriptor && typeof descriptor.set === \"function\";\n}\n/**\n * `name` is the attribute written when it differs from the key the value\n * is stored under, e.g. `attrX` -> `x`. Numbers take the attribute's\n * default unit (`x: 100` -> `\"100px\"`), as they do when key and name match.\n */\nconst addAttrValue = (element, state, key, value, name = key) => {\n const isProp = canSetAsProperty(element, name);\n if (!isProp && (name.startsWith(\"data\") || name.startsWith(\"aria\"))) {\n name = camelToDash(name);\n }\n const type = numberValueTypes[key] || numberValueTypes[name];\n /**\n * Set attribute directly via property if available\n */\n const render = isProp\n ? () => {\n element[name] = getValueAsType(value.get(), numberValueTypes[key]);\n }\n : () => {\n const v = getValueAsType(value.get(), type);\n if (v === null || v === undefined) {\n element.removeAttribute(name);\n }\n else {\n element.setAttribute(name, String(v));\n }\n };\n return state.set(key, value, render);\n};\nconst attrEffect = /*@__PURE__*/ createSelectorEffect(\n/*@__PURE__*/ createEffect(addAttrValue));\n\nexport { addAttrValue, attrEffect };\n//# sourceMappingURL=index.mjs.map\n","import { isCSSVar } from '../../render/dom/is-css-var.mjs';\nimport { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\nimport { cssStyleProperties } from '../../render/svg/utils/build-attrs.mjs';\nimport { transformProps } from '../../render/utils/keys-transform.mjs';\nimport { isSVGElement } from '../../utils/is-svg-element.mjs';\nimport { MotionValue } from '../../value/index.mjs';\nimport { numberValueTypes } from '../../value/types/maps/number.mjs';\nimport { addAttrValue } from '../attr/index.mjs';\nimport { originProps, addStyleValue, readStyleValue } from '../style/index.mjs';\nimport { createSelectorEffect } from '../utils/create-dom-effect.mjs';\nimport { createEffect } from '../utils/create-effect.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nfunction addSVGPathValue(element, state, key, value) {\n frame.render(() => element.setAttribute(\"pathLength\", \"1\"));\n if (key === \"pathOffset\") {\n return state.set(key, value, () => {\n // Use unitless value to avoid Safari zoom bug\n const offset = value.get();\n element.setAttribute(\"stroke-dashoffset\", `${-offset}`);\n });\n }\n else {\n if (!state.get(\"stroke-dasharray\")) {\n state.set(\"stroke-dasharray\", new MotionValue(\"1 1\"), () => {\n const pathLength = state.get(\"pathLength\")?.get() ?? 1;\n const pathSpacing = state.get(\"pathSpacing\")?.get();\n // Use unitless values to avoid Safari zoom bug\n element.setAttribute(\"stroke-dasharray\", `${pathLength} ${pathSpacing ?? 1 - Number(pathLength)}`);\n });\n }\n return state.set(key, value, undefined, state.get(\"stroke-dasharray\"));\n }\n}\nconst addSVGValue = (element, state, key, value) => {\n if (key.startsWith(\"path\")) {\n return addSVGPathValue(element, state, key, value);\n }\n else if (key.startsWith(\"attr\")) {\n return addAttrValue(element, state, key, value, convertAttrKey(key));\n }\n /**\n * Transforms and origins aren't CSS properties (bar `x`/`y` in some\n * browsers), so check them by name rather than `key in element.style`.\n */\n const handler = transformProps.has(key) ||\n originProps.has(key) ||\n isCSSVar(key) ||\n key in element.style\n ? addStyleValue\n : addAttrValue;\n return handler(element, state, key, value);\n};\n/**\n * Reads the current value of `key` from an SVG element as the origin of\n * an animation, as the SVG VisualElement does: transforms start from\n * their defaults, CSS variables and the few CSS-only properties come from\n * computed style, falling back to the attribute when that's empty (e.g.\n * the element isn't rendered), and everything else is read from the\n * attribute, dash-cased (`strokeWidth` -> `stroke-width`) or, failing\n * that, as written (`baseFrequency`).\n */\nconst readSVGValue = (element, key) => {\n if (transformProps.has(key)) {\n return numberValueTypes[key]?.default || 0;\n }\n if (isCSSVar(key) || cssStyleProperties.includes(key)) {\n return (readStyleValue(element, key) ||\n element.getAttribute(camelToDash(key)) ||\n 0);\n }\n key = convertAttrKey(key);\n return (element.getAttribute(camelToDash(key)) ??\n element.getAttribute(key) ??\n undefined);\n};\n/**\n * The per-element effect `animate()` binds through, so SVG values share\n * state with a direct `svgEffect()` call.\n */\nconst svgSubjectEffect = /*@__PURE__*/ createEffect(addSVGValue, {\n test: isSVGElement,\n read: readSVGValue,\n});\nconst svgEffect = /*@__PURE__*/ createSelectorEffect(svgSubjectEffect);\nfunction convertAttrKey(key) {\n return key.replace(/^attr([A-Z])/, (_, firstChar) => firstChar.toLowerCase());\n}\n\nexport { addSVGValue, readSVGValue, svgEffect, svgSubjectEffect };\n//# sourceMappingURL=index.mjs.map\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({ top, left, right, bottom, }) {\n return {\n x: { min: left, max: right },\n y: { min: top, max: bottom },\n };\n}\nfunction convertBoxToBoundingBox({ x, 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 const topLeft = transformPoint({ x: point.left, y: point.top });\n const 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//# sourceMappingURL=conversion.mjs.map\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 const viewportBox = measureViewportBox(element, transformPagePoint);\n const { scroll } = rootProjectionNode;\n if (scroll) {\n translateAxis(viewportBox.x, scroll.offset.x);\n translateAxis(viewportBox.y, scroll.offset.y);\n }\n return viewportBox;\n}\n\nexport { measurePageBox, measureViewportBox };\n//# sourceMappingURL=measure.mjs.map\n","import { styleSubjectEffect } from '../../effects/style/index.mjs';\nimport { svgSubjectEffect } from '../../effects/svg/index.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { isSVGElement } from '../../utils/is-svg-element.mjs';\nimport { DOMKeyframesResolver } from '../keyframes/DOMKeyframesResolver.mjs';\nimport { animateValues, animateEffectSubject } from './effects.mjs';\n\nconst noProps = {};\nconst getElementEffect = (element) => (isSVGElement(element)\n ? svgSubjectEffect\n : styleSubjectEffect);\n/**\n * Presents an effect bound to a DOM element in the shape the DOM keyframe\n * resolver and WAAPI expect, which is that of a VisualElement. Holds no\n * state: everything delegates to the effect. Goes once the resolver takes\n * an effect and subject directly.\n */\nclass EffectSubject {\n constructor(effect, current) {\n this.effect = effect;\n this.current = current;\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n getValue(key) {\n return this.effect.get(this.current, key);\n }\n readValue(key, target) {\n return this.effect.read(this.current, key, target);\n }\n render() {\n this.effect.flush(this.current);\n }\n measureViewportBox() {\n return measureViewportBox(this.current);\n }\n getProps() {\n return noProps;\n }\n}\n/**\n * Animate a DOM element's styles. HTML elements are bound through\n * styleEffect, SVG through svgEffect, and both are resolved with the DOM\n * keyframe resolver so reads are batched, units are converted by\n * measurement and eligible values run on WAAPI.\n *\n * Pass the element's VisualElement (a <motion.*> component or an\n * animateLayout() node) to animate its values instead, so the two keep\n * sharing values and a renderer.\n */\nfunction animateElement(element, keyframes, transition, visualElement) {\n if (visualElement) {\n return animateValues((key) => visualElement.getValue(key, null), keyframes, transition, visualElement);\n }\n const effect = getElementEffect(element);\n return animateEffectSubject(effect, element, keyframes, transition, new EffectSubject(effect, element));\n}\n/**\n * Hand the values styleEffect/svgEffect are rendering on `element`,\n * whether bound by animate() or directly, to a VisualElement that now\n * owns the element (e.g. created by animateLayout()), so a single\n * renderer drives them alongside its own values.\n */\nfunction handOffElementState(element, visualElement) {\n const state = getElementEffect(element).state(element);\n if (!state)\n return;\n const { transformKeys } = state;\n state.release().forEach((value, key) => {\n /**\n * The style effect derives transform (from the bound transform\n * keys) and transformBox itself; a VisualElement builds its own.\n */\n const derived = key === \"transformBox\" ||\n (key === \"transform\" && transformKeys?.length);\n derived || visualElement.addValue(key, value);\n });\n}\n\nexport { animateElement, handOffElementState };\n//# sourceMappingURL=element.mjs.map\n","import { isObject } from 'motion-utils';\nimport { createEffect } from '../utils/create-effect.mjs';\n\n/**\n * Writes motion values to the properties of any object. This is\n * animate()'s fallback for subjects no registered effect claims.\n */\nconst propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => {\n return state.set(key, value, () => {\n subject[key] = value.get();\n });\n}, {\n test: (subject) => isObject(subject),\n read: (subject, key) => {\n const value = subject[key];\n return typeof value === \"string\" || typeof value === \"number\"\n ? value\n : undefined;\n },\n});\n\nexport { propEffect };\n//# sourceMappingURL=index.mjs.map\n","import { isCSSVar } from './is-css-var.mjs';\n\nfunction getComputedStyle(element, name) {\n const computedStyle = window.getComputedStyle(element);\n return isCSSVar(name)\n ? computedStyle.getPropertyValue(name)\n : computedStyle[name];\n}\n\nexport { getComputedStyle };\n//# sourceMappingURL=style-computed.mjs.map\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n//# sourceMappingURL=store.mjs.map\n","import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n","function isDOMKeyframes(keyframes) {\n return typeof keyframes === \"object\" && !Array.isArray(keyframes);\n}\n\nexport { isDOMKeyframes };\n//# sourceMappingURL=is-dom-keyframes.mjs.map\n","import { resolveElements } from 'motion-dom';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\n\nfunction resolveSubjects(subject, keyframes, scope, selectorCache) {\n if (subject == null) {\n return [];\n }\n if (typeof subject === \"string\" && isDOMKeyframes(keyframes)) {\n return resolveElements(subject, scope, selectorCache);\n }\n else if (subject instanceof NodeList) {\n return Array.from(subject);\n }\n else if (Array.isArray(subject)) {\n return subject.filter((s) => s != null);\n }\n else {\n return [subject];\n }\n}\n\nexport { resolveSubjects };\n//# sourceMappingURL=resolve-subjects.mjs.map\n","function calculateRepeatDuration(duration, repeat, repeatDelay) {\n return duration * (repeat + 1) + repeatDelay * repeat;\n}\n\nexport { calculateRepeatDuration };\n//# sourceMappingURL=calc-repeat-duration.mjs.map\n","/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nfunction calcNextTime(current, next, prev, labels) {\n if (typeof next === \"number\") {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)));\n }\n else {\n return labels.get(next) ?? current;\n }\n}\n\nexport { calcNextTime };\n//# sourceMappingURL=calc-time.mjs.map\n","import { mixNumber } from 'motion-dom';\nimport { getEasingForSegment, removeItem } from 'motion-utils';\n\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mixNumber(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n\nexport { addKeyframes, eraseKeyframes };\n//# sourceMappingURL=edit.mjs.map\n","/**\n * Take an array of times that represent repeated keyframes. For instance\n * if we have original times of [0, 0.5, 1] then our repeated times will\n * be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back\n * down to a 0-1 scale.\n *\n * `repeatDelayUnits` is the repeatDelay expressed in units of a single\n * iteration's duration, so the total span equals `(repeat + 1) + repeat * repeatDelayUnits`.\n */\nfunction normalizeTimes(times, repeat, repeatDelayUnits = 0) {\n const totalUnits = repeat + 1 + repeat * repeatDelayUnits;\n for (let i = 0; i < times.length; i++) {\n times[i] = times[i] / totalUnits;\n }\n}\n\nexport { normalizeTimes };\n//# sourceMappingURL=normalize-times.mjs.map\n","function compareByTime(a, b) {\n if (a.at === b.at) {\n if (a.value === null)\n return 1;\n if (b.value === null)\n return -1;\n return 0;\n }\n else {\n return a.at - b.at;\n }\n}\n\nexport { compareByTime };\n//# sourceMappingURL=sort.mjs.map\n","import { isMotionValue, defaultOffset, isGenerator, createGeneratorEasing, fillOffset } from 'motion-dom';\nimport { progress, secondsToMilliseconds, warning, reverseEasing, getEasingForSegment } from 'motion-utils';\nimport { resolveSubjects } from '../animate/resolve-subjects.mjs';\nimport { calculateRepeatDuration } from './utils/calc-repeat-duration.mjs';\nimport { calcNextTime } from './utils/calc-time.mjs';\nimport { addKeyframes } from './utils/edit.mjs';\nimport { normalizeTimes } from './utils/normalize-times.mjs';\nimport { compareByTime } from './utils/sort.mjs';\n\nconst defaultSegmentEasing = \"easeInOut\";\nconst MAX_REPEAT = 20;\nfunction createAnimationsFromSequence(sequence, { defaultTransition = {}, ...sequenceTransition } = {}, scope, generators) {\n const defaultDuration = defaultTransition.duration || 0.3;\n const animationDefinitions = new Map();\n const sequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the sequence array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < sequence.length; i++) {\n const segment = sequence[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (typeof segment === \"string\") {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n let [subject, keyframes, transition = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (transition.at !== undefined) {\n currentTime = calcNextTime(currentTime, transition.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n const resolveValueSequence = (valueKeyframes, valueTransition, valueSequence, elementIndex = 0, numSubjects = 0) => {\n const valueKeyframesAsList = keyframesAsList(valueKeyframes);\n const { delay = 0, times = defaultOffset(valueKeyframesAsList), type = defaultTransition.type || \"keyframes\", repeat, repeatType, repeatDelay = 0, ...remainingTransition } = valueTransition;\n let { ease = defaultTransition.ease || \"easeOut\", duration } = valueTransition;\n /**\n * Resolve stagger() if defined.\n */\n const calculatedDelay = typeof delay === \"function\"\n ? delay(elementIndex, numSubjects)\n : delay;\n /**\n * If this animation should and can use a spring, generate a spring easing function.\n */\n const numKeyframes = valueKeyframesAsList.length;\n const createGenerator = isGenerator(type)\n ? type\n : generators?.[type || \"keyframes\"];\n if (numKeyframes <= 2 && createGenerator) {\n /**\n * As we're creating an easing function from a spring,\n * ideally we want to generate it using the real distance\n * between the two keyframes. However this isn't always\n * possible - in these situations we use 0-100.\n */\n let absoluteDelta = 100;\n if (numKeyframes === 2 &&\n isNumberKeyframesArray(valueKeyframesAsList)) {\n const delta = valueKeyframesAsList[1] - valueKeyframesAsList[0];\n absoluteDelta = Math.abs(delta);\n }\n const springTransition = {\n ...defaultTransition,\n ...remainingTransition,\n };\n if (duration !== undefined) {\n springTransition.duration = secondsToMilliseconds(duration);\n }\n const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);\n ease = springEasing.ease;\n duration = springEasing.duration;\n }\n duration ?? (duration = defaultDuration);\n const startTime = currentTime + calculatedDelay;\n /**\n * If there's only one time offset of 0, fill in a second with length 1\n */\n if (times.length === 1 && times[0] === 0) {\n times[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = times.length - valueKeyframesAsList.length;\n remainder > 0 && fillOffset(times, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframesAsList.length === 1 &&\n valueKeyframesAsList.unshift(null);\n /**\n * Segments can't express `repeat: Infinity` or very large\n * counts — they'd leave dead time after the segment or\n * explode the keyframe array. Ignore with a warning.\n */\n if (repeat) {\n warning(repeat < MAX_REPEAT, `Sequence segments can't repeat ${repeat} times — ignoring repeat option. Use a value below ${MAX_REPEAT} or apply repeat at the sequence level instead.`);\n }\n if (repeat && repeat < MAX_REPEAT) {\n /**\n * Express repeatDelay in units of a single iteration's duration\n * so it can be added to the per-iteration time offsets below\n * before they're normalized to 0-1.\n */\n const repeatDelayUnits = duration > 0 ? repeatDelay / duration : 0;\n duration = calculateRepeatDuration(duration, repeat, repeatDelay);\n const originalKeyframes = [...valueKeyframesAsList];\n const originalTimes = [...times];\n ease = Array.isArray(ease) ? [...ease] : [ease];\n const originalEase = [...ease];\n /**\n * For reverse/mirror, alternate iterations play the segment\n * backwards. mirror matches JSAnimation's mirroredGenerator:\n * reversed keyframes, easings unchanged. reverse matches\n * JSAnimation's iterationProgress = 1 - p: reversed\n * keyframes, easing array reversed AND each function easing\n * mapped through reverseEasing (string easings unchanged —\n * they're resolved later by the keyframes engine).\n */\n const isFlipping = repeatType === \"reverse\" || repeatType === \"mirror\";\n let flippedKeyframes = originalKeyframes;\n let flippedEases = originalEase;\n if (isFlipping) {\n flippedKeyframes = [...originalKeyframes].reverse();\n if (repeatType === \"reverse\") {\n flippedEases = [...originalEase]\n .reverse()\n .map((e) => typeof e === \"function\"\n ? reverseEasing(e)\n : e);\n }\n }\n for (let repeatIndex = 0; repeatIndex < repeat; repeatIndex++) {\n const isFlipped = isFlipping && repeatIndex % 2 === 0;\n const iterKeyframes = isFlipped\n ? flippedKeyframes\n : originalKeyframes;\n const iterEase = isFlipped ? flippedEases : originalEase;\n const iterStartOffset = (repeatIndex + 1) * (1 + repeatDelayUnits);\n /**\n * If repeatDelay is set, hold the previous iteration's\n * final value through the delay by inserting a keyframe\n * at the moment the next iteration begins.\n */\n if (repeatDelayUnits > 0) {\n valueKeyframesAsList.push(valueKeyframesAsList[valueKeyframesAsList.length - 1]);\n times.push(iterStartOffset);\n ease.push(\"linear\");\n }\n valueKeyframesAsList.push(...iterKeyframes);\n for (let keyframeIndex = 0; keyframeIndex < iterKeyframes.length; keyframeIndex++) {\n times.push(originalTimes[keyframeIndex] + iterStartOffset);\n ease.push(keyframeIndex === 0\n ? \"linear\"\n : getEasingForSegment(iterEase, keyframeIndex - 1));\n }\n }\n normalizeTimes(times, repeat, repeatDelayUnits);\n }\n const targetTime = startTime + duration;\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframesAsList, ease, times, startTime, targetTime);\n maxDuration = Math.max(calculatedDelay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n };\n if (isMotionValue(subject)) {\n const subjectSequence = getSubjectSequence(subject, sequences);\n resolveValueSequence(keyframes, transition, getValueSequence(\"default\", subjectSequence));\n }\n else {\n const subjects = resolveSubjects(subject, keyframes, scope, elementCache);\n const numSubjects = subjects.length;\n /**\n * For every element in this segment, process the defined values.\n */\n for (let subjectIndex = 0; subjectIndex < numSubjects; subjectIndex++) {\n /**\n * Cast necessary, but we know these are of this type\n */\n keyframes = keyframes;\n transition = transition;\n const thisSubject = subjects[subjectIndex];\n const subjectSequence = getSubjectSequence(thisSubject, sequences);\n for (const key in keyframes) {\n resolveValueSequence(keyframes[key], getValueTransition(transition, key), getValueSequence(key, subjectSequence), subjectIndex, numSubjects);\n }\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n sequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || \"easeOut\");\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(defaultSegmentEasing);\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n if (!animationDefinitions.has(element)) {\n animationDefinitions.set(element, {\n keyframes: {},\n transition: {},\n });\n }\n const definition = animationDefinitions.get(element);\n definition.keyframes[key] = keyframes;\n /**\n * Exclude `type` from defaultTransition since springs have been\n * converted to duration-based easing functions in resolveValueSequence.\n * Including `type: \"spring\"` would cause JSAnimation to error when\n * the merged keyframes array has more than 2 keyframes.\n */\n const { type: _type, ...remainingDefaultTransition } = defaultTransition;\n definition.transition[key] = {\n ...remainingDefaultTransition,\n duration: totalDuration,\n ease: valueEasing,\n times: valueOffset,\n ...sequenceTransition,\n };\n }\n });\n return animationDefinitions;\n}\nfunction getSubjectSequence(subject, sequences) {\n !sequences.has(subject) && sequences.set(subject, {});\n return sequences.get(subject);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\nfunction keyframesAsList(keyframes) {\n return Array.isArray(keyframes) ? keyframes : [keyframes];\n}\nfunction getValueTransition(transition, key) {\n return transition && transition[key]\n ? {\n ...transition,\n ...transition[key],\n }\n : { ...transition };\n}\nconst isNumber = (keyframe) => typeof keyframe === \"number\";\nconst isNumberKeyframesArray = (keyframes) => keyframes.every(isNumber);\n\nexport { createAnimationsFromSequence, getValueTransition };\n//# sourceMappingURL=create.mjs.map\n","import { animateSingleValue, animateElement, visualElementStore, animateEffectSubject, propEffect, findEffect, isMotionValue } from 'motion-dom';\nimport { invariant } from 'motion-utils';\nimport { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';\nimport { resolveSubjects } from './resolve-subjects.mjs';\n\nfunction isSingleValue(subject, keyframes) {\n return (isMotionValue(subject) ||\n typeof subject === \"number\" ||\n (typeof subject === \"string\" && !isDOMKeyframes(keyframes)));\n}\n/**\n * Implementation\n */\nfunction animateSubject(subject, keyframes, options, scope) {\n const animations = [];\n if (isSingleValue(subject, keyframes)) {\n animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)\n ? keyframes.default || keyframes\n : keyframes, options ? options.default || options : options));\n }\n else {\n // Gracefully handle null/undefined subjects (e.g., from querySelector returning null)\n if (subject == null) {\n return animations;\n }\n const subjects = resolveSubjects(subject, keyframes, scope);\n const numSubjects = subjects.length;\n invariant(Boolean(numSubjects), \"No valid elements provided.\", \"no-valid-elements\");\n for (let i = 0; i < numSubjects; i++) {\n const thisSubject = subjects[i];\n const transition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (\"delay\" in transition &&\n typeof transition.delay === \"function\") {\n transition.delay = transition.delay(i, numSubjects);\n }\n if (thisSubject instanceof Element) {\n /**\n * An element already owned by a VisualElement (a <motion.*>\n * component or animateLayout()) animates its values so they\n * share one renderer. Anything else is driven through\n * styleEffect (or svgEffect) and the DOM keyframe resolver,\n * without creating a VisualElement.\n */\n animations.push(...animateElement(thisSubject, keyframes, transition, visualElementStore.get(thisSubject)));\n }\n else {\n /**\n * Registered effects (animate.addEffect) claim non-DOM\n * subjects before we fall back to writing plain properties.\n */\n animations.push(...animateEffectSubject(findEffect(thisSubject) ?? propEffect, thisSubject, keyframes, transition));\n }\n }\n }\n return animations;\n}\n\nexport { animateSubject };\n//# sourceMappingURL=subject.mjs.map\n","import { motionValue, spring } from 'motion-dom';\nimport { createAnimationsFromSequence } from '../sequence/create.mjs';\nimport { animateSubject } from './subject.mjs';\n\nfunction animateSequence(sequence, options, scope) {\n const animations = [];\n /**\n * Pre-process: replace function segments with MotionValue segments,\n * subscribe callbacks immediately\n */\n const processedSequence = sequence.map((segment) => {\n if (Array.isArray(segment) && typeof segment[0] === \"function\") {\n const callback = segment[0];\n const mv = motionValue(0);\n mv.on(\"change\", callback);\n if (segment.length === 1) {\n return [mv, [0, 1]];\n }\n else if (segment.length === 2) {\n return [mv, [0, 1], segment[1]];\n }\n else {\n return [mv, segment[1], segment[2]];\n }\n }\n return segment;\n });\n const animationDefinitions = createAnimationsFromSequence(processedSequence, options, scope, { spring });\n animationDefinitions.forEach(({ keyframes, transition }, subject) => {\n animations.push(...animateSubject(subject, keyframes, transition));\n });\n return animations;\n}\n\nexport { animateSequence };\n//# sourceMappingURL=sequence.mjs.map\n","import { removeEffect, addEffect, GroupAnimationWithThen } from 'motion-dom';\nimport { removeItem } from 'motion-utils';\nimport { animateSequence } from './sequence.mjs';\nimport { animateSubject } from './subject.mjs';\n\nfunction isSequence(value) {\n return Array.isArray(value) && value.some(Array.isArray);\n}\n/**\n * Creates an animation function that is optionally scoped\n * to a specific element.\n */\nfunction createScopedAnimate(options = {}) {\n const { scope, reduceMotion, skipAnimations } = options;\n /**\n * Implementation\n */\n function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {\n let animations = [];\n let animationOnComplete;\n const inherited = {};\n if (reduceMotion !== undefined)\n inherited.reduceMotion = reduceMotion;\n if (skipAnimations !== undefined)\n inherited.skipAnimations = skipAnimations;\n if (isSequence(subjectOrSequence)) {\n const { onComplete, ...sequenceOptions } = optionsOrKeyframes || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSequence(subjectOrSequence, { ...inherited, ...sequenceOptions }, scope);\n }\n else {\n // Extract top-level onComplete so it doesn't get applied per-value\n const { onComplete, ...rest } = options || {};\n if (typeof onComplete === \"function\") {\n animationOnComplete = onComplete;\n }\n animations = animateSubject(subjectOrSequence, optionsOrKeyframes, { ...inherited, ...rest }, scope);\n }\n const animation = new GroupAnimationWithThen(animations);\n if (animationOnComplete) {\n animation.finished.then(animationOnComplete);\n }\n if (scope) {\n scope.animations.push(animation);\n animation.finished.then(() => {\n removeItem(scope.animations, animation);\n });\n }\n return animation;\n }\n return scopedAnimate;\n}\nconst animate = Object.assign(createScopedAnimate(), {\n /**\n * Register an effect so `animate()` can animate the subjects it\n * claims, for instance `animate.addEffect(threeEffect)`. The most\n * recently added effect is tested first. DOM elements are always\n * animated directly.\n */\n addEffect,\n removeEffect,\n});\n\nexport { animate, createScopedAnimate };\n//# sourceMappingURL=index.mjs.map\n","import { resolveElements, getValueTransition, getAnimationMap, animationMapKey, getComputedStyle, fillWildcards, applyPxDefaults, NativeAnimation } from 'motion-dom';\nimport { invariant, secondsToMilliseconds } from 'motion-utils';\n\nfunction animateElements(elementOrSelector, keyframes, options, scope) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return [];\n }\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid elements provided.\", \"no-valid-elements\");\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions = [];\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName];\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n const valueOptions = {\n ...getValueTransition(elementTransition, valueName),\n };\n valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));\n valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element);\n const key = animationMapKey(valueName, valueOptions.pseudoElement || \"\");\n const currentAnimation = map.get(key);\n currentAnimation && currentAnimation.stop();\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n options: {\n ...valueOptions,\n element,\n name: valueName,\n allowFlatten: !elementTransition.type && !elementTransition.ease,\n },\n });\n }\n }\n /**\n * Step 2: Resolve keyframes (read)\n */\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];\n const { element, name, pseudoElement } = animationOptions;\n if (!pseudoElement && unresolvedKeyframes[0] === null) {\n unresolvedKeyframes[0] = getComputedStyle(element, name);\n }\n fillWildcards(unresolvedKeyframes);\n applyPxDefaults(unresolvedKeyframes, name);\n /**\n * If we only have one keyframe, explicitly read the initial keyframe\n * from the computed style. This is to ensure consistency with WAAPI behaviour\n * for restarting animations, for instance .play() after finish, when it\n * has one vs two keyframes.\n */\n if (!pseudoElement && unresolvedKeyframes.length < 2) {\n unresolvedKeyframes.unshift(getComputedStyle(element, name));\n }\n animationOptions.keyframes = unresolvedKeyframes;\n }\n /**\n * Step 3: Create new animations (write)\n */\n const animations = [];\n for (let i = 0; i < animationDefinitions.length; i++) {\n const { map, key, options: animationOptions } = animationDefinitions[i];\n const animation = new NativeAnimation(animationOptions);\n map.set(key, animation);\n animation.finished.finally(() => map.delete(key));\n animations.push(animation);\n }\n return animations;\n}\n\nexport { animateElements };\n//# sourceMappingURL=animate-elements.mjs.map\n","import { GroupAnimationWithThen } from 'motion-dom';\nimport { animateElements } from './animate-elements.mjs';\n\nconst createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes, options) {\n return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));\n }\n return scopedAnimate;\n};\nconst animateMini = /*@__PURE__*/ createScopedWaapiAnimate();\n\nexport { animateMini, createScopedWaapiAnimate };\n//# sourceMappingURL=animate-style.mjs.map\n","import {\n type AnimationPlaybackControls,\n} from 'motion';\nimport {createLayoutTask} from '../runtime/layout-task';\n\ntype MotionHandle = PromiseLike<void> & {\n finished: Promise<void>;\n cancel(): void;\n stop(): void;\n complete(): void;\n};\n\nconst motionHandle = (\n finished: Promise<void>,\n controls: Pick<MotionHandle, 'cancel' | 'stop' | 'complete'>,\n): MotionHandle => ({\n finished,\n then: finished.then.bind(finished),\n ...controls,\n});\n\n/** Measure together, then let Motion start playback in the shared write phase. */\nconst measureMotion = <T>({measure, start, signal}: {\n measure(): T;\n start(measurement: T): MotionHandle;\n signal?: AbortSignal | null;\n}): MotionHandle => {\n let driver: MotionHandle | null = null;\n let completeRequested = false;\n let settled = false;\n let resolve!: () => void;\n let reject!: (error: unknown) => void;\n const finished = new Promise<void>((yes, no) => { resolve = yes; reject = no; });\n const settle = (error?: unknown): void => {\n if (settled) return;\n settled = true;\n task.cancel();\n signal?.removeEventListener('abort', abort);\n if (error === undefined) resolve();\n else reject(error);\n };\n const task = createLayoutTask({\n measure: () => {\n try { return {value: measure()}; }\n catch (error) { settle(error); return null; }\n },\n apply: (measurement) => {\n if (!measurement || settled || signal?.aborted) return;\n try {\n driver = start(measurement.value);\n if (settled) {\n driver.cancel();\n return;\n }\n void driver.finished.then(() => settle(), settle);\n if (completeRequested) driver.complete();\n } catch (error) { settle(error); }\n },\n });\n const terminate = (action: 'cancel' | 'stop'): void => {\n if (settled) return;\n try { driver?.[action](); }\n finally { settle(); }\n };\n const abort = (): void => {\n // The child's signal listener owns painted presentation capture. Let\n // the abort dispatch reach it before falling back to cancellation.\n if (driver) queueMicrotask(() => terminate('cancel'));\n else terminate('cancel');\n };\n signal?.addEventListener('abort', abort, {once: true});\n if (signal?.aborted) settle();\n else task.schedule();\n return motionHandle(finished, {\n cancel: () => terminate('cancel'),\n stop: () => terminate('stop'),\n complete: () => {\n completeRequested = true;\n driver?.complete();\n },\n });\n};\n\nconst noopHandle = (run?: () => void | Promise<void>): MotionHandle => {\n const finished = (async () => {\n await run?.();\n })();\n\n return motionHandle(finished, {\n cancel() {},\n stop() {},\n complete() {},\n });\n};\n\nconst toMotionHandle = (\n controls: Pick<AnimationPlaybackControls, 'finished' | 'cancel' | 'stop' | 'complete'>,\n cleanup?: () => void,\n): MotionHandle => {\n let didCleanup = false;\n const clean = (): void => {\n if (didCleanup) return;\n didCleanup = true;\n cleanup?.();\n };\n\n let settleInterruption = (): void => {};\n const interrupted = new Promise<void>((resolve) => { settleInterruption = resolve; });\n const driverFinished = controls.finished.then(() => {}, () => {});\n const finished = Promise.race([driverFinished, interrupted]).finally(clean);\n const terminate = (action: () => void): void => {\n try {\n action();\n } finally {\n settleInterruption();\n clean();\n }\n };\n return motionHandle(finished, {\n cancel() {\n terminate(() => controls.cancel());\n },\n stop() {\n terminate(() => {\n try {\n controls.stop();\n } catch (error) {\n // WAAPI cannot commit styles when a target is no longer rendered.\n // Cancel the whole driver group so no animations survive cleanup.\n if (!(error instanceof DOMException && error.name === 'InvalidStateError')) throw error;\n controls.cancel();\n }\n });\n },\n complete() {\n // Native drivers commit styles asynchronously after finish is requested.\n // Cleanup must follow that commit; interruption has a different lifetime.\n controls.complete();\n },\n });\n};\n\nconst parallel = (...handles: MotionHandle[]): MotionHandle => motionHandle(\n Promise.allSettled(handles.map((handle) => handle.finished)).then(() => {}),\n {\n cancel() {\n handles.forEach((handle) => handle.cancel());\n },\n stop() {\n handles.forEach((handle) => handle.stop());\n },\n complete() {\n handles.forEach((handle) => handle.complete());\n },\n },\n);\n\n\nexport {\n motionHandle,\n measureMotion,\n noopHandle,\n parallel,\n toMotionHandle,\n};\nexport type {MotionHandle};\n","import {transformProps, type AnimationPlaybackControls} from 'motion';\n\nconst reducedMotionQuery = '(prefers-reduced-motion: reduce)';\nconst shouldReduceMotion = (): boolean => typeof window !== 'undefined'\n && typeof window.matchMedia === 'function' && window.matchMedia(reducedMotionQuery).matches;\n\nexport {\n reducedMotionQuery,\n shouldReduceMotion,\n};\n\nconst spatialProperties = new Set([\n ...transformProps, 'flexBasis', 'gridTemplateColumns', '--ui-app-sidebar-width', '--ui-app-sidebar-progress',\n 'bottom', 'filter', 'height', 'maxHeight', 'maxWidth', 'inset', 'insetBlock', 'insetInline', 'left', 'right', 'top', 'transform', 'width',\n 'translate', 'x', 'y', 'z', 'scale', 'scaleX', 'scaleY', 'rotate', 'rotateX', 'rotateY', 'skew', 'skewX', 'skewY',\n]);\ntype SpatialMotion = Pick<AnimationPlaybackControls, 'complete' | 'finished'>;\nconst spatialMotions = new Set<SpatialMotion>();\nlet listening = false;\nconst trackSpatialMotion = (handle: SpatialMotion): (() => void) => {\n if (!listening && typeof window !== 'undefined' && window.matchMedia) {\n listening = true;\n window.matchMedia(reducedMotionQuery).addEventListener('change', (event) => {\n if (event.matches) for (const motion of [...spatialMotions]) motion.complete();\n });\n }\n spatialMotions.add(handle);\n const release = (): void => { spatialMotions.delete(handle); };\n void handle.finished.then(release, release);\n return release;\n};\nexport {spatialProperties, trackSpatialMotion};\n","import {styleEffect, svgEffect, transformProps, visualElementStore, type AnimationPlaybackControls} from 'motion';\nimport {motionHandle, noopHandle, toMotionHandle, type MotionHandle} from './animate';\n\nimport {spatialProperties, trackSpatialMotion} from './reduced-motion';\n\ntype MotionProperty = string;\ntype MotionSettlement = 'finished' | 'cancelled' | 'stopped';\ntype OwnedMotion = Readonly<{\n handle: MotionHandle;\n properties: Set<MotionProperty>;\n retire(): void;\n}>;\n\nconst ownedMotions = new WeakMap<Element, Set<OwnedMotion>>();\nconst scopedTransforms = new WeakMap<Element, number>();\nconst trackTransformMotion = (element: Element): (() => void) => {\n scopedTransforms.set(element, (scopedTransforms.get(element) ?? 0) + 1);\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const remaining = (scopedTransforms.get(element) ?? 1) - 1;\n if (remaining) scopedTransforms.set(element, remaining);\n else scopedTransforms.delete(element);\n };\n};\ntype MotionPresentation = ReadonlyMap<MotionProperty, string | number | undefined>;\nconst interruptedPresentations = new WeakMap<Element, Map<MotionProperty, string | number | undefined>>();\nconst consumeInterruptedPresentation = (element: Element, properties?: ReadonlySet<MotionProperty>): MotionPresentation | undefined => {\n const retained = interruptedPresentations.get(element);\n if (!retained) return;\n const consumed = new Map([...retained].filter(([property]) => !properties || properties.has(property)));\n for (const property of consumed.keys()) retained.delete(property);\n if (!retained.size) interruptedPresentations.delete(element);\n return consumed.size ? consumed : undefined;\n};\nconst hasOwnedMotion = (element: Element): boolean => scopedTransforms.has(element) || [...(ownedMotions.get(element) ?? [])]\n .some(({properties}) => [...properties].some((property) => property === 'transform' || transformProps.has(property)));\nconst presentation = (element: Element, properties: ReadonlySet<string>): MotionPresentation => {\n // Transform aliases already belong to Motion's effect state. Only native\n // CSS properties need a computed presentation snapshot.\n let computed: CSSStyleDeclaration | undefined;\n return new Map([...properties].map((property) => {\n if (transformProps.has(property)) {\n const value = element instanceof SVGElement ? svgEffect.read(element, property)\n : element instanceof HTMLElement ? styleEffect.read(element, property) : undefined;\n return [property, value];\n }\n computed ??= getComputedStyle(element);\n const value = property.startsWith('--') ? computed.getPropertyValue(property)\n : (computed as unknown as Record<string, string>)[property];\n const numeric = Number(value);\n // Motion expects unitless keyframes such as opacity as numbers, not CSS strings.\n return [property, value?.trim() && Number.isFinite(numeric) ? numeric : value];\n }));\n};\n\n/** Stop and release motion ownership before direct measurement or presentation changes. */\nconst stopOwnedMotion = (element: Element, properties?: ReadonlySet<string>): MotionPresentation | undefined => {\n const owned = ownedMotions.get(element);\n const owners = properties\n ? new Set([...(owned ?? [])].filter((owner) => [...owner.properties].some((property) => properties.has(property))))\n : owned;\n const retained = consumeInterruptedPresentation(element, properties);\n if (!owners?.size) return retained;\n const previous = new Map([\n ...retained ?? [],\n ...presentation(element, new Set([...owners].flatMap(({properties}) => [...properties]))),\n ]);\n for (const owned of [...owners]) owned.handle.stop();\n return previous;\n};\n\n/** Retire a DOM/gesture owner, including upstream values and queued presentation. */\nconst releaseOwnedMotion = (element: Element): void => {\n if (element.isConnected) stopOwnedMotion(element);\n else {\n // A removed owner has no painted handoff to preserve. Cancelling also\n // avoids sampling native presentation after the document was mutated.\n for (const owner of [...ownedMotions.get(element) ?? []]) owner.handle.cancel();\n interruptedPresentations.delete(element);\n }\n releaseMotionEffect(element);\n};\n\n/** Detach renderer values after their drivers have stopped or settled. */\nconst releaseMotionEffect = (element: Element, properties?: ReadonlySet<string>): void => {\n // animateLayout hands effect values to a persistent VisualElement. Later\n // animate() calls reuse that renderer, so releasing only styleEffect leaves\n // retired gesture values ready to repaint on the next layout/opacity update.\n const visualElement = visualElementStore.get(element);\n for (const property of visualElement?.values.keys() ?? []) {\n if (!properties || properties.has(property)) visualElement?.removeValue(property);\n }\n const effect = element instanceof SVGElement ? svgEffect : element instanceof HTMLElement ? styleEffect : undefined;\n const state = effect?.state(element as HTMLElement & SVGElement);\n if (!state || !effect) return;\n const released = state.release();\n if (!properties) return;\n const retained = Object.fromEntries([...released].filter(([property]) => !properties.has(property)));\n if (Object.keys(retained).length) effect(element as HTMLElement & SVGElement, retained);\n};\n\n/** Return temporary animation styles to CSS, including layout projection's base opacity. */\nconst restoreMotionStyles = (element: HTMLElement, styles: Readonly<Record<string, string>>): void => {\n releaseMotionEffect(element, new Set(Object.keys(styles)));\n for (const [property, value] of Object.entries(styles)) {\n if (property.startsWith('--')) element.style.setProperty(property, value);\n else (element.style as unknown as Record<string, string>)[property] = value;\n }\n const visualElement = visualElementStore.get(element);\n if (visualElement && 'opacity' in styles) {\n // Shared layout projection writes opacity even without a bound value,\n // defaulting to 1. Seed its base from the restored CSS instead.\n const opacity = Number(getComputedStyle(element).opacity);\n visualElement.getValue('opacity', opacity)?.jump(opacity);\n }\n};\n\nconst ownMotion = (\n element: Element,\n start: (previousProperties?: MotionPresentation) => Pick<AnimationPlaybackControls, 'finished' | 'cancel' | 'stop' | 'complete'>,\n properties: ReadonlySet<MotionProperty>,\n signal?: AbortSignal | null,\n cleanup?: (settlement: MotionSettlement) => void,\n): MotionHandle => {\n if (signal?.aborted) {\n cleanup?.('cancelled');\n return noopHandle();\n }\n const owners = ownedMotions.get(element) ?? new Set<OwnedMotion>();\n ownedMotions.set(element, owners);\n const activeProperties = new Set([...owners].flatMap((owner) => [...owner.properties]).filter((property) => properties.has(property)));\n const previous = new Map([\n ...consumeInterruptedPresentation(element, properties) ?? [],\n ...activeProperties.size ? presentation(element, activeProperties) : [],\n ]);\n const previousProperties = previous.size ? previous : undefined;\n // Motion replaces only the values being retargeted. Relinquish those claims\n // without stopping a group that may still be driving unrelated properties.\n for (const owner of [...owners]) {\n for (const property of properties) owner.properties.delete(property);\n if (!owner.properties.size) owner.retire();\n }\n const controls = toMotionHandle(start(previousProperties));\n let supersede!: () => void;\n const superseded = new Promise<void>((resolve) => { supersede = resolve; });\n\n let handle!: MotionHandle;\n const stopForAbort = (): void => {\n if (!element.isConnected) {\n releaseOwnedMotion(element);\n return;\n }\n // A state change aborts its old hook before starting the successor. Preserve\n // the sampled presentation across that synchronous handoff, while releasing\n // styles and listeners immediately even when no successor is started.\n const previous = presentation(element, owner.properties);\n handle.stop();\n const retained = new Map([...interruptedPresentations.get(element) ?? [], ...previous]);\n interruptedPresentations.set(element, retained);\n queueMicrotask(() => {\n if (interruptedPresentations.get(element) === retained) interruptedPresentations.delete(element);\n });\n };\n let released = false;\n const release = (settlement: MotionSettlement, painted?: MotionPresentation): void => {\n if (!owners.has(owner)) return;\n try {\n if (!released || painted) {\n const firstRelease = !released;\n released = true;\n const visualElement = visualElementStore.get(element);\n const state = element instanceof SVGElement ? svgEffect.state(element)\n : element instanceof HTMLElement ? styleEffect.state(element) : undefined;\n if (painted && (element instanceof HTMLElement || element instanceof SVGElement)) {\n const aliases = [...owner.properties].some((property) => transformProps.has(property));\n // Native stop samples its clock, which can be ahead of the painted\n // frame. Keep Motion's reusable values aligned with the DOM sample.\n for (const [property, value] of painted) {\n if (value !== undefined && !(property === 'transform' && aliases)) {\n (visualElement?.getValue(property) ?? state?.get(property))?.set(value);\n }\n }\n // A completed owner may already have returned its styles to\n // CSS. Resync remaining values without restoring those styles.\n if (firstRelease) {\n visualElement?.render();\n state?.flush();\n for (const [property, value] of painted) {\n if (value !== undefined && !transformProps.has(property)) {\n if (property.startsWith('--')) element.style.setProperty(property, String(value));\n else (element.style as unknown as Record<string, string>)[property] = String(value);\n }\n }\n }\n } else {\n visualElement?.render();\n state?.flush();\n }\n if (firstRelease) cleanup?.(settlement);\n }\n } finally {\n if (settlement !== 'finished' || !signal || signal.aborted) {\n signal?.removeEventListener('abort', stopForAbort);\n owners.delete(owner);\n if (!owners.size) ownedMotions.delete(element);\n }\n }\n };\n handle = motionHandle(Promise.race([controls.finished, superseded]).finally(() => release('finished')), {\n cancel() {\n if (!owners.has(owner)) return;\n try {\n if (owner.properties.size === properties.size) controls.cancel();\n else controls.stop();\n } finally {\n release('cancelled');\n }\n },\n stop() {\n if (!owners.has(owner)) return;\n const sampled = new Set(owner.properties);\n if ([...owner.properties].some((property) => transformProps.has(property))) sampled.add('transform');\n const painted = presentation(element, sampled);\n try {\n if (!released) controls.stop();\n } finally {\n // A completed owner can still have native fill awaiting its\n // finish event. Retire the driver before handing off styles.\n try {\n // A native group can retain already replaced subdrivers.\n // Cancelling that group would rewind another owner's values.\n if (owner.properties.size === properties.size) controls.cancel();\n } finally {\n release('stopped', painted);\n }\n }\n },\n complete() {\n if (!owners.has(owner)) return;\n controls.complete();\n },\n });\n const owner: OwnedMotion = {\n handle,\n properties: new Set(properties),\n retire() {\n release('stopped');\n supersede();\n },\n };\n owners.add(owner);\n ownedMotions.set(element, owners);\n if ([...properties].some((property) => spatialProperties.has(property))) trackSpatialMotion(handle);\n signal?.addEventListener('abort', stopForAbort, {once: true});\n return handle;\n};\n\nexport {hasOwnedMotion, trackTransformMotion, ownMotion, releaseOwnedMotion, releaseMotionEffect, restoreMotionStyles, stopOwnedMotion};\nexport type {MotionPresentation, MotionSettlement};\n","import {spring, type AnimationOptions, type ValueAnimationTransition} from 'motion';\n\n/** Global animation policy. Recipe options override these defaults. */\nexport interface MotionConfiguration {\n tempo: number;\n elasticity: number;\n displacement: number;\n}\nconst motionDurations = {\n fast: 80, moderate: 160, slow: 240,\n 'fast-exit': 60, 'moderate-exit': 120, 'slow-exit': 160,\n continuous: 800,\n} as const;\nconst motionEasings = {\n out: [0.23, 1, 0.32, 1],\n inOut: [0.77, 0, 0.175, 1],\n linear: [0, 0, 1, 1],\n} as const;\nconst motionRoles = {\n feedback: {duration: 'fast', easing: 'out', reduced: 'feedback', spring: false, elasticity: 0.12},\n presence: {duration: 'moderate', easing: 'out', reduced: 'feedback', spring: false, elasticity: 0.2},\n presenceEmphasized: {duration: 'slow', easing: 'out', reduced: 'feedback', spring: false, elasticity: 0.24},\n presenceEmphasizedExit: {duration: 'slow-exit', easing: 'out', reduced: 'feedbackExit', spring: false, elasticity: 0},\n feedbackExit: {duration: 'fast-exit', easing: 'out', reduced: 'feedbackExit', spring: false, elasticity: 0},\n presenceExit: {duration: 'moderate-exit', easing: 'out', reduced: 'feedbackExit', spring: false, elasticity: 0},\n layout: {duration: 'moderate', easing: 'inOut', reduced: 'feedback', spring: false, elasticity: 0.14},\n layoutQuick: {duration: 'fast', easing: 'inOut', reduced: 'feedback', spring: false, elasticity: 0.08},\n layoutSpring: {duration: 'moderate', easing: 'inOut', reduced: 'feedback', spring: true, elasticity: 0.22},\n resize: {duration: 'moderate', easing: 'inOut', reduced: 'feedback', spring: true, elasticity: 0.18},\n gestureExit: {duration: 'moderate', easing: 'out', reduced: 'feedbackExit', spring: false, elasticity: 0},\n gestureSettle: {duration: 'slow', easing: 'out', reduced: 'feedback', spring: true, elasticity: 0.3},\n continuous: {duration: 'continuous', easing: 'linear', reduced: 'feedback', spring: false, elasticity: 0},\n} as const;\nexport type MotionTransition = Readonly<AnimationOptions>;\nexport type MotionRoleName = keyof typeof motionRoles;\nexport type MotionSpeedName = 'fast' | 'moderate' | 'slow';\nexport type DurationSpeed = Readonly<{duration: number}>;\nexport type PhysicsSpeed = Readonly<{stiffness: number; damping: number; mass?: number}>;\nexport type MotionSpeed = MotionSpeedName | DurationSpeed | PhysicsSpeed;\n\nlet configuration: Readonly<MotionConfiguration> = Object.freeze({tempo: 0.5, elasticity: 0, displacement: 0.5});\nconst listeners = new Set<() => void>();\nexport const configureMotion = (options: Partial<MotionConfiguration>): void => {\n for (const [key, value] of Object.entries(options)) {\n if (!Object.hasOwn(configuration, key) || typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > 1) {\n throw new TypeError(`Animation ${key} must be a number from 0 to 1.`);\n }\n }\n if (Object.entries(options).every(([key, value]) => configuration[key as keyof MotionConfiguration] === value)) return;\n configuration = Object.freeze({...configuration, ...options});\n for (const listener of listeners) listener();\n};\nexport const subscribeMotionConfiguration = (listener: () => void): (() => void) => {\n listeners.add(listener);\n return () => { listeners.delete(listener); };\n};\nexport const motionDisplacement = (): number => 0.5 + configuration.displacement;\nconst speedOptions = (speed: MotionSpeed): DurationSpeed | PhysicsSpeed => typeof speed === 'string'\n ? {duration: Math.round(motionDurations[speed] * (1.4 - configuration.tempo * 0.8)) / 1000}\n : speed;\nexport const resolveMotionRole = (role: MotionRoleName, channel: 'spatial' | 'opacity' = 'spatial', speed?: MotionSpeed): ValueAnimationTransition => {\n const policy = motionRoles[role];\n const custom = speed === undefined ? undefined : speedOptions(speed);\n if (custom && 'stiffness' in custom && channel === 'spatial') return {type: spring, ...custom};\n const duration = custom && 'duration' in custom ? custom.duration\n : Math.round(motionDurations[policy.duration] * (1.4 - configuration.tempo * 0.8)) / 1000;\n const bounce = Number((configuration.elasticity * policy.elasticity).toFixed(3));\n return channel === 'spatial' && (policy.spring || bounce > 0)\n ? {type: spring, visualDuration: duration, bounce}\n : {type: 'tween', duration, ease: motionEasings[policy.easing]};\n};\nexport const reducedMotionRole = (role: MotionRoleName): MotionRoleName => motionRoles[role].reduced;\n","import type {DOMKeyframesDefinition} from 'motion';\nimport {motionDisplacement} from './config';\ntype MotionKeyframes<T> = T | readonly T[];\ntype MotionKeyframePreset = Readonly<DOMKeyframesDefinition>;\n\n/** Positioned surfaces share spatial presentation; controllers own readiness and reversal. */\nconst anchoredEntrance = (element: Element): MotionKeyframePreset => {\n const side = element.getAttribute('data-side');\n const distance = 4 * motionDisplacement();\n const x = side === 'left' ? distance : side === 'right' ? -distance : 0;\n const y = side === 'top' ? distance : side === 'bottom' ? -distance : 0;\n const scale = element.hasAttribute('data-ui-tooltip-content') ? 1 : 0.97;\n return {opacity: [0, 1], transform: [`translate(${x}px, ${y}px) scaleY(${scale})`, 'none']};\n};\n\nconst anchoredExit = Object.freeze({\n opacity: Object.freeze([1, 0]),\n transform: Object.freeze([null, null]),\n}) as MotionKeyframePreset;\n\nconst presets = Object.freeze({\n opacity: Object.freeze({\n in: Object.freeze({opacity: Object.freeze([0, 1])}) as MotionKeyframePreset,\n out: Object.freeze({opacity: Object.freeze([1, 0])}) as MotionKeyframePreset,\n }),\n popover: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n scale: Object.freeze([0.97, 1]),\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: Object.freeze([1, 0]),\n scale: Object.freeze([1, 0.97]),\n }) as MotionKeyframePreset,\n }),\n get modal() { return {\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n y: Object.freeze([8 * motionDisplacement(), '0px']),\n scale: Object.freeze([0.98, 1]),\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: Object.freeze([1, 0]),\n y: Object.freeze(['0px', 8 * motionDisplacement()]),\n scale: Object.freeze([1, 0.98]),\n }) as MotionKeyframePreset,\n }; },\n toast: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n y: Object.freeze([\n 'calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))',\n 'var(--ui-toast-stack-offset, 0px)',\n ]),\n scale: 'var(--ui-toast-stack-scale, 1)',\n }) as MotionKeyframePreset,\n out: Object.freeze({\n opacity: 0,\n y: 'calc(var(--ui-toast-stack-offset, 0px) + var(--ui-toast-outside, -100%))',\n scale: 'var(--ui-toast-stack-scale, 1)',\n }) as MotionKeyframePreset,\n }),\n sheet: Object.freeze({\n left: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n transform: Object.freeze(['translateX(-100%)', 'none']),\n }) as MotionKeyframePreset,\n out: Object.freeze({opacity: 0, transform: 'translateX(-100%)'}) as MotionKeyframePreset,\n }),\n right: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n transform: Object.freeze(['translateX(100%)', 'none']),\n }) as MotionKeyframePreset,\n out: Object.freeze({opacity: 0, transform: 'translateX(100%)'}) as MotionKeyframePreset,\n }),\n top: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n transform: Object.freeze(['translateY(-100%)', 'none']),\n }) as MotionKeyframePreset,\n out: Object.freeze({opacity: 0, transform: 'translateY(-100%)'}) as MotionKeyframePreset,\n }),\n bottom: Object.freeze({\n in: Object.freeze({\n opacity: Object.freeze([0, 1]),\n transform: Object.freeze(['translateY(100%)', 'none']),\n }) as MotionKeyframePreset,\n out: Object.freeze({opacity: 0, transform: 'translateY(100%)'}) as MotionKeyframePreset,\n }),\n }),\n});\n\nconst finalKeyframe = <T>(keyframes: MotionKeyframes<T>): T => (\n Array.isArray(keyframes)\n ? (keyframes as readonly T[])[keyframes.length - 1] as T\n : keyframes as T\n);\n\nconst mutableKeyframes = <T>(keyframes: MotionKeyframes<T>): T | T[] => (\n Array.isArray(keyframes) ? [...keyframes] as T[] : keyframes as T\n);\n\nexport {\n anchoredEntrance,\n anchoredExit,\n finalKeyframe,\n mutableKeyframes,\n presets,\n};\nexport type {\n MotionKeyframes,\n};\n","type MotionTransitionSubject = Readonly<{\n el: unknown;\n root: unknown;\n signal: AbortSignal;\n}>;\n\ntype MotionSubject = Element | MotionTransitionSubject;\n\nconst isTransitionSubject = (subject: MotionSubject): subject is MotionTransitionSubject => (\n !(subject instanceof Element)\n && subject !== null\n && typeof subject === 'object'\n && 'signal' in subject\n);\n\nconst subjectElement = (subject: MotionSubject): Element => {\n const element = subject instanceof Element ? subject : subject.el;\n if (!(element instanceof Element)) throw new TypeError('Motion subject requires an Element target.');\n return element;\n};\n\nconst resolveMotionTarget = (subject: MotionSubject, target?: Element | string): Element => {\n const element = subjectElement(subject);\n if (!target) return element;\n if (target instanceof Element) return target;\n\n const root = isTransitionSubject(subject) ? subject.root : element;\n if (!(root instanceof Element)) throw new TypeError('Motion transition subject requires an Element root.');\n const resolved = root.matches(target) ? root : root.querySelector(target);\n if (!resolved) throw new Error(`Motion target not found: ${target}`);\n return resolved;\n};\n\nconst motionSignal = (subject: MotionSubject): AbortSignal | null => (\n isTransitionSubject(subject) ? subject.signal : null\n);\n\nexport {motionSignal, resolveMotionTarget};\nexport type {MotionSubject, MotionTransitionSubject};\n","import {animate, motionValue, styleEffect, svgEffect, spring, transformProps, visualElementStore, type DOMKeyframesDefinition} from 'motion';\nimport {animate as animateCss} from 'motion/mini';\nimport {noopHandle, parallel, toMotionHandle, type MotionHandle} from './animate';\nimport {ownMotion, releaseMotionEffect, stopOwnedMotion, type MotionPresentation} from './owned';\nimport {finalKeyframe} from './recipe';\nimport {resolveMotionRole, reducedMotionRole, type MotionRoleName, type MotionSpeed, type MotionTransition} from './config';\nimport {shouldReduceMotion, spatialProperties} from './reduced-motion';\nimport {motionSignal, resolveMotionTarget, type MotionSubject} from './subject';\n\ntype PropertyAnimationOptions = Readonly<{\n target?: Element | string;\n role?: MotionRoleName;\n speed?: MotionSpeed;\n transition?: MotionTransition;\n signal?: AbortSignal | null;\n}>;\n\nconst retargetKeyframes = (\n keyframes: Readonly<DOMKeyframesDefinition>,\n activeProperties?: MotionPresentation,\n): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(keyframes).map(([property, value]) => [\n property,\n Array.isArray(value)\n ? activeProperties?.has(property) ? [activeProperties.get(property), ...value.slice(1)] : [...value]\n : value,\n ]),\n) as DOMKeyframesDefinition;\n\n// Literal transforms can contain live CSS variables and calc expressions.\n// Keep those endpoints in WAAPI instead of resolving them through Motion values.\nconst animateKeyframes = (target: Element, keyframes: DOMKeyframesDefinition, timing: MotionTransition) => {\n if (keyframes.transform === undefined) return animate(target, keyframes, timing);\n const {type, ...options} = timing;\n const native = typeof type === 'string' ? type === 'spring' ? {...options, type: spring} : options : timing;\n return animateCss(target, {transform: keyframes.transform}, native);\n};\n\nconst reducedKeyframes = (keyframes: Readonly<DOMKeyframesDefinition>): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(keyframes).filter(([property]) => !spatialProperties.has(property)),\n) as DOMKeyframesDefinition;\n\nconst reducedDestinations = (keyframes: Readonly<DOMKeyframesDefinition>): DOMKeyframesDefinition => Object.fromEntries(\n Object.entries(keyframes).flatMap(([property, value]) => {\n if (!spatialProperties.has(property)) return [];\n return [[property, Array.isArray(value) ? finalKeyframe(value) : value]];\n }),\n) as DOMKeyframesDefinition;\n\n// Motion's visualDuration takes precedence over duration. An explicit timing or\n// physics choice must not accidentally retain the role's spring configuration.\nexport const withMotionDefaults = (defaults: MotionTransition, options: MotionTransition): MotionTransition => {\n const explicitTiming = (custom: Record<string, unknown>): boolean => custom.duration !== undefined\n || custom.stiffness !== undefined || custom.damping !== undefined || custom.mass !== undefined\n || (custom.type !== undefined && custom.type !== spring && custom.type !== 'spring');\n const timing: Record<string, unknown> = {...defaults, ...options};\n if (explicitTiming(options as Record<string, unknown>)) {\n timing.visualDuration = options.visualDuration;\n timing.bounce = options.bounce;\n }\n // Let Motion resolve property inheritance. Undefined overrides prevent a\n // role's visual spring timing from shadowing an explicitly authored duration.\n for (const [property, value] of Object.entries(options)) {\n if (!value || typeof value !== 'object' || !('inherit' in value) || !value.inherit) continue;\n const custom = value as Record<string, unknown>;\n if (explicitTiming(custom)) timing[property] = {...custom, visualDuration: custom.visualDuration, bounce: custom.bounce};\n }\n return timing as MotionTransition;\n};\n\n/** Literal transforms take over aliases while unrelated properties retain their renderer. */\nconst releaseTransformEffect = (target: Element): void => {\n releaseMotionEffect(target, new Set(['transform', ...transformProps]));\n};\n\nconst animateProperties = (\n subject: MotionSubject,\n keyframesInput: Readonly<DOMKeyframesDefinition>,\n options: PropertyAnimationOptions = {},\n): MotionHandle => {\n const target = resolveMotionTarget(subject, options.target);\n const signal = options.signal ?? motionSignal(subject);\n if (signal?.aborted) return noopHandle();\n\n if ('transform' in keyframesInput && Object.keys(keyframesInput).length > 1) {\n const {transform, ...rest} = keyframesInput;\n return parallel(animateProperties(subject, {transform}, options), animateProperties(subject, rest, options));\n }\n // Literal CSS transforms use Motion's WAAPI executor. Retire only its old\n // transform driver; Motion values own replacement for all other properties.\n const literalPresentation = 'transform' in keyframesInput\n ? stopOwnedMotion(target, new Set(['transform'])) : undefined;\n const reduced = shouldReduceMotion();\n const snap = (destinations: DOMKeyframesDefinition): void => {\n if (!(target instanceof HTMLElement || target instanceof SVGElement)) return;\n // A literal transform replaces the whole transform; aliases compose in\n // Motion's persistent effect state across partial animation calls.\n const visualElement = visualElementStore.get(target);\n const stateBefore = target instanceof SVGElement ? svgEffect.state(target) : styleEffect.state(target);\n if ('transform' in destinations) releaseTransformEffect(target);\n const values = Object.fromEntries(Object.entries(destinations)\n .filter(([, value]) => value != null)\n .map(([property, value]) => {\n const existing = visualElement?.getValue(property) ?? stateBefore?.get(property);\n // Native stop commits its sample; retire it before jumping to the endpoint.\n existing?.stop();\n existing?.jump(value as string | number);\n return [property, existing ?? motionValue(value as string | number)];\n }));\n if (Object.keys(values).length === 0) return;\n // Keep a layout-enrolled element on its existing renderer. Creating a\n // second effect would let the next layout render restore the old endpoint.\n if (visualElement) {\n for (const [property, value] of Object.entries(values)) visualElement.addValue(property, value);\n visualElement.render();\n } else {\n if (target instanceof SVGElement) svgEffect(target, values);\n else styleEffect(target, values);\n const state = target instanceof SVGElement ? svgEffect.state(target) : styleEffect.state(target);\n state?.flush();\n }\n if ('transform' in destinations) releaseTransformEffect(target);\n };\n if (options.transition?.duration === 0\n && Object.keys(options.transition).every((key) => key === 'duration' || key === 'type')) {\n return ownMotion(target, () => {\n snap(Object.fromEntries(Object.entries(keyframesInput).map(([property, value]) => [property, finalKeyframe(value)])) as DOMKeyframesDefinition);\n return noopHandle();\n }, new Set(Object.keys(keyframesInput)), signal);\n }\n const snapSpatial = (): void => snap(reduced ? reducedDestinations(keyframesInput) : {});\n const keyframes = reduced ? reducedKeyframes(keyframesInput) : keyframesInput;\n if (Object.keys(keyframes).length === 0) {\n return ownMotion(target, () => {\n snapSpatial();\n return noopHandle();\n }, new Set(Object.keys(keyframesInput)), signal);\n }\n\n return ownMotion(target, (previousProperties) => {\n if ('transform' in keyframes) {\n releaseTransformEffect(target);\n }\n const frames = retargetKeyframes(keyframes, literalPresentation ?? previousProperties);\n snapSpatial();\n const role = options.role;\n const transition: MotionTransition = options.transition ?? {};\n const effectiveRole = reduced ? reducedMotionRole(role ?? 'presence') : role ?? 'presence';\n const speed = reduced ? undefined : options.speed;\n const timing = withMotionDefaults(resolveMotionRole(effectiveRole, reduced ? 'opacity' : 'spatial', speed), transition);\n const spatial = Object.fromEntries(Object.entries(frames).filter(([property]) => spatialProperties.has(property))) as DOMKeyframesDefinition;\n const feedback = Object.fromEntries(Object.entries(frames).filter(([property]) => !spatialProperties.has(property))) as DOMKeyframesDefinition;\n if (timing.type !== 'tween' && Object.keys(feedback).length > 0 && transition.type === undefined) {\n const fade = animate(target, feedback, withMotionDefaults(resolveMotionRole(effectiveRole, 'opacity', speed), transition));\n if (Object.keys(spatial).length === 0) return fade;\n return parallel(toMotionHandle(animateKeyframes(target, spatial, timing)), toMotionHandle(fade));\n }\n return animateKeyframes(target, frames, timing);\n }, new Set(Object.keys(keyframesInput)), signal, (settlement) => {\n if (settlement !== 'finished' || !(target instanceof HTMLElement || target instanceof SVGElement)) return;\n const aliases = Object.entries(keyframes).filter(([property]) => transformProps.has(property));\n const identity = aliases.length > 0 && aliases.every(([property, value]) =>\n finalKeyframe(value) === (property.startsWith('scale') ? 1 : 0));\n // Resolved calc(0px) still creates a containing block. Release it when\n // the authored endpoints and painted transform both finish at identity.\n if (identity && new DOMMatrixReadOnly(getComputedStyle(target).transform).isIdentity) {\n target.style.transform = 'none';\n }\n });\n};\n\nexport {animateProperties, releaseTransformEffect};\nexport type {PropertyAnimationOptions};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155],"mappings":"kHAAA,SAAS,EAAc,EAAK,EAAM,CAC1B,EAAI,QAAQ,CAAI,IAAM,IACtB,EAAI,KAAK,CAAI,CACrB,CACA,SAAS,EAAW,EAAK,EAAM,CAC3B,IAAM,EAAQ,EAAI,QAAQ,CAAI,EAC1B,EAAQ,IACR,EAAI,OAAO,EAAO,CAAC,CAC3B,CCRA,IAAM,GAAS,EAAK,EAAK,IACjB,EAAI,EACG,EACP,EAAI,EACG,EACJ,ECFP,MAAkB,CAAE,ECAlB,EAAqB,GAAM,+BAA+B,KAAK,CAAC,ECHhE,EAAY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