@applemusic-like-lyrics/react-full 0.2.0-alpha.1 → 0.2.1

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.
Files changed (63) hide show
  1. package/README.md +4 -2
  2. package/dist/amll-react-framework.css +1023 -0
  3. package/dist/amll-react-framework.js +13730 -6817
  4. package/dist/amll-react-framework.js.map +1 -1
  5. package/dist/components/AudioFFTVisualizer/index.d.ts +1 -0
  6. package/dist/components/AudioFFTVisualizer/index.d.ts.map +1 -0
  7. package/dist/components/AudioQualityTag/index.d.ts +7 -5
  8. package/dist/components/AudioQualityTag/index.d.ts.map +1 -0
  9. package/dist/components/BouncingSlider/index.d.ts +13 -8
  10. package/dist/components/BouncingSlider/index.d.ts.map +1 -0
  11. package/dist/components/ControlThumb/index.d.ts +2 -1
  12. package/dist/components/ControlThumb/index.d.ts.map +1 -0
  13. package/dist/components/Cover/index.d.ts +2 -1
  14. package/dist/components/Cover/index.d.ts.map +1 -0
  15. package/dist/components/MediaButton/index.d.ts +3 -2
  16. package/dist/components/MediaButton/index.d.ts.map +1 -0
  17. package/dist/components/MenuButton/index.d.ts +1 -0
  18. package/dist/components/MenuButton/index.d.ts.map +1 -0
  19. package/dist/components/MusicInfo/index.d.ts +1 -0
  20. package/dist/components/MusicInfo/index.d.ts.map +1 -0
  21. package/dist/components/PrebuiltLyricPlayer/index.d.ts +5 -2
  22. package/dist/components/PrebuiltLyricPlayer/index.d.ts.map +1 -0
  23. package/dist/components/TextMarquee/index.d.ts +1 -0
  24. package/dist/components/TextMarquee/index.d.ts.map +1 -0
  25. package/dist/components/ToggleIconButton/index.d.ts +1 -0
  26. package/dist/components/ToggleIconButton/index.d.ts.map +1 -0
  27. package/dist/components/ToggleIconButton/prebuilt-enum.d.ts +1 -0
  28. package/dist/components/ToggleIconButton/prebuilt-enum.d.ts.map +1 -0
  29. package/dist/components/VolumeControlSlider/index.d.ts +4 -2
  30. package/dist/components/VolumeControlSlider/index.d.ts.map +1 -0
  31. package/dist/components/index.d.ts +1 -0
  32. package/dist/components/index.d.ts.map +1 -0
  33. package/dist/hook/useThrottle.d.ts +11 -0
  34. package/dist/hook/useThrottle.d.ts.map +1 -0
  35. package/dist/index.d.ts +5 -1
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/layout/auto.d.ts +4 -1
  38. package/dist/layout/auto.d.ts.map +1 -0
  39. package/dist/layout/horizontal.d.ts +2 -1
  40. package/dist/layout/horizontal.d.ts.map +1 -0
  41. package/dist/layout/index.d.ts +1 -0
  42. package/dist/layout/index.d.ts.map +1 -0
  43. package/dist/layout/vertical.d.ts +3 -1
  44. package/dist/layout/vertical.d.ts.map +1 -0
  45. package/dist/states/callbacks.d.ts +93 -0
  46. package/dist/states/callbacks.d.ts.map +1 -0
  47. package/dist/states/configAtoms.d.ts +174 -0
  48. package/dist/states/configAtoms.d.ts.map +1 -0
  49. package/dist/states/controlsAtoms.d.ts +24 -0
  50. package/dist/states/controlsAtoms.d.ts.map +1 -0
  51. package/dist/states/{music.d.ts → dataAtoms.d.ts} +71 -32
  52. package/dist/states/dataAtoms.d.ts.map +1 -0
  53. package/dist/utils/duration.d.ts +1 -0
  54. package/dist/utils/duration.d.ts.map +1 -0
  55. package/dist/utils/index.d.ts +1 -1
  56. package/dist/utils/index.d.ts.map +1 -0
  57. package/package.json +49 -37
  58. package/dist/amll-react-framework.cjs +0 -64
  59. package/dist/amll-react-framework.cjs.map +0 -1
  60. package/dist/states/callback.d.ts +0 -80
  61. package/dist/states/config.d.ts +0 -130
  62. package/dist/states/index.d.ts +0 -3
  63. package/dist/utils/spring.d.ts +0 -25
@@ -1 +0,0 @@
1
- {"version":3,"file":"amll-react-framework.cjs","sources":["../src/components/AudioFFTVisualizer/index.tsx","../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/warn-once.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/time-conversion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/noop.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/frameloop/render-step.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/frameloop/batcher.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/frameloop/frame.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/errors.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/clamp.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/utils.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/color/utils.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/color/hex.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/color/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/complex/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/memo.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/utils/is-generator.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/ease.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/circ.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/back.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/anticipate.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/utils/map.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/pipe.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/progress.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/number.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/color.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/visibility.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/complex.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/mix/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/interpolate.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/offsets/default.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/offsets/time.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/resolve-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/array.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/setters.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/use-will-change/get-will-change-name.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/Feature.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/animations.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/event-info.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/add-dom-event.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/distance.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/models.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/utils/measure.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/get-context-window.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/drag/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/pan/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/PresenceContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/frameloop/microtask.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/shared/stack.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/styles/transform.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/delay.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/drag.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/hover.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/focus.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/gestures/press.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/gestures.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/layout.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/is-browser.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/LazyContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/definitions.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/features/load-features.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-constant.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/config-motion.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/use-props.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/use-props.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/use-render.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/create-factory.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/store.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/VisualElement.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/create.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/utils/use-force-update.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/projection/node/group.mjs","../../../node_modules/.pnpm/framer-motion@11.7.0_@emotion+is-prop-valid@1.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs","../../../node_modules/.pnpm/jotai@2.10.0_@types+react@18.3.9_react@18.3.1/node_modules/jotai/esm/vanilla.mjs","../../../node_modules/.pnpm/jotai@2.10.0_@types+react@18.3.9_react@18.3.1/node_modules/jotai/esm/vanilla/utils.mjs","../src/states/music.ts","../src/components/AudioQualityTag/icon_dolby_atmos.svg?react","../src/components/AudioQualityTag/tag_hires_lossless.svg?react","../src/components/AudioQualityTag/tag_lossless.svg?react","../src/components/AudioQualityTag/index.tsx","../src/utils/spring.ts","../src/components/BouncingSlider/index.tsx","../src/components/ControlThumb/index.tsx","../../../node_modules/.pnpm/figma-squircle@0.3.1/node_modules/figma-squircle/dist/module.js","../../../node_modules/.pnpm/corner-smoothing@0.1.5_react@18.3.1/node_modules/corner-smoothing/dist/esm/corner-smoothing-vanilla.js","../../../node_modules/.pnpm/corner-smoothing@0.1.5_react@18.3.1/node_modules/corner-smoothing/dist/esm/corner-smoothing-react.js","../src/components/Cover/index.tsx","../src/components/MediaButton/index.tsx","../src/components/MenuButton/icon_more.svg?react","../src/components/MenuButton/index.tsx","../src/components/TextMarquee/index.tsx","../src/components/MusicInfo/index.tsx","../../react/dist/amll-react.js","../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/types.js","../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/deserialize.js","../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/serialize.js","../../../node_modules/.pnpm/@ungap+structured-clone@1.2.0/node_modules/@ungap/structured-clone/esm/index.js","../src/layout/horizontal.tsx","../src/layout/vertical.tsx","../src/layout/auto.tsx","../src/states/callback.ts","../src/components/VolumeControlSlider/icon_speaker.svg?react","../src/components/VolumeControlSlider/icon_speaker_3.svg?react","../src/components/VolumeControlSlider/index.tsx","../src/states/config.ts","../src/utils/duration.ts","../src/components/IconButton/airplay.svg?react","../src/components/ToggleIconButton/lyrics_off.svg?react","../src/components/ToggleIconButton/lyrics_on.svg?react","../src/components/ToggleIconButton/playlist_off.svg?react","../src/components/ToggleIconButton/playlist_on.svg?react","../src/components/ToggleIconButton/prebuilt-enum.ts","../src/components/ToggleIconButton/repeat_off.svg?react","../src/components/ToggleIconButton/repeat_on_normal.svg?react","../src/components/ToggleIconButton/shuffle_off.svg?react","../src/components/ToggleIconButton/shuffle_on.svg?react","../src/components/ToggleIconButton/star.svg?react","../src/components/ToggleIconButton/star_filled.svg?react","../src/components/ToggleIconButton/index.tsx","../src/components/PrebuiltLyricPlayer/icon_forward.svg?react","../src/components/PrebuiltLyricPlayer/icon_pause.svg?react","../src/components/PrebuiltLyricPlayer/icon_play.svg?react","../src/components/PrebuiltLyricPlayer/icon_rewind.svg?react","../src/components/PrebuiltLyricPlayer/index.tsx"],"sourcesContent":["import {\n\ttype FC,\n\ttype HTMLProps,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n} from \"react\";\n\nexport const AudioFFTVisualizer: FC<\n\t{\n\t\tfftData: number[];\n\t} & HTMLProps<HTMLCanvasElement>\n> = ({ fftData, ...props }) => {\n\tconst canvasRef = useRef<HTMLCanvasElement>(null);\n\tconst fftDataRef = useRef<number[]>();\n\tif (fftDataRef.current === undefined) {\n\t\tfftDataRef.current = fftData;\n\t}\n\n\tuseEffect(() => {\n\t\tfftDataRef.current = fftData;\n\t}, [fftData]);\n\n\tuseLayoutEffect(() => {\n\t\tconst canvas = canvasRef.current;\n\n\t\tif (canvas) {\n\t\t\tconst ctx = canvas.getContext(\"2d\");\n\t\t\tif (ctx) {\n\t\t\t\tlet targetSize = { width: 0, height: 0 };\n\t\t\t\tconst obs = new ResizeObserver((sizes) => {\n\t\t\t\t\tfor (const size of sizes) {\n\t\t\t\t\t\ttargetSize = {\n\t\t\t\t\t\t\twidth: size.contentRect.width * window.devicePixelRatio,\n\t\t\t\t\t\t\theight: size.contentRect.height * window.devicePixelRatio,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tobs.observe(canvas);\n\n\t\t\t\tlet maxValue = 100;\n\t\t\t\tlet stopped = false;\n\n\t\t\t\tlet buf: number[] = [];\n\n\t\t\t\tfunction onFrame() {\n\t\t\t\t\tif (!(canvas && ctx) || stopped) return;\n\t\t\t\t\tconst width = canvas.width;\n\t\t\t\t\tconst height = canvas.height;\n\t\t\t\t\tif (targetSize.width !== width || targetSize.height !== height) {\n\t\t\t\t\t\tcanvas.width = targetSize.width;\n\t\t\t\t\t\tcanvas.height = targetSize.height;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst processed = fftDataRef.current ?? [];\n\t\t\t\t\tif (buf.length !== processed.length) {\n\t\t\t\t\t\tbuf = [...processed];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let i = 0; i < buf.length; i++) {\n\t\t\t\t\t\t\tlet t = processed[i];\n\t\t\t\t\t\t\tt = t * Math.min(((i + 5) / buf.length) * 4, 1);\n\t\t\t\t\t\t\tbuf[i] += t * 2;\n\t\t\t\t\t\t\tbuf[i] /= 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tctx.clearRect(0, 0, width, height);\n\t\t\t\t\t{\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tconst targetMaxValue = Math.max.apply(Math, buf);\n\t\t\t\t\t\tmaxValue = Math.max(targetMaxValue * 0.1 + maxValue * 0.9, 100);\n\n\t\t\t\t\t\tconst len = buf.length;\n\n\t\t\t\t\t\tconst barWidth = width / len;\n\n\t\t\t\t\t\tctx.strokeStyle = \"white\";\n\t\t\t\t\t\tctx.lineWidth = 4 * window.devicePixelRatio;\n\t\t\t\t\t\tctx.lineCap = \"round\";\n\t\t\t\t\t\tctx.lineJoin = \"round\";\n\n\t\t\t\t\t\tconst barBeginY = height - barWidth;\n\n\t\t\t\t\t\tfor (let i = 0; i < buf.length; i++) {\n\t\t\t\t\t\t\tconst x = barWidth * (i + 0.5);\n\t\t\t\t\t\t\tctx.moveTo(x, barBeginY);\n\t\t\t\t\t\t\tctx.lineTo(\n\t\t\t\t\t\t\t\tx,\n\t\t\t\t\t\t\t\tbarBeginY -\n\t\t\t\t\t\t\t\t\tMath.min(1, Math.max(0, buf[i] / maxValue)) ** 2 *\n\t\t\t\t\t\t\t\t\t\t(height - barWidth * 2),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\n\t\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\t}\n\n\t\t\t\tonFrame();\n\n\t\t\t\treturn () => {\n\t\t\t\t\tobs.disconnect();\n\t\t\t\t\tstopped = true;\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}, []);\n\n\treturn <canvas ref={canvasRef} {...props} />;\n};\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","const warned = new Set();\nfunction warnOnce(condition, message, element) {\n if (condition || warned.has(message))\n return;\n console.warn(message);\n if (element)\n console.warn(element);\n warned.add(message);\n}\n\nexport { warnOnce };\n","import { warnOnce } from '../../utils/warn-once.mjs';\n\nfunction createDOMMotionComponentProxy(componentFactory) {\n if (typeof Proxy === \"undefined\") {\n return componentFactory;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n const componentCache = new Map();\n const deprecatedFactoryFunction = (...args) => {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(false, \"motion() is deprecated. Use motion.create() instead.\");\n }\n return componentFactory(...args);\n };\n return new Proxy(deprecatedFactoryFunction, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: (_target, key) => {\n if (key === \"create\")\n return componentFactory;\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, componentFactory(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createDOMMotionComponentProxy };\n","function isAnimationControls(v) {\n return (v !== null &&\n typeof v === \"object\" &&\n typeof v.start === \"function\");\n}\n\nexport { isAnimationControls };\n","const isKeyframesTarget = (v) => {\n return Array.isArray(v);\n};\n\nexport { isKeyframesTarget };\n","function shallowCompare(next, prev) {\n if (!Array.isArray(prev))\n return false;\n const prevLength = prev.length;\n if (prevLength !== next.length)\n return false;\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i])\n return false;\n }\n return true;\n}\n\nexport { shallowCompare };\n","/**\n * Decides if the supplied variable is variant label\n */\nfunction isVariantLabel(v) {\n return typeof v === \"string\" || Array.isArray(v);\n}\n\nexport { isVariantLabel };\n","function getValueState(visualElement) {\n const state = [{}, {}];\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.values.forEach((value, key) => {\n state[0][key] = value.get();\n state[1][key] = value.getVelocity();\n });\n return state;\n}\nfunction resolveVariantFromProps(props, definition, custom, visualElement) {\n /**\n * If the variant definition is a function, resolve.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n /**\n * If the variant definition is a variant label, or\n * the function returned a variant label, resolve.\n */\n if (typeof definition === \"string\") {\n definition = props.variants && props.variants[definition];\n }\n /**\n * At this point we've resolved both functions and variant labels,\n * but the resolved variant label might itself have been a function.\n * If so, resolve. This can only have returned a valid target object.\n */\n if (typeof definition === \"function\") {\n const [current, velocity] = getValueState(visualElement);\n definition = definition(custom !== undefined ? custom : props.custom, current, velocity);\n }\n return definition;\n}\n\nexport { resolveVariantFromProps };\n","import { resolveVariantFromProps } from './resolve-variants.mjs';\n\nfunction resolveVariant(visualElement, definition, custom) {\n const props = visualElement.getProps();\n return resolveVariantFromProps(props, definition, custom !== undefined ? custom : props.custom, visualElement);\n}\n\nexport { resolveVariant };\n","const variantPriorityOrder = [\n \"animate\",\n \"whileInView\",\n \"whileFocus\",\n \"whileHover\",\n \"whileTap\",\n \"whileDrag\",\n \"exit\",\n];\nconst variantProps = [\"initial\", ...variantPriorityOrder];\n\nexport { variantPriorityOrder, variantProps };\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 \"rotate\",\n \"rotateX\",\n \"rotateY\",\n \"rotateZ\",\n \"skew\",\n \"skewX\",\n \"skewY\",\n];\n/**\n * A quick lookup for transform props.\n */\nconst transformProps = new Set(transformPropOrder);\n\nexport { transformPropOrder, transformProps };\n","/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n","import { transformProps } from '../../render/html/utils/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","/**\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({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return (transition[key] ||\n transition[\"default\"] ||\n transition);\n}\n\nexport { getValueTransition, isTransitionDefined };\n","const MotionGlobalConfig = {\n skipAnimations: false,\n useManualTiming: false,\n};\n\nexport { MotionGlobalConfig };\n","const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n","const noop = (any) => any;\n\nexport { noop };\n","function createRenderStep(runNextFrame) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Clear the next frame queue\n nextFrame.clear();\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n","import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame);\n return acc;\n }, {});\n const { read, resolveKeyframes, update, preRender, render, postRender } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n read.process(state);\n resolveKeyframes.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher, stepsOrder };\n","import { noop } from '../utils/noop.mjs';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\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","import { isZeroValueString } from '../../utils/is-zero-value-string.mjs';\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","import { noop } from './noop.mjs';\n\nlet warning = noop;\nlet invariant = noop;\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\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","const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = checkStringStartsWith(\"--\");\nconst startsAsVariableToken = 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\nexport { isCSSVariableName, isCSSVariableToken };\n","import { invariant } from '../../../utils/errors.mjs';\nimport { isNumericalString } from '../../../utils/is-numerical-string.mjs';\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 !== null && token1 !== void 0 ? 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.`);\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","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","import { clamp } from '../../../utils/clamp.mjs';\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","/**\n * TODO: When we move from string as a source of truth to data models\n * everything in this folder should probably be referred to as models vs types\n */\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;\nconst floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\nconst colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\nconst singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\nfunction isString(v) {\n return typeof v === \"string\";\n}\nfunction isNullish(v) {\n return v == null;\n}\n\nexport { colorRegex, floatRegex, isNullish, isString, sanitize, singleColorRegex };\n","import { isString } from '../utils.mjs';\n\nconst createUnitType = (unit) => ({\n test: (v) => isString(v) && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = {\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","import { transformPropOrder } from '../../html/utils/transform.mjs';\nimport { number } from '../../../value/types/numbers/index.mjs';\nimport { px } from '../../../value/types/numbers/units.mjs';\n\nconst positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n \"translateX\",\n \"translateY\",\n]);\nconst isNumOrPxType = (v) => v === number || v === px;\nconst getPosFromMatrix = (matrix, pos) => parseFloat(matrix.split(\", \")[pos]);\nconst getTranslateFromMatrix = (pos2, pos3) => (_bbox, { transform }) => {\n if (transform === \"none\" || !transform)\n return 0;\n const matrix3d = transform.match(/^matrix3d\\((.+)\\)$/u);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n const matrix = transform.match(/^matrix\\((.+)\\)$/u);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n};\nconst transformKeys = new Set([\"x\", \"y\", \"z\"]);\nconst nonTranslationalTransformKeys = transformPropOrder.filter((key) => !transformKeys.has(key));\nfunction removeNonTranslationalTransform(visualElement) {\n const removedTransforms = [];\n nonTranslationalTransformKeys.forEach((key) => {\n const value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n return removedTransforms;\n}\nconst positionalValues = {\n // Dimensions\n width: ({ x }, { paddingLeft = \"0\", paddingRight = \"0\" }) => x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight),\n height: ({ y }, { paddingTop = \"0\", paddingBottom = \"0\" }) => y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom),\n top: (_bbox, { top }) => parseFloat(top),\n left: (_bbox, { left }) => parseFloat(left),\n bottom: ({ y }, { top }) => parseFloat(top) + (y.max - y.min),\n right: ({ x }, { left }) => parseFloat(left) + (x.max - x.min),\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\n// Alias translate longform names\npositionalValues.translateX = positionalValues.x;\npositionalValues.translateY = positionalValues.y;\n\nexport { isNumOrPxType, positionalKeys, positionalValues, removeNonTranslationalTransform };\n","/**\n * Tests a provided value against a ValueType\n */\nconst testValueType = (v) => (type) => type.test(v);\n\nexport { testValueType };\n","/**\n * ValueType for \"auto\"\n */\nconst auto = {\n test: (v) => v === \"auto\",\n parse: (v) => v,\n};\n\nexport { auto };\n","import { number } from '../../../value/types/numbers/index.mjs';\nimport { px, percent, degrees, vw, vh } from '../../../value/types/numbers/units.mjs';\nimport { testValueType } from './test.mjs';\nimport { auto } from './type-auto.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","import { removeNonTranslationalTransform } from '../dom/utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.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 var _a;\n (_a = element.getValue(key)) === null || _a === void 0 ? void 0 : _a.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());\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 readAllKeyframes();\n measureAllKeyframes();\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n /**\n * Track whether this resolver has completed. Once complete, it never\n * needs to attempt keyframe resolution again.\n */\n this.isComplete = false;\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 /**\n * Track whether this resolver is currently scheduled to resolve\n * to allow it to be cancelled and resumed externally.\n */\n this.isScheduled = 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.isScheduled = true;\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 /**\n * If a keyframe is null, we hydrate it either by reading it from\n * the instance, or propagating from previous keyframes.\n */\n for (let i = 0; i < unresolvedKeyframes.length; i++) {\n if (unresolvedKeyframes[i] === null) {\n /**\n * If the first keyframe is null, we need to find its value by sampling the element\n */\n if (i === 0) {\n const currentValue = motionValue === null || motionValue === void 0 ? void 0 : motionValue.get();\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\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 else {\n unresolvedKeyframes[i] = unresolvedKeyframes[i - 1];\n }\n }\n }\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete() {\n this.isComplete = true;\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe);\n toResolve.delete(this);\n }\n cancel() {\n if (!this.isComplete) {\n this.isScheduled = false;\n toResolve.delete(this);\n }\n }\n resume() {\n if (!this.isComplete)\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n","import { isString, singleColorRegex, isNullish, floatRegex } from '../utils.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((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (!isString(v))\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n","import { clamp } from '../../../utils/clamp.mjs';\nimport { alpha, number } from '../numbers/index.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } 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","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","import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: /*@__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","import { isString } from '../utils.mjs';\nimport { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return isString(v)\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n","import { color } from '../color/index.mjs';\nimport { isString, floatRegex, colorRegex, sanitize } from '../utils.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n isString(v) &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\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`\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+)/giu;\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 createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\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}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n","import { complex } from './index.mjs';\nimport { floatRegex } from '../utils.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","import { number } from '../../../value/types/numbers/index.mjs';\n\nconst int = {\n ...number,\n transform: Math.round,\n};\n\nexport { int };\n","import { scale, alpha } from '../../../value/types/numbers/index.mjs';\nimport { px, degrees, progressPercentage } from '../../../value/types/numbers/units.mjs';\nimport { int } from './type-int.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 radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n backgroundPositionX: px,\n backgroundPositionY: px,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int,\n};\n\nexport { numberValueTypes };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.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};\n/**\n * Gets the default ValueType for the provided value key\n */\nconst getDefaultValueType = (key) => defaultValueTypes[key];\n\nexport { defaultValueTypes, getDefaultValueType };\n","import { complex } from '../../../value/types/complex/index.mjs';\nimport { filter } from '../../../value/types/complex/filter.mjs';\nimport { getDefaultValueType } from './defaults.mjs';\n\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getDefaultValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n // If value is not recognised as animatable, ie \"none\", create an animatable version origin based on the target\n return defaultValueType.getAnimatableNone\n ? defaultValueType.getAnimatableNone(value)\n : undefined;\n}\n\nexport { getAnimatableNone };\n","import { analyseComplexValue } from '../../../value/types/complex/index.mjs';\nimport { getAnimatableNone } from '../../dom/value-types/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 analyseComplexValue(keyframe).values.length) {\n animatableTemplate = unresolvedKeyframes[i];\n }\n i++;\n }\n if (animatableTemplate && name) {\n for (const noneIndex of noneKeyframeIndexes) {\n unresolvedKeyframes[noneIndex] = getAnimatableNone(name, animatableTemplate);\n }\n }\n}\n\nexport { makeNoneKeyframesAnimatable };\n","import { isNone } from '../../animation/utils/is-none.mjs';\nimport { getVariableValue } from './utils/css-variables-conversion.mjs';\nimport { isCSSVariableToken } from './utils/is-css-variable.mjs';\nimport { positionalKeys, isNumOrPxType, positionalValues } from './utils/unit-conversion.mjs';\nimport { findDimensionValueType } from './value-types/dimensions.mjs';\nimport { KeyframeResolver } from '../utils/KeyframesResolver.mjs';\nimport { makeNoneKeyframesAnimatable } from '../html/utils/make-none-animatable.mjs';\n\nclass DOMKeyframesResolver extends KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n super(unresolvedKeyframes, onComplete, name, motionValue, element, 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 const originType = findDimensionValueType(origin);\n const targetType = findDimensionValueType(target);\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 {\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 (isNone(unresolvedKeyframes[i])) {\n noneKeyframeIndexes.push(i);\n }\n }\n if (noneKeyframeIndexes.length) {\n makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, name);\n }\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 = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\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 element.getValue(name, measureKeyframe).jump(measureKeyframe, false);\n }\n }\n measureEndState() {\n var _a;\n const { element, name, unresolvedKeyframes } = this;\n if (!element || !element.current)\n return;\n const value = element.getValue(name);\n value && value.jump(this.measuredOrigin, false);\n const finalKeyframeIndex = unresolvedKeyframes.length - 1;\n const finalKeyframe = unresolvedKeyframes[finalKeyframeIndex];\n unresolvedKeyframes[finalKeyframeIndex] = positionalValues[name](element.measureViewportBox(), window.getComputedStyle(element.current));\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 ((_a = this.removedTransforms) === null || _a === void 0 ? void 0 : _a.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","function memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n","function isGenerator(type) {\n return typeof type === \"function\";\n}\n\nexport { isGenerator };\n","import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { frameData } from './frame.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","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 tat 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","import { warning } from '../../../utils/errors.mjs';\nimport { isGenerator } from '../../generators/utils/is-generator.mjs';\nimport { isAnimatable } from '../../utils/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 * 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 warning(isOriginAnimatable === isTargetAnimatable, `You are trying to animate ${name} from \"${originKeyframe}\" to \"${targetKeyframe}\". ${originKeyframe} is not an animatable value - to enable this animation set ${originKeyframe} to a value animatable to ${targetKeyframe} via the \\`style\\` property.`);\n // Always skip if any of these are true\n if (!isOriginAnimatable || !isTargetAnimatable) {\n return false;\n }\n return (hasKeyframesChanged(keyframes) ||\n ((type === \"spring\" || isGenerator(type)) && velocity));\n}\n\nexport { canAnimate };\n","import { time } from '../../frameloop/sync-time.mjs';\nimport { flushKeyframeResolvers } from '../../render/utils/KeyframesResolver.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { canAnimate } from './utils/can-animate.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\n\n/**\n * Maximum time allowed between an animation being created and it being\n * resolved for us to use the latter as the start time.\n *\n * This is to ensure that while we prefer to \"start\" an animation as soon\n * as it's triggered, we also want to avoid a visual jump if there's a big delay\n * between these two moments.\n */\nconst MAX_RESOLVE_DELAY = 40;\nclass BaseAnimation {\n constructor({ autoplay = true, delay = 0, type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType = \"loop\", ...options }) {\n // Track whether the animation has been stopped. Stopped animations won't restart.\n this.isStopped = false;\n this.hasAttemptedResolve = false;\n this.createdAt = time.now();\n this.options = {\n autoplay,\n delay,\n type,\n repeat,\n repeatDelay,\n repeatType,\n ...options,\n };\n this.updateFinishedPromise();\n }\n /**\n * This method uses the createdAt and resolvedAt to calculate the\n * animation startTime. *Ideally*, we would use the createdAt time as t=0\n * as the following frame would then be the first frame of the animation in\n * progress, which would feel snappier.\n *\n * However, if there's a delay (main thread work) between the creation of\n * the animation and the first commited frame, we prefer to use resolvedAt\n * to avoid a sudden jump into the animation.\n */\n calcStartTime() {\n if (!this.resolvedAt)\n return this.createdAt;\n return this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY\n ? this.resolvedAt\n : this.createdAt;\n }\n /**\n * A getter for resolved data. If keyframes are not yet resolved, accessing\n * this.resolved will synchronously flush all pending keyframe resolvers.\n * This is a deoptimisation, but at its worst still batches read/writes.\n */\n get resolved() {\n if (!this._resolved && !this.hasAttemptedResolve) {\n flushKeyframeResolvers();\n }\n return this._resolved;\n }\n /**\n * A method to be called when the keyframes resolver completes. This method\n * will check if its possible to run the animation and, if not, skip it.\n * Otherwise, it will call initPlayback on the implementing class.\n */\n onKeyframesResolved(keyframes, finalKeyframe) {\n this.resolvedAt = time.now();\n this.hasAttemptedResolve = true;\n const { name, type, velocity, delay, onComplete, onUpdate, isGenerator, } = this.options;\n /**\n * If we can't animate this value with the resolved keyframes\n * then we should complete it immediately.\n */\n if (!isGenerator && !canAnimate(keyframes, name, type, velocity)) {\n // Finish immediately\n if (instantAnimationState.current || !delay) {\n onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes, this.options, finalKeyframe));\n onComplete === null || onComplete === void 0 ? void 0 : onComplete();\n this.resolveFinishedPromise();\n return;\n }\n // Finish after a delay\n else {\n this.options.duration = 0;\n }\n }\n const resolvedAnimation = this.initPlayback(keyframes, finalKeyframe);\n if (resolvedAnimation === false)\n return;\n this._resolved = {\n keyframes,\n finalKeyframe,\n ...resolvedAnimation,\n };\n this.onPostResolved();\n }\n onPostResolved() { }\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.currentFinishedPromise.then(resolve, reject);\n }\n updateFinishedPromise() {\n this.currentFinishedPromise = new Promise((resolve) => {\n this.resolveFinishedPromise = resolve;\n });\n }\n}\n\nexport { BaseAnimation };\n","/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n","import { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\nconst velocitySampleDuration = 5; // ms\nfunction calcGeneratorVelocity(resolveValue, t, current) {\n const prevT = Math.max(t - velocitySampleDuration, 0);\n return velocityPerSecond(current - resolveValue(prevT), t - prevT);\n}\n\nexport { calcGeneratorVelocity };\n","import { warning } from '../../../utils/errors.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../../utils/time-conversion.mjs';\n\nconst safeMin = 0.001;\nconst minDuration = 0.01;\nconst maxDuration = 10.0;\nconst minDamping = 0.05;\nconst maxDamping = 1;\nfunction findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(minDamping, maxDamping, dampingRatio);\n duration = clamp(minDuration, 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 a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: 100,\n damping: 10,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring, maxDamping, maxDuration, minDamping, minDuration };\n","import { millisecondsToSeconds, secondsToMilliseconds } from '../../../utils/time-conversion.mjs';\nimport { calcGeneratorVelocity } from '../utils/velocity.mjs';\nimport { findSpring, calcAngularFreq } from './find.mjs';\n\nconst durationKeys = [\"duration\", \"bounce\"];\nconst physicsKeys = [\"stiffness\", \"damping\", \"mass\"];\nfunction isSpringType(options, keys) {\n return keys.some((key) => options[key] !== undefined);\n}\nfunction getSpringOptions(options) {\n let springOptions = {\n velocity: 0.0,\n stiffness: 100,\n damping: 10,\n mass: 1.0,\n isResolvedFromDuration: false,\n ...options,\n };\n // stiffness/damping/mass overrides duration/bounce\n if (!isSpringType(options, physicsKeys) &&\n isSpringType(options, durationKeys)) {\n const derived = findSpring(options);\n springOptions = {\n ...springOptions,\n ...derived,\n mass: 1.0,\n };\n springOptions.isResolvedFromDuration = true;\n }\n return springOptions;\n}\nfunction spring({ keyframes, restDelta, restSpeed, ...options }) {\n const origin = keyframes[0];\n const target = keyframes[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, velocity, isResolvedFromDuration, } = getSpringOptions({\n ...options,\n velocity: -millisecondsToSeconds(options.velocity || 0),\n });\n const initialVelocity = velocity || 0.0;\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n const initialDelta = target - origin;\n const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));\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 emprically based on what strikes a good\n * ratio between feeling good and finishing as soon as changes are imperceptible.\n */\n const isGranularScale = Math.abs(initialDelta) < 5;\n restSpeed || (restSpeed = isGranularScale ? 0.01 : 2);\n restDelta || (restDelta = isGranularScale ? 0.005 : 0.5);\n let resolveSpring;\n if (dampingRatio < 1) {\n const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);\n // Underdamped spring\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n return (target -\n envelope *\n (((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) /\n angularFreq) *\n Math.sin(angularFreq * t) +\n initialDelta * Math.cos(angularFreq * t)));\n };\n }\n else if (dampingRatio === 1) {\n // Critically damped spring\n resolveSpring = (t) => target -\n Math.exp(-undampedAngularFreq * t) *\n (initialDelta +\n (initialVelocity + undampedAngularFreq * initialDelta) * t);\n }\n else {\n // Overdamped spring\n const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);\n resolveSpring = (t) => {\n const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);\n // When performing sinh or cosh values can hit Infinity so we cap them here\n const freqForT = Math.min(dampedAngularFreq * t, 300);\n return (target -\n (envelope *\n ((initialVelocity +\n dampingRatio * undampedAngularFreq * initialDelta) *\n Math.sinh(freqForT) +\n dampedAngularFreq *\n initialDelta *\n Math.cosh(freqForT))) /\n dampedAngularFreq);\n };\n }\n return {\n calculatedDuration: isResolvedFromDuration ? duration || null : null,\n next: (t) => {\n const current = resolveSpring(t);\n if (!isResolvedFromDuration) {\n let currentVelocity = 0.0;\n /**\n * We only need to calculate velocity for under-damped springs\n * as over- and critically-damped springs can't overshoot, so\n * checking only for displacement is enough.\n */\n if (dampingRatio < 1) {\n currentVelocity =\n t === 0\n ? secondsToMilliseconds(initialVelocity)\n : calcGeneratorVelocity(resolveSpring, t, current);\n }\n const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;\n const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;\n state.done =\n isBelowVelocityThreshold && isBelowDisplacementThreshold;\n }\n else {\n state.done = t >= duration;\n }\n state.value = state.done ? target : current;\n return state;\n },\n };\n}\n\nexport { spring };\n","import { spring } from './spring/index.mjs';\nimport { calcGeneratorVelocity } from './utils/velocity.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) => (min !== undefined && v < min) || (max !== undefined && 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 calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\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 velocity: calcGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 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","import { noop } from '../utils/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 I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\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.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\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 const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\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","const isEasingArray = (ease) => {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n};\n\nexport { isEasingArray };\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.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n","// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\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","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","import { backIn } from './back.mjs';\n\nconst anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n\nexport { anticipate };\n","import { invariant } from '../../utils/errors.mjs';\nimport { cubicBezier } from '../cubic-bezier.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { easeIn, easeInOut, easeOut } from '../ease.mjs';\nimport { circIn, circInOut, circOut } from '../circ.mjs';\nimport { backIn, backInOut, backOut } from '../back.mjs';\nimport { anticipate } from '../anticipate.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 easingDefinitionToFunction = (definition) => {\n if (Array.isArray(definition)) {\n // If cubic bezier definition, create bezier curve\n invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`);\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n }\n else if (typeof definition === \"string\") {\n // Else lookup from table\n invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`);\n return easingLookup[definition];\n }\n return definition;\n};\n\nexport { easingDefinitionToFunction };\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 combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\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 @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\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","// 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","function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n","import { mixNumber } from './number.mjs';\nimport { warning } from '../errors.mjs';\nimport { hslaToRgba } from '../hsla-to-rgba.mjs';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { mixImmediate } from './immediate.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 warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Framer 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","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","import { mixNumber as mixNumber$1 } from './number.mjs';\nimport { mixColor } from './color.mjs';\nimport { pipe } from '../pipe.mjs';\nimport { warning } from '../errors.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { isCSSVariableToken } from '../../render/dom/utils/is-css-variable.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\nimport { mixImmediate } from './immediate.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 var _a;\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 = (_a = origin.values[originIndex]) !== null && _a !== void 0 ? _a : 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.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n","import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\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 const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n","import { invariant } from './errors.mjs';\nimport { clamp } from './clamp.mjs';\nimport { pipe } from './pipe.mjs';\nimport { progress } from './progress.mjs';\nimport { noop } from './noop.mjs';\nimport { mix } from './mix/index.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || 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 Revist 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\");\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 && input[0] === input[1])\n return () => output[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 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","import { mixNumber } from '../mix/number.mjs';\nimport { progress } from '../progress.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","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","function convertOffsetToTimes(offset, duration) {\n return offset.map((o) => o * duration);\n}\n\nexport { convertOffsetToTimes };\n","import { easeInOut } from '../../easing/ease.mjs';\nimport { isEasingArray } from '../../easing/utils/is-easing-array.mjs';\nimport { easingDefinitionToFunction } from '../../easing/utils/map.mjs';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../utils/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../../utils/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);\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 * 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","/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n","import { time } from '../../../frameloop/sync-time.mjs';\nimport { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: () => frame.update(passTimestamp, true),\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","import { KeyframeResolver } from '../../render/utils/KeyframesResolver.mjs';\nimport { spring } from '../generators/spring/index.mjs';\nimport { inertia } from '../generators/inertia.mjs';\nimport { keyframes } from '../generators/keyframes.mjs';\nimport { BaseAnimation } from './BaseAnimation.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { mix } from '../../utils/mix/index.mjs';\nimport { calcGeneratorDuration } from '../generators/utils/calc-duration.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { invariant } from '../../utils/errors.mjs';\nimport { frameloopDriver } from './drivers/driver-frameloop.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\n\nconst generators = {\n decay: inertia,\n inertia,\n tween: keyframes,\n keyframes: keyframes,\n spring,\n};\nconst percentToProgress = (percent) => percent / 100;\n/**\n * Animation that runs on the main thread. Designed to be WAAPI-spec in the subset of\n * features we expose publically. Mostly the compatibility is to ensure visual identity\n * between both WAAPI and main thread animations.\n */\nclass MainThreadAnimation extends BaseAnimation {\n constructor(options) {\n super(options);\n /**\n * The time at which the animation was paused.\n */\n this.holdTime = null;\n /**\n * The time at which the animation was cancelled.\n */\n this.cancelTime = null;\n /**\n * The current time of the animation.\n */\n this.currentTime = 0;\n /**\n * Playback speed as a factor. 0 would be stopped, -1 reverse and 2 double speed.\n */\n this.playbackSpeed = 1;\n /**\n * The state of the animation to apply when the animation is resolved. This\n * allows calls to the public API to control the animation before it is resolved,\n * without us having to resolve it first.\n */\n this.pendingPlayState = \"running\";\n /**\n * The time at which the animation was started.\n */\n this.startTime = null;\n this.state = \"idle\";\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 this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.teardown();\n const { onStop } = this.options;\n onStop && onStop();\n };\n const { name, motionValue, element, keyframes } = this.options;\n const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;\n const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);\n this.resolver = new KeyframeResolver$1(keyframes, onResolved, name, motionValue, element);\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes$1) {\n const { type = \"keyframes\", repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = this.options;\n const generatorFactory = isGenerator(type)\n ? type\n : generators[type] || keyframes;\n /**\n * If our generator doesn't support mixing numbers, we need to replace keyframes with\n * [0, 100] and then make a function that maps that to the actual keyframes.\n *\n * 100 is chosen instead of 1 as it works nicer with spring animations.\n */\n let mapPercentToKeyframes;\n let mirroredGenerator;\n if (generatorFactory !== keyframes &&\n typeof keyframes$1[0] !== \"number\") {\n if (process.env.NODE_ENV !== \"production\") {\n invariant(keyframes$1.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);\n }\n mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));\n keyframes$1 = [0, 100];\n }\n const generator = generatorFactory({ ...this.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 mirroredGenerator = generatorFactory({\n ...this.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 const resolvedDuration = calculatedDuration + repeatDelay;\n const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;\n return {\n generator,\n mirroredGenerator,\n mapPercentToKeyframes,\n calculatedDuration,\n resolvedDuration,\n totalDuration,\n };\n }\n onPostResolved() {\n const { autoplay = true } = this.options;\n this.play();\n if (this.pendingPlayState === \"paused\" || !autoplay) {\n this.pause();\n }\n else {\n this.state = this.pendingPlayState;\n }\n }\n tick(timestamp, sample = false) {\n const { resolved } = this;\n // If the animations has failed to resolve, return the final keyframe.\n if (!resolved) {\n const { keyframes } = this.options;\n return { done: true, value: keyframes[keyframes.length - 1] };\n }\n const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes, calculatedDuration, totalDuration, resolvedDuration, } = resolved;\n if (this.startTime === null)\n return generator.next(0);\n const { delay, repeat, repeatType, repeatDelay, onUpdate } = this.options;\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 // Update currentTime\n if (sample) {\n this.currentTime = timestamp;\n }\n else 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 =\n Math.round(timestamp - this.startTime) * this.speed;\n }\n // Rebase on delay\n const timeWithoutDelay = this.currentTime - delay * (this.speed >= 0 ? 1 : -1);\n const isInDelayPhase = this.speed >= 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 let elapsed = this.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(this.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 const state = isInDelayPhase\n ? { done: false, value: keyframes[0] }\n : frameGenerator.next(elapsed);\n if (mapPercentToKeyframes) {\n state.value = mapPercentToKeyframes(state.value);\n }\n let { done } = state;\n if (!isInDelayPhase && calculatedDuration !== null) {\n done =\n this.speed >= 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 if (isAnimationFinished && finalKeyframe !== undefined) {\n state.value = getFinalKeyframe(keyframes, this.options, finalKeyframe);\n }\n if (onUpdate) {\n onUpdate(state.value);\n }\n if (isAnimationFinished) {\n this.finish();\n }\n return state;\n }\n get duration() {\n const { resolved } = this;\n return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;\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.holdTime !== null || this.speed === 0) {\n this.holdTime = newTime;\n }\n else if (this.driver) {\n this.startTime = this.driver.now() - newTime / this.speed;\n }\n }\n get speed() {\n return this.playbackSpeed;\n }\n set speed(newSpeed) {\n const hasChanged = this.playbackSpeed !== newSpeed;\n this.playbackSpeed = newSpeed;\n if (hasChanged) {\n this.time = millisecondsToSeconds(this.currentTime);\n }\n }\n play() {\n if (!this.resolver.isScheduled) {\n this.resolver.resume();\n }\n if (!this._resolved) {\n this.pendingPlayState = \"running\";\n return;\n }\n if (this.isStopped)\n return;\n const { driver = frameloopDriver, onPlay, startTime } = this.options;\n if (!this.driver) {\n this.driver = driver((timestamp) => this.tick(timestamp));\n }\n onPlay && onPlay();\n const now = this.driver.now();\n if (this.holdTime !== null) {\n this.startTime = now - this.holdTime;\n }\n else if (!this.startTime) {\n this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();\n }\n else if (this.state === \"finished\") {\n this.startTime = now;\n }\n if (this.state === \"finished\") {\n this.updateFinishedPromise();\n }\n this.cancelTime = this.startTime;\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 var _a;\n if (!this._resolved) {\n this.pendingPlayState = \"paused\";\n return;\n }\n this.state = \"paused\";\n this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;\n }\n complete() {\n if (this.state !== \"running\") {\n this.play();\n }\n this.pendingPlayState = this.state = \"finished\";\n this.holdTime = null;\n }\n finish() {\n this.teardown();\n this.state = \"finished\";\n const { onComplete } = this.options;\n onComplete && onComplete();\n }\n cancel() {\n if (this.cancelTime !== null) {\n this.tick(this.cancelTime);\n }\n this.teardown();\n this.updateFinishedPromise();\n }\n teardown() {\n this.state = \"idle\";\n this.stopDriver();\n this.resolveFinishedPromise();\n this.updateFinishedPromise();\n this.startTime = this.cancelTime = null;\n this.resolver.cancel();\n }\n stopDriver() {\n if (!this.driver)\n return;\n this.driver.stop();\n this.driver = undefined;\n }\n sample(time) {\n this.startTime = 0;\n return this.tick(time, true);\n }\n}\n// Legacy interface\nfunction animateValue(options) {\n return new MainThreadAnimation(options);\n}\n\nexport { MainThreadAnimation, animateValue };\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 // TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved\n // or until we implement support for linear() easing.\n // \"background-color\"\n]);\n\nexport { acceleratedValues };\n","const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n","import { isBezierDefinition } from '../../../easing/utils/is-bezier-definition.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean(!easing ||\n (typeof easing === \"string\" && easing in supportedWaapiEasing) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\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};\nfunction mapEasingToNativeEasingWithDefault(easing) {\n return (mapEasingToNativeEasing(easing) ||\n supportedWaapiEasing.easeOut);\n}\nfunction mapEasingToNativeEasing(easing) {\n if (!easing) {\n return undefined;\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map(mapEasingToNativeEasingWithDefault);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n","import { mapEasingToNativeEasing } from './easing.mjs';\n\nfunction animateStyle(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease, times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease);\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 return element.animate(keyframeOptions, {\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}\n\nexport { animateStyle };\n","import { DOMKeyframesResolver } from '../../render/dom/DOMKeyframesResolver.mjs';\nimport { memo } from '../../utils/memo.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { isGenerator } from '../generators/utils/is-generator.mjs';\nimport { BaseAnimation } from './BaseAnimation.mjs';\nimport { MainThreadAnimation } from './MainThreadAnimation.mjs';\nimport { acceleratedValues } from './utils/accelerated-values.mjs';\nimport { animateStyle } from './waapi/index.mjs';\nimport { isWaapiSupportedEasing } from './waapi/easing.mjs';\nimport { getFinalKeyframe } from './waapi/utils/get-final-keyframe.mjs';\n\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\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\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxDuration = 20000;\n/**\n * Check if an animation can run natively via WAAPI or requires pregenerated keyframes.\n * WAAPI doesn't support spring or function easings so we run these as JS animation before\n * handing off.\n */\nfunction requiresPregeneratedKeyframes(options) {\n return (isGenerator(options.type) ||\n options.type === \"spring\" ||\n !isWaapiSupportedEasing(options.ease));\n}\nfunction pregenerateKeyframes(keyframes, options) {\n /**\n * Create a main-thread animation to pregenerate keyframes.\n * We sample this at regular intervals to generate keyframes that we then\n * linearly interpolate between.\n */\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes,\n repeat: 0,\n delay: 0,\n isGenerator: true,\n });\n let state = { done: false, value: keyframes[0] };\n const pregeneratedKeyframes = [];\n /**\n * Bail after 20 seconds of pre-generated keyframes as it's likely\n * we're heading for an infinite loop.\n */\n let t = 0;\n while (!state.done && t < maxDuration) {\n state = sampleAnimation.sample(t);\n pregeneratedKeyframes.push(state.value);\n t += sampleDelta;\n }\n return {\n times: undefined,\n keyframes: pregeneratedKeyframes,\n duration: t - sampleDelta,\n ease: \"linear\",\n };\n}\nclass AcceleratedAnimation extends BaseAnimation {\n constructor(options) {\n super(options);\n const { name, motionValue, element, keyframes } = this.options;\n this.resolver = new DOMKeyframesResolver(keyframes, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue, element);\n this.resolver.scheduleResolve();\n }\n initPlayback(keyframes, finalKeyframe) {\n var _a;\n let { duration = 300, times, ease, type, motionValue, name, startTime, } = this.options;\n /**\n * If element has since been unmounted, return false to indicate\n * the animation failed to initialised.\n */\n if (!((_a = motionValue.owner) === null || _a === void 0 ? void 0 : _a.current)) {\n return false;\n }\n /**\n * If this animation needs pre-generated keyframes then generate.\n */\n if (requiresPregeneratedKeyframes(this.options)) {\n const { onComplete, onUpdate, motionValue, element, ...options } = this.options;\n const pregeneratedAnimation = pregenerateKeyframes(keyframes, options);\n keyframes = pregeneratedAnimation.keyframes;\n // If this is a very short animation, ensure we have\n // at least two keyframes to animate between as older browsers\n // can't animate between a single keyframe.\n if (keyframes.length === 1) {\n keyframes[1] = keyframes[0];\n }\n duration = pregeneratedAnimation.duration;\n times = pregeneratedAnimation.times;\n ease = pregeneratedAnimation.ease;\n type = \"keyframes\";\n }\n const animation = animateStyle(motionValue.owner.current, name, keyframes, { ...this.options, duration, times, ease });\n // Override the browser calculated startTime with one synchronised to other JS\n // and WAAPI animations starting this event loop.\n animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();\n if (this.pendingTimeline) {\n animation.timeline = this.pendingTimeline;\n this.pendingTimeline = undefined;\n }\n else {\n /**\n * Prefer the `onfinish` prop as it's more widely supported than\n * the `finished` promise.\n *\n * Here, we synchronously set the provided MotionValue to the end\n * keyframe. If we didn't, when the WAAPI animation is finished it would\n * be removed from the element which would then revert to its old styles.\n */\n animation.onfinish = () => {\n const { onComplete } = this.options;\n motionValue.set(getFinalKeyframe(keyframes, this.options, finalKeyframe));\n onComplete && onComplete();\n this.cancel();\n this.resolveFinishedPromise();\n };\n }\n return {\n animation,\n duration,\n times,\n type,\n ease,\n keyframes: keyframes,\n };\n }\n get duration() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { duration } = resolved;\n return millisecondsToSeconds(duration);\n }\n get time() {\n const { resolved } = this;\n if (!resolved)\n return 0;\n const { animation } = resolved;\n return millisecondsToSeconds(animation.currentTime || 0);\n }\n set time(newTime) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.currentTime = secondsToMilliseconds(newTime);\n }\n get speed() {\n const { resolved } = this;\n if (!resolved)\n return 1;\n const { animation } = resolved;\n return animation.playbackRate;\n }\n set speed(newSpeed) {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.playbackRate = newSpeed;\n }\n get state() {\n const { resolved } = this;\n if (!resolved)\n return \"idle\";\n const { animation } = resolved;\n return animation.playState;\n }\n get startTime() {\n const { resolved } = this;\n if (!resolved)\n return null;\n const { animation } = resolved;\n // Coerce to number as TypeScript incorrectly types this\n // as CSSNumberish\n return animation.startTime;\n }\n /**\n * Replace the default DocumentTimeline with another AnimationTimeline.\n * Currently used for scroll animations.\n */\n attachTimeline(timeline) {\n if (!this._resolved) {\n this.pendingTimeline = timeline;\n }\n else {\n const { resolved } = this;\n if (!resolved)\n return noop;\n const { animation } = resolved;\n animation.timeline = timeline;\n animation.onfinish = null;\n }\n return noop;\n }\n play() {\n if (this.isStopped)\n return;\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n if (animation.playState === \"finished\") {\n this.updateFinishedPromise();\n }\n animation.play();\n }\n pause() {\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation } = resolved;\n animation.pause();\n }\n stop() {\n this.resolver.cancel();\n this.isStopped = true;\n if (this.state === \"idle\")\n return;\n this.resolveFinishedPromise();\n this.updateFinishedPromise();\n const { resolved } = this;\n if (!resolved)\n return;\n const { animation, keyframes, duration, type, ease, times } = resolved;\n if (animation.playState === \"idle\" ||\n animation.playState === \"finished\") {\n return;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read commited styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n if (this.time) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n const sampleAnimation = new MainThreadAnimation({\n ...options,\n keyframes,\n duration,\n type,\n ease,\n times,\n isGenerator: true,\n });\n const sampleTime = secondsToMilliseconds(this.time);\n motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);\n }\n const { onStop } = this.options;\n onStop && onStop();\n this.cancel();\n }\n complete() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.finish();\n }\n cancel() {\n const { resolved } = this;\n if (!resolved)\n return;\n resolved.animation.cancel();\n }\n static supports(options) {\n const { motionValue, name, repeatDelay, repeatType, damping, type } = options;\n return (supportsWaapi() &&\n name &&\n acceleratedValues.has(name) &&\n motionValue &&\n motionValue.owner &&\n motionValue.owner.current instanceof HTMLElement &&\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 !motionValue.owner.getProps().onUpdate &&\n !repeatDelay &&\n repeatType !== \"mirror\" &&\n damping !== 0 &&\n type !== \"inertia\");\n }\n}\n\nexport { AcceleratedAnimation };\n","import { frame, cancelFrame } from '../../../frameloop/frame.mjs';\n\nfunction observeTimeline(update, timeline) {\n let prevProgress;\n const onFrame = () => {\n const { currentTime } = timeline;\n const percentage = currentTime === null ? 0 : currentTime.value;\n const progress = percentage / 100;\n if (prevProgress !== progress) {\n update(progress);\n }\n prevProgress = progress;\n };\n frame.update(onFrame, true);\n return () => cancelFrame(onFrame);\n}\n\nexport { observeTimeline };\n","import { memo } from '../../../utils/memo.mjs';\n\nconst supportsScrollTimeline = memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n","import { observeTimeline } from '../render/dom/scroll/observe.mjs';\nimport { supportsScrollTimeline } from '../render/dom/scroll/supports.mjs';\n\nclass GroupPlaybackControls {\n constructor(animations) {\n // Bound to accomodate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n then(onResolve, onReject) {\n return Promise.all(this.animations).then(onResolve).catch(onReject);\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 cancelAll = this.animations.map((animation) => {\n if (supportsScrollTimeline() && animation.attachTimeline) {\n animation.attachTimeline(timeline);\n }\n else {\n animation.pause();\n return observeTimeline((progress) => {\n animation.time = animation.duration * progress;\n }, timeline);\n }\n });\n return () => {\n cancelAll.forEach((cancelTimeline, i) => {\n if (cancelTimeline)\n cancelTimeline();\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 startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n let max = 0;\n for (let i = 0; i < this.animations.length; i++) {\n max = Math.max(max, this.animations[i].duration);\n }\n return max;\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}\n\nexport { GroupPlaybackControls };\n","import { secondsToMilliseconds } from '../../utils/time-conversion.mjs';\nimport { getDefaultTransition } from '../utils/default-transitions.mjs';\nimport { getValueTransition, isTransitionDefined } from '../utils/transitions.mjs';\nimport { MotionGlobalConfig } from '../../utils/GlobalConfig.mjs';\nimport { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';\nimport { getFinalKeyframe } from '../animators/waapi/utils/get-final-keyframe.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\nimport { AcceleratedAnimation } from '../animators/AcceleratedAnimation.mjs';\nimport { MainThreadAnimation } from '../animators/MainThreadAnimation.mjs';\nimport { GroupPlaybackControls } from '../GroupPlaybackControls.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 let 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 };\n /**\n * If there's no transition defined for this value, we can generate\n * unqiue transition settings for this value.\n */\n if (!isTransitionDefined(valueTransition)) {\n options = {\n ...options,\n ...getDefaultTransition(name, options),\n };\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 if (options.duration) {\n options.duration = secondsToMilliseconds(options.duration);\n }\n if (options.repeatDelay) {\n options.repeatDelay = secondsToMilliseconds(options.repeatDelay);\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 options.duration = 0;\n if (options.delay === 0) {\n shouldSkip = true;\n }\n }\n if (instantAnimationState.current ||\n MotionGlobalConfig.skipAnimations) {\n shouldSkip = true;\n options.duration = 0;\n options.delay = 0;\n }\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 // We still want to return some animation controls here rather\n // than returning undefined\n return new GroupPlaybackControls([]);\n }\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 if (!isHandoff && AcceleratedAnimation.supports(options)) {\n return new AcceleratedAnimation(options);\n }\n else {\n return new MainThreadAnimation(options);\n }\n};\n\nexport { animateMotionValue };\n","import { isKeyframesTarget } from '../animation/utils/is-keyframes-target.mjs';\n\nconst isCustomValue = (v) => {\n return Boolean(v && typeof v === \"object\" && v.mix && v.toValue);\n};\nconst resolveFinalValueInKeyframes = (v) => {\n // TODO maybe throw if v.length - 1 is placeholder token?\n return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;\n};\n\nexport { isCustomValue, resolveFinalValueInKeyframes };\n","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","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 () => 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","import { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { velocityPerSecond } from '../utils/velocity-per-second.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\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 * @internal\n */\n constructor(init, options = {}) {\n /**\n * This will be replaced by the build step with the latest version number.\n * When MotionValues are provided to motion components, warn if versions are mixed.\n */\n this.version = \"11.7.0\";\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, render = true) => {\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 && this.events.change) {\n this.events.change.notify(this.current);\n }\n // Update render subscribers\n if (render && this.events.renderRequest) {\n this.events.renderRequest.notify(this.current);\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 if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n const unsubscribe = this.events[eventName].add(callback);\n if (eventName === \"change\") {\n return () => {\n unsubscribe();\n /**\n * If we have no more change listeners by the start\n * of the next frame, stop active animations.\n */\n frame.read(() => {\n if (!this.events.change.getSize()) {\n this.stop();\n }\n });\n };\n }\n return unsubscribe;\n }\n clearListeners() {\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 * @internal\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, render = true) {\n if (!render || !this.passiveEffect) {\n this.updateAndNotify(v, render);\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 /**\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 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 * @internal\n */\n start(startAnimation) {\n this.stop();\n return new Promise((resolve) => {\n this.hasAnimated = true;\n this.animation = startAnimation(resolve);\n if (this.events.animationStart) {\n this.events.animationStart.notify();\n }\n }).then(() => {\n if (this.events.animationComplete) {\n this.events.animationComplete.notify();\n }\n this.clearAnimation();\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 delete this.animation;\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.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","import { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\n\n/**\n * Set VisualElement's MotionValue, creating a new MotionValue for it if\n * it doesn't exist.\n */\nfunction setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}\nfunction setTarget(visualElement, definition) {\n const resolved = resolveVariant(visualElement, definition);\n let { transitionEnd = {}, transition = {}, ...target } = resolved || {};\n target = { ...target, ...transitionEnd };\n for (const key in target) {\n const value = resolveFinalValueInKeyframes(target[key]);\n setMotionValue(visualElement, key, value);\n }\n}\n\nexport { setTarget };\n","/**\n * Convert camelCase to dash-case properties.\n */\nconst camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, \"$1-$2\").toLowerCase();\n\nexport { camelToDash };\n","import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\n\nconst optimizedAppearDataId = \"framerAppearId\";\nconst optimizedAppearDataAttribute = \"data-\" + camelToDash(optimizedAppearDataId);\n\nexport { optimizedAppearDataAttribute, optimizedAppearDataId };\n","import { optimizedAppearDataAttribute } from './data-id.mjs';\n\nfunction getOptimisedAppearId(visualElement) {\n return visualElement.props[optimizedAppearDataAttribute];\n}\n\nexport { getOptimisedAppearId };\n","import { acceleratedValues } from '../../animation/animators/utils/accelerated-values.mjs';\nimport { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction getWillChangeName(name) {\n if (transformProps.has(name)) {\n return \"transform\";\n }\n else if (acceleratedValues.has(name)) {\n return camelToDash(name);\n }\n}\n\nexport { getWillChangeName };\n","import { MotionValue } from '../index.mjs';\nimport { getWillChangeName } from './get-will-change-name.mjs';\nimport { addUniqueItem } from '../../utils/array.mjs';\n\nclass WillChangeMotionValue extends MotionValue {\n constructor() {\n super(...arguments);\n this.values = [];\n }\n add(name) {\n const styleName = getWillChangeName(name);\n if (styleName) {\n addUniqueItem(this.values, styleName);\n this.update();\n }\n }\n update() {\n this.set(this.values.length ? this.values.join(\", \") : \"auto\");\n }\n}\n\nexport { WillChangeMotionValue };\n","const isMotionValue = (value) => Boolean(value && value.getVelocity);\n\nexport { isMotionValue };\n","import { isMotionValue } from '../utils/is-motion-value.mjs';\n\nfunction isWillChangeMotionValue(value) {\n return Boolean(isMotionValue(value) && value.add);\n}\n\nexport { isWillChangeMotionValue };\n","import { WillChangeMotionValue } from './WillChangeMotionValue.mjs';\nimport { isWillChangeMotionValue } from './is.mjs';\n\nfunction addValueToWillChange(visualElement, key) {\n var _a;\n if (!visualElement.applyWillChange)\n return;\n let willChange = visualElement.getValue(\"willChange\");\n /**\n * If we haven't created a willChange MotionValue, and the we haven't been\n * manually provided one, create one.\n */\n if (!willChange && !((_a = visualElement.props.style) === null || _a === void 0 ? void 0 : _a.willChange)) {\n willChange = new WillChangeMotionValue(\"auto\");\n visualElement.addValue(\"willChange\", willChange);\n }\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key);\n }\n}\n\nexport { addValueToWillChange };\n","import { transformProps } from '../../render/html/utils/transform.mjs';\nimport { animateMotionValue } from './motion-value.mjs';\nimport { setTarget } from '../../render/utils/setters.mjs';\nimport { getValueTransition } from '../utils/transitions.mjs';\nimport { getOptimisedAppearId } from '../optimized-appear/get-appear-id.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\n/**\n * Decide whether we should block this animation. Previously, we achieved this\n * just by checking whether the key was listed in protectedKeys, but this\n * posed problems if an animation was triggered by afterChildren and protectedKeys\n * had been set to true in the meantime.\n */\nfunction shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {\n const shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;\n needsAnimating[key] = false;\n return shouldBlock;\n}\nfunction animateTarget(visualElement, targetAndTransition, { delay = 0, transitionOverride, type } = {}) {\n var _a;\n let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;\n if (transitionOverride)\n transition = transitionOverride;\n const animations = [];\n const animationTypeState = type &&\n visualElement.animationState &&\n visualElement.animationState.getState()[type];\n for (const key in target) {\n const value = visualElement.getValue(key, (_a = visualElement.latestValues[key]) !== null && _a !== void 0 ? _a : null);\n const valueTarget = target[key];\n if (valueTarget === undefined ||\n (animationTypeState &&\n shouldBlockAnimation(animationTypeState, key))) {\n continue;\n }\n const valueTransition = {\n delay,\n ...getValueTransition(transition || {}, key),\n };\n /**\n * If this is the first time a value is being animated, check\n * to see if we're handling off from an existing animation.\n */\n let isHandoff = false;\n if (window.MotionHandoffAnimation) {\n const appearId = getOptimisedAppearId(visualElement);\n if (appearId) {\n const startTime = window.MotionHandoffAnimation(appearId, key, frame);\n if (startTime !== null) {\n valueTransition.startTime = startTime;\n isHandoff = true;\n }\n }\n }\n addValueToWillChange(visualElement, key);\n value.start(animateMotionValue(key, value, valueTarget, visualElement.shouldReduceMotion && transformProps.has(key)\n ? { type: false }\n : valueTransition, visualElement, isHandoff));\n const animation = value.animation;\n if (animation) {\n animations.push(animation);\n }\n }\n if (transitionEnd) {\n Promise.all(animations).then(() => {\n frame.update(() => {\n transitionEnd && setTarget(visualElement, transitionEnd);\n });\n });\n }\n return animations;\n}\n\nexport { animateTarget };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\n\nfunction animateVariant(visualElement, variant, options = {}) {\n var _a;\n const resolved = resolveVariant(visualElement, variant, options.type === \"exit\"\n ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom\n : undefined);\n let { transition = visualElement.getDefaultTransition() || {} } = resolved || {};\n if (options.transitionOverride) {\n transition = options.transitionOverride;\n }\n /**\n * If we have a variant, create a callback that runs it as an animation.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getAnimation = resolved\n ? () => Promise.all(animateTarget(visualElement, resolved, options))\n : () => Promise.resolve();\n /**\n * If we have children, create a callback that runs all their animations.\n * Otherwise, we resolve a Promise immediately for a composable no-op.\n */\n const getChildAnimations = visualElement.variantChildren && visualElement.variantChildren.size\n ? (forwardDelay = 0) => {\n const { delayChildren = 0, staggerChildren, staggerDirection, } = transition;\n return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);\n }\n : () => Promise.resolve();\n /**\n * If the transition explicitly defines a \"when\" option, we need to resolve either\n * this animation or all children animations before playing the other.\n */\n const { when } = transition;\n if (when) {\n const [first, last] = when === \"beforeChildren\"\n ? [getAnimation, getChildAnimations]\n : [getChildAnimations, getAnimation];\n return first().then(() => last());\n }\n else {\n return Promise.all([getAnimation(), getChildAnimations(options.delay)]);\n }\n}\nfunction animateChildren(visualElement, variant, delayChildren = 0, staggerChildren = 0, staggerDirection = 1, options) {\n const animations = [];\n const maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;\n const generateStaggerDuration = staggerDirection === 1\n ? (i = 0) => i * staggerChildren\n : (i = 0) => maxStaggerDuration - i * staggerChildren;\n Array.from(visualElement.variantChildren)\n .sort(sortByTreeOrder)\n .forEach((child, i) => {\n child.notify(\"AnimationStart\", variant);\n animations.push(animateVariant(child, variant, {\n ...options,\n delay: delayChildren + generateStaggerDuration(i),\n }).then(() => child.notify(\"AnimationComplete\", variant)));\n });\n return Promise.all(animations);\n}\nfunction sortByTreeOrder(a, b) {\n return a.sortNodePosition(b);\n}\n\nexport { animateVariant, sortByTreeOrder };\n","import { resolveVariant } from '../../render/utils/resolve-dynamic-variants.mjs';\nimport { animateTarget } from './visual-element-target.mjs';\nimport { animateVariant } from './visual-element-variant.mjs';\n\nfunction animateVisualElement(visualElement, definition, options = {}) {\n visualElement.notify(\"AnimationStart\", definition);\n let animation;\n if (Array.isArray(definition)) {\n const animations = definition.map((variant) => animateVariant(visualElement, variant, options));\n animation = Promise.all(animations);\n }\n else if (typeof definition === \"string\") {\n animation = animateVariant(visualElement, definition, options);\n }\n else {\n const resolvedDefinition = typeof definition === \"function\"\n ? resolveVariant(visualElement, definition, options.custom)\n : definition;\n animation = Promise.all(animateTarget(visualElement, resolvedDefinition, options));\n }\n return animation.then(() => {\n visualElement.notify(\"AnimationComplete\", definition);\n });\n}\n\nexport { animateVisualElement };\n","import { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nconst numVariantProps = variantProps.length;\nfunction getVariantContext(visualElement) {\n if (!visualElement)\n return undefined;\n if (!visualElement.isControllingVariants) {\n const context = visualElement.parent\n ? getVariantContext(visualElement.parent) || {}\n : {};\n if (visualElement.props.initial !== undefined) {\n context.initial = visualElement.props.initial;\n }\n return context;\n }\n const context = {};\n for (let i = 0; i < numVariantProps; i++) {\n const name = variantProps[i];\n const prop = visualElement.props[name];\n if (isVariantLabel(prop) || prop === false) {\n context[name] = prop;\n }\n }\n return context;\n}\n\nexport { getVariantContext };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';\nimport { shallowCompare } from '../../utils/shallow-compare.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { resolveVariant } from './resolve-dynamic-variants.mjs';\nimport { variantPriorityOrder } from './variant-props.mjs';\nimport { animateVisualElement } from '../../animation/interfaces/visual-element.mjs';\nimport { getVariantContext } from './get-variant-context.mjs';\n\nconst reversePriorityOrder = [...variantPriorityOrder].reverse();\nconst numAnimationTypes = variantPriorityOrder.length;\nfunction animateList(visualElement) {\n return (animations) => Promise.all(animations.map(({ animation, options }) => animateVisualElement(visualElement, animation, options)));\n}\nfunction createAnimationState(visualElement) {\n let animate = animateList(visualElement);\n let state = createState();\n let isInitialRender = true;\n /**\n * This function will be used to reduce the animation definitions for\n * each active animation type into an object of resolved values for it.\n */\n const buildResolvedTypeValues = (type) => (acc, definition) => {\n var _a;\n const resolved = resolveVariant(visualElement, definition, type === \"exit\"\n ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom\n : undefined);\n if (resolved) {\n const { transition, transitionEnd, ...target } = resolved;\n acc = { ...acc, ...target, ...transitionEnd };\n }\n return acc;\n };\n /**\n * This just allows us to inject mocked animation functions\n * @internal\n */\n function setAnimateFunction(makeAnimator) {\n animate = makeAnimator(visualElement);\n }\n /**\n * When we receive new props, we need to:\n * 1. Create a list of protected keys for each type. This is a directory of\n * value keys that are currently being \"handled\" by types of a higher priority\n * so that whenever an animation is played of a given type, these values are\n * protected from being animated.\n * 2. Determine if an animation type needs animating.\n * 3. Determine if any values have been removed from a type and figure out\n * what to animate those to.\n */\n function animateChanges(changedActiveType) {\n const { props } = visualElement;\n const context = getVariantContext(visualElement.parent) || {};\n /**\n * A list of animations that we'll build into as we iterate through the animation\n * types. This will get executed at the end of the function.\n */\n const animations = [];\n /**\n * Keep track of which values have been removed. Then, as we hit lower priority\n * animation types, we can check if they contain removed values and animate to that.\n */\n const removedKeys = new Set();\n /**\n * A dictionary of all encountered keys. This is an object to let us build into and\n * copy it without iteration. Each time we hit an animation type we set its protected\n * keys - the keys its not allowed to animate - to the latest version of this object.\n */\n let encounteredKeys = {};\n /**\n * If a variant has been removed at a given index, and this component is controlling\n * variant animations, we want to ensure lower-priority variants are forced to animate.\n */\n let removedVariantIndex = Infinity;\n /**\n * Iterate through all animation types in reverse priority order. For each, we want to\n * detect which values it's handling and whether or not they've changed (and therefore\n * need to be animated). If any values have been removed, we want to detect those in\n * lower priority props and flag for animation.\n */\n for (let i = 0; i < numAnimationTypes; i++) {\n const type = reversePriorityOrder[i];\n const typeState = state[type];\n const prop = props[type] !== undefined\n ? props[type]\n : context[type];\n const propIsVariant = isVariantLabel(prop);\n /**\n * If this type has *just* changed isActive status, set activeDelta\n * to that status. Otherwise set to null.\n */\n const activeDelta = type === changedActiveType ? typeState.isActive : null;\n if (activeDelta === false)\n removedVariantIndex = i;\n /**\n * If this prop is an inherited variant, rather than been set directly on the\n * component itself, we want to make sure we allow the parent to trigger animations.\n *\n * TODO: Can probably change this to a !isControllingVariants check\n */\n let isInherited = prop === context[type] &&\n prop !== props[type] &&\n propIsVariant;\n /**\n *\n */\n if (isInherited &&\n isInitialRender &&\n visualElement.manuallyAnimateOnMount) {\n isInherited = false;\n }\n /**\n * Set all encountered keys so far as the protected keys for this type. This will\n * be any key that has been animated or otherwise handled by active, higher-priortiy types.\n */\n typeState.protectedKeys = { ...encounteredKeys };\n // Check if we can skip analysing this prop early\n if (\n // If it isn't active and hasn't *just* been set as inactive\n (!typeState.isActive && activeDelta === null) ||\n // If we didn't and don't have any defined prop for this animation type\n (!prop && !typeState.prevProp) ||\n // Or if the prop doesn't define an animation\n isAnimationControls(prop) ||\n typeof prop === \"boolean\") {\n continue;\n }\n /**\n * As we go look through the values defined on this type, if we detect\n * a changed value or a value that was removed in a higher priority, we set\n * this to true and add this prop to the animation list.\n */\n const variantDidChange = checkVariantsDidChange(typeState.prevProp, prop);\n let shouldAnimateType = variantDidChange ||\n // If we're making this variant active, we want to always make it active\n (type === changedActiveType &&\n typeState.isActive &&\n !isInherited &&\n propIsVariant) ||\n // If we removed a higher-priority variant (i is in reverse order)\n (i > removedVariantIndex && propIsVariant);\n let handledRemovedValues = false;\n /**\n * As animations can be set as variant lists, variants or target objects, we\n * coerce everything to an array if it isn't one already\n */\n const definitionList = Array.isArray(prop) ? prop : [prop];\n /**\n * Build an object of all the resolved values. We'll use this in the subsequent\n * animateChanges calls to determine whether a value has changed.\n */\n let resolvedValues = definitionList.reduce(buildResolvedTypeValues(type), {});\n if (activeDelta === false)\n resolvedValues = {};\n /**\n * Now we need to loop through all the keys in the prev prop and this prop,\n * and decide:\n * 1. If the value has changed, and needs animating\n * 2. If it has been removed, and needs adding to the removedKeys set\n * 3. If it has been removed in a higher priority type and needs animating\n * 4. If it hasn't been removed in a higher priority but hasn't changed, and\n * needs adding to the type's protectedKeys list.\n */\n const { prevResolvedValues = {} } = typeState;\n const allKeys = {\n ...prevResolvedValues,\n ...resolvedValues,\n };\n const markToAnimate = (key) => {\n shouldAnimateType = true;\n if (removedKeys.has(key)) {\n handledRemovedValues = true;\n removedKeys.delete(key);\n }\n typeState.needsAnimating[key] = true;\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = false;\n };\n for (const key in allKeys) {\n const next = resolvedValues[key];\n const prev = prevResolvedValues[key];\n // If we've already handled this we can just skip ahead\n if (encounteredKeys.hasOwnProperty(key))\n continue;\n /**\n * If the value has changed, we probably want to animate it.\n */\n let valueHasChanged = false;\n if (isKeyframesTarget(next) && isKeyframesTarget(prev)) {\n valueHasChanged = !shallowCompare(next, prev);\n }\n else {\n valueHasChanged = next !== prev;\n }\n if (valueHasChanged) {\n if (next !== undefined && next !== null) {\n // If next is defined and doesn't equal prev, it needs animating\n markToAnimate(key);\n }\n else {\n // If it's undefined, it's been removed.\n removedKeys.add(key);\n }\n }\n else if (next !== undefined && removedKeys.has(key)) {\n /**\n * If next hasn't changed and it isn't undefined, we want to check if it's\n * been removed by a higher priority\n */\n markToAnimate(key);\n }\n else {\n /**\n * If it hasn't changed, we add it to the list of protected values\n * to ensure it doesn't get animated.\n */\n typeState.protectedKeys[key] = true;\n }\n }\n /**\n * Update the typeState so next time animateChanges is called we can compare the\n * latest prop and resolvedValues to these.\n */\n typeState.prevProp = prop;\n typeState.prevResolvedValues = resolvedValues;\n /**\n *\n */\n if (typeState.isActive) {\n encounteredKeys = { ...encounteredKeys, ...resolvedValues };\n }\n if (isInitialRender && visualElement.blockInitialAnimation) {\n shouldAnimateType = false;\n }\n /**\n * If this is an inherited prop we want to skip this animation\n * unless the inherited variants haven't changed on this render.\n */\n const willAnimateViaParent = isInherited && variantDidChange;\n const needsAnimating = !willAnimateViaParent || handledRemovedValues;\n if (shouldAnimateType && needsAnimating) {\n animations.push(...definitionList.map((animation) => ({\n animation: animation,\n options: { type },\n })));\n }\n }\n /**\n * If there are some removed value that haven't been dealt with,\n * we need to create a new animation that falls back either to the value\n * defined in the style prop, or the last read value.\n */\n if (removedKeys.size) {\n const fallbackAnimation = {};\n removedKeys.forEach((key) => {\n const fallbackTarget = visualElement.getBaseTarget(key);\n const motionValue = visualElement.getValue(key);\n if (motionValue)\n motionValue.liveStyle = true;\n // @ts-expect-error - @mattgperry to figure if we should do something here\n fallbackAnimation[key] = fallbackTarget !== null && fallbackTarget !== void 0 ? fallbackTarget : null;\n });\n animations.push({ animation: fallbackAnimation });\n }\n let shouldAnimate = Boolean(animations.length);\n if (isInitialRender &&\n (props.initial === false || props.initial === props.animate) &&\n !visualElement.manuallyAnimateOnMount) {\n shouldAnimate = false;\n }\n isInitialRender = false;\n return shouldAnimate ? animate(animations) : Promise.resolve();\n }\n /**\n * Change whether a certain animation type is active.\n */\n function setActive(type, isActive) {\n var _a;\n // If the active state hasn't changed, we can safely do nothing here\n if (state[type].isActive === isActive)\n return Promise.resolve();\n // Propagate active change to children\n (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach((child) => { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });\n state[type].isActive = isActive;\n const animations = animateChanges(type);\n for (const key in state) {\n state[key].protectedKeys = {};\n }\n return animations;\n }\n return {\n animateChanges,\n setActive,\n setAnimateFunction,\n getState: () => state,\n reset: () => {\n state = createState();\n isInitialRender = true;\n },\n };\n}\nfunction checkVariantsDidChange(prev, next) {\n if (typeof next === \"string\") {\n return next !== prev;\n }\n else if (Array.isArray(next)) {\n return !shallowCompare(next, prev);\n }\n return false;\n}\nfunction createTypeState(isActive = false) {\n return {\n isActive,\n protectedKeys: {},\n needsAnimating: {},\n prevResolvedValues: {},\n };\n}\nfunction createState() {\n return {\n animate: createTypeState(true),\n whileInView: createTypeState(),\n whileHover: createTypeState(),\n whileTap: createTypeState(),\n whileDrag: createTypeState(),\n whileFocus: createTypeState(),\n exit: createTypeState(),\n };\n}\n\nexport { checkVariantsDidChange, createAnimationState };\n","class Feature {\n constructor(node) {\n this.isMounted = false;\n this.node = node;\n }\n update() { }\n}\n\nexport { Feature };\n","import { isAnimationControls } from '../../../animation/utils/is-animation-controls.mjs';\nimport { createAnimationState } from '../../../render/utils/animation-state.mjs';\nimport { Feature } from '../Feature.mjs';\n\nclass AnimationFeature extends Feature {\n /**\n * We dynamically generate the AnimationState manager as it contains a reference\n * to the underlying animation library. We only want to load that if we load this,\n * so people can optionally code split it out using the `m` component.\n */\n constructor(node) {\n super(node);\n node.animationState || (node.animationState = createAnimationState(node));\n }\n updateAnimationControlsSubscription() {\n const { animate } = this.node.getProps();\n if (isAnimationControls(animate)) {\n this.unmountControls = animate.subscribe(this.node);\n }\n }\n /**\n * Subscribe any provided AnimationControls to the component's VisualElement\n */\n mount() {\n this.updateAnimationControlsSubscription();\n }\n update() {\n const { animate } = this.node.getProps();\n const { animate: prevAnimate } = this.node.prevProps || {};\n if (animate !== prevAnimate) {\n this.updateAnimationControlsSubscription();\n }\n }\n unmount() {\n var _a;\n this.node.animationState.reset();\n (_a = this.unmountControls) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n}\n\nexport { AnimationFeature };\n","import { Feature } from '../Feature.mjs';\n\nlet id = 0;\nclass ExitAnimationFeature extends Feature {\n constructor() {\n super(...arguments);\n this.id = id++;\n }\n update() {\n if (!this.node.presenceContext)\n return;\n const { isPresent, onExitComplete } = this.node.presenceContext;\n const { isPresent: prevIsPresent } = this.node.prevPresenceContext || {};\n if (!this.node.animationState || isPresent === prevIsPresent) {\n return;\n }\n const exitAnimation = this.node.animationState.setActive(\"exit\", !isPresent);\n if (onExitComplete && !isPresent) {\n exitAnimation.then(() => onExitComplete(this.id));\n }\n }\n mount() {\n const { register } = this.node.presenceContext || {};\n if (register) {\n this.unmount = register(this.id);\n }\n }\n unmount() { }\n}\n\nexport { ExitAnimationFeature };\n","import { AnimationFeature } from './animation/index.mjs';\nimport { ExitAnimationFeature } from './animation/exit.mjs';\n\nconst animations = {\n animation: {\n Feature: AnimationFeature,\n },\n exit: {\n Feature: ExitAnimationFeature,\n },\n};\n\nexport { animations };\n","const isPrimaryPointer = (event) => {\n if (event.pointerType === \"mouse\") {\n return typeof event.button !== \"number\" || event.button <= 0;\n }\n else {\n /**\n * isPrimary is true for all mice buttons, whereas every touch point\n * is regarded as its own input. So subsequent concurrent touch points\n * will be false.\n *\n * Specifically match against false here as incomplete versions of\n * PointerEvents in very old browser might have it set as undefined.\n */\n return event.isPrimary !== false;\n }\n};\n\nexport { isPrimaryPointer };\n","import { isPrimaryPointer } from './utils/is-primary-pointer.mjs';\n\nfunction extractEventInfo(event, pointType = \"page\") {\n return {\n point: {\n x: event[`${pointType}X`],\n y: event[`${pointType}Y`],\n },\n };\n}\nconst addPointerInfo = (handler) => {\n return (event) => isPrimaryPointer(event) && handler(event, extractEventInfo(event));\n};\n\nexport { addPointerInfo, extractEventInfo };\n","function addDomEvent(target, eventName, handler, options = { passive: true }) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler);\n}\n\nexport { addDomEvent };\n","import { addDomEvent } from './add-dom-event.mjs';\nimport { addPointerInfo } from './event-info.mjs';\n\nfunction addPointerEvent(target, eventName, handler, options) {\n return addDomEvent(target, eventName, addPointerInfo(handler), options);\n}\n\nexport { addPointerEvent };\n","const distance = (a, b) => Math.abs(a - b);\nfunction distance2D(a, b) {\n // Multi-dimensional\n const xDelta = distance(a.x, b.x);\n const yDelta = distance(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n}\n\nexport { distance, distance2D };\n","import { extractEventInfo } from '../../events/event-info.mjs';\nimport { secondsToMilliseconds, millisecondsToSeconds } from '../../utils/time-conversion.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { pipe } from '../../utils/pipe.mjs';\nimport { distance2D } from '../../utils/distance.mjs';\nimport { isPrimaryPointer } from '../../events/utils/is-primary-pointer.mjs';\nimport { frame, cancelFrame, frameData } from '../../frameloop/frame.mjs';\n\n/**\n * @internal\n */\nclass PanSession {\n constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false } = {}) {\n /**\n * @internal\n */\n this.startEvent = null;\n /**\n * @internal\n */\n this.lastMoveEvent = null;\n /**\n * @internal\n */\n this.lastMoveEventInfo = null;\n /**\n * @internal\n */\n this.handlers = {};\n /**\n * @internal\n */\n this.contextWindow = window;\n this.updatePoint = () => {\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const info = getPanInfo(this.lastMoveEventInfo, this.history);\n const isPanStarted = this.startEvent !== null;\n // Only start panning if the offset is larger than 3 pixels. If we make it\n // any larger than this we'll want to reset the pointer history\n // on the first update to avoid visual snapping to the cursoe.\n const isDistancePastThreshold = distance2D(info.offset, { x: 0, y: 0 }) >= 3;\n if (!isPanStarted && !isDistancePastThreshold)\n return;\n const { point } = info;\n const { timestamp } = frameData;\n this.history.push({ ...point, timestamp });\n const { onStart, onMove } = this.handlers;\n if (!isPanStarted) {\n onStart && onStart(this.lastMoveEvent, info);\n this.startEvent = this.lastMoveEvent;\n }\n onMove && onMove(this.lastMoveEvent, info);\n };\n this.handlePointerMove = (event, info) => {\n this.lastMoveEvent = event;\n this.lastMoveEventInfo = transformPoint(info, this.transformPagePoint);\n // Throttle mouse move event to once per frame\n frame.update(this.updatePoint, true);\n };\n this.handlePointerUp = (event, info) => {\n this.end();\n const { onEnd, onSessionEnd, resumeAnimation } = this.handlers;\n if (this.dragSnapToOrigin)\n resumeAnimation && resumeAnimation();\n if (!(this.lastMoveEvent && this.lastMoveEventInfo))\n return;\n const panInfo = getPanInfo(event.type === \"pointercancel\"\n ? this.lastMoveEventInfo\n : transformPoint(info, this.transformPagePoint), this.history);\n if (this.startEvent && onEnd) {\n onEnd(event, panInfo);\n }\n onSessionEnd && onSessionEnd(event, panInfo);\n };\n // If we have more than one touch, don't start detecting this gesture\n if (!isPrimaryPointer(event))\n return;\n this.dragSnapToOrigin = dragSnapToOrigin;\n this.handlers = handlers;\n this.transformPagePoint = transformPagePoint;\n this.contextWindow = contextWindow || window;\n const info = extractEventInfo(event);\n const initialInfo = transformPoint(info, this.transformPagePoint);\n const { point } = initialInfo;\n const { timestamp } = frameData;\n this.history = [{ ...point, timestamp }];\n const { onSessionStart } = handlers;\n onSessionStart &&\n onSessionStart(event, getPanInfo(initialInfo, this.history));\n this.removeListeners = pipe(addPointerEvent(this.contextWindow, \"pointermove\", this.handlePointerMove), addPointerEvent(this.contextWindow, \"pointerup\", this.handlePointerUp), addPointerEvent(this.contextWindow, \"pointercancel\", this.handlePointerUp));\n }\n updateHandlers(handlers) {\n this.handlers = handlers;\n }\n end() {\n this.removeListeners && this.removeListeners();\n cancelFrame(this.updatePoint);\n }\n}\nfunction transformPoint(info, transformPagePoint) {\n return transformPagePoint ? { point: transformPagePoint(info.point) } : info;\n}\nfunction subtractPoint(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\nfunction getPanInfo({ point }, history) {\n return {\n point,\n delta: subtractPoint(point, lastDevicePoint(history)),\n offset: subtractPoint(point, startDevicePoint(history)),\n velocity: getVelocity(history, 0.1),\n };\n}\nfunction startDevicePoint(history) {\n return history[0];\n}\nfunction lastDevicePoint(history) {\n return history[history.length - 1];\n}\nfunction getVelocity(history, timeDelta) {\n if (history.length < 2) {\n return { x: 0, y: 0 };\n }\n let i = history.length - 1;\n let timestampedPoint = null;\n const lastPoint = lastDevicePoint(history);\n while (i >= 0) {\n timestampedPoint = history[i];\n if (lastPoint.timestamp - timestampedPoint.timestamp >\n secondsToMilliseconds(timeDelta)) {\n break;\n }\n i--;\n }\n if (!timestampedPoint) {\n return { x: 0, y: 0 };\n }\n const time = millisecondsToSeconds(lastPoint.timestamp - timestampedPoint.timestamp);\n if (time === 0) {\n return { x: 0, y: 0 };\n }\n const currentVelocity = {\n x: (lastPoint.x - timestampedPoint.x) / time,\n y: (lastPoint.y - timestampedPoint.y) / time,\n };\n if (currentVelocity.x === Infinity) {\n currentVelocity.x = 0;\n }\n if (currentVelocity.y === Infinity) {\n currentVelocity.y = 0;\n }\n return currentVelocity;\n}\n\nexport { PanSession };\n","function createLock(name) {\n let lock = null;\n return () => {\n const openLock = () => {\n lock = null;\n };\n if (lock === null) {\n lock = name;\n return openLock;\n }\n return false;\n };\n}\nconst globalHorizontalLock = createLock(\"dragHorizontal\");\nconst globalVerticalLock = createLock(\"dragVertical\");\nfunction getGlobalLock(drag) {\n let lock = false;\n if (drag === \"y\") {\n lock = globalVerticalLock();\n }\n else if (drag === \"x\") {\n lock = globalHorizontalLock();\n }\n else {\n const openHorizontal = globalHorizontalLock();\n const openVertical = globalVerticalLock();\n if (openHorizontal && openVertical) {\n lock = () => {\n openHorizontal();\n openVertical();\n };\n }\n else {\n // Release the locks because we don't use them\n if (openHorizontal)\n openHorizontal();\n if (openVertical)\n openVertical();\n }\n }\n return lock;\n}\nfunction isDragActive() {\n // Check the gesture lock - if we get it, it means no drag gesture is active\n // and we can safely fire the tap gesture.\n const openGestureLock = getGlobalLock(true);\n if (!openGestureLock)\n return true;\n openGestureLock();\n return false;\n}\n\nexport { createLock, getGlobalLock, isDragActive };\n","function isRefObject(ref) {\n return (ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { mixNumber } from '../../utils/mix/number.mjs';\n\nconst SCALE_PRECISION = 0.0001;\nconst SCALE_MIN = 1 - SCALE_PRECISION;\nconst SCALE_MAX = 1 + SCALE_PRECISION;\nconst TRANSLATE_PRECISION = 0.01;\nconst TRANSLATE_MIN = 0 - TRANSLATE_PRECISION;\nconst TRANSLATE_MAX = 0 + TRANSLATE_PRECISION;\nfunction calcLength(axis) {\n return axis.max - axis.min;\n}\nfunction isNear(value, target, maxDistance) {\n return Math.abs(value - target) <= maxDistance;\n}\nfunction calcAxisDelta(delta, source, target, origin = 0.5) {\n delta.origin = origin;\n delta.originPoint = mixNumber(source.min, source.max, delta.origin);\n delta.scale = calcLength(target) / calcLength(source);\n delta.translate =\n mixNumber(target.min, target.max, delta.origin) - delta.originPoint;\n if ((delta.scale >= SCALE_MIN && delta.scale <= SCALE_MAX) ||\n isNaN(delta.scale)) {\n delta.scale = 1.0;\n }\n if ((delta.translate >= TRANSLATE_MIN &&\n delta.translate <= TRANSLATE_MAX) ||\n isNaN(delta.translate)) {\n delta.translate = 0.0;\n }\n}\nfunction calcBoxDelta(delta, source, target, origin) {\n calcAxisDelta(delta.x, source.x, target.x, origin ? origin.originX : undefined);\n calcAxisDelta(delta.y, source.y, target.y, origin ? origin.originY : undefined);\n}\nfunction calcRelativeAxis(target, relative, parent) {\n target.min = parent.min + relative.min;\n target.max = target.min + calcLength(relative);\n}\nfunction calcRelativeBox(target, relative, parent) {\n calcRelativeAxis(target.x, relative.x, parent.x);\n calcRelativeAxis(target.y, relative.y, parent.y);\n}\nfunction calcRelativeAxisPosition(target, layout, parent) {\n target.min = layout.min - parent.min;\n target.max = target.min + calcLength(layout);\n}\nfunction calcRelativePosition(target, layout, parent) {\n calcRelativeAxisPosition(target.x, layout.x, parent.x);\n calcRelativeAxisPosition(target.y, layout.y, parent.y);\n}\n\nexport { calcAxisDelta, calcBoxDelta, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, isNear };\n","import { progress } from '../../../utils/progress.mjs';\nimport { calcLength } from '../../../projection/geometry/delta-calc.mjs';\nimport { clamp } from '../../../utils/clamp.mjs';\nimport { mixNumber } from '../../../utils/mix/number.mjs';\n\n/**\n * Apply constraints to a point. These constraints are both physical along an\n * axis, and an elastic factor that determines how much to constrain the point\n * by if it does lie outside the defined parameters.\n */\nfunction applyConstraints(point, { min, max }, elastic) {\n if (min !== undefined && point < min) {\n // If we have a min point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(min, point, elastic.min)\n : Math.max(point, min);\n }\n else if (max !== undefined && point > max) {\n // If we have a max point defined, and this is outside of that, constrain\n point = elastic\n ? mixNumber(max, point, elastic.max)\n : Math.min(point, max);\n }\n return point;\n}\n/**\n * Calculate constraints in terms of the viewport when defined relatively to the\n * measured axis. This is measured from the nearest edge, so a max constraint of 200\n * on an axis with a max value of 300 would return a constraint of 500 - axis length\n */\nfunction calcRelativeAxisConstraints(axis, min, max) {\n return {\n min: min !== undefined ? axis.min + min : undefined,\n max: max !== undefined\n ? axis.max + max - (axis.max - axis.min)\n : undefined,\n };\n}\n/**\n * Calculate constraints in terms of the viewport when\n * defined relatively to the measured bounding box.\n */\nfunction calcRelativeConstraints(layoutBox, { top, left, bottom, right }) {\n return {\n x: calcRelativeAxisConstraints(layoutBox.x, left, right),\n y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),\n };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative axis\n */\nfunction calcViewportAxisConstraints(layoutAxis, constraintsAxis) {\n let min = constraintsAxis.min - layoutAxis.min;\n let max = constraintsAxis.max - layoutAxis.max;\n // If the constraints axis is actually smaller than the layout axis then we can\n // flip the constraints\n if (constraintsAxis.max - constraintsAxis.min <\n layoutAxis.max - layoutAxis.min) {\n [min, max] = [max, min];\n }\n return { min, max };\n}\n/**\n * Calculate viewport constraints when defined as another viewport-relative box\n */\nfunction calcViewportConstraints(layoutBox, constraintsBox) {\n return {\n x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),\n y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),\n };\n}\n/**\n * Calculate a transform origin relative to the source axis, between 0-1, that results\n * in an asthetically pleasing scale/transform needed to project from source to target.\n */\nfunction calcOrigin(source, target) {\n let origin = 0.5;\n const sourceLength = calcLength(source);\n const targetLength = calcLength(target);\n if (targetLength > sourceLength) {\n origin = progress(target.min, target.max - sourceLength, source.min);\n }\n else if (sourceLength > targetLength) {\n origin = progress(source.min, source.max - targetLength, target.min);\n }\n return clamp(0, 1, origin);\n}\n/**\n * Rebase the calculated viewport constraints relative to the layout.min point.\n */\nfunction rebaseAxisConstraints(layout, constraints) {\n const relativeConstraints = {};\n if (constraints.min !== undefined) {\n relativeConstraints.min = constraints.min - layout.min;\n }\n if (constraints.max !== undefined) {\n relativeConstraints.max = constraints.max - layout.min;\n }\n return relativeConstraints;\n}\nconst defaultElastic = 0.35;\n/**\n * Accepts a dragElastic prop and returns resolved elastic values for each axis.\n */\nfunction resolveDragElastic(dragElastic = defaultElastic) {\n if (dragElastic === false) {\n dragElastic = 0;\n }\n else if (dragElastic === true) {\n dragElastic = defaultElastic;\n }\n return {\n x: resolveAxisElastic(dragElastic, \"left\", \"right\"),\n y: resolveAxisElastic(dragElastic, \"top\", \"bottom\"),\n };\n}\nfunction resolveAxisElastic(dragElastic, minLabel, maxLabel) {\n return {\n min: resolvePointElastic(dragElastic, minLabel),\n max: resolvePointElastic(dragElastic, maxLabel),\n };\n}\nfunction resolvePointElastic(dragElastic, label) {\n return typeof dragElastic === \"number\"\n ? dragElastic\n : dragElastic[label] || 0;\n}\n\nexport { applyConstraints, calcOrigin, calcRelativeAxisConstraints, calcRelativeConstraints, calcViewportAxisConstraints, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, resolveAxisElastic, resolveDragElastic, resolvePointElastic };\n","const createAxisDelta = () => ({\n translate: 0,\n scale: 1,\n origin: 0,\n originPoint: 0,\n});\nconst createDelta = () => ({\n x: createAxisDelta(),\n y: createAxisDelta(),\n});\nconst createAxis = () => ({ min: 0, max: 0 });\nconst createBox = () => ({\n x: createAxis(),\n y: createAxis(),\n});\n\nexport { createAxis, createAxisDelta, createBox, createDelta };\n","function eachAxis(callback) {\n return [callback(\"x\"), callback(\"y\")];\n}\n\nexport { eachAxis };\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","function isIdentityScale(scale) {\n return scale === undefined || scale === 1;\n}\nfunction hasScale({ scale, scaleX, scaleY }) {\n return (!isIdentityScale(scale) ||\n !isIdentityScale(scaleX) ||\n !isIdentityScale(scaleY));\n}\nfunction hasTransform(values) {\n return (hasScale(values) ||\n has2DTranslate(values) ||\n values.z ||\n values.rotate ||\n values.rotateX ||\n values.rotateY ||\n values.skewX ||\n values.skewY);\n}\nfunction has2DTranslate(values) {\n return is2DTranslate(values.x) || is2DTranslate(values.y);\n}\nfunction is2DTranslate(value) {\n return value && value !== \"0%\";\n}\n\nexport { has2DTranslate, hasScale, hasTransform };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { hasTransform } from '../utils/has-transform.mjs';\n\n/**\n * Scales a point based on a factor and an originPoint\n */\nfunction scalePoint(point, scale, originPoint) {\n const distanceFromOrigin = point - originPoint;\n const scaled = scale * distanceFromOrigin;\n return originPoint + scaled;\n}\n/**\n * Applies a translate/scale delta to a point\n */\nfunction applyPointDelta(point, translate, scale, originPoint, boxScale) {\n if (boxScale !== undefined) {\n point = scalePoint(point, boxScale, originPoint);\n }\n return scalePoint(point, scale, originPoint) + translate;\n}\n/**\n * Applies a translate/scale delta to an axis\n */\nfunction applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {\n axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Applies a translate/scale delta to a box\n */\nfunction applyBoxDelta(box, { x, y }) {\n applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);\n applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);\n}\nconst TREE_SCALE_SNAP_MIN = 0.999999999999;\nconst TREE_SCALE_SNAP_MAX = 1.0000000000001;\n/**\n * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms\n * in a tree upon our box before then calculating how to project it into our desired viewport-relative box\n *\n * This is the final nested loop within updateLayoutDelta for future refactoring\n */\nfunction applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {\n const treeLength = treePath.length;\n if (!treeLength)\n return;\n // Reset the treeScale\n treeScale.x = treeScale.y = 1;\n let node;\n let delta;\n for (let i = 0; i < treeLength; i++) {\n node = treePath[i];\n delta = node.projectionDelta;\n /**\n * TODO: Prefer to remove this, but currently we have motion components with\n * display: contents in Framer.\n */\n const { visualElement } = node.options;\n if (visualElement &&\n visualElement.props.style &&\n visualElement.props.style.display === \"contents\") {\n continue;\n }\n if (isSharedTransition &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(box, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (delta) {\n // Incoporate each ancestor's scale into a culmulative treeScale for this component\n treeScale.x *= delta.x.scale;\n treeScale.y *= delta.y.scale;\n // Apply each ancestor's calculated delta into this component's recorded layout box\n applyBoxDelta(box, delta);\n }\n if (isSharedTransition && hasTransform(node.latestValues)) {\n transformBox(box, node.latestValues);\n }\n }\n /**\n * Snap tree scale back to 1 if it's within a non-perceivable threshold.\n * This will help reduce useless scales getting rendered.\n */\n if (treeScale.x < TREE_SCALE_SNAP_MAX &&\n treeScale.x > TREE_SCALE_SNAP_MIN) {\n treeScale.x = 1.0;\n }\n if (treeScale.y < TREE_SCALE_SNAP_MAX &&\n treeScale.y > TREE_SCALE_SNAP_MIN) {\n treeScale.y = 1.0;\n }\n}\nfunction translateAxis(axis, distance) {\n axis.min = axis.min + distance;\n axis.max = axis.max + distance;\n}\n/**\n * Apply a transform to an axis from the latest resolved motion values.\n * This function basically acts as a bridge between a flat motion value map\n * and applyAxisDelta\n */\nfunction transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {\n const originPoint = mixNumber(axis.min, axis.max, axisOrigin);\n // Apply the axis delta to the final axis\n applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);\n}\n/**\n * Apply a transform to a box from the latest resolved motion values.\n */\nfunction transformBox(box, transform) {\n transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);\n transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);\n}\n\nexport { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };\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","// Fixes https://github.com/framer/motion/issues/2270\nconst getContextWindow = ({ current }) => {\n return current ? current.ownerDocument.defaultView : null;\n};\n\nexport { getContextWindow };\n","import { invariant } from '../../utils/errors.mjs';\nimport { PanSession } from '../pan/PanSession.mjs';\nimport { getGlobalLock } from './utils/lock.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { applyConstraints, calcRelativeConstraints, resolveDragElastic, rebaseAxisConstraints, calcViewportConstraints, calcOrigin, defaultElastic } from './utils/constraints.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { eachAxis } from '../../projection/utils/each-axis.mjs';\nimport { measurePageBox } from '../../projection/utils/measure.mjs';\nimport { extractEventInfo } from '../../events/event-info.mjs';\nimport { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../projection/geometry/conversion.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\nimport { calcLength } from '../../projection/geometry/delta-calc.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst elementDragControls = new WeakMap();\n/**\n *\n */\n// let latestPointerEvent: PointerEvent\nclass VisualElementDragControls {\n constructor(visualElement) {\n // This is a reference to the global drag gesture lock, ensuring only one component\n // can \"capture\" the drag of one or both axes.\n // TODO: Look into moving this into pansession?\n this.openGlobalLock = null;\n this.isDragging = false;\n this.currentDirection = null;\n this.originPoint = { x: 0, y: 0 };\n /**\n * The permitted boundaries of travel, in pixels.\n */\n this.constraints = false;\n this.hasMutatedConstraints = false;\n /**\n * The per-axis resolved elastic values.\n */\n this.elastic = createBox();\n this.visualElement = visualElement;\n }\n start(originEvent, { snapToCursor = false } = {}) {\n /**\n * Don't start dragging if this component is exiting\n */\n const { presenceContext } = this.visualElement;\n if (presenceContext && presenceContext.isPresent === false)\n return;\n const onSessionStart = (event) => {\n const { dragSnapToOrigin } = this.getProps();\n // Stop or pause any animations on both axis values immediately. This allows the user to throw and catch\n // the component.\n dragSnapToOrigin ? this.pauseAnimation() : this.stopAnimation();\n if (snapToCursor) {\n this.snapToCursor(extractEventInfo(event, \"page\").point);\n }\n };\n const onStart = (event, info) => {\n // Attempt to grab the global drag gesture lock - maybe make this part of PanSession\n const { drag, dragPropagation, onDragStart } = this.getProps();\n if (drag && !dragPropagation) {\n if (this.openGlobalLock)\n this.openGlobalLock();\n this.openGlobalLock = getGlobalLock(drag);\n // If we don 't have the lock, don't start dragging\n if (!this.openGlobalLock)\n return;\n }\n this.isDragging = true;\n this.currentDirection = null;\n this.resolveConstraints();\n if (this.visualElement.projection) {\n this.visualElement.projection.isAnimationBlocked = true;\n this.visualElement.projection.target = undefined;\n }\n /**\n * Record gesture origin\n */\n eachAxis((axis) => {\n let current = this.getAxisMotionValue(axis).get() || 0;\n /**\n * If the MotionValue is a percentage value convert to px\n */\n if (percent.test(current)) {\n const { projection } = this.visualElement;\n if (projection && projection.layout) {\n const measuredAxis = projection.layout.layoutBox[axis];\n if (measuredAxis) {\n const length = calcLength(measuredAxis);\n current = length * (parseFloat(current) / 100);\n }\n }\n }\n this.originPoint[axis] = current;\n });\n // Fire onDragStart event\n if (onDragStart) {\n frame.postRender(() => onDragStart(event, info));\n }\n addValueToWillChange(this.visualElement, \"transform\");\n const { animationState } = this.visualElement;\n animationState && animationState.setActive(\"whileDrag\", true);\n };\n const onMove = (event, info) => {\n // latestPointerEvent = event\n const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();\n // If we didn't successfully receive the gesture lock, early return.\n if (!dragPropagation && !this.openGlobalLock)\n return;\n const { offset } = info;\n // Attempt to detect drag direction if directionLock is true\n if (dragDirectionLock && this.currentDirection === null) {\n this.currentDirection = getCurrentDirection(offset);\n // If we've successfully set a direction, notify listener\n if (this.currentDirection !== null) {\n onDirectionLock && onDirectionLock(this.currentDirection);\n }\n return;\n }\n // Update each point with the latest position\n this.updateAxis(\"x\", info.point, offset);\n this.updateAxis(\"y\", info.point, offset);\n /**\n * Ideally we would leave the renderer to fire naturally at the end of\n * this frame but if the element is about to change layout as the result\n * of a re-render we want to ensure the browser can read the latest\n * bounding box to ensure the pointer and element don't fall out of sync.\n */\n this.visualElement.render();\n /**\n * This must fire after the render call as it might trigger a state\n * change which itself might trigger a layout update.\n */\n onDrag && onDrag(event, info);\n };\n const onSessionEnd = (event, info) => this.stop(event, info);\n const resumeAnimation = () => eachAxis((axis) => {\n var _a;\n return this.getAnimationState(axis) === \"paused\" &&\n ((_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.play());\n });\n const { dragSnapToOrigin } = this.getProps();\n this.panSession = new PanSession(originEvent, {\n onSessionStart,\n onStart,\n onMove,\n onSessionEnd,\n resumeAnimation,\n }, {\n transformPagePoint: this.visualElement.getTransformPagePoint(),\n dragSnapToOrigin,\n contextWindow: getContextWindow(this.visualElement),\n });\n }\n stop(event, info) {\n const isDragging = this.isDragging;\n this.cancel();\n if (!isDragging)\n return;\n const { velocity } = info;\n this.startAnimation(velocity);\n const { onDragEnd } = this.getProps();\n if (onDragEnd) {\n frame.postRender(() => onDragEnd(event, info));\n }\n }\n cancel() {\n this.isDragging = false;\n const { projection, animationState } = this.visualElement;\n if (projection) {\n projection.isAnimationBlocked = false;\n }\n this.panSession && this.panSession.end();\n this.panSession = undefined;\n const { dragPropagation } = this.getProps();\n if (!dragPropagation && this.openGlobalLock) {\n this.openGlobalLock();\n this.openGlobalLock = null;\n }\n animationState && animationState.setActive(\"whileDrag\", false);\n }\n updateAxis(axis, _point, offset) {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!offset || !shouldDrag(axis, drag, this.currentDirection))\n return;\n const axisValue = this.getAxisMotionValue(axis);\n let next = this.originPoint[axis] + offset[axis];\n // Apply constraints\n if (this.constraints && this.constraints[axis]) {\n next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);\n }\n axisValue.set(next);\n }\n resolveConstraints() {\n var _a;\n const { dragConstraints, dragElastic } = this.getProps();\n const layout = this.visualElement.projection &&\n !this.visualElement.projection.layout\n ? this.visualElement.projection.measure(false)\n : (_a = this.visualElement.projection) === null || _a === void 0 ? void 0 : _a.layout;\n const prevConstraints = this.constraints;\n if (dragConstraints && isRefObject(dragConstraints)) {\n if (!this.constraints) {\n this.constraints = this.resolveRefConstraints();\n }\n }\n else {\n if (dragConstraints && layout) {\n this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);\n }\n else {\n this.constraints = false;\n }\n }\n this.elastic = resolveDragElastic(dragElastic);\n /**\n * If we're outputting to external MotionValues, we want to rebase the measured constraints\n * from viewport-relative to component-relative.\n */\n if (prevConstraints !== this.constraints &&\n layout &&\n this.constraints &&\n !this.hasMutatedConstraints) {\n eachAxis((axis) => {\n if (this.constraints !== false &&\n this.getAxisMotionValue(axis)) {\n this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);\n }\n });\n }\n }\n resolveRefConstraints() {\n const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();\n if (!constraints || !isRefObject(constraints))\n return false;\n const constraintsElement = constraints.current;\n invariant(constraintsElement !== null, \"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.\");\n const { projection } = this.visualElement;\n // TODO\n if (!projection || !projection.layout)\n return false;\n const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());\n let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);\n /**\n * If there's an onMeasureDragConstraints listener we call it and\n * if different constraints are returned, set constraints to that\n */\n if (onMeasureDragConstraints) {\n const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));\n this.hasMutatedConstraints = !!userConstraints;\n if (userConstraints) {\n measuredConstraints = convertBoundingBoxToBox(userConstraints);\n }\n }\n return measuredConstraints;\n }\n startAnimation(velocity) {\n const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();\n const constraints = this.constraints || {};\n const momentumAnimations = eachAxis((axis) => {\n if (!shouldDrag(axis, drag, this.currentDirection)) {\n return;\n }\n let transition = (constraints && constraints[axis]) || {};\n if (dragSnapToOrigin)\n transition = { min: 0, max: 0 };\n /**\n * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame\n * of spring animations so we should look into adding a disable spring option to `inertia`.\n * We could do something here where we affect the `bounceStiffness` and `bounceDamping`\n * using the value of `dragElastic`.\n */\n const bounceStiffness = dragElastic ? 200 : 1000000;\n const bounceDamping = dragElastic ? 40 : 10000000;\n const inertia = {\n type: \"inertia\",\n velocity: dragMomentum ? velocity[axis] : 0,\n bounceStiffness,\n bounceDamping,\n timeConstant: 750,\n restDelta: 1,\n restSpeed: 10,\n ...dragTransition,\n ...transition,\n };\n // If we're not animating on an externally-provided `MotionValue` we can use the\n // component's animation controls which will handle interactions with whileHover (etc),\n // otherwise we just have to animate the `MotionValue` itself.\n return this.startAxisValueAnimation(axis, inertia);\n });\n // Run all animations and then resolve the new drag constraints.\n return Promise.all(momentumAnimations).then(onDragTransitionEnd);\n }\n startAxisValueAnimation(axis, transition) {\n const axisValue = this.getAxisMotionValue(axis);\n addValueToWillChange(this.visualElement, axis);\n return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));\n }\n stopAnimation() {\n eachAxis((axis) => this.getAxisMotionValue(axis).stop());\n }\n pauseAnimation() {\n eachAxis((axis) => { var _a; return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.pause(); });\n }\n getAnimationState(axis) {\n var _a;\n return (_a = this.getAxisMotionValue(axis).animation) === null || _a === void 0 ? void 0 : _a.state;\n }\n /**\n * Drag works differently depending on which props are provided.\n *\n * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.\n * - Otherwise, we apply the delta to the x/y motion values.\n */\n getAxisMotionValue(axis) {\n const dragKey = `_drag${axis.toUpperCase()}`;\n const props = this.visualElement.getProps();\n const externalMotionValue = props[dragKey];\n return externalMotionValue\n ? externalMotionValue\n : this.visualElement.getValue(axis, (props.initial\n ? props.initial[axis]\n : undefined) || 0);\n }\n snapToCursor(point) {\n eachAxis((axis) => {\n const { drag } = this.getProps();\n // If we're not dragging this axis, do an early return.\n if (!shouldDrag(axis, drag, this.currentDirection))\n return;\n const { projection } = this.visualElement;\n const axisValue = this.getAxisMotionValue(axis);\n if (projection && projection.layout) {\n const { min, max } = projection.layout.layoutBox[axis];\n axisValue.set(point[axis] - mixNumber(min, max, 0.5));\n }\n });\n }\n /**\n * When the viewport resizes we want to check if the measured constraints\n * have changed and, if so, reposition the element within those new constraints\n * relative to where it was before the resize.\n */\n scalePositionWithinConstraints() {\n if (!this.visualElement.current)\n return;\n const { drag, dragConstraints } = this.getProps();\n const { projection } = this.visualElement;\n if (!isRefObject(dragConstraints) || !projection || !this.constraints)\n return;\n /**\n * Stop current animations as there can be visual glitching if we try to do\n * this mid-animation\n */\n this.stopAnimation();\n /**\n * Record the relative position of the dragged element relative to the\n * constraints box and save as a progress value.\n */\n const boxProgress = { x: 0, y: 0 };\n eachAxis((axis) => {\n const axisValue = this.getAxisMotionValue(axis);\n if (axisValue && this.constraints !== false) {\n const latest = axisValue.get();\n boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);\n }\n });\n /**\n * Update the layout of this element and resolve the latest drag constraints\n */\n const { transformTemplate } = this.visualElement.getProps();\n this.visualElement.current.style.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n this.resolveConstraints();\n /**\n * For each axis, calculate the current progress of the layout axis\n * within the new constraints.\n */\n eachAxis((axis) => {\n if (!shouldDrag(axis, drag, null))\n return;\n /**\n * Calculate a new transform based on the previous box progress\n */\n const axisValue = this.getAxisMotionValue(axis);\n const { min, max } = this.constraints[axis];\n axisValue.set(mixNumber(min, max, boxProgress[axis]));\n });\n }\n addListeners() {\n if (!this.visualElement.current)\n return;\n elementDragControls.set(this.visualElement, this);\n const element = this.visualElement.current;\n /**\n * Attach a pointerdown event listener on this DOM element to initiate drag tracking.\n */\n const stopPointerListener = addPointerEvent(element, \"pointerdown\", (event) => {\n const { drag, dragListener = true } = this.getProps();\n drag && dragListener && this.start(event);\n });\n const measureDragConstraints = () => {\n const { dragConstraints } = this.getProps();\n if (isRefObject(dragConstraints) && dragConstraints.current) {\n this.constraints = this.resolveRefConstraints();\n }\n };\n const { projection } = this.visualElement;\n const stopMeasureLayoutListener = projection.addEventListener(\"measure\", measureDragConstraints);\n if (projection && !projection.layout) {\n projection.root && projection.root.updateScroll();\n projection.updateLayout();\n }\n frame.read(measureDragConstraints);\n /**\n * Attach a window resize listener to scale the draggable target within its defined\n * constraints as the window resizes.\n */\n const stopResizeListener = addDomEvent(window, \"resize\", () => this.scalePositionWithinConstraints());\n /**\n * If the element's layout changes, calculate the delta and apply that to\n * the drag gesture's origin point.\n */\n const stopLayoutUpdateListener = projection.addEventListener(\"didUpdate\", (({ delta, hasLayoutChanged }) => {\n if (this.isDragging && hasLayoutChanged) {\n eachAxis((axis) => {\n const motionValue = this.getAxisMotionValue(axis);\n if (!motionValue)\n return;\n this.originPoint[axis] += delta[axis].translate;\n motionValue.set(motionValue.get() + delta[axis].translate);\n });\n this.visualElement.render();\n }\n }));\n return () => {\n stopResizeListener();\n stopPointerListener();\n stopMeasureLayoutListener();\n stopLayoutUpdateListener && stopLayoutUpdateListener();\n };\n }\n getProps() {\n const props = this.visualElement.getProps();\n const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;\n return {\n ...props,\n drag,\n dragDirectionLock,\n dragPropagation,\n dragConstraints,\n dragElastic,\n dragMomentum,\n };\n }\n}\nfunction shouldDrag(direction, drag, currentDirection) {\n return ((drag === true || drag === direction) &&\n (currentDirection === null || currentDirection === direction));\n}\n/**\n * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower\n * than the provided threshold, return `null`.\n *\n * @param offset - The x/y offset from origin.\n * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.\n */\nfunction getCurrentDirection(offset, lockThreshold = 10) {\n let direction = null;\n if (Math.abs(offset.y) > lockThreshold) {\n direction = \"y\";\n }\n else if (Math.abs(offset.x) > lockThreshold) {\n direction = \"x\";\n }\n return direction;\n}\n\nexport { VisualElementDragControls, elementDragControls };\n","import { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n }\n}\n\nexport { DragGesture };\n","import { PanSession } from './PanSession.mjs';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { Feature } from '../../motion/features/Feature.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.postRender(() => handler(event, info));\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: onPan,\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst PresenceContext = createContext(null);\n\nexport { PresenceContext };\n","import { useContext, useId, useEffect, useCallback } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\n\n/**\n * When a component is the child of `AnimatePresence`, it can use `usePresence`\n * to access information about whether it's still present in the React tree.\n *\n * ```jsx\n * import { usePresence } from \"framer-motion\"\n *\n * export const Component = () => {\n * const [isPresent, safeToRemove] = usePresence()\n *\n * useEffect(() => {\n * !isPresent && setTimeout(safeToRemove, 1000)\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * If `isPresent` is `false`, it means that a component has been removed the tree, but\n * `AnimatePresence` won't really remove it until `safeToRemove` has been called.\n *\n * @public\n */\nfunction usePresence() {\n const context = useContext(PresenceContext);\n if (context === null)\n return [true, null];\n const { isPresent, onExitComplete, register } = context;\n // It's safe to call the following hooks conditionally (after an early return) because the context will always\n // either be null or non-null for the lifespan of the component.\n const id = useId();\n useEffect(() => register(id), []);\n const safeToRemove = useCallback(() => onExitComplete && onExitComplete(id), [id, onExitComplete]);\n return !isPresent && onExitComplete ? [false, safeToRemove] : [true];\n}\n/**\n * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.\n * There is no `safeToRemove` function.\n *\n * ```jsx\n * import { useIsPresent } from \"framer-motion\"\n *\n * export const Component = () => {\n * const isPresent = useIsPresent()\n *\n * useEffect(() => {\n * !isPresent && console.log(\"I've been removed!\")\n * }, [isPresent])\n *\n * return <div />\n * }\n * ```\n *\n * @public\n */\nfunction useIsPresent() {\n return isPresent(useContext(PresenceContext));\n}\nfunction isPresent(context) {\n return context === null ? true : context.isPresent;\n}\n\nexport { isPresent, useIsPresent, usePresence };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = createContext({});\n\nexport { LayoutGroupContext };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = createContext({});\n\nexport { SwitchLayoutGroupContext };\n","/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nconst globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n};\n\nexport { globalProjectionState };\n","import { px } from '../../value/types/numbers/units.mjs';\n\nfunction pixelsToPercent(pixels, axis) {\n if (axis.max === axis.min)\n return 0;\n return (pixels / (axis.max - axis.min)) * 100;\n}\n/**\n * We always correct borderRadius as a percentage rather than pixels to reduce paints.\n * For example, if you are projecting a box that is 100px wide with a 10px borderRadius\n * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%\n * borderRadius in both states. If we animate between the two in pixels that will trigger\n * a paint each time. If we animate between the two in percentage we'll avoid a paint.\n */\nconst correctBorderRadius = {\n correct: (latest, node) => {\n if (!node.target)\n return latest;\n /**\n * If latest is a string, if it's a percentage we can return immediately as it's\n * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.\n */\n if (typeof latest === \"string\") {\n if (px.test(latest)) {\n latest = parseFloat(latest);\n }\n else {\n return latest;\n }\n }\n /**\n * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that\n * pixel value as a percentage of each axis\n */\n const x = pixelsToPercent(latest, node.target.x);\n const y = pixelsToPercent(latest, node.target.y);\n return `${x}% ${y}%`;\n },\n};\n\nexport { correctBorderRadius, pixelsToPercent };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { complex } from '../../value/types/complex/index.mjs';\n\nconst correctBoxShadow = {\n correct: (latest, { treeScale, projectionDelta }) => {\n const original = latest;\n const shadow = complex.parse(latest);\n // TODO: Doesn't support multiple shadows\n if (shadow.length > 5)\n return original;\n const template = complex.createTransformer(latest);\n const offset = typeof shadow[0] !== \"number\" ? 1 : 0;\n // Calculate the overall context scale\n const xScale = projectionDelta.x.scale * treeScale.x;\n const yScale = projectionDelta.y.scale * treeScale.y;\n shadow[0 + offset] /= xScale;\n shadow[1 + offset] /= yScale;\n /**\n * Ideally we'd correct x and y scales individually, but because blur and\n * spread apply to both we have to take a scale average and apply that instead.\n * We could potentially improve the outcome of this by incorporating the ratio between\n * the two scales.\n */\n const averageScale = mixNumber(xScale, yScale, 0.5);\n // Blur\n if (typeof shadow[2 + offset] === \"number\")\n shadow[2 + offset] /= averageScale;\n // Spread\n if (typeof shadow[3 + offset] === \"number\")\n shadow[3 + offset] /= averageScale;\n return template(shadow);\n },\n};\n\nexport { correctBoxShadow };\n","const scaleCorrectors = {};\nfunction addScaleCorrector(correctors) {\n Object.assign(scaleCorrectors, correctors);\n}\n\nexport { addScaleCorrector, scaleCorrectors };\n","import { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);\n\nexport { cancelMicrotask, microtask };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, Component } from 'react';\nimport { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';\nimport { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';\nimport { SwitchLayoutGroupContext } from '../../../context/SwitchLayoutGroupContext.mjs';\nimport { globalProjectionState } from '../../../projection/node/state.mjs';\nimport { correctBorderRadius } from '../../../projection/styles/scale-border-radius.mjs';\nimport { correctBoxShadow } from '../../../projection/styles/scale-box-shadow.mjs';\nimport { addScaleCorrector } from '../../../projection/styles/scale-correction.mjs';\nimport { microtask } from '../../../frameloop/microtask.mjs';\nimport { frame } from '../../../frameloop/frame.mjs';\n\nclass MeasureLayoutWithContext extends Component {\n /**\n * This only mounts projection nodes for components that\n * need measuring, we might want to do it for all components\n * in order to incorporate transforms\n */\n componentDidMount() {\n const { visualElement, layoutGroup, switchLayoutGroup, layoutId } = this.props;\n const { projection } = visualElement;\n addScaleCorrector(defaultScaleCorrectors);\n if (projection) {\n if (layoutGroup.group)\n layoutGroup.group.add(projection);\n if (switchLayoutGroup && switchLayoutGroup.register && layoutId) {\n switchLayoutGroup.register(projection);\n }\n projection.root.didUpdate();\n projection.addEventListener(\"animationComplete\", () => {\n this.safeToRemove();\n });\n projection.setOptions({\n ...projection.options,\n onExitComplete: () => this.safeToRemove(),\n });\n }\n globalProjectionState.hasEverUpdated = true;\n }\n getSnapshotBeforeUpdate(prevProps) {\n const { layoutDependency, visualElement, drag, isPresent } = this.props;\n const projection = visualElement.projection;\n if (!projection)\n return null;\n /**\n * TODO: We use this data in relegate to determine whether to\n * promote a previous element. There's no guarantee its presence data\n * will have updated by this point - if a bug like this arises it will\n * have to be that we markForRelegation and then find a new lead some other way,\n * perhaps in didUpdate\n */\n projection.isPresent = isPresent;\n if (drag ||\n prevProps.layoutDependency !== layoutDependency ||\n layoutDependency === undefined) {\n projection.willUpdate();\n }\n else {\n this.safeToRemove();\n }\n if (prevProps.isPresent !== isPresent) {\n if (isPresent) {\n projection.promote();\n }\n else if (!projection.relegate()) {\n /**\n * If there's another stack member taking over from this one,\n * it's in charge of the exit animation and therefore should\n * be in charge of the safe to remove. Otherwise we call it here.\n */\n frame.postRender(() => {\n const stack = projection.getStack();\n if (!stack || !stack.members.length) {\n this.safeToRemove();\n }\n });\n }\n }\n return null;\n }\n componentDidUpdate() {\n const { projection } = this.props.visualElement;\n if (projection) {\n projection.root.didUpdate();\n microtask.postRender(() => {\n if (!projection.currentAnimation && projection.isLead()) {\n this.safeToRemove();\n }\n });\n }\n }\n componentWillUnmount() {\n const { visualElement, layoutGroup, switchLayoutGroup: promoteContext, } = this.props;\n const { projection } = visualElement;\n if (projection) {\n projection.scheduleCheckAfterUnmount();\n if (layoutGroup && layoutGroup.group)\n layoutGroup.group.remove(projection);\n if (promoteContext && promoteContext.deregister)\n promoteContext.deregister(projection);\n }\n }\n safeToRemove() {\n const { safeToRemove } = this.props;\n safeToRemove && safeToRemove();\n }\n render() {\n return null;\n }\n}\nfunction MeasureLayout(props) {\n const [isPresent, safeToRemove] = usePresence();\n const layoutGroup = useContext(LayoutGroupContext);\n return (jsx(MeasureLayoutWithContext, { ...props, layoutGroup: layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent: isPresent, safeToRemove: safeToRemove }));\n}\nconst defaultScaleCorrectors = {\n borderRadius: {\n ...correctBorderRadius,\n applyTo: [\n \"borderTopLeftRadius\",\n \"borderTopRightRadius\",\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\",\n ],\n },\n borderTopLeftRadius: correctBorderRadius,\n borderTopRightRadius: correctBorderRadius,\n borderBottomLeftRadius: correctBorderRadius,\n borderBottomRightRadius: correctBorderRadius,\n boxShadow: correctBoxShadow,\n};\n\nexport { MeasureLayout };\n","import { circOut } from '../../easing/circ.mjs';\nimport { progress } from '../../utils/progress.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { percent, px } from '../../value/types/numbers/units.mjs';\n\nconst borders = [\"TopLeft\", \"TopRight\", \"BottomLeft\", \"BottomRight\"];\nconst numBorders = borders.length;\nconst asNumber = (value) => typeof value === \"string\" ? parseFloat(value) : value;\nconst isPx = (value) => typeof value === \"number\" || px.test(value);\nfunction mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) {\n if (shouldCrossfadeOpacity) {\n target.opacity = mixNumber(0, \n // TODO Reinstate this if only child\n lead.opacity !== undefined ? lead.opacity : 1, easeCrossfadeIn(progress));\n target.opacityExit = mixNumber(follow.opacity !== undefined ? follow.opacity : 1, 0, easeCrossfadeOut(progress));\n }\n else if (isOnlyMember) {\n target.opacity = mixNumber(follow.opacity !== undefined ? follow.opacity : 1, lead.opacity !== undefined ? lead.opacity : 1, progress);\n }\n /**\n * Mix border radius\n */\n for (let i = 0; i < numBorders; i++) {\n const borderLabel = `border${borders[i]}Radius`;\n let followRadius = getRadius(follow, borderLabel);\n let leadRadius = getRadius(lead, borderLabel);\n if (followRadius === undefined && leadRadius === undefined)\n continue;\n followRadius || (followRadius = 0);\n leadRadius || (leadRadius = 0);\n const canMix = followRadius === 0 ||\n leadRadius === 0 ||\n isPx(followRadius) === isPx(leadRadius);\n if (canMix) {\n target[borderLabel] = Math.max(mixNumber(asNumber(followRadius), asNumber(leadRadius), progress), 0);\n if (percent.test(leadRadius) || percent.test(followRadius)) {\n target[borderLabel] += \"%\";\n }\n }\n else {\n target[borderLabel] = leadRadius;\n }\n }\n /**\n * Mix rotation\n */\n if (follow.rotate || lead.rotate) {\n target.rotate = mixNumber(follow.rotate || 0, lead.rotate || 0, progress);\n }\n}\nfunction getRadius(values, radiusName) {\n return values[radiusName] !== undefined\n ? values[radiusName]\n : values.borderRadius;\n}\n// /**\n// * We only want to mix the background color if there's a follow element\n// * that we're not crossfading opacity between. For instance with switch\n// * AnimateSharedLayout animations, this helps the illusion of a continuous\n// * element being animated but also cuts down on the number of paints triggered\n// * for elements where opacity is doing that work for us.\n// */\n// if (\n// !hasFollowElement &&\n// latestLeadValues.backgroundColor &&\n// latestFollowValues.backgroundColor\n// ) {\n// /**\n// * This isn't ideal performance-wise as mixColor is creating a new function every frame.\n// * We could probably create a mixer that runs at the start of the animation but\n// * the idea behind the crossfader is that it runs dynamically between two potentially\n// * changing targets (ie opacity or borderRadius may be animating independently via variants)\n// */\n// leadState.backgroundColor = followState.backgroundColor = mixColor(\n// latestFollowValues.backgroundColor as string,\n// latestLeadValues.backgroundColor as string\n// )(p)\n// }\nconst easeCrossfadeIn = /*@__PURE__*/ compress(0, 0.5, circOut);\nconst easeCrossfadeOut = /*@__PURE__*/ compress(0.5, 0.95, noop);\nfunction compress(min, max, easing) {\n return (p) => {\n // Could replace ifs with clamp\n if (p < min)\n return 0;\n if (p > max)\n return 1;\n return easing(progress(min, max, p));\n };\n}\n\nexport { mixValues };\n","/**\n * Reset an axis to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}\n/**\n * Reset a box to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyBoxInto(box, originBox) {\n copyAxisInto(box.x, originBox.x);\n copyAxisInto(box.y, originBox.y);\n}\n/**\n * Reset a delta to the provided origin box.\n *\n * This is a mutative operation.\n */\nfunction copyAxisDeltaInto(delta, originDelta) {\n delta.translate = originDelta.translate;\n delta.scale = originDelta.scale;\n delta.originPoint = originDelta.originPoint;\n delta.origin = originDelta.origin;\n}\n\nexport { copyAxisDeltaInto, copyAxisInto, copyBoxInto };\n","import { mixNumber } from '../../utils/mix/number.mjs';\nimport { percent } from '../../value/types/numbers/units.mjs';\nimport { scalePoint } from './delta-apply.mjs';\n\n/**\n * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse\n */\nfunction removePointDelta(point, translate, scale, originPoint, boxScale) {\n point -= translate;\n point = scalePoint(point, 1 / scale, originPoint);\n if (boxScale !== undefined) {\n point = scalePoint(point, 1 / boxScale, originPoint);\n }\n return point;\n}\n/**\n * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse\n */\nfunction removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {\n if (percent.test(translate)) {\n translate = parseFloat(translate);\n const relativeProgress = mixNumber(sourceAxis.min, sourceAxis.max, translate / 100);\n translate = relativeProgress - sourceAxis.min;\n }\n if (typeof translate !== \"number\")\n return;\n let originPoint = mixNumber(originAxis.min, originAxis.max, origin);\n if (axis === originAxis)\n originPoint -= translate;\n axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);\n axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);\n}\n/**\n * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {\n removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);\n}\n/**\n * The names of the motion values we want to apply as translation, scale and origin.\n */\nconst xKeys = [\"x\", \"scaleX\", \"originX\"];\nconst yKeys = [\"y\", \"scaleY\", \"originY\"];\n/**\n * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse\n * and acts as a bridge between motion values and removeAxisDelta\n */\nfunction removeBoxTransforms(box, transforms, originBox, sourceBox) {\n removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);\n removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);\n}\n\nexport { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };\n","import { calcLength } from './delta-calc.mjs';\n\nfunction isAxisDeltaZero(delta) {\n return delta.translate === 0 && delta.scale === 1;\n}\nfunction isDeltaZero(delta) {\n return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y);\n}\nfunction axisEquals(a, b) {\n return a.min === b.min && a.max === b.max;\n}\nfunction boxEquals(a, b) {\n return axisEquals(a.x, b.x) && axisEquals(a.y, b.y);\n}\nfunction axisEqualsRounded(a, b) {\n return (Math.round(a.min) === Math.round(b.min) &&\n Math.round(a.max) === Math.round(b.max));\n}\nfunction boxEqualsRounded(a, b) {\n return axisEqualsRounded(a.x, b.x) && axisEqualsRounded(a.y, b.y);\n}\nfunction aspectRatio(box) {\n return calcLength(box.x) / calcLength(box.y);\n}\nfunction axisDeltaEquals(a, b) {\n return (a.translate === b.translate &&\n a.scale === b.scale &&\n a.originPoint === b.originPoint);\n}\n\nexport { aspectRatio, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, isDeltaZero };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\n\nclass NodeStack {\n constructor() {\n this.members = [];\n }\n add(node) {\n addUniqueItem(this.members, node);\n node.scheduleRender();\n }\n remove(node) {\n removeItem(this.members, node);\n if (node === this.prevLead) {\n this.prevLead = undefined;\n }\n if (node === this.lead) {\n const prevLead = this.members[this.members.length - 1];\n if (prevLead) {\n this.promote(prevLead);\n }\n }\n }\n relegate(node) {\n const indexOfNode = this.members.findIndex((member) => node === member);\n if (indexOfNode === 0)\n return false;\n /**\n * Find the next projection node that is present\n */\n let prevLead;\n for (let i = indexOfNode; i >= 0; i--) {\n const member = this.members[i];\n if (member.isPresent !== false) {\n prevLead = member;\n break;\n }\n }\n if (prevLead) {\n this.promote(prevLead);\n return true;\n }\n else {\n return false;\n }\n }\n promote(node, preserveFollowOpacity) {\n const prevLead = this.lead;\n if (node === prevLead)\n return;\n this.prevLead = prevLead;\n this.lead = node;\n node.show();\n if (prevLead) {\n prevLead.instance && prevLead.scheduleRender();\n node.scheduleRender();\n node.resumeFrom = prevLead;\n if (preserveFollowOpacity) {\n node.resumeFrom.preserveOpacity = true;\n }\n if (prevLead.snapshot) {\n node.snapshot = prevLead.snapshot;\n node.snapshot.latestValues =\n prevLead.animationValues || prevLead.latestValues;\n }\n if (node.root && node.root.isUpdating) {\n node.isLayoutDirty = true;\n }\n const { crossfade } = node.options;\n if (crossfade === false) {\n prevLead.hide();\n }\n /**\n * TODO:\n * - Test border radius when previous node was deleted\n * - boxShadow mixing\n * - Shared between element A in scrolled container and element B (scroll stays the same or changes)\n * - Shared between element A in transformed container and element B (transform stays the same or changes)\n * - Shared between element A in scrolled page and element B (scroll stays the same or changes)\n * ---\n * - Crossfade opacity of root nodes\n * - layoutId changes after animation\n * - layoutId changes mid animation\n */\n }\n }\n exitAnimationComplete() {\n this.members.forEach((node) => {\n const { options, resumingFrom } = node;\n options.onExitComplete && options.onExitComplete();\n if (resumingFrom) {\n resumingFrom.options.onExitComplete &&\n resumingFrom.options.onExitComplete();\n }\n });\n }\n scheduleRender() {\n this.members.forEach((node) => {\n node.instance && node.scheduleRender(false);\n });\n }\n /**\n * Clear any leads that have been removed this render to prevent them from being\n * used in future animations and to prevent memory leaks\n */\n removeLeadSnapshot() {\n if (this.lead && this.lead.snapshot) {\n this.lead.snapshot = undefined;\n }\n }\n}\n\nexport { NodeStack };\n","function buildProjectionTransform(delta, treeScale, latestTransform) {\n let transform = \"\";\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x;\n const yTranslate = delta.y.translate / treeScale.y;\n const zTranslate = (latestTransform === null || latestTransform === void 0 ? void 0 : latestTransform.z) || 0;\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `;\n }\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;\n }\n if (latestTransform) {\n const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } = latestTransform;\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`;\n if (rotate)\n transform += `rotate(${rotate}deg) `;\n if (rotateX)\n transform += `rotateX(${rotateX}deg) `;\n if (rotateY)\n transform += `rotateY(${rotateY}deg) `;\n if (skewX)\n transform += `skewX(${skewX}deg) `;\n if (skewY)\n transform += `skewY(${skewY}deg) `;\n }\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x;\n const elementScaleY = delta.y.scale * treeScale.y;\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`;\n }\n return transform || \"none\";\n}\n\nexport { buildProjectionTransform };\n","const compareByDepth = (a, b) => a.depth - b.depth;\n\nexport { compareByDepth };\n","import { addUniqueItem, removeItem } from '../../utils/array.mjs';\nimport { compareByDepth } from './compare-by-depth.mjs';\n\nclass FlatTree {\n constructor() {\n this.children = [];\n this.isDirty = false;\n }\n add(child) {\n addUniqueItem(this.children, child);\n this.isDirty = true;\n }\n remove(child) {\n removeItem(this.children, child);\n this.isDirty = true;\n }\n forEach(callback) {\n this.isDirty && this.children.sort(compareByDepth);\n this.isDirty = false;\n this.children.forEach(callback);\n }\n}\n\nexport { FlatTree };\n","import { isCustomValue } from '../../utils/resolve-value.mjs';\nimport { isMotionValue } from './is-motion-value.mjs';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nfunction resolveMotionValue(value) {\n const unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { time } from '../frameloop/sync-time.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\n/**\n * Timeout defined in ms\n */\nfunction delay(callback, timeout) {\n const start = time.now();\n const checkElapsed = ({ timestamp }) => {\n const elapsed = timestamp - start;\n if (elapsed >= timeout) {\n cancelFrame(checkElapsed);\n callback(elapsed - timeout);\n }\n };\n frame.read(checkElapsed, true);\n return () => cancelFrame(checkElapsed);\n}\n\nexport { delay };\n","function isSVGElement(element) {\n return element instanceof SVGElement && element.tagName !== \"svg\";\n}\n\nexport { isSVGElement };\n","import { animateMotionValue } from './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","import { SubscriptionManager } from '../../utils/subscription-manager.mjs';\nimport { mixValues } from '../animation/mix-values.mjs';\nimport { copyBoxInto, copyAxisDeltaInto } from '../geometry/copy.mjs';\nimport { translateAxis, transformBox, applyBoxDelta, applyTreeDeltas } from '../geometry/delta-apply.mjs';\nimport { calcRelativePosition, calcRelativeBox, calcBoxDelta, calcLength, isNear } from '../geometry/delta-calc.mjs';\nimport { removeBoxTransforms } from '../geometry/delta-remove.mjs';\nimport { getValueTransition } from '../../animation/utils/transitions.mjs';\nimport { boxEqualsRounded, isDeltaZero, axisDeltaEquals, aspectRatio, boxEquals } from '../geometry/utils.mjs';\nimport { NodeStack } from '../shared/stack.mjs';\nimport { scaleCorrectors } from '../styles/scale-correction.mjs';\nimport { buildProjectionTransform } from '../styles/transform.mjs';\nimport { eachAxis } from '../utils/each-axis.mjs';\nimport { hasTransform, hasScale, has2DTranslate } from '../utils/has-transform.mjs';\nimport { FlatTree } from '../../render/utils/flat-tree.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { globalProjectionState } from './state.mjs';\nimport { delay } from '../../utils/delay.mjs';\nimport { mixNumber } from '../../utils/mix/number.mjs';\nimport { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';\nimport { animateSingleValue } from '../../animation/interfaces/single-value.mjs';\nimport { clamp } from '../../utils/clamp.mjs';\nimport { cancelFrame, frameData, frameSteps, frame } from '../../frameloop/frame.mjs';\nimport { noop } from '../../utils/noop.mjs';\nimport { time } from '../../frameloop/sync-time.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\nimport { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs';\nimport { createBox, createDelta } from '../geometry/models.mjs';\n\nconst metrics = {\n type: \"projectionFrame\",\n totalNodes: 0,\n resolvedTargetDeltas: 0,\n recalculatedProjection: 0,\n};\nconst isDebug = typeof window !== \"undefined\" && window.MotionDebug !== undefined;\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\nconst hiddenVisibility = { visibility: \"hidden\" };\n/**\n * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1\n * which has a noticeable difference in spring animations\n */\nconst animationTarget = 1000;\nlet id = 0;\nfunction resetDistortingTransform(key, visualElement, values, sharedAnimationValues) {\n const { latestValues } = visualElement;\n // Record the distorting transform and then temporarily set it to 0\n if (latestValues[key]) {\n values[key] = latestValues[key];\n visualElement.setStaticValue(key, 0);\n if (sharedAnimationValues) {\n sharedAnimationValues[key] = 0;\n }\n }\n}\nfunction cancelTreeOptimisedTransformAnimations(projectionNode) {\n projectionNode.hasCheckedOptimisedAppear = true;\n if (projectionNode.root === projectionNode)\n return;\n const { visualElement } = projectionNode.options;\n if (!visualElement)\n return;\n const appearId = getOptimisedAppearId(visualElement);\n if (window.MotionHasOptimisedAnimation(appearId, \"transform\")) {\n const { layout, layoutId } = projectionNode.options;\n window.MotionCancelOptimisedAnimation(appearId, \"transform\", frame, !(layout || layoutId));\n }\n const { parent } = projectionNode;\n if (parent && !parent.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(parent);\n }\n}\nfunction createProjectionNode({ attachResizeListener, defaultParent, measureScroll, checkIsScrollRoot, resetTransform, }) {\n return class ProjectionNode {\n constructor(latestValues = {}, parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent()) {\n /**\n * A unique ID generated for every projection node.\n */\n this.id = id++;\n /**\n * An id that represents a unique session instigated by startUpdate.\n */\n this.animationId = 0;\n /**\n * A Set containing all this component's children. This is used to iterate\n * through the children.\n *\n * TODO: This could be faster to iterate as a flat array stored on the root node.\n */\n this.children = new Set();\n /**\n * Options for the node. We use this to configure what kind of layout animations\n * we should perform (if any).\n */\n this.options = {};\n /**\n * We use this to detect when its safe to shut down part of a projection tree.\n * We have to keep projecting children for scale correction and relative projection\n * until all their parents stop performing layout animations.\n */\n this.isTreeAnimating = false;\n this.isAnimationBlocked = false;\n /**\n * Flag to true if we think this layout has been changed. We can't always know this,\n * currently we set it to true every time a component renders, or if it has a layoutDependency\n * if that has changed between renders. Additionally, components can be grouped by LayoutGroup\n * and if one node is dirtied, they all are.\n */\n this.isLayoutDirty = false;\n /**\n * Flag to true if we think the projection calculations for this node needs\n * recalculating as a result of an updated transform or layout animation.\n */\n this.isProjectionDirty = false;\n /**\n * Flag to true if the layout *or* transform has changed. This then gets propagated\n * throughout the projection tree, forcing any element below to recalculate on the next frame.\n */\n this.isSharedProjectionDirty = false;\n /**\n * Flag transform dirty. This gets propagated throughout the whole tree but is only\n * respected by shared nodes.\n */\n this.isTransformDirty = false;\n /**\n * Block layout updates for instant layout transitions throughout the tree.\n */\n this.updateManuallyBlocked = false;\n this.updateBlockedByResize = false;\n /**\n * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate`\n * call.\n */\n this.isUpdating = false;\n /**\n * If this is an SVG element we currently disable projection transforms\n */\n this.isSVG = false;\n /**\n * Flag to true (during promotion) if a node doing an instant layout transition needs to reset\n * its projection styles.\n */\n this.needsReset = false;\n /**\n * Flags whether this node should have its transform reset prior to measuring.\n */\n this.shouldResetTransform = false;\n /**\n * Store whether this node has been checked for optimised appear animations. As\n * effects fire bottom-up, and we want to look up the tree for appear animations,\n * this makes sure we only check each path once, stopping at nodes that\n * have already been checked.\n */\n this.hasCheckedOptimisedAppear = false;\n /**\n * An object representing the calculated contextual/accumulated/tree scale.\n * This will be used to scale calculcated projection transforms, as these are\n * calculated in screen-space but need to be scaled for elements to layoutly\n * make it to their calculated destinations.\n *\n * TODO: Lazy-init\n */\n this.treeScale = { x: 1, y: 1 };\n /**\n *\n */\n this.eventHandlers = new Map();\n this.hasTreeAnimated = false;\n // Note: Currently only running on root node\n this.updateScheduled = false;\n this.scheduleUpdate = () => this.update();\n this.projectionUpdateScheduled = false;\n this.checkUpdateFailed = () => {\n if (this.isUpdating) {\n this.isUpdating = false;\n this.clearAllSnapshots();\n }\n };\n /**\n * This is a multi-step process as shared nodes might be of different depths. Nodes\n * are sorted by depth order, so we need to resolve the entire tree before moving to\n * the next step.\n */\n this.updateProjection = () => {\n this.projectionUpdateScheduled = false;\n /**\n * Reset debug counts. Manually resetting rather than creating a new\n * object each frame.\n */\n if (isDebug) {\n metrics.totalNodes =\n metrics.resolvedTargetDeltas =\n metrics.recalculatedProjection =\n 0;\n }\n this.nodes.forEach(propagateDirtyNodes);\n this.nodes.forEach(resolveTargetDelta);\n this.nodes.forEach(calcProjection);\n this.nodes.forEach(cleanDirtyNodes);\n if (isDebug) {\n window.MotionDebug.record(metrics);\n }\n };\n /**\n * Frame calculations\n */\n this.resolvedRelativeTargetAt = 0.0;\n this.hasProjected = false;\n this.isVisible = true;\n this.animationProgress = 0;\n /**\n * Shared layout\n */\n // TODO Only running on root node\n this.sharedNodes = new Map();\n this.latestValues = latestValues;\n this.root = parent ? parent.root || parent : this;\n this.path = parent ? [...parent.path, parent] : [];\n this.parent = parent;\n this.depth = parent ? parent.depth + 1 : 0;\n for (let i = 0; i < this.path.length; i++) {\n this.path[i].shouldResetTransform = true;\n }\n if (this.root === this)\n this.nodes = new FlatTree();\n }\n addEventListener(name, handler) {\n if (!this.eventHandlers.has(name)) {\n this.eventHandlers.set(name, new SubscriptionManager());\n }\n return this.eventHandlers.get(name).add(handler);\n }\n notifyListeners(name, ...args) {\n const subscriptionManager = this.eventHandlers.get(name);\n subscriptionManager && subscriptionManager.notify(...args);\n }\n hasListeners(name) {\n return this.eventHandlers.has(name);\n }\n /**\n * Lifecycles\n */\n mount(instance, isLayoutDirty = this.root.hasTreeAnimated) {\n if (this.instance)\n return;\n this.isSVG = isSVGElement(instance);\n this.instance = instance;\n const { layoutId, layout, visualElement } = this.options;\n if (visualElement && !visualElement.current) {\n visualElement.mount(instance);\n }\n this.root.nodes.add(this);\n this.parent && this.parent.children.add(this);\n if (isLayoutDirty && (layout || layoutId)) {\n this.isLayoutDirty = true;\n }\n if (attachResizeListener) {\n let cancelDelay;\n const resizeUnblockUpdate = () => (this.root.updateBlockedByResize = false);\n attachResizeListener(instance, () => {\n this.root.updateBlockedByResize = true;\n cancelDelay && cancelDelay();\n cancelDelay = delay(resizeUnblockUpdate, 250);\n if (globalProjectionState.hasAnimatedSinceResize) {\n globalProjectionState.hasAnimatedSinceResize = false;\n this.nodes.forEach(finishAnimation);\n }\n });\n }\n if (layoutId) {\n this.root.registerSharedNode(layoutId, this);\n }\n // Only register the handler if it requires layout animation\n if (this.options.animate !== false &&\n visualElement &&\n (layoutId || layout)) {\n this.addEventListener(\"didUpdate\", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout, }) => {\n if (this.isTreeAnimationBlocked()) {\n this.target = undefined;\n this.relativeTarget = undefined;\n return;\n }\n // TODO: Check here if an animation exists\n const layoutTransition = this.options.transition ||\n visualElement.getDefaultTransition() ||\n defaultLayoutTransition;\n const { onLayoutAnimationStart, onLayoutAnimationComplete, } = visualElement.getProps();\n /**\n * The target layout of the element might stay the same,\n * but its position relative to its parent has changed.\n */\n const targetChanged = !this.targetLayout ||\n !boxEqualsRounded(this.targetLayout, newLayout) ||\n hasRelativeTargetChanged;\n /**\n * If the layout hasn't seemed to have changed, it might be that the\n * element is visually in the same place in the document but its position\n * relative to its parent has indeed changed. So here we check for that.\n */\n const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;\n if (this.options.layoutRoot ||\n (this.resumeFrom && this.resumeFrom.instance) ||\n hasOnlyRelativeTargetChanged ||\n (hasLayoutChanged &&\n (targetChanged || !this.currentAnimation))) {\n if (this.resumeFrom) {\n this.resumingFrom = this.resumeFrom;\n this.resumingFrom.resumingFrom = undefined;\n }\n this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);\n const animationOptions = {\n ...getValueTransition(layoutTransition, \"layout\"),\n onPlay: onLayoutAnimationStart,\n onComplete: onLayoutAnimationComplete,\n };\n if (visualElement.shouldReduceMotion ||\n this.options.layoutRoot) {\n animationOptions.delay = 0;\n animationOptions.type = false;\n }\n this.startAnimation(animationOptions);\n }\n else {\n /**\n * If the layout hasn't changed and we have an animation that hasn't started yet,\n * finish it immediately. Otherwise it will be animating from a location\n * that was probably never commited to screen and look like a jumpy box.\n */\n if (!hasLayoutChanged) {\n finishAnimation(this);\n }\n if (this.isLead() && this.options.onExitComplete) {\n this.options.onExitComplete();\n }\n }\n this.targetLayout = newLayout;\n });\n }\n }\n unmount() {\n this.options.layoutId && this.willUpdate();\n this.root.nodes.remove(this);\n const stack = this.getStack();\n stack && stack.remove(this);\n this.parent && this.parent.children.delete(this);\n this.instance = undefined;\n cancelFrame(this.updateProjection);\n }\n // only on the root\n blockUpdate() {\n this.updateManuallyBlocked = true;\n }\n unblockUpdate() {\n this.updateManuallyBlocked = false;\n }\n isUpdateBlocked() {\n return this.updateManuallyBlocked || this.updateBlockedByResize;\n }\n isTreeAnimationBlocked() {\n return (this.isAnimationBlocked ||\n (this.parent && this.parent.isTreeAnimationBlocked()) ||\n false);\n }\n // Note: currently only running on root node\n startUpdate() {\n if (this.isUpdateBlocked())\n return;\n this.isUpdating = true;\n this.nodes && this.nodes.forEach(resetSkewAndRotation);\n this.animationId++;\n }\n getTransformTemplate() {\n const { visualElement } = this.options;\n return visualElement && visualElement.getProps().transformTemplate;\n }\n willUpdate(shouldNotifyListeners = true) {\n this.root.hasTreeAnimated = true;\n if (this.root.isUpdateBlocked()) {\n this.options.onExitComplete && this.options.onExitComplete();\n return;\n }\n /**\n * If we're running optimised appear animations then these must be\n * cancelled before measuring the DOM. This is so we can measure\n * the true layout of the element rather than the WAAPI animation\n * which will be unaffected by the resetSkewAndRotate step.\n *\n * Note: This is a DOM write. Worst case scenario is this is sandwiched\n * between other snapshot reads which will cause unnecessary style recalculations.\n * This has to happen here though, as we don't yet know which nodes will need\n * snapshots in startUpdate(), but we only want to cancel optimised animations\n * if a layout animation measurement is actually going to be affected by them.\n */\n if (window.MotionCancelOptimisedAnimation &&\n !this.hasCheckedOptimisedAppear) {\n cancelTreeOptimisedTransformAnimations(this);\n }\n !this.root.isUpdating && this.root.startUpdate();\n if (this.isLayoutDirty)\n return;\n this.isLayoutDirty = true;\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.shouldResetTransform = true;\n node.updateScroll(\"snapshot\");\n if (node.options.layoutRoot) {\n node.willUpdate(false);\n }\n }\n const { layoutId, layout } = this.options;\n if (layoutId === undefined && !layout)\n return;\n const transformTemplate = this.getTransformTemplate();\n this.prevTransformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n this.updateSnapshot();\n shouldNotifyListeners && this.notifyListeners(\"willUpdate\");\n }\n update() {\n this.updateScheduled = false;\n const updateWasBlocked = this.isUpdateBlocked();\n // When doing an instant transition, we skip the layout update,\n // but should still clean up the measurements so that the next\n // snapshot could be taken correctly.\n if (updateWasBlocked) {\n this.unblockUpdate();\n this.clearAllSnapshots();\n this.nodes.forEach(clearMeasurements);\n return;\n }\n if (!this.isUpdating) {\n this.nodes.forEach(clearIsLayoutDirty);\n }\n this.isUpdating = false;\n /**\n * Write\n */\n this.nodes.forEach(resetTransformStyle);\n /**\n * Read ==================\n */\n // Update layout measurements of updated children\n this.nodes.forEach(updateLayout);\n /**\n * Write\n */\n // Notify listeners that the layout is updated\n this.nodes.forEach(notifyLayoutUpdate);\n this.clearAllSnapshots();\n /**\n * Manually flush any pending updates. Ideally\n * we could leave this to the following requestAnimationFrame but this seems\n * to leave a flash of incorrectly styled content.\n */\n const now = time.now();\n frameData.delta = clamp(0, 1000 / 60, now - frameData.timestamp);\n frameData.timestamp = now;\n frameData.isProcessing = true;\n frameSteps.update.process(frameData);\n frameSteps.preRender.process(frameData);\n frameSteps.render.process(frameData);\n frameData.isProcessing = false;\n }\n didUpdate() {\n if (!this.updateScheduled) {\n this.updateScheduled = true;\n microtask.read(this.scheduleUpdate);\n }\n }\n clearAllSnapshots() {\n this.nodes.forEach(clearSnapshot);\n this.sharedNodes.forEach(removeLeadSnapshots);\n }\n scheduleUpdateProjection() {\n if (!this.projectionUpdateScheduled) {\n this.projectionUpdateScheduled = true;\n frame.preRender(this.updateProjection, false, true);\n }\n }\n scheduleCheckAfterUnmount() {\n /**\n * If the unmounting node is in a layoutGroup and did trigger a willUpdate,\n * we manually call didUpdate to give a chance to the siblings to animate.\n * Otherwise, cleanup all snapshots to prevents future nodes from reusing them.\n */\n frame.postRender(() => {\n if (this.isLayoutDirty) {\n this.root.didUpdate();\n }\n else {\n this.root.checkUpdateFailed();\n }\n });\n }\n /**\n * Update measurements\n */\n updateSnapshot() {\n if (this.snapshot || !this.instance)\n return;\n this.snapshot = this.measure();\n }\n updateLayout() {\n if (!this.instance)\n return;\n // TODO: Incorporate into a forwarded scroll offset\n this.updateScroll();\n if (!(this.options.alwaysMeasureLayout && this.isLead()) &&\n !this.isLayoutDirty) {\n return;\n }\n /**\n * When a node is mounted, it simply resumes from the prevLead's\n * snapshot instead of taking a new one, but the ancestors scroll\n * might have updated while the prevLead is unmounted. We need to\n * update the scroll again to make sure the layout we measure is\n * up to date.\n */\n if (this.resumeFrom && !this.resumeFrom.instance) {\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n node.updateScroll();\n }\n }\n const prevLayout = this.layout;\n this.layout = this.measure(false);\n this.layoutCorrected = createBox();\n this.isLayoutDirty = false;\n this.projectionDelta = undefined;\n this.notifyListeners(\"measure\", this.layout.layoutBox);\n const { visualElement } = this.options;\n visualElement &&\n visualElement.notify(\"LayoutMeasure\", this.layout.layoutBox, prevLayout ? prevLayout.layoutBox : undefined);\n }\n updateScroll(phase = \"measure\") {\n let needsMeasurement = Boolean(this.options.layoutScroll && this.instance);\n if (this.scroll &&\n this.scroll.animationId === this.root.animationId &&\n this.scroll.phase === phase) {\n needsMeasurement = false;\n }\n if (needsMeasurement) {\n const isRoot = checkIsScrollRoot(this.instance);\n this.scroll = {\n animationId: this.root.animationId,\n phase,\n isRoot,\n offset: measureScroll(this.instance),\n wasRoot: this.scroll ? this.scroll.isRoot : isRoot,\n };\n }\n }\n resetTransform() {\n if (!resetTransform)\n return;\n const isResetRequested = this.isLayoutDirty ||\n this.shouldResetTransform ||\n this.options.alwaysMeasureLayout;\n const hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta);\n const transformTemplate = this.getTransformTemplate();\n const transformTemplateValue = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : undefined;\n const transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue;\n if (isResetRequested &&\n (hasProjection ||\n hasTransform(this.latestValues) ||\n transformTemplateHasChanged)) {\n resetTransform(this.instance, transformTemplateValue);\n this.shouldResetTransform = false;\n this.scheduleRender();\n }\n }\n measure(removeTransform = true) {\n const pageBox = this.measurePageBox();\n let layoutBox = this.removeElementScroll(pageBox);\n /**\n * Measurements taken during the pre-render stage\n * still have transforms applied so we remove them\n * via calculation.\n */\n if (removeTransform) {\n layoutBox = this.removeTransform(layoutBox);\n }\n roundBox(layoutBox);\n return {\n animationId: this.root.animationId,\n measuredBox: pageBox,\n layoutBox,\n latestValues: {},\n source: this.id,\n };\n }\n measurePageBox() {\n var _a;\n const { visualElement } = this.options;\n if (!visualElement)\n return createBox();\n const box = visualElement.measureViewportBox();\n const wasInScrollRoot = ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) || this.path.some(checkNodeWasScrollRoot);\n if (!wasInScrollRoot) {\n // Remove viewport scroll to give page-relative coordinates\n const { scroll } = this.root;\n if (scroll) {\n translateAxis(box.x, scroll.offset.x);\n translateAxis(box.y, scroll.offset.y);\n }\n }\n return box;\n }\n removeElementScroll(box) {\n var _a;\n const boxWithoutScroll = createBox();\n copyBoxInto(boxWithoutScroll, box);\n if ((_a = this.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot) {\n return boxWithoutScroll;\n }\n /**\n * Performance TODO: Keep a cumulative scroll offset down the tree\n * rather than loop back up the path.\n */\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n const { scroll, options } = node;\n if (node !== this.root && scroll && options.layoutScroll) {\n /**\n * If this is a new scroll root, we want to remove all previous scrolls\n * from the viewport box.\n */\n if (scroll.wasRoot) {\n copyBoxInto(boxWithoutScroll, box);\n }\n translateAxis(boxWithoutScroll.x, scroll.offset.x);\n translateAxis(boxWithoutScroll.y, scroll.offset.y);\n }\n }\n return boxWithoutScroll;\n }\n applyTransform(box, transformOnly = false) {\n const withTransforms = createBox();\n copyBoxInto(withTransforms, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!transformOnly &&\n node.options.layoutScroll &&\n node.scroll &&\n node !== node.root) {\n transformBox(withTransforms, {\n x: -node.scroll.offset.x,\n y: -node.scroll.offset.y,\n });\n }\n if (!hasTransform(node.latestValues))\n continue;\n transformBox(withTransforms, node.latestValues);\n }\n if (hasTransform(this.latestValues)) {\n transformBox(withTransforms, this.latestValues);\n }\n return withTransforms;\n }\n removeTransform(box) {\n const boxWithoutTransform = createBox();\n copyBoxInto(boxWithoutTransform, box);\n for (let i = 0; i < this.path.length; i++) {\n const node = this.path[i];\n if (!node.instance)\n continue;\n if (!hasTransform(node.latestValues))\n continue;\n hasScale(node.latestValues) && node.updateSnapshot();\n const sourceBox = createBox();\n const nodeBox = node.measurePageBox();\n copyBoxInto(sourceBox, nodeBox);\n removeBoxTransforms(boxWithoutTransform, node.latestValues, node.snapshot ? node.snapshot.layoutBox : undefined, sourceBox);\n }\n if (hasTransform(this.latestValues)) {\n removeBoxTransforms(boxWithoutTransform, this.latestValues);\n }\n return boxWithoutTransform;\n }\n setTargetDelta(delta) {\n this.targetDelta = delta;\n this.root.scheduleUpdateProjection();\n this.isProjectionDirty = true;\n }\n setOptions(options) {\n this.options = {\n ...this.options,\n ...options,\n crossfade: options.crossfade !== undefined ? options.crossfade : true,\n };\n }\n clearMeasurements() {\n this.scroll = undefined;\n this.layout = undefined;\n this.snapshot = undefined;\n this.prevTransformTemplateValue = undefined;\n this.targetDelta = undefined;\n this.target = undefined;\n this.isLayoutDirty = false;\n }\n forceRelativeParentToResolveTarget() {\n if (!this.relativeParent)\n return;\n /**\n * If the parent target isn't up-to-date, force it to update.\n * This is an unfortunate de-optimisation as it means any updating relative\n * projection will cause all the relative parents to recalculate back\n * up the tree.\n */\n if (this.relativeParent.resolvedRelativeTargetAt !==\n frameData.timestamp) {\n this.relativeParent.resolveTargetDelta(true);\n }\n }\n resolveTargetDelta(forceRecalculation = false) {\n var _a;\n /**\n * Once the dirty status of nodes has been spread through the tree, we also\n * need to check if we have a shared node of a different depth that has itself\n * been dirtied.\n */\n const lead = this.getLead();\n this.isProjectionDirty || (this.isProjectionDirty = lead.isProjectionDirty);\n this.isTransformDirty || (this.isTransformDirty = lead.isTransformDirty);\n this.isSharedProjectionDirty || (this.isSharedProjectionDirty = lead.isSharedProjectionDirty);\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n /**\n * We don't use transform for this step of processing so we don't\n * need to check whether any nodes have changed transform.\n */\n const canSkip = !(forceRecalculation ||\n (isShared && this.isSharedProjectionDirty) ||\n this.isProjectionDirty ||\n ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty) ||\n this.attemptToResolveRelativeTarget ||\n this.root.updateBlockedByResize);\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If we have no layout, we can't perform projection, so early return\n */\n if (!this.layout || !(layout || layoutId))\n return;\n this.resolvedRelativeTargetAt = frameData.timestamp;\n /**\n * If we don't have a targetDelta but do have a layout, we can attempt to resolve\n * a relativeParent. This will allow a component to perform scale correction\n * even if no animation has started.\n */\n if (!this.targetDelta && !this.relativeTarget) {\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n relativeParent.layout &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.layout.layoutBox, relativeParent.layout.layoutBox);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * If we have no relative target or no target delta our target isn't valid\n * for this frame.\n */\n if (!this.relativeTarget && !this.targetDelta)\n return;\n /**\n * Lazy-init target data structure\n */\n if (!this.target) {\n this.target = createBox();\n this.targetWithTransforms = createBox();\n }\n /**\n * If we've got a relative box for this component, resolve it into a target relative to the parent.\n */\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.relativeParent &&\n this.relativeParent.target) {\n this.forceRelativeParentToResolveTarget();\n calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target);\n /**\n * If we've only got a targetDelta, resolve it into a target\n */\n }\n else if (this.targetDelta) {\n if (Boolean(this.resumingFrom)) {\n // TODO: This is creating a new object every frame\n this.target = this.applyTransform(this.layout.layoutBox);\n }\n else {\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n applyBoxDelta(this.target, this.targetDelta);\n }\n else {\n /**\n * If no target, use own layout as target\n */\n copyBoxInto(this.target, this.layout.layoutBox);\n }\n /**\n * If we've been told to attempt to resolve a relative target, do so.\n */\n if (this.attemptToResolveRelativeTarget) {\n this.attemptToResolveRelativeTarget = false;\n const relativeParent = this.getClosestProjectingParent();\n if (relativeParent &&\n Boolean(relativeParent.resumingFrom) ===\n Boolean(this.resumingFrom) &&\n !relativeParent.options.layoutScroll &&\n relativeParent.target &&\n this.animationProgress !== 1) {\n this.relativeParent = relativeParent;\n this.forceRelativeParentToResolveTarget();\n this.relativeTarget = createBox();\n this.relativeTargetOrigin = createBox();\n calcRelativePosition(this.relativeTargetOrigin, this.target, relativeParent.target);\n copyBoxInto(this.relativeTarget, this.relativeTargetOrigin);\n }\n else {\n this.relativeParent = this.relativeTarget = undefined;\n }\n }\n /**\n * Increase debug counter for resolved target deltas\n */\n if (isDebug) {\n metrics.resolvedTargetDeltas++;\n }\n }\n getClosestProjectingParent() {\n if (!this.parent ||\n hasScale(this.parent.latestValues) ||\n has2DTranslate(this.parent.latestValues)) {\n return undefined;\n }\n if (this.parent.isProjecting()) {\n return this.parent;\n }\n else {\n return this.parent.getClosestProjectingParent();\n }\n }\n isProjecting() {\n return Boolean((this.relativeTarget ||\n this.targetDelta ||\n this.options.layoutRoot) &&\n this.layout);\n }\n calcProjection() {\n var _a;\n const lead = this.getLead();\n const isShared = Boolean(this.resumingFrom) || this !== lead;\n let canSkip = true;\n /**\n * If this is a normal layout animation and neither this node nor its nearest projecting\n * is dirty then we can't skip.\n */\n if (this.isProjectionDirty || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isProjectionDirty)) {\n canSkip = false;\n }\n /**\n * If this is a shared layout animation and this node's shared projection is dirty then\n * we can't skip.\n */\n if (isShared &&\n (this.isSharedProjectionDirty || this.isTransformDirty)) {\n canSkip = false;\n }\n /**\n * If we have resolved the target this frame we must recalculate the\n * projection to ensure it visually represents the internal calculations.\n */\n if (this.resolvedRelativeTargetAt === frameData.timestamp) {\n canSkip = false;\n }\n if (canSkip)\n return;\n const { layout, layoutId } = this.options;\n /**\n * If this section of the tree isn't animating we can\n * delete our target sources for the following frame.\n */\n this.isTreeAnimating = Boolean((this.parent && this.parent.isTreeAnimating) ||\n this.currentAnimation ||\n this.pendingAnimation);\n if (!this.isTreeAnimating) {\n this.targetDelta = this.relativeTarget = undefined;\n }\n if (!this.layout || !(layout || layoutId))\n return;\n /**\n * Reset the corrected box with the latest values from box, as we're then going\n * to perform mutative operations on it.\n */\n copyBoxInto(this.layoutCorrected, this.layout.layoutBox);\n /**\n * Record previous tree scales before updating.\n */\n const prevTreeScaleX = this.treeScale.x;\n const prevTreeScaleY = this.treeScale.y;\n /**\n * Apply all the parent deltas to this box to produce the corrected box. This\n * is the layout box, as it will appear on screen as a result of the transforms of its parents.\n */\n applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, isShared);\n /**\n * If this layer needs to perform scale correction but doesn't have a target,\n * use the layout as the target.\n */\n if (lead.layout &&\n !lead.target &&\n (this.treeScale.x !== 1 || this.treeScale.y !== 1)) {\n lead.target = lead.layout.layoutBox;\n lead.targetWithTransforms = createBox();\n }\n const { target } = lead;\n if (!target) {\n /**\n * If we don't have a target to project into, but we were previously\n * projecting, we want to remove the stored transform and schedule\n * a render to ensure the elements reflect the removed transform.\n */\n if (this.prevProjectionDelta) {\n this.createProjectionDeltas();\n this.scheduleRender();\n }\n return;\n }\n if (!this.projectionDelta || !this.prevProjectionDelta) {\n this.createProjectionDeltas();\n }\n else {\n copyAxisDeltaInto(this.prevProjectionDelta.x, this.projectionDelta.x);\n copyAxisDeltaInto(this.prevProjectionDelta.y, this.projectionDelta.y);\n }\n /**\n * Update the delta between the corrected box and the target box before user-set transforms were applied.\n * This will allow us to calculate the corrected borderRadius and boxShadow to compensate\n * for our layout reprojection, but still allow them to be scaled correctly by the user.\n * It might be that to simplify this we may want to accept that user-set scale is also corrected\n * and we wouldn't have to keep and calc both deltas, OR we could support a user setting\n * to allow people to choose whether these styles are corrected based on just the\n * layout reprojection or the final bounding box.\n */\n calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues);\n if (this.treeScale.x !== prevTreeScaleX ||\n this.treeScale.y !== prevTreeScaleY ||\n !axisDeltaEquals(this.projectionDelta.x, this.prevProjectionDelta.x) ||\n !axisDeltaEquals(this.projectionDelta.y, this.prevProjectionDelta.y)) {\n this.hasProjected = true;\n this.scheduleRender();\n this.notifyListeners(\"projectionUpdate\", target);\n }\n /**\n * Increase debug counter for recalculated projections\n */\n if (isDebug) {\n metrics.recalculatedProjection++;\n }\n }\n hide() {\n this.isVisible = false;\n // TODO: Schedule render\n }\n show() {\n this.isVisible = true;\n // TODO: Schedule render\n }\n scheduleRender(notifyAll = true) {\n var _a;\n (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.scheduleRender();\n if (notifyAll) {\n const stack = this.getStack();\n stack && stack.scheduleRender();\n }\n if (this.resumingFrom && !this.resumingFrom.instance) {\n this.resumingFrom = undefined;\n }\n }\n createProjectionDeltas() {\n this.prevProjectionDelta = createDelta();\n this.projectionDelta = createDelta();\n this.projectionDeltaWithTransform = createDelta();\n }\n setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {\n const snapshot = this.snapshot;\n const snapshotLatestValues = snapshot\n ? snapshot.latestValues\n : {};\n const mixedValues = { ...this.latestValues };\n const targetDelta = createDelta();\n if (!this.relativeParent ||\n !this.relativeParent.options.layoutRoot) {\n this.relativeTarget = this.relativeTargetOrigin = undefined;\n }\n this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;\n const relativeLayout = createBox();\n const snapshotSource = snapshot ? snapshot.source : undefined;\n const layoutSource = this.layout ? this.layout.source : undefined;\n const isSharedLayoutAnimation = snapshotSource !== layoutSource;\n const stack = this.getStack();\n const isOnlyMember = !stack || stack.members.length <= 1;\n const shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation &&\n !isOnlyMember &&\n this.options.crossfade === true &&\n !this.path.some(hasOpacityCrossfade));\n this.animationProgress = 0;\n let prevRelativeTarget;\n this.mixTargetDelta = (latest) => {\n const progress = latest / 1000;\n mixAxisDelta(targetDelta.x, delta.x, progress);\n mixAxisDelta(targetDelta.y, delta.y, progress);\n this.setTargetDelta(targetDelta);\n if (this.relativeTarget &&\n this.relativeTargetOrigin &&\n this.layout &&\n this.relativeParent &&\n this.relativeParent.layout) {\n calcRelativePosition(relativeLayout, this.layout.layoutBox, this.relativeParent.layout.layoutBox);\n mixBox(this.relativeTarget, this.relativeTargetOrigin, relativeLayout, progress);\n /**\n * If this is an unchanged relative target we can consider the\n * projection not dirty.\n */\n if (prevRelativeTarget &&\n boxEquals(this.relativeTarget, prevRelativeTarget)) {\n this.isProjectionDirty = false;\n }\n if (!prevRelativeTarget)\n prevRelativeTarget = createBox();\n copyBoxInto(prevRelativeTarget, this.relativeTarget);\n }\n if (isSharedLayoutAnimation) {\n this.animationValues = mixedValues;\n mixValues(mixedValues, snapshotLatestValues, this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember);\n }\n this.root.scheduleUpdateProjection();\n this.scheduleRender();\n this.animationProgress = progress;\n };\n this.mixTargetDelta(this.options.layoutRoot ? 1000 : 0);\n }\n startAnimation(options) {\n this.notifyListeners(\"animationStart\");\n this.currentAnimation && this.currentAnimation.stop();\n if (this.resumingFrom && this.resumingFrom.currentAnimation) {\n this.resumingFrom.currentAnimation.stop();\n }\n if (this.pendingAnimation) {\n cancelFrame(this.pendingAnimation);\n this.pendingAnimation = undefined;\n }\n /**\n * Start the animation in the next frame to have a frame with progress 0,\n * where the target is the same as when the animation started, so we can\n * calculate the relative positions correctly for instant transitions.\n */\n this.pendingAnimation = frame.update(() => {\n globalProjectionState.hasAnimatedSinceResize = true;\n this.currentAnimation = animateSingleValue(0, animationTarget, {\n ...options,\n onUpdate: (latest) => {\n this.mixTargetDelta(latest);\n options.onUpdate && options.onUpdate(latest);\n },\n onComplete: () => {\n options.onComplete && options.onComplete();\n this.completeAnimation();\n },\n });\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = this.currentAnimation;\n }\n this.pendingAnimation = undefined;\n });\n }\n completeAnimation() {\n if (this.resumingFrom) {\n this.resumingFrom.currentAnimation = undefined;\n this.resumingFrom.preserveOpacity = undefined;\n }\n const stack = this.getStack();\n stack && stack.exitAnimationComplete();\n this.resumingFrom =\n this.currentAnimation =\n this.animationValues =\n undefined;\n this.notifyListeners(\"animationComplete\");\n }\n finishAnimation() {\n if (this.currentAnimation) {\n this.mixTargetDelta && this.mixTargetDelta(animationTarget);\n this.currentAnimation.stop();\n }\n this.completeAnimation();\n }\n applyTransformsToTarget() {\n const lead = this.getLead();\n let { targetWithTransforms, target, layout, latestValues } = lead;\n if (!targetWithTransforms || !target || !layout)\n return;\n /**\n * If we're only animating position, and this element isn't the lead element,\n * then instead of projecting into the lead box we instead want to calculate\n * a new target that aligns the two boxes but maintains the layout shape.\n */\n if (this !== lead &&\n this.layout &&\n layout &&\n shouldAnimatePositionOnly(this.options.animationType, this.layout.layoutBox, layout.layoutBox)) {\n target = this.target || createBox();\n const xLength = calcLength(this.layout.layoutBox.x);\n target.x.min = lead.target.x.min;\n target.x.max = target.x.min + xLength;\n const yLength = calcLength(this.layout.layoutBox.y);\n target.y.min = lead.target.y.min;\n target.y.max = target.y.min + yLength;\n }\n copyBoxInto(targetWithTransforms, target);\n /**\n * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.\n * This is the final box that we will then project into by calculating a transform delta and\n * applying it to the corrected box.\n */\n transformBox(targetWithTransforms, latestValues);\n /**\n * Update the delta between the corrected box and the final target box, after\n * user-set transforms are applied to it. This will be used by the renderer to\n * create a transform style that will reproject the element from its layout layout\n * into the desired bounding box.\n */\n calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues);\n }\n registerSharedNode(layoutId, node) {\n if (!this.sharedNodes.has(layoutId)) {\n this.sharedNodes.set(layoutId, new NodeStack());\n }\n const stack = this.sharedNodes.get(layoutId);\n stack.add(node);\n const config = node.options.initialPromotionConfig;\n node.promote({\n transition: config ? config.transition : undefined,\n preserveFollowOpacity: config && config.shouldPreserveFollowOpacity\n ? config.shouldPreserveFollowOpacity(node)\n : undefined,\n });\n }\n isLead() {\n const stack = this.getStack();\n return stack ? stack.lead === this : true;\n }\n getLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this;\n }\n getPrevLead() {\n var _a;\n const { layoutId } = this.options;\n return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined;\n }\n getStack() {\n const { layoutId } = this.options;\n if (layoutId)\n return this.root.sharedNodes.get(layoutId);\n }\n promote({ needsReset, transition, preserveFollowOpacity, } = {}) {\n const stack = this.getStack();\n if (stack)\n stack.promote(this, preserveFollowOpacity);\n if (needsReset) {\n this.projectionDelta = undefined;\n this.needsReset = true;\n }\n if (transition)\n this.setOptions({ transition });\n }\n relegate() {\n const stack = this.getStack();\n if (stack) {\n return stack.relegate(this);\n }\n else {\n return false;\n }\n }\n resetSkewAndRotation() {\n const { visualElement } = this.options;\n if (!visualElement)\n return;\n // If there's no detected skew or rotation values, we can early return without a forced render.\n let hasDistortingTransform = false;\n /**\n * An unrolled check for rotation values. Most elements don't have any rotation and\n * skipping the nested loop and new object creation is 50% faster.\n */\n const { latestValues } = visualElement;\n if (latestValues.z ||\n latestValues.rotate ||\n latestValues.rotateX ||\n latestValues.rotateY ||\n latestValues.rotateZ ||\n latestValues.skewX ||\n latestValues.skewY) {\n hasDistortingTransform = true;\n }\n // If there's no distorting values, we don't need to do any more.\n if (!hasDistortingTransform)\n return;\n const resetValues = {};\n if (latestValues.z) {\n resetDistortingTransform(\"z\", visualElement, resetValues, this.animationValues);\n }\n // Check the skew and rotate value of all axes and reset to 0\n for (let i = 0; i < transformAxes.length; i++) {\n resetDistortingTransform(`rotate${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n resetDistortingTransform(`skew${transformAxes[i]}`, visualElement, resetValues, this.animationValues);\n }\n // Force a render of this element to apply the transform with all skews and rotations\n // set to 0.\n visualElement.render();\n // Put back all the values we reset\n for (const key in resetValues) {\n visualElement.setStaticValue(key, resetValues[key]);\n if (this.animationValues) {\n this.animationValues[key] = resetValues[key];\n }\n }\n // Schedule a render for the next frame. This ensures we won't visually\n // see the element with the reset rotate value applied.\n visualElement.scheduleRender();\n }\n getProjectionStyles(styleProp) {\n var _a, _b;\n if (!this.instance || this.isSVG)\n return undefined;\n if (!this.isVisible) {\n return hiddenVisibility;\n }\n const styles = {\n visibility: \"\",\n };\n const transformTemplate = this.getTransformTemplate();\n if (this.needsReset) {\n this.needsReset = false;\n styles.opacity = \"\";\n styles.pointerEvents =\n resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n styles.transform = transformTemplate\n ? transformTemplate(this.latestValues, \"\")\n : \"none\";\n return styles;\n }\n const lead = this.getLead();\n if (!this.projectionDelta || !this.layout || !lead.target) {\n const emptyStyles = {};\n if (this.options.layoutId) {\n emptyStyles.opacity =\n this.latestValues.opacity !== undefined\n ? this.latestValues.opacity\n : 1;\n emptyStyles.pointerEvents =\n resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\";\n }\n if (this.hasProjected && !hasTransform(this.latestValues)) {\n emptyStyles.transform = transformTemplate\n ? transformTemplate({}, \"\")\n : \"none\";\n this.hasProjected = false;\n }\n return emptyStyles;\n }\n const valuesToRender = lead.animationValues || lead.latestValues;\n this.applyTransformsToTarget();\n styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);\n if (transformTemplate) {\n styles.transform = transformTemplate(valuesToRender, styles.transform);\n }\n const { x, y } = this.projectionDelta;\n styles.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;\n if (lead.animationValues) {\n /**\n * If the lead component is animating, assign this either the entering/leaving\n * opacity\n */\n styles.opacity =\n lead === this\n ? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1\n : this.preserveOpacity\n ? this.latestValues.opacity\n : valuesToRender.opacityExit;\n }\n else {\n /**\n * Or we're not animating at all, set the lead component to its layout\n * opacity and other components to hidden.\n */\n styles.opacity =\n lead === this\n ? valuesToRender.opacity !== undefined\n ? valuesToRender.opacity\n : \"\"\n : valuesToRender.opacityExit !== undefined\n ? valuesToRender.opacityExit\n : 0;\n }\n /**\n * Apply scale correction\n */\n for (const key in scaleCorrectors) {\n if (valuesToRender[key] === undefined)\n continue;\n const { correct, applyTo } = scaleCorrectors[key];\n /**\n * Only apply scale correction to the value if we have an\n * active projection transform. Otherwise these values become\n * vulnerable to distortion if the element changes size without\n * a corresponding layout animation.\n */\n const corrected = styles.transform === \"none\"\n ? valuesToRender[key]\n : correct(valuesToRender[key], lead);\n if (applyTo) {\n const num = applyTo.length;\n for (let i = 0; i < num; i++) {\n styles[applyTo[i]] = corrected;\n }\n }\n else {\n styles[key] = corrected;\n }\n }\n /**\n * Disable pointer events on follow components. This is to ensure\n * that if a follow component covers a lead component it doesn't block\n * pointer events on the lead.\n */\n if (this.options.layoutId) {\n styles.pointerEvents =\n lead === this\n ? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || \"\"\n : \"none\";\n }\n return styles;\n }\n clearSnapshot() {\n this.resumeFrom = this.snapshot = undefined;\n }\n // Only run on root\n resetTree() {\n this.root.nodes.forEach((node) => { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); });\n this.root.nodes.forEach(clearMeasurements);\n this.root.sharedNodes.clear();\n }\n };\n}\nfunction updateLayout(node) {\n node.updateLayout();\n}\nfunction notifyLayoutUpdate(node) {\n var _a;\n const snapshot = ((_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) || node.snapshot;\n if (node.isLead() &&\n node.layout &&\n snapshot &&\n node.hasListeners(\"didUpdate\")) {\n const { layoutBox: layout, measuredBox: measuredLayout } = node.layout;\n const { animationType } = node.options;\n const isShared = snapshot.source !== node.layout.source;\n // TODO Maybe we want to also resize the layout snapshot so we don't trigger\n // animations for instance if layout=\"size\" and an element has only changed position\n if (animationType === \"size\") {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(axisSnapshot);\n axisSnapshot.min = layout[axis].min;\n axisSnapshot.max = axisSnapshot.min + length;\n });\n }\n else if (shouldAnimatePositionOnly(animationType, snapshot.layoutBox, layout)) {\n eachAxis((axis) => {\n const axisSnapshot = isShared\n ? snapshot.measuredBox[axis]\n : snapshot.layoutBox[axis];\n const length = calcLength(layout[axis]);\n axisSnapshot.max = axisSnapshot.min + length;\n /**\n * Ensure relative target gets resized and rerendererd\n */\n if (node.relativeTarget && !node.currentAnimation) {\n node.isProjectionDirty = true;\n node.relativeTarget[axis].max =\n node.relativeTarget[axis].min + length;\n }\n });\n }\n const layoutDelta = createDelta();\n calcBoxDelta(layoutDelta, layout, snapshot.layoutBox);\n const visualDelta = createDelta();\n if (isShared) {\n calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measuredBox);\n }\n else {\n calcBoxDelta(visualDelta, layout, snapshot.layoutBox);\n }\n const hasLayoutChanged = !isDeltaZero(layoutDelta);\n let hasRelativeTargetChanged = false;\n if (!node.resumeFrom) {\n const relativeParent = node.getClosestProjectingParent();\n /**\n * If the relativeParent is itself resuming from a different element then\n * the relative snapshot is not relavent\n */\n if (relativeParent && !relativeParent.resumeFrom) {\n const { snapshot: parentSnapshot, layout: parentLayout } = relativeParent;\n if (parentSnapshot && parentLayout) {\n const relativeSnapshot = createBox();\n calcRelativePosition(relativeSnapshot, snapshot.layoutBox, parentSnapshot.layoutBox);\n const relativeLayout = createBox();\n calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);\n if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {\n hasRelativeTargetChanged = true;\n }\n if (relativeParent.options.layoutRoot) {\n node.relativeTarget = relativeLayout;\n node.relativeTargetOrigin = relativeSnapshot;\n node.relativeParent = relativeParent;\n }\n }\n }\n }\n node.notifyListeners(\"didUpdate\", {\n layout,\n snapshot,\n delta: visualDelta,\n layoutDelta,\n hasLayoutChanged,\n hasRelativeTargetChanged,\n });\n }\n else if (node.isLead()) {\n const { onExitComplete } = node.options;\n onExitComplete && onExitComplete();\n }\n /**\n * Clearing transition\n * TODO: Investigate why this transition is being passed in as {type: false } from Framer\n * and why we need it at all\n */\n node.options.transition = undefined;\n}\nfunction propagateDirtyNodes(node) {\n /**\n * Increase debug counter for nodes encountered this frame\n */\n if (isDebug) {\n metrics.totalNodes++;\n }\n if (!node.parent)\n return;\n /**\n * If this node isn't projecting, propagate isProjectionDirty. It will have\n * no performance impact but it will allow the next child that *is* projecting\n * but *isn't* dirty to just check its parent to see if *any* ancestor needs\n * correcting.\n */\n if (!node.isProjecting()) {\n node.isProjectionDirty = node.parent.isProjectionDirty;\n }\n /**\n * Propagate isSharedProjectionDirty and isTransformDirty\n * throughout the whole tree. A future revision can take another look at\n * this but for safety we still recalcualte shared nodes.\n */\n node.isSharedProjectionDirty || (node.isSharedProjectionDirty = Boolean(node.isProjectionDirty ||\n node.parent.isProjectionDirty ||\n node.parent.isSharedProjectionDirty));\n node.isTransformDirty || (node.isTransformDirty = node.parent.isTransformDirty);\n}\nfunction cleanDirtyNodes(node) {\n node.isProjectionDirty =\n node.isSharedProjectionDirty =\n node.isTransformDirty =\n false;\n}\nfunction clearSnapshot(node) {\n node.clearSnapshot();\n}\nfunction clearMeasurements(node) {\n node.clearMeasurements();\n}\nfunction clearIsLayoutDirty(node) {\n node.isLayoutDirty = false;\n}\nfunction resetTransformStyle(node) {\n const { visualElement } = node.options;\n if (visualElement && visualElement.getProps().onBeforeLayoutMeasure) {\n visualElement.notify(\"BeforeLayoutMeasure\");\n }\n node.resetTransform();\n}\nfunction finishAnimation(node) {\n node.finishAnimation();\n node.targetDelta = node.relativeTarget = node.target = undefined;\n node.isProjectionDirty = true;\n}\nfunction resolveTargetDelta(node) {\n node.resolveTargetDelta();\n}\nfunction calcProjection(node) {\n node.calcProjection();\n}\nfunction resetSkewAndRotation(node) {\n node.resetSkewAndRotation();\n}\nfunction removeLeadSnapshots(stack) {\n stack.removeLeadSnapshot();\n}\nfunction mixAxisDelta(output, delta, p) {\n output.translate = mixNumber(delta.translate, 0, p);\n output.scale = mixNumber(delta.scale, 1, p);\n output.origin = delta.origin;\n output.originPoint = delta.originPoint;\n}\nfunction mixAxis(output, from, to, p) {\n output.min = mixNumber(from.min, to.min, p);\n output.max = mixNumber(from.max, to.max, p);\n}\nfunction mixBox(output, from, to, p) {\n mixAxis(output.x, from.x, to.x, p);\n mixAxis(output.y, from.y, to.y, p);\n}\nfunction hasOpacityCrossfade(node) {\n return (node.animationValues && node.animationValues.opacityExit !== undefined);\n}\nconst defaultLayoutTransition = {\n duration: 0.45,\n ease: [0.4, 0, 0.1, 1],\n};\nconst userAgentContains = (string) => typeof navigator !== \"undefined\" &&\n navigator.userAgent &&\n navigator.userAgent.toLowerCase().includes(string);\n/**\n * Measured bounding boxes must be rounded in Safari and\n * left untouched in Chrome, otherwise non-integer layouts within scaled-up elements\n * can appear to jump.\n */\nconst roundPoint = userAgentContains(\"applewebkit/\") && !userAgentContains(\"chrome/\")\n ? Math.round\n : noop;\nfunction roundAxis(axis) {\n // Round to the nearest .5 pixels to support subpixel layouts\n axis.min = roundPoint(axis.min);\n axis.max = roundPoint(axis.max);\n}\nfunction roundBox(box) {\n roundAxis(box.x);\n roundAxis(box.y);\n}\nfunction shouldAnimatePositionOnly(animationType, snapshot, layout) {\n return (animationType === \"position\" ||\n (animationType === \"preserve-aspect\" &&\n !isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));\n}\nfunction checkNodeWasScrollRoot(node) {\n var _a;\n return node !== node.root && ((_a = node.scroll) === null || _a === void 0 ? void 0 : _a.wasRoot);\n}\n\nexport { cleanDirtyNodes, createProjectionNode, mixAxis, mixAxisDelta, mixBox, propagateDirtyNodes };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { addDomEvent } from '../../events/add-dom-event.mjs';\n\nconst DocumentProjectionNode = createProjectionNode({\n attachResizeListener: (ref, notify) => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body.scrollLeft,\n y: document.documentElement.scrollTop || document.body.scrollTop,\n }),\n checkIsScrollRoot: () => true,\n});\n\nexport { DocumentProjectionNode };\n","import { createProjectionNode } from './create-projection-node.mjs';\nimport { DocumentProjectionNode } from './DocumentProjectionNode.mjs';\n\nconst rootProjectionNode = {\n current: undefined,\n};\nconst HTMLProjectionNode = createProjectionNode({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({});\n documentNode.mount(window);\n documentNode.setOptions({ layoutScroll: true });\n rootProjectionNode.current = documentNode;\n }\n return rootProjectionNode.current;\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\";\n },\n checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n});\n\nexport { HTMLProjectionNode, rootProjectionNode };\n","import { DragGesture } from '../../gestures/drag/index.mjs';\nimport { PanGesture } from '../../gestures/pan/index.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\nimport { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\n\nconst drag = {\n pan: {\n Feature: PanGesture,\n },\n drag: {\n Feature: DragGesture,\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { drag };\n","import { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction addHoverEvent(node, isActive) {\n const eventName = isActive ? \"pointerenter\" : \"pointerleave\";\n const callbackName = isActive ? \"onHoverStart\" : \"onHoverEnd\";\n const handleEvent = (event, info) => {\n if (event.pointerType === \"touch\" || isDragActive())\n return;\n const props = node.getProps();\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", isActive);\n }\n const callback = props[callbackName];\n if (callback) {\n frame.postRender(() => callback(event, info));\n }\n };\n return addPointerEvent(node.current, eventName, handleEvent, {\n passive: !node.getProps()[callbackName],\n });\n}\nclass HoverGesture extends Feature {\n mount() {\n this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n","import { addDomEvent } from '../events/add-dom-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\n\nclass FocusGesture extends Feature {\n constructor() {\n super(...arguments);\n this.isActive = false;\n }\n onFocus() {\n let isFocusVisible = false;\n /**\n * If this element doesn't match focus-visible then don't\n * apply whileHover. But, if matches throws that focus-visible\n * is not a valid selector then in that browser outline styles will be applied\n * to the element by default and we want to match that behaviour with whileFocus.\n */\n try {\n isFocusVisible = this.node.current.matches(\":focus-visible\");\n }\n catch (e) {\n isFocusVisible = true;\n }\n if (!isFocusVisible || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", true);\n this.isActive = true;\n }\n onBlur() {\n if (!this.isActive || !this.node.animationState)\n return;\n this.node.animationState.setActive(\"whileFocus\", false);\n this.isActive = false;\n }\n mount() {\n this.unmount = pipe(addDomEvent(this.node.current, \"focus\", () => this.onFocus()), addDomEvent(this.node.current, \"blur\", () => this.onBlur()));\n }\n unmount() { }\n}\n\nexport { FocusGesture };\n","/**\n * Recursively traverse up the tree to check whether the provided child node\n * is the parent or a descendant of it.\n *\n * @param parent - Element to find\n * @param child - Element to test against parent\n */\nconst isNodeOrChild = (parent, child) => {\n if (!child) {\n return false;\n }\n else if (parent === child) {\n return true;\n }\n else {\n return isNodeOrChild(parent, child.parentElement);\n }\n};\n\nexport { isNodeOrChild };\n","import { extractEventInfo } from '../events/event-info.mjs';\nimport { addDomEvent } from '../events/add-dom-event.mjs';\nimport { addPointerEvent } from '../events/add-pointer-event.mjs';\nimport { Feature } from '../motion/features/Feature.mjs';\nimport { pipe } from '../utils/pipe.mjs';\nimport { isDragActive } from './drag/utils/lock.mjs';\nimport { isNodeOrChild } from './utils/is-node-or-child.mjs';\nimport { noop } from '../utils/noop.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction fireSyntheticPointerEvent(name, handler) {\n if (!handler)\n return;\n const syntheticPointerEvent = new PointerEvent(\"pointer\" + name);\n handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removeStartListeners = noop;\n this.removeEndListeners = noop;\n this.removeAccessibleListeners = noop;\n this.startPointerPress = (startEvent, startInfo) => {\n if (this.isPressing)\n return;\n this.removeEndListeners();\n const props = this.node.getProps();\n const endPointerPress = (endEvent, endInfo) => {\n if (!this.checkPressEnd())\n return;\n const { onTap, onTapCancel, globalTapTarget } = this.node.getProps();\n /**\n * We only count this as a tap gesture if the event.target is the same\n * as, or a child of, this component's element\n */\n const handler = !globalTapTarget &&\n !isNodeOrChild(this.node.current, endEvent.target)\n ? onTapCancel\n : onTap;\n if (handler) {\n frame.update(() => handler(endEvent, endInfo));\n }\n };\n const removePointerUpListener = addPointerEvent(window, \"pointerup\", endPointerPress, {\n passive: !(props.onTap || props[\"onPointerUp\"]),\n });\n const removePointerCancelListener = addPointerEvent(window, \"pointercancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo), {\n passive: !(props.onTapCancel ||\n props[\"onPointerCancel\"]),\n });\n this.removeEndListeners = pipe(removePointerUpListener, removePointerCancelListener);\n this.startPress(startEvent, startInfo);\n };\n this.startAccessiblePress = () => {\n const handleKeydown = (keydownEvent) => {\n if (keydownEvent.key !== \"Enter\" || this.isPressing)\n return;\n const handleKeyup = (keyupEvent) => {\n if (keyupEvent.key !== \"Enter\" || !this.checkPressEnd())\n return;\n fireSyntheticPointerEvent(\"up\", (event, info) => {\n const { onTap } = this.node.getProps();\n if (onTap) {\n frame.postRender(() => onTap(event, info));\n }\n });\n };\n this.removeEndListeners();\n this.removeEndListeners = addDomEvent(this.node.current, \"keyup\", handleKeyup);\n fireSyntheticPointerEvent(\"down\", (event, info) => {\n this.startPress(event, info);\n });\n };\n const removeKeydownListener = addDomEvent(this.node.current, \"keydown\", handleKeydown);\n const handleBlur = () => {\n if (!this.isPressing)\n return;\n fireSyntheticPointerEvent(\"cancel\", (cancelEvent, cancelInfo) => this.cancelPress(cancelEvent, cancelInfo));\n };\n const removeBlurListener = addDomEvent(this.node.current, \"blur\", handleBlur);\n this.removeAccessibleListeners = pipe(removeKeydownListener, removeBlurListener);\n };\n }\n startPress(event, info) {\n this.isPressing = true;\n const { onTapStart, whileTap } = this.node.getProps();\n /**\n * Ensure we trigger animations before firing event callback\n */\n if (whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", true);\n }\n if (onTapStart) {\n frame.postRender(() => onTapStart(event, info));\n }\n }\n checkPressEnd() {\n this.removeEndListeners();\n this.isPressing = false;\n const props = this.node.getProps();\n if (props.whileTap && this.node.animationState) {\n this.node.animationState.setActive(\"whileTap\", false);\n }\n return !isDragActive();\n }\n cancelPress(event, info) {\n if (!this.checkPressEnd())\n return;\n const { onTapCancel } = this.node.getProps();\n if (onTapCancel) {\n frame.postRender(() => onTapCancel(event, info));\n }\n }\n mount() {\n const props = this.node.getProps();\n const removePointerListener = addPointerEvent(props.globalTapTarget ? window : this.node.current, \"pointerdown\", this.startPointerPress, {\n passive: !(props.onTapStart ||\n props[\"onPointerStart\"]),\n });\n const removeFocusListener = addDomEvent(this.node.current, \"focus\", this.startAccessiblePress);\n this.removeStartListeners = pipe(removePointerListener, removeFocusListener);\n }\n unmount() {\n this.removeStartListeners();\n this.removeEndListeners();\n this.removeAccessibleListeners();\n }\n}\n\nexport { PressGesture };\n","/**\n * Map an IntersectionHandler callback to an element. We only ever make one handler for one\n * element, so even though these handlers might all be triggered by different\n * observers, we can keep them in the same map.\n */\nconst observerCallbacks = new WeakMap();\n/**\n * Multiple observers can be created for multiple element/document roots. Each with\n * different settings. So here we store dictionaries of observers to each root,\n * using serialised settings (threshold/margin) as lookup keys.\n */\nconst observers = new WeakMap();\nconst fireObserverCallback = (entry) => {\n const callback = observerCallbacks.get(entry.target);\n callback && callback(entry);\n};\nconst fireAllObserverCallbacks = (entries) => {\n entries.forEach(fireObserverCallback);\n};\nfunction initIntersectionObserver({ root, ...options }) {\n const lookupRoot = root || document;\n /**\n * If we don't have an observer lookup map for this root, create one.\n */\n if (!observers.has(lookupRoot)) {\n observers.set(lookupRoot, {});\n }\n const rootObservers = observers.get(lookupRoot);\n const key = JSON.stringify(options);\n /**\n * If we don't have an observer for this combination of root and settings,\n * create one.\n */\n if (!rootObservers[key]) {\n rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });\n }\n return rootObservers[key];\n}\nfunction observeIntersection(element, options, callback) {\n const rootInteresectionObserver = initIntersectionObserver(options);\n observerCallbacks.set(element, callback);\n rootInteresectionObserver.observe(element);\n return () => {\n observerCallbacks.delete(element);\n rootInteresectionObserver.unobserve(element);\n };\n}\n\nexport { observeIntersection };\n","import { Feature } from '../Feature.mjs';\nimport { observeIntersection } from './observers.mjs';\n\nconst thresholdNames = {\n some: 0,\n all: 1,\n};\nclass InViewFeature extends Feature {\n constructor() {\n super(...arguments);\n this.hasEnteredView = false;\n this.isInView = false;\n }\n startObserver() {\n this.unmount();\n const { viewport = {} } = this.node.getProps();\n const { root, margin: rootMargin, amount = \"some\", once } = viewport;\n const options = {\n root: root ? root.current : undefined,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholdNames[amount],\n };\n const onIntersectionUpdate = (entry) => {\n const { isIntersecting } = entry;\n /**\n * If there's been no change in the viewport state, early return.\n */\n if (this.isInView === isIntersecting)\n return;\n this.isInView = isIntersecting;\n /**\n * Handle hasEnteredView. If this is only meant to run once, and\n * element isn't visible, early return. Otherwise set hasEnteredView to true.\n */\n if (once && !isIntersecting && this.hasEnteredView) {\n return;\n }\n else if (isIntersecting) {\n this.hasEnteredView = true;\n }\n if (this.node.animationState) {\n this.node.animationState.setActive(\"whileInView\", isIntersecting);\n }\n /**\n * Use the latest committed props rather than the ones in scope\n * when this observer is created\n */\n const { onViewportEnter, onViewportLeave } = this.node.getProps();\n const callback = isIntersecting ? onViewportEnter : onViewportLeave;\n callback && callback(entry);\n };\n return observeIntersection(this.node.current, options, onIntersectionUpdate);\n }\n mount() {\n this.startObserver();\n }\n update() {\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const { props, prevProps } = this.node;\n const hasOptionsChanged = [\"amount\", \"margin\", \"root\"].some(hasViewportOptionChanged(props, prevProps));\n if (hasOptionsChanged) {\n this.startObserver();\n }\n }\n unmount() { }\n}\nfunction hasViewportOptionChanged({ viewport = {} }, { viewport: prevViewport = {} } = {}) {\n return (name) => viewport[name] !== prevViewport[name];\n}\n\nexport { InViewFeature };\n","import { HoverGesture } from '../../gestures/hover.mjs';\nimport { FocusGesture } from '../../gestures/focus.mjs';\nimport { PressGesture } from '../../gestures/press.mjs';\nimport { InViewFeature } from './viewport/index.mjs';\n\nconst gestureAnimations = {\n inView: {\n Feature: InViewFeature,\n },\n tap: {\n Feature: PressGesture,\n },\n focus: {\n Feature: FocusGesture,\n },\n hover: {\n Feature: HoverGesture,\n },\n};\n\nexport { gestureAnimations };\n","import { HTMLProjectionNode } from '../../projection/node/HTMLProjectionNode.mjs';\nimport { MeasureLayout } from './layout/MeasureLayout.mjs';\n\nconst layout = {\n layout: {\n ProjectionNode: HTMLProjectionNode,\n MeasureLayout,\n },\n};\n\nexport { layout };\n","\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst MotionContext = createContext({});\n\nexport { MotionContext };\n","const isBrowser = typeof window !== \"undefined\";\n\nexport { isBrowser };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nconst useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { useContext, useRef, useInsertionEffect, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';\nimport { microtask } from '../../frameloop/microtask.mjs';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nlet scheduleHandoffComplete = false;\nfunction useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor) {\n var _a;\n const { visualElement: parent } = useContext(MotionContext);\n const lazyContext = useContext(LazyContext);\n const presenceContext = useContext(PresenceContext);\n const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;\n const visualElementRef = useRef();\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n createVisualElement = createVisualElement || lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState,\n parent,\n props,\n presenceContext,\n blockInitialAnimation: presenceContext\n ? presenceContext.initial === false\n : false,\n reducedMotionConfig,\n });\n }\n const visualElement = visualElementRef.current;\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);\n if (visualElement &&\n !visualElement.projection &&\n ProjectionNodeConstructor &&\n (visualElement.type === \"html\" || visualElement.type === \"svg\")) {\n createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);\n }\n useInsertionEffect(() => {\n visualElement && visualElement.update(props, presenceContext);\n });\n /**\n * Cache this value as we want to know whether HandoffAppearAnimations\n * was present on initial render - it will be deleted after this.\n */\n const optimisedAppearId = props[optimizedAppearDataAttribute];\n const wantsHandoff = useRef(Boolean(optimisedAppearId) &&\n !window.MotionHandoffIsComplete &&\n ((_a = window.MotionHasOptimisedAnimation) === null || _a === void 0 ? void 0 : _a.call(window, optimisedAppearId)));\n useIsomorphicLayoutEffect(() => {\n if (!visualElement)\n return;\n visualElement.updateFeatures();\n microtask.render(visualElement.render);\n /**\n * Ideally this function would always run in a useEffect.\n *\n * However, if we have optimised appear animations to handoff from,\n * it needs to happen synchronously to ensure there's no flash of\n * incorrect styles in the event of a hydration error.\n *\n * So if we detect a situtation where optimised appear animations\n * are running, we use useLayoutEffect to trigger animations.\n */\n if (wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n });\n useEffect(() => {\n if (!visualElement)\n return;\n if (!wantsHandoff.current && visualElement.animationState) {\n visualElement.animationState.animateChanges();\n }\n wantsHandoff.current = false;\n // This ensures all future calls to animateChanges() will run in useEffect\n if (!scheduleHandoffComplete) {\n scheduleHandoffComplete = true;\n queueMicrotask(completeHandoff);\n }\n });\n return visualElement;\n}\nfunction completeHandoff() {\n window.MotionHandoffIsComplete = true;\n}\nfunction createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {\n const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, } = props;\n visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props[\"data-framer-portal-id\"]\n ? undefined\n : getClosestProjectingNode(visualElement.parent));\n visualElement.projection.setOptions({\n layoutId,\n layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement,\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig,\n layoutScroll,\n layoutRoot,\n });\n}\nfunction getClosestProjectingNode(visualElement) {\n if (!visualElement)\n return undefined;\n return visualElement.options.allowProjection !== false\n ? visualElement.projection\n : getClosestProjectingNode(visualElement.parent);\n}\n\nexport { useVisualElement };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback((instance) => {\n instance && visualState.mount && visualState.mount(instance);\n if (visualElement) {\n if (instance) {\n visualElement.mount(instance);\n }\n else {\n visualElement.unmount();\n }\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { isVariantLabel } from './is-variant-label.mjs';\nimport { variantProps } from './variant-props.mjs';\n\nfunction isControllingVariants(props) {\n return (isAnimationControls(props.animate) ||\n variantProps.some((name) => isVariantLabel(props[name])));\n}\nfunction isVariantNode(props) {\n return Boolean(isControllingVariants(props) || props.variants);\n}\n\nexport { isControllingVariants, isVariantNode };\n","import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';\nimport { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (isControllingVariants(props)) {\n const { initial, animate } = props;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useMemo } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));\n return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","const featureProps = {\n animation: [\n \"animate\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"exit\",\n \"whileInView\",\n \"whileFocus\",\n \"whileDrag\",\n ],\n exit: [\"exit\"],\n drag: [\"drag\", \"dragControls\"],\n focus: [\"whileFocus\"],\n hover: [\"whileHover\", \"onHoverStart\", \"onHoverEnd\"],\n tap: [\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"],\n pan: [\"onPan\", \"onPanStart\", \"onPanSessionStart\", \"onPanEnd\"],\n inView: [\"whileInView\", \"onViewportEnter\", \"onViewportLeave\"],\n layout: [\"layout\", \"layoutId\"],\n};\nconst featureDefinitions = {};\nfor (const key in featureProps) {\n featureDefinitions[key] = {\n isEnabled: (props) => featureProps[key].some((name) => !!props[name]),\n };\n}\n\nexport { featureDefinitions };\n","import { featureDefinitions } from './definitions.mjs';\n\nfunction loadFeatures(features) {\n for (const key in features) {\n featureDefinitions[key] = {\n ...featureDefinitions[key],\n ...features[key],\n };\n }\n}\n\nexport { loadFeatures };\n","const motionComponentSymbol = Symbol.for(\"motionComponentSymbol\");\n\nexport { motionComponentSymbol };\n","\"use client\";\nimport { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures } from './features/load-features.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { LazyContext } from '../context/LazyContext.mjs';\nimport { motionComponentSymbol } from './utils/symbol.mjs';\nimport { warning, invariant } from '../utils/errors.mjs';\nimport { featureDefinitions } from './features/definitions.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we need to measure the element we load this functionality in a\n * separate class component in order to gain access to getSnapshotBeforeUpdate.\n */\n let MeasureLayout;\n const configAndProps = {\n ...useContext(MotionConfigContext),\n ...props,\n layoutId: useLayoutId(props),\n };\n const { isStatic } = configAndProps;\n const context = useCreateMotionContext(props);\n const visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n useStrictMode(configAndProps, preloadedFeatures);\n const layoutProjection = getProjectionFunctionality(configAndProps);\n MeasureLayout = layoutProjection.MeasureLayout;\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));\n }\n const ForwardRefMotionComponent = forwardRef(MotionComponent);\n ForwardRefMotionComponent[motionComponentSymbol] = Component;\n return ForwardRefMotionComponent;\n}\nfunction useLayoutId({ layoutId }) {\n const layoutGroupId = useContext(LayoutGroupContext).id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useStrictMode(configAndProps, preloadedFeatures) {\n const isStrict = useContext(LazyContext).strict;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n isStrict) {\n const strictMessage = \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\";\n configAndProps.ignoreStrict\n ? warning(false, strictMessage)\n : invariant(false, strictMessage);\n }\n}\nfunction getProjectionFunctionality(props) {\n const { drag, layout } = featureDefinitions;\n if (!drag && !layout)\n return {};\n const combined = { ...drag, ...layout };\n return {\n MeasureLayout: (drag === null || drag === void 0 ? void 0 : drag.isEnabled(props)) || (layout === null || layout === void 0 ? void 0 : layout.isEnabled(props))\n ? combined.MeasureLayout\n : undefined,\n ProjectionNode: combined.ProjectionNode,\n };\n}\n\nexport { createRendererMotionComponent };\n","/**\n * We keep these listed separately as we use the lowercase tag names as part\n * of the runtime bundle to detect SVG components\n */\nconst lowercaseSVGElements = [\n \"animate\",\n \"circle\",\n \"defs\",\n \"desc\",\n \"ellipse\",\n \"g\",\n \"image\",\n \"line\",\n \"filter\",\n \"marker\",\n \"mask\",\n \"metadata\",\n \"path\",\n \"pattern\",\n \"polygon\",\n \"polyline\",\n \"rect\",\n \"stop\",\n \"switch\",\n \"symbol\",\n \"svg\",\n \"text\",\n \"tspan\",\n \"use\",\n \"view\",\n];\n\nexport { lowercaseSVGElements };\n","import { lowercaseSVGElements } from '../../svg/lowercase-elements.mjs';\n\nfunction isSVGComponent(Component) {\n if (\n /**\n * If it's not a string, it's a custom React component. Currently we only support\n * HTML custom React components.\n */\n typeof Component !== \"string\" ||\n /**\n * If it contains a dash, the element is a custom HTML webcomponent.\n */\n Component.includes(\"-\")) {\n return false;\n }\n else if (\n /**\n * If it's in our list of lowercase SVG tags, it's an SVG component\n */\n lowercaseSVGElements.indexOf(Component) > -1 ||\n /**\n * If it contains a capital letter, it's an SVG component\n */\n /[A-Z]/u.test(Component)) {\n return true;\n }\n return false;\n}\n\nexport { isSVGComponent };\n","function renderHTML(element, { style, vars }, styleProp, projection) {\n Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp));\n // Loop over any CSS variables and assign those.\n for (const key in vars) {\n element.style.setProperty(key, vars[key]);\n }\n}\n\nexport { renderHTML };\n","/**\n * A set of attribute names that are always read/written as camel case.\n */\nconst camelCaseAttributes = new Set([\n \"baseFrequency\",\n \"diffuseConstant\",\n \"kernelMatrix\",\n \"kernelUnitLength\",\n \"keySplines\",\n \"keyTimes\",\n \"limitingConeAngle\",\n \"markerHeight\",\n \"markerWidth\",\n \"numOctaves\",\n \"targetX\",\n \"targetY\",\n \"surfaceScale\",\n \"specularConstant\",\n \"specularExponent\",\n \"stdDeviation\",\n \"tableValues\",\n \"viewBox\",\n \"gradientTransform\",\n \"pathLength\",\n \"startOffset\",\n \"textLength\",\n \"lengthAdjust\",\n]);\n\nexport { camelCaseAttributes };\n","import { camelToDash } from '../../dom/utils/camel-to-dash.mjs';\nimport { renderHTML } from '../../html/utils/render.mjs';\nimport { camelCaseAttributes } from './camel-case-attrs.mjs';\n\nfunction renderSVG(element, renderState, _styleProp, projection) {\n renderHTML(element, renderState, undefined, projection);\n for (const key in renderState.attrs) {\n element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]);\n }\n}\n\nexport { renderSVG };\n","import { scaleCorrectors } from '../../projection/styles/scale-correction.mjs';\nimport { transformProps } from '../../render/html/utils/transform.mjs';\n\nfunction isForcedMotionValue(key, { layout, layoutId }) {\n return (transformProps.has(key) ||\n key.startsWith(\"origin\") ||\n ((layout || layoutId !== undefined) &&\n (!!scaleCorrectors[key] || key === \"opacity\")));\n}\n\nexport { isForcedMotionValue };\n","import { isForcedMotionValue } from '../../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n var _a;\n const { style } = props;\n const newValues = {};\n for (const key in style) {\n if (isMotionValue(style[key]) ||\n (prevProps.style &&\n isMotionValue(prevProps.style[key])) ||\n isForcedMotionValue(key, props) ||\n ((_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.getValue(key)) === null || _a === void 0 ? void 0 : _a.liveStyle) !== undefined) {\n newValues[key] = style[key];\n }\n }\n /**\n * If the willChange style has been manually set as a string, set\n * applyWillChange to false to prevent it from automatically being applied.\n */\n if (visualElement && style && typeof style.willChange === \"string\") {\n visualElement.applyWillChange = false;\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { isMotionValue } from '../../../value/utils/is-motion-value.mjs';\nimport { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';\nimport { transformPropOrder } from '../../html/utils/transform.mjs';\n\nfunction scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);\n for (const key in props) {\n if (isMotionValue(props[key]) ||\n isMotionValue(prevProps[key])) {\n const targetKey = transformPropOrder.indexOf(key) !== -1\n ? \"attr\" + key.charAt(0).toUpperCase() + key.substring(1)\n : key;\n newValues[targetKey] = props[key];\n }\n }\n return newValues;\n}\n\nexport { scrapeMotionValuesFromProps };\n","import { useRef } from 'react';\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nfunction useConstant(init) {\n const ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}\n\nexport { useConstant };\n","import { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\nimport { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';\nimport { getWillChangeName } from '../../value/use-will-change/get-will-change-name.mjs';\nimport { addUniqueItem } from '../../utils/array.mjs';\n\nfunction makeState({ applyWillChange = false, scrapeMotionValuesFromProps, createRenderState, onMount, }, props, context, presenceContext, isStatic) {\n const state = {\n latestValues: makeLatestValues(props, context, presenceContext, isStatic ? false : applyWillChange, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = (instance) => onMount(props, instance, state);\n }\n return state;\n}\nconst makeUseVisualState = (config) => (props, isStatic) => {\n const context = useContext(MotionContext);\n const presenceContext = useContext(PresenceContext);\n const make = () => makeState(config, props, context, presenceContext, isStatic);\n return isStatic ? make() : useConstant(make);\n};\nfunction addWillChange(willChange, name) {\n const memberName = getWillChangeName(name);\n if (memberName) {\n addUniqueItem(willChange, memberName);\n }\n}\nfunction forEachDefinition(props, definition, callback) {\n const list = Array.isArray(definition) ? definition : [definition];\n for (let i = 0; i < list.length; i++) {\n const resolved = resolveVariantFromProps(props, list[i]);\n if (resolved) {\n const { transitionEnd, transition, ...target } = resolved;\n callback(target, transitionEnd);\n }\n }\n}\nfunction makeLatestValues(props, context, presenceContext, shouldApplyWillChange, scrapeMotionValues) {\n var _a;\n const values = {};\n const willChange = [];\n const applyWillChange = shouldApplyWillChange && ((_a = props.style) === null || _a === void 0 ? void 0 : _a.willChange) === undefined;\n const motionValues = scrapeMotionValues(props, {});\n for (const key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n let { initial, animate } = props;\n const isControllingVariants$1 = isControllingVariants(props);\n const isVariantNode$1 = isVariantNode(props);\n if (context &&\n isVariantNode$1 &&\n !isControllingVariants$1 &&\n props.inherit !== false) {\n if (initial === undefined)\n initial = context.initial;\n if (animate === undefined)\n animate = context.animate;\n }\n let isInitialAnimationBlocked = presenceContext\n ? presenceContext.initial === false\n : false;\n isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;\n const variantToSet = isInitialAnimationBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n forEachDefinition(props, variantToSet, (target, transitionEnd) => {\n for (const key in target) {\n let valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n const index = isInitialAnimationBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (const key in transitionEnd) {\n values[key] = transitionEnd[key];\n }\n });\n }\n // Add animating values to will-change\n if (applyWillChange) {\n if (animate && initial !== false && !isAnimationControls(animate)) {\n forEachDefinition(props, animate, (target) => {\n for (const key in target) {\n addWillChange(willChange, key);\n }\n });\n }\n if (willChange.length) {\n values.willChange = willChange.join(\",\");\n }\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","const createHtmlRenderState = () => ({\n style: {},\n transform: {},\n transformOrigin: {},\n vars: {},\n});\n\nexport { createHtmlRenderState };\n","import { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nconst createSvgRenderState = () => ({\n ...createHtmlRenderState(),\n attrs: {},\n});\n\nexport { createSvgRenderState };\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","import { transformPropOrder } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.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 valueIsDefault = parseFloat(value) === 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 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 };\n","import { buildTransform } from './build-transform.mjs';\nimport { isCSSVariableName } from '../../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './transform.mjs';\nimport { getValueAsType } from '../../dom/value-types/get-as-type.mjs';\nimport { numberValueTypes } from '../../dom/value-types/number.mjs';\n\nfunction buildHTMLStyles(state, latestValues, transformTemplate) {\n const { style, vars, transformOrigin } = state;\n // Track whether we encounter any transform or transformOrigin values.\n let hasTransform = false;\n let hasTransformOrigin = false;\n /**\n * Loop over all our latest animated values and decide whether to handle them\n * as a style or CSS variable.\n *\n * Transforms and transform origins are kept separately for further processing.\n */\n for (const key in latestValues) {\n const value = latestValues[key];\n if (transformProps.has(key)) {\n // If this is a transform, flag to enable further transform processing\n hasTransform = true;\n continue;\n }\n else if (isCSSVariableName(key)) {\n vars[key] = value;\n continue;\n }\n else {\n // Convert the value to its default value type, ie 0 -> \"0px\"\n const valueAsType = getValueAsType(value, numberValueTypes[key]);\n if (key.startsWith(\"origin\")) {\n // If this is a transform origin, flag and enable further transform-origin processing\n hasTransformOrigin = true;\n transformOrigin[key] =\n valueAsType;\n }\n else {\n style[key] = valueAsType;\n }\n }\n }\n if (!latestValues.transform) {\n if (hasTransform || transformTemplate) {\n style.transform = buildTransform(latestValues, state.transform, transformTemplate);\n }\n else if (style.transform) {\n /**\n * If we have previously created a transform but currently don't have any,\n * reset transform style to none.\n */\n style.transform = \"none\";\n }\n }\n /**\n * Build a transformOrigin style. Uses the same defaults as the browser for\n * undefined origins.\n */\n if (hasTransformOrigin) {\n const { originX = \"50%\", originY = \"50%\", originZ = 0, } = transformOrigin;\n style.transformOrigin = `${originX} ${originY} ${originZ}`;\n }\n}\n\nexport { buildHTMLStyles };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === \"string\"\n ? origin\n : px.transform(offset + size * origin);\n}\n/**\n * The SVG transform origin defaults are different to CSS and is less intuitive,\n * so we use the measured dimensions of the SVG to reconcile these.\n */\nfunction calcSVGTransformOrigin(dimensions, originX, originY) {\n const pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);\n const pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);\n return `${pxOriginX} ${pxOriginY}`;\n}\n\nexport { calcSVGTransformOrigin };\n","import { px } from '../../../value/types/numbers/units.mjs';\n\nconst dashKeys = {\n offset: \"stroke-dashoffset\",\n array: \"stroke-dasharray\",\n};\nconst camelKeys = {\n offset: \"strokeDashoffset\",\n array: \"strokeDasharray\",\n};\n/**\n * Build SVG path properties. Uses the path's measured length to convert\n * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset\n * and stroke-dasharray attributes.\n *\n * This function is mutative to reduce per-frame GC.\n */\nfunction buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {\n // Normalise path length by setting SVG attribute pathLength to 1\n attrs.pathLength = 1;\n // We use dash case when setting attributes directly to the DOM node and camel case\n // when defining props on a React component.\n const keys = useDashCase ? dashKeys : camelKeys;\n // Build the dash offset\n attrs[keys.offset] = px.transform(-offset);\n // Build the dash array\n const pathLength = px.transform(length);\n const pathSpacing = px.transform(spacing);\n attrs[keys.array] = `${pathLength} ${pathSpacing}`;\n}\n\nexport { buildSVGPath };\n","import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';\nimport { calcSVGTransformOrigin } from './transform-origin.mjs';\nimport { buildSVGPath } from './path.mjs';\n\n/**\n * Build SVG visual attrbutes, like cx and style.transform\n */\nfunction buildSVGAttrs(state, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0, \n// This is object creation, which we try to avoid per-frame.\n...latest }, isSVGTag, transformTemplate) {\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, dimensions } = state;\n /**\n * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs\n * and copy it into style.\n */\n if (attrs.transform) {\n if (dimensions)\n style.transform = attrs.transform;\n delete attrs.transform;\n }\n // Parse transformOrigin\n if (dimensions &&\n (originX !== undefined || originY !== undefined || style.transform)) {\n style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);\n }\n // 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 };\n","const isSVGTag = (tag) => typeof tag === \"string\" && tag.toLowerCase() === \"svg\";\n\nexport { isSVGTag };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: (props, instance, { renderState, latestValues }) => {\n frame.read(() => {\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n });\n frame.render(() => {\n buildSVGAttrs(renderState, latestValues, isSVGTag(instance.tagName), props.transformTemplate);\n renderSVG(instance, renderState);\n });\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nconst htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n applyWillChange: true,\n scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (const key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues({ transformTemplate }, visualState) {\n return useMemo(() => {\n const state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, transformTemplate);\n return Object.assign({}, state.vars, state.style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState) {\n const styleProp = props.style || {};\n const style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState));\n return style;\n}\nfunction useHTMLProps(props, visualState) {\n // The `any` isn't ideal but it is the type of createElement props argument\n const htmlProps = {};\n const style = useStyle(props, visualState);\n if (props.drag && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : `pan-${props.drag === \"x\" ? \"y\" : \"x\"}`;\n }\n if (props.tabIndex === undefined &&\n (props.onTap || props.onTapStart || props.whileTap)) {\n htmlProps.tabIndex = 0;\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nconst validMotionProps = new Set([\n \"animate\",\n \"exit\",\n \"variants\",\n \"initial\",\n \"style\",\n \"values\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"custom\",\n \"inherit\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"_dragX\",\n \"_dragY\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"globalTapTarget\",\n \"ignoreStrict\",\n \"viewport\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return (key.startsWith(\"while\") ||\n (key.startsWith(\"drag\") && key !== \"draggable\") ||\n key.startsWith(\"layout\") ||\n key.startsWith(\"onTap\") ||\n key.startsWith(\"onPan\") ||\n key.startsWith(\"onLayout\") ||\n validMotionProps.has(key));\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nlet shouldForward = (key) => !isValidMotionProp(key);\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = (key) => key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n const filteredProps = {};\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\")\n continue;\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] &&\n key.startsWith(\"onDrag\"))) {\n filteredProps[key] =\n props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nfunction useSVGProps(props, visualState, _isStatic, Component) {\n const visualProps = useMemo(() => {\n const state = createSvgRenderState();\n buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate);\n return {\n ...state.attrs,\n style: { ...state.style },\n };\n }, [visualState]);\n if (props.style) {\n const rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = { ...rawStyles, ...visualProps.style };\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { Fragment, useMemo, createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction createUseRender(forwardMotionProps = false) {\n const useRender = (Component, props, ref, { latestValues }, isStatic) => {\n const useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n const visualProps = useVisualProps(props, latestValues, isStatic, Component);\n const filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n const elementProps = Component !== Fragment\n ? { ...filteredProps, ...visualProps, ref }\n : {};\n /**\n * If component has been handed a motion value as its child,\n * memoise its initial value and render that. Subsequent updates\n * will be handled by the onChange handler\n */\n const { children } = props;\n const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);\n return createElement(Component, {\n ...elementProps,\n children: renderedChildren,\n });\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { createRendererMotionComponent } from '../../motion/index.mjs';\nimport { isSVGComponent } from '../dom/utils/is-svg-component.mjs';\nimport { svgMotionConfig } from '../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../html/config-motion.mjs';\nimport { createUseRender } from '../dom/use-render.mjs';\n\nfunction createMotionComponentFactory(preloadedFeatures, createVisualElement) {\n return function createMotionComponent(Component, { forwardMotionProps } = { forwardMotionProps: false }) {\n const baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n const config = {\n ...baseConfig,\n preloadedFeatures,\n useRender: createUseRender(forwardMotionProps),\n createVisualElement,\n Component,\n };\n return createRendererMotionComponent(config);\n };\n}\n\nexport { createMotionComponentFactory };\n","// Does this device prefer reduced motion? Returns `null` server-side.\nconst prefersReducedMotion = { current: null };\nconst hasReducedMotionListener = { current: false };\n\nexport { hasReducedMotionListener, prefersReducedMotion };\n","import { isBrowser } from '../is-browser.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from './state.mjs';\n\nfunction initPrefersReducedMotion() {\n hasReducedMotionListener.current = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);\n motionMediaQuery.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n\nexport { initPrefersReducedMotion };\n","import { warnOnce } from '../../utils/warn-once.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction updateMotionValuesFromProps(element, next, prev) {\n for (const key in next) {\n const nextValue = next[key];\n const prevValue = prev[key];\n if (isMotionValue(nextValue)) {\n /**\n * If this is a motion value found in props or style, we want to add it\n * to our visual element's motion value map.\n */\n element.addValue(key, nextValue);\n /**\n * Check the version of the incoming motion value with this version\n * and warn against mismatches.\n */\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(nextValue.version === \"11.7.0\", `Attempting to mix Framer Motion versions ${nextValue.version} with 11.7.0 may not work as expected.`);\n }\n }\n else if (isMotionValue(prevValue)) {\n /**\n * If we're swapping from a motion value to a static value,\n * create a new motion value from that\n */\n element.addValue(key, motionValue(nextValue, { owner: element }));\n }\n else if (prevValue !== nextValue) {\n /**\n * If this is a flat value that has changed, update the motion value\n * or create one if it doesn't exist. We only want to do this if we're\n * not handling the value with our animation state.\n */\n if (element.hasValue(key)) {\n const existingValue = element.getValue(key);\n if (existingValue.liveStyle === true) {\n existingValue.jump(nextValue);\n }\n else if (!existingValue.hasAnimated) {\n existingValue.set(nextValue);\n }\n }\n else {\n const latestValue = element.getStaticValue(key);\n element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));\n }\n }\n }\n // Handle removed values\n for (const key in prev) {\n if (next[key] === undefined)\n element.removeValue(key);\n }\n return next;\n}\n\nexport { updateMotionValuesFromProps };\n","const visualElementStore = new WeakMap();\n\nexport { visualElementStore };\n","import { color } from '../../../value/types/color/index.mjs';\nimport { complex } from '../../../value/types/complex/index.mjs';\nimport { dimensionValueTypes } from './dimensions.mjs';\nimport { testValueType } from './test.mjs';\n\n/**\n * A list of all ValueTypes\n */\nconst valueTypes = [...dimensionValueTypes, color, complex];\n/**\n * Tests a value against the list of ValueTypes\n */\nconst findValueType = (v) => valueTypes.find(testValueType(v));\n\nexport { findValueType };\n","import { initPrefersReducedMotion } from '../utils/reduced-motion/index.mjs';\nimport { hasReducedMotionListener, prefersReducedMotion } from '../utils/reduced-motion/state.mjs';\nimport { SubscriptionManager } from '../utils/subscription-manager.mjs';\nimport { motionValue } from '../value/index.mjs';\nimport { isMotionValue } from '../value/utils/is-motion-value.mjs';\nimport { transformProps } from './html/utils/transform.mjs';\nimport { isControllingVariants, isVariantNode } from './utils/is-controlling-variants.mjs';\nimport { updateMotionValuesFromProps } from './utils/motion-values.mjs';\nimport { resolveVariantFromProps } from './utils/resolve-variants.mjs';\nimport { warnOnce } from '../utils/warn-once.mjs';\nimport { featureDefinitions } from '../motion/features/definitions.mjs';\nimport { visualElementStore } from './store.mjs';\nimport { KeyframeResolver } from './utils/KeyframesResolver.mjs';\nimport { isNumericalString } from '../utils/is-numerical-string.mjs';\nimport { isZeroValueString } from '../utils/is-zero-value-string.mjs';\nimport { findValueType } from './dom/value-types/find.mjs';\nimport { complex } from '../value/types/complex/index.mjs';\nimport { getAnimatableNone } from './dom/value-types/animatable-none.mjs';\nimport { createBox } from '../projection/geometry/models.mjs';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { frame, cancelFrame } from '../frameloop/frame.mjs';\n\nconst propEventHandlers = [\n \"AnimationStart\",\n \"AnimationComplete\",\n \"Update\",\n \"BeforeLayoutMeasure\",\n \"LayoutMeasure\",\n \"LayoutAnimationStart\",\n \"LayoutAnimationComplete\",\n];\n/**\n * A VisualElement is an imperative abstraction around UI elements such as\n * HTMLElement, SVGElement, Three.Object3D etc.\n */\nclass VisualElement {\n /**\n * This method takes React props and returns found MotionValues. For example, HTML\n * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.\n *\n * This isn't an abstract method as it needs calling in the constructor, but it is\n * intended to be one.\n */\n scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {\n return {};\n }\n constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {\n /**\n * If true, will-change will be applied to the element. Only HTMLVisualElements\n * currently support this.\n */\n this.applyWillChange = false;\n /**\n * A reference to the current underlying Instance, e.g. a HTMLElement\n * or Three.Mesh etc.\n */\n this.current = null;\n /**\n * A set containing references to this VisualElement's children.\n */\n this.children = new Set();\n /**\n * Determine what role this visual element should take in the variant tree.\n */\n this.isVariantNode = false;\n this.isControllingVariants = false;\n /**\n * Decides whether this VisualElement should animate in reduced motion\n * mode.\n *\n * TODO: This is currently set on every individual VisualElement but feels\n * like it could be set globally.\n */\n this.shouldReduceMotion = null;\n /**\n * A map of all motion values attached to this visual element. Motion\n * values are source of truth for any given animated value. A motion\n * value might be provided externally by the component via props.\n */\n this.values = new Map();\n this.KeyframeResolver = KeyframeResolver;\n /**\n * Cleanup functions for active features (hover/tap/exit etc)\n */\n this.features = {};\n /**\n * A map of every subscription that binds the provided or generated\n * motion values onChange listeners to this visual element.\n */\n this.valueSubscriptions = new Map();\n /**\n * A reference to the previously-provided motion values as returned\n * from scrapeMotionValuesFromProps. We use the keys in here to determine\n * if any motion values need to be removed after props are updated.\n */\n this.prevMotionValues = {};\n /**\n * An object containing a SubscriptionManager for each active event.\n */\n this.events = {};\n /**\n * An object containing an unsubscribe function for each prop event subscription.\n * For example, every \"Update\" event can have multiple subscribers via\n * VisualElement.on(), but only one of those can be defined via the onUpdate prop.\n */\n this.propEventSubscriptions = {};\n this.notifyUpdate = () => this.notify(\"Update\", this.latestValues);\n this.render = () => {\n if (!this.current)\n return;\n this.triggerBuild();\n this.renderInstance(this.current, this.renderState, this.props.style, this.projection);\n };\n this.renderScheduledAt = 0.0;\n this.scheduleRender = () => {\n const now = time.now();\n if (this.renderScheduledAt < now) {\n this.renderScheduledAt = now;\n frame.render(this.render, false, true);\n }\n };\n const { latestValues, renderState } = visualState;\n this.latestValues = latestValues;\n this.baseTarget = { ...latestValues };\n this.initialValues = props.initial ? { ...latestValues } : {};\n this.renderState = renderState;\n this.parent = parent;\n this.props = props;\n this.presenceContext = presenceContext;\n this.depth = parent ? parent.depth + 1 : 0;\n this.reducedMotionConfig = reducedMotionConfig;\n this.options = options;\n this.blockInitialAnimation = Boolean(blockInitialAnimation);\n this.isControllingVariants = isControllingVariants(props);\n this.isVariantNode = isVariantNode(props);\n if (this.isVariantNode) {\n this.variantChildren = new Set();\n }\n this.manuallyAnimateOnMount = Boolean(parent && parent.current);\n /**\n * Any motion values that are provided to the element when created\n * aren't yet bound to the element, as this would technically be impure.\n * However, we iterate through the motion values and set them to the\n * initial values for this component.\n *\n * TODO: This is impure and we should look at changing this to run on mount.\n * Doing so will break some tests but this isn't necessarily a breaking change,\n * more a reflection of the test.\n */\n const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);\n for (const key in initialMotionValues) {\n const value = initialMotionValues[key];\n if (latestValues[key] !== undefined && isMotionValue(value)) {\n value.set(latestValues[key], false);\n }\n }\n }\n mount(instance) {\n this.current = instance;\n visualElementStore.set(instance, this);\n if (this.projection && !this.projection.instance) {\n this.projection.mount(instance);\n }\n if (this.parent && this.isVariantNode && !this.isControllingVariants) {\n this.removeFromVariantTree = this.parent.addVariantChild(this);\n }\n this.values.forEach((value, key) => this.bindToMotionValue(key, value));\n if (!hasReducedMotionListener.current) {\n initPrefersReducedMotion();\n }\n this.shouldReduceMotion =\n this.reducedMotionConfig === \"never\"\n ? false\n : this.reducedMotionConfig === \"always\"\n ? true\n : prefersReducedMotion.current;\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(this.shouldReduceMotion !== true, \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\");\n }\n if (this.parent)\n this.parent.children.add(this);\n this.update(this.props, this.presenceContext);\n }\n unmount() {\n visualElementStore.delete(this.current);\n this.projection && this.projection.unmount();\n cancelFrame(this.notifyUpdate);\n cancelFrame(this.render);\n this.valueSubscriptions.forEach((remove) => remove());\n this.valueSubscriptions.clear();\n this.removeFromVariantTree && this.removeFromVariantTree();\n this.parent && this.parent.children.delete(this);\n for (const key in this.events) {\n this.events[key].clear();\n }\n for (const key in this.features) {\n const feature = this.features[key];\n if (feature) {\n feature.unmount();\n feature.isMounted = false;\n }\n }\n this.current = null;\n }\n bindToMotionValue(key, value) {\n if (this.valueSubscriptions.has(key)) {\n this.valueSubscriptions.get(key)();\n }\n const valueIsTransform = transformProps.has(key);\n const removeOnChange = value.on(\"change\", (latestValue) => {\n this.latestValues[key] = latestValue;\n this.props.onUpdate && frame.preRender(this.notifyUpdate);\n if (valueIsTransform && this.projection) {\n this.projection.isTransformDirty = true;\n }\n });\n const removeOnRenderRequest = value.on(\"renderRequest\", this.scheduleRender);\n let removeSyncCheck;\n if (window.MotionCheckAppearSync) {\n removeSyncCheck = window.MotionCheckAppearSync(this, key, value);\n }\n this.valueSubscriptions.set(key, () => {\n removeOnChange();\n removeOnRenderRequest();\n if (removeSyncCheck)\n removeSyncCheck();\n if (value.owner)\n value.stop();\n });\n }\n sortNodePosition(other) {\n /**\n * If these nodes aren't even of the same type we can't compare their depth.\n */\n if (!this.current ||\n !this.sortInstanceNodePosition ||\n this.type !== other.type) {\n return 0;\n }\n return this.sortInstanceNodePosition(this.current, other.current);\n }\n updateFeatures() {\n let key = \"animation\";\n for (key in featureDefinitions) {\n const featureDefinition = featureDefinitions[key];\n if (!featureDefinition)\n continue;\n const { isEnabled, Feature: FeatureConstructor } = featureDefinition;\n /**\n * If this feature is enabled but not active, make a new instance.\n */\n if (!this.features[key] &&\n FeatureConstructor &&\n isEnabled(this.props)) {\n this.features[key] = new FeatureConstructor(this);\n }\n /**\n * If we have a feature, mount or update it.\n */\n if (this.features[key]) {\n const feature = this.features[key];\n if (feature.isMounted) {\n feature.update();\n }\n else {\n feature.mount();\n feature.isMounted = true;\n }\n }\n }\n }\n triggerBuild() {\n this.build(this.renderState, this.latestValues, this.props);\n }\n /**\n * Measure the current viewport box with or without transforms.\n * Only measures axis-aligned boxes, rotate and skew must be manually\n * removed with a re-render to work.\n */\n measureViewportBox() {\n return this.current\n ? this.measureInstanceViewportBox(this.current, this.props)\n : createBox();\n }\n getStaticValue(key) {\n return this.latestValues[key];\n }\n setStaticValue(key, value) {\n this.latestValues[key] = value;\n }\n /**\n * Update the provided props. Ensure any newly-added motion values are\n * added to our map, old ones removed, and listeners updated.\n */\n update(props, presenceContext) {\n if (props.transformTemplate || this.props.transformTemplate) {\n this.scheduleRender();\n }\n this.prevProps = this.props;\n this.props = props;\n this.prevPresenceContext = this.presenceContext;\n this.presenceContext = presenceContext;\n /**\n * Update prop event handlers ie onAnimationStart, onAnimationComplete\n */\n for (let i = 0; i < propEventHandlers.length; i++) {\n const key = propEventHandlers[i];\n if (this.propEventSubscriptions[key]) {\n this.propEventSubscriptions[key]();\n delete this.propEventSubscriptions[key];\n }\n const listenerName = (\"on\" + key);\n const listener = props[listenerName];\n if (listener) {\n this.propEventSubscriptions[key] = this.on(key, listener);\n }\n }\n this.prevMotionValues = updateMotionValuesFromProps(this, this.scrapeMotionValuesFromProps(props, this.prevProps, this), this.prevMotionValues);\n if (this.handleChildMotionValue) {\n this.handleChildMotionValue();\n }\n }\n getProps() {\n return this.props;\n }\n /**\n * Returns the variant definition with a given name.\n */\n getVariant(name) {\n return this.props.variants ? this.props.variants[name] : undefined;\n }\n /**\n * Returns the defined default transition on this component.\n */\n getDefaultTransition() {\n return this.props.transition;\n }\n getTransformPagePoint() {\n return this.props.transformPagePoint;\n }\n getClosestVariantNode() {\n return this.isVariantNode\n ? this\n : this.parent\n ? this.parent.getClosestVariantNode()\n : undefined;\n }\n /**\n * Add a child visual element to our set of children.\n */\n addVariantChild(child) {\n const closestVariantNode = this.getClosestVariantNode();\n if (closestVariantNode) {\n closestVariantNode.variantChildren &&\n closestVariantNode.variantChildren.add(child);\n return () => closestVariantNode.variantChildren.delete(child);\n }\n }\n /**\n * Add a motion value and bind it to this visual element.\n */\n addValue(key, value) {\n // Remove existing value if it exists\n const existingValue = this.values.get(key);\n if (value !== existingValue) {\n if (existingValue)\n this.removeValue(key);\n this.bindToMotionValue(key, value);\n this.values.set(key, value);\n this.latestValues[key] = value.get();\n }\n }\n /**\n * Remove a motion value and unbind any active subscriptions.\n */\n removeValue(key) {\n this.values.delete(key);\n const unsubscribe = this.valueSubscriptions.get(key);\n if (unsubscribe) {\n unsubscribe();\n this.valueSubscriptions.delete(key);\n }\n delete this.latestValues[key];\n this.removeValueFromRenderState(key, this.renderState);\n }\n /**\n * Check whether we have a motion value for this key\n */\n hasValue(key) {\n return this.values.has(key);\n }\n getValue(key, defaultValue) {\n if (this.props.values && this.props.values[key]) {\n return this.props.values[key];\n }\n let value = this.values.get(key);\n if (value === undefined && defaultValue !== undefined) {\n value = motionValue(defaultValue === null ? undefined : defaultValue, { owner: this });\n this.addValue(key, value);\n }\n return value;\n }\n /**\n * If we're trying to animate to a previously unencountered value,\n * we need to check for it in our state and as a last resort read it\n * directly from the instance (which might have performance implications).\n */\n readValue(key, target) {\n var _a;\n let value = this.latestValues[key] !== undefined || !this.current\n ? this.latestValues[key]\n : (_a = this.getBaseTargetFromProps(this.props, key)) !== null && _a !== void 0 ? _a : this.readValueFromInstance(this.current, key, this.options);\n if (value !== undefined && value !== null) {\n if (typeof value === \"string\" &&\n (isNumericalString(value) || isZeroValueString(value))) {\n // If this is a number read as a string, ie \"0\" or \"200\", convert it to a number\n value = parseFloat(value);\n }\n else if (!findValueType(value) && complex.test(target)) {\n value = getAnimatableNone(key, target);\n }\n this.setBaseTarget(key, isMotionValue(value) ? value.get() : value);\n }\n return isMotionValue(value) ? value.get() : value;\n }\n /**\n * Set the base target to later animate back to. This is currently\n * only hydrated on creation and when we first read a value.\n */\n setBaseTarget(key, value) {\n this.baseTarget[key] = value;\n }\n /**\n * Find the base target for a value thats been removed from all animation\n * props.\n */\n getBaseTarget(key) {\n var _a;\n const { initial } = this.props;\n let valueFromInitial;\n if (typeof initial === \"string\" || typeof initial === \"object\") {\n const variant = resolveVariantFromProps(this.props, initial, (_a = this.presenceContext) === null || _a === void 0 ? void 0 : _a.custom);\n if (variant) {\n valueFromInitial = variant[key];\n }\n }\n /**\n * If this value still exists in the current initial variant, read that.\n */\n if (initial && valueFromInitial !== undefined) {\n return valueFromInitial;\n }\n /**\n * Alternatively, if this VisualElement config has defined a getBaseTarget\n * so we can read the value from an alternative source, try that.\n */\n const target = this.getBaseTargetFromProps(this.props, key);\n if (target !== undefined && !isMotionValue(target))\n return target;\n /**\n * If the value was initially defined on initial, but it doesn't any more,\n * return undefined. Otherwise return the value as initially read from the DOM.\n */\n return this.initialValues[key] !== undefined &&\n valueFromInitial === undefined\n ? undefined\n : this.baseTarget[key];\n }\n on(eventName, callback) {\n if (!this.events[eventName]) {\n this.events[eventName] = new SubscriptionManager();\n }\n return this.events[eventName].add(callback);\n }\n notify(eventName, ...args) {\n if (this.events[eventName]) {\n this.events[eventName].notify(...args);\n }\n }\n}\n\nexport { VisualElement };\n","import { VisualElement } from '../VisualElement.mjs';\nimport { DOMKeyframesResolver } from './DOMKeyframesResolver.mjs';\n\nclass DOMVisualElement extends VisualElement {\n constructor() {\n super(...arguments);\n this.KeyframeResolver = DOMKeyframesResolver;\n }\n sortInstanceNodePosition(a, b) {\n /**\n * compareDocumentPosition returns a bitmask, by using the bitwise &\n * we're returning true if 2 in that bitmask is set to true. 2 is set\n * to true if b preceeds a.\n */\n return a.compareDocumentPosition(b) & 2 ? 1 : -1;\n }\n getBaseTargetFromProps(props, key) {\n return props.style\n ? props.style[key]\n : undefined;\n }\n removeValueFromRenderState(key, { vars, style }) {\n delete vars[key];\n delete style[key];\n }\n}\n\nexport { DOMVisualElement };\n","import { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { isCSSVariableName } from '../dom/utils/is-css-variable.mjs';\nimport { transformProps } from './utils/transform.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { renderHTML } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { measureViewportBox } from '../../projection/utils/measure.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction getComputedStyle(element) {\n return window.getComputedStyle(element);\n}\nclass HTMLVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"html\";\n this.applyWillChange = true;\n this.renderInstance = renderHTML;\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n else {\n const computedStyle = getComputedStyle(instance);\n const value = (isCSSVariableName(key)\n ? computedStyle.getPropertyValue(key)\n : computedStyle[key]) || 0;\n return typeof value === \"string\" ? value.trim() : value;\n }\n }\n measureInstanceViewportBox(instance, { transformPagePoint }) {\n return measureViewportBox(instance, transformPagePoint);\n }\n build(renderState, latestValues, props) {\n buildHTMLStyles(renderState, latestValues, props.transformTemplate);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n handleChildMotionValue() {\n if (this.childSubscription) {\n this.childSubscription();\n delete this.childSubscription;\n }\n const { children } = this.props;\n if (isMotionValue(children)) {\n this.childSubscription = children.on(\"change\", (latest) => {\n if (this.current)\n this.current.textContent = `${latest}`;\n });\n }\n }\n}\n\nexport { HTMLVisualElement, getComputedStyle };\n","import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { DOMVisualElement } from '../dom/DOMVisualElement.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { camelToDash } from '../dom/utils/camel-to-dash.mjs';\nimport { camelCaseAttributes } from './utils/camel-case-attrs.mjs';\nimport { transformProps } from '../html/utils/transform.mjs';\nimport { renderSVG } from './utils/render.mjs';\nimport { getDefaultValueType } from '../dom/value-types/defaults.mjs';\nimport { createBox } from '../../projection/geometry/models.mjs';\nimport { isSVGTag } from './utils/is-svg-tag.mjs';\n\nclass SVGVisualElement extends DOMVisualElement {\n constructor() {\n super(...arguments);\n this.type = \"svg\";\n this.isSVGTag = false;\n this.measureInstanceViewportBox = createBox;\n }\n getBaseTargetFromProps(props, key) {\n return props[key];\n }\n readValueFromInstance(instance, key) {\n if (transformProps.has(key)) {\n const defaultType = getDefaultValueType(key);\n return defaultType ? defaultType.default || 0 : 0;\n }\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n return instance.getAttribute(key);\n }\n scrapeMotionValuesFromProps(props, prevProps, visualElement) {\n return scrapeMotionValuesFromProps(props, prevProps, visualElement);\n }\n build(renderState, latestValues, props) {\n buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);\n }\n renderInstance(instance, renderState, styleProp, projection) {\n renderSVG(instance, renderState, styleProp, projection);\n }\n mount(instance) {\n this.isSVGTag = isSVGTag(instance.tagName);\n super.mount(instance);\n }\n}\n\nexport { SVGVisualElement };\n","import { Fragment } from 'react';\nimport { HTMLVisualElement } from '../html/HTMLVisualElement.mjs';\nimport { SVGVisualElement } from '../svg/SVGVisualElement.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\n\nconst createDomVisualElement = (Component, options) => {\n return isSVGComponent(Component)\n ? new SVGVisualElement(options)\n : new HTMLVisualElement(options, {\n allowProjection: Component !== Fragment,\n });\n};\n\nexport { createDomVisualElement };\n","import { animations } from '../../../motion/features/animations.mjs';\nimport { drag } from '../../../motion/features/drag.mjs';\nimport { gestureAnimations } from '../../../motion/features/gestures.mjs';\nimport { layout } from '../../../motion/features/layout.mjs';\nimport { createMotionComponentFactory } from '../create-factory.mjs';\nimport { createDomVisualElement } from '../../dom/create-visual-element.mjs';\n\nconst createMotionComponent = /*@__PURE__*/ createMotionComponentFactory({\n ...animations,\n ...gestureAnimations,\n ...drag,\n ...layout,\n}, createDomVisualElement);\n\nexport { createMotionComponent };\n","import { createDOMMotionComponentProxy } from '../create-proxy.mjs';\nimport { createMotionComponent } from './create.mjs';\n\nconst motion = /*@__PURE__*/ createDOMMotionComponentProxy(createMotionComponent);\n\nexport { motion };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random()] : [isPresent]);\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = jsx(PopChild, { isPresent: isPresent, children: children });\n }\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n","\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { invariant } from '../../utils/errors.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, exitBeforeEnter, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitComplete.has(key)) {\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender === null || forceRender === void 0 ? void 0 : forceRender();\n setRenderedChildren(pendingPresentChildren.current);\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: isPresent ? undefined : custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, onExitComplete: isPresent ? undefined : onExit, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n","import { createContext } from 'react';\n\n/**\n * Note: Still used by components generated by old versions of Framer\n *\n * @deprecated\n */\nconst DeprecatedLayoutGroupContext = createContext(null);\n\nexport { DeprecatedLayoutGroupContext };\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);\nfunction nodeGroup() {\n const nodes = new Set();\n const subscriptions = new WeakMap();\n const dirtyAll = () => nodes.forEach(notify);\n return {\n add: (node) => {\n nodes.add(node);\n subscriptions.set(node, node.addEventListener(\"willUpdate\", dirtyAll));\n },\n remove: (node) => {\n nodes.delete(node);\n const unsubscribe = subscriptions.get(node);\n if (unsubscribe) {\n unsubscribe();\n subscriptions.delete(node);\n }\n dirtyAll();\n },\n dirty: dirtyAll,\n };\n}\n\nexport { nodeGroup };\n","\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { useContext, useRef, useMemo } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { DeprecatedLayoutGroupContext } from '../../context/DeprecatedLayoutGroupContext.mjs';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { nodeGroup } from '../../projection/node/group.mjs';\n\nconst shouldInheritGroup = (inherit) => inherit === true;\nconst shouldInheritId = (inherit) => shouldInheritGroup(inherit === true) || inherit === \"id\";\nconst LayoutGroup = ({ children, id, inherit = true }) => {\n const layoutGroupContext = useContext(LayoutGroupContext);\n const deprecatedLayoutGroupContext = useContext(DeprecatedLayoutGroupContext);\n const [forceRender, key] = useForceUpdate();\n const context = useRef(null);\n const upstreamId = layoutGroupContext.id || deprecatedLayoutGroupContext;\n if (context.current === null) {\n if (shouldInheritId(inherit) && upstreamId) {\n id = id ? upstreamId + \"-\" + id : upstreamId;\n }\n context.current = {\n id,\n group: shouldInheritGroup(inherit)\n ? layoutGroupContext.group || nodeGroup()\n : nodeGroup(),\n };\n }\n const memoizedContext = useMemo(() => ({ ...context.current, forceRender }), [key]);\n return (jsx(LayoutGroupContext.Provider, { value: memoizedContext, children: children }));\n};\n\nexport { LayoutGroup };\n","let keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst cancelablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !((_a = cancelablePromiseMap.get(value)) == null ? void 0 : _a[1]);\n};\nconst cancelPromise = (promise, nextValue) => {\n const promiseState = cancelablePromiseMap.get(promise);\n if (promiseState) {\n promiseState[1] = true;\n promiseState[0].forEach((fn) => fn(nextValue));\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n throw new Error(\"[Bug] cancelable promise not found\");\n }\n};\nconst patchPromiseForCancelability = (promise) => {\n if (cancelablePromiseMap.has(promise)) {\n return;\n }\n const promiseState = [/* @__PURE__ */ new Set(), false];\n cancelablePromiseMap.set(promise, promiseState);\n const settle = () => {\n promiseState[1] = true;\n };\n promise.then(settle, settle);\n promise.onCancel = (fn) => {\n promiseState[0].add(fn);\n };\n};\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst addDependency = (pending, atom, atomState, a, aState) => {\n var _a;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a === atom) {\n throw new Error(\"[Bug] atom cannot depend on itself\");\n }\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a = aState.m) == null ? void 0 : _a.t.add(atom);\n if (pending) {\n addPendingDependent(pending, a, atom);\n }\n};\nconst createPending = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()];\nconst addPendingAtom = (pending, atom, atomState) => {\n if (!pending[0].has(atom)) {\n pending[0].set(atom, /* @__PURE__ */ new Set());\n }\n pending[1].set(atom, atomState);\n};\nconst addPendingDependent = (pending, atom, dependent) => {\n const dependents = pending[0].get(atom);\n if (dependents) {\n dependents.add(dependent);\n }\n};\nconst getPendingDependents = (pending, atom) => pending[0].get(atom);\nconst addPendingFunction = (pending, fn) => {\n pending[2].add(fn);\n};\nconst flushPending = (pending) => {\n while (pending[1].size || pending[2].size) {\n pending[0].clear();\n const atomStates = new Set(pending[1].values());\n pending[1].clear();\n const functions = new Set(pending[2]);\n pending[2].clear();\n atomStates.forEach((atomState) => {\n var _a;\n return (_a = atomState.m) == null ? void 0 : _a.l.forEach((l) => l());\n });\n functions.forEach((fn) => fn());\n }\n};\nconst buildStore = (getAtomState) => {\n let debugMountedAtoms;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms = /* @__PURE__ */ new Set();\n }\n const setAtomStateValueOrPromise = (atom, atomState, valueOrPromise) => {\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n const pendingPromise = isPendingPromise(atomState.v) ? atomState.v : null;\n if (isPromiseLike(valueOrPromise)) {\n patchPromiseForCancelability(valueOrPromise);\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(\n atom,\n valueOrPromise,\n getAtomState(a, atomState)\n );\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n } else {\n atomState.v = valueOrPromise;\n delete atomState.e;\n }\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (pendingPromise) {\n cancelPromise(pendingPromise, valueOrPromise);\n }\n }\n };\n const readAtomState = (pending, atom, atomState, force) => {\n var _a;\n if (!(force == null ? void 0 : force(atom)) && isAtomStateInitialized(atomState)) {\n if (atomState.m) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(pending, a, getAtomState(a, atomState), force).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const getter = (a) => {\n if (isSelfAtom(atom, a)) {\n const aState2 = getAtomState(a, atomState);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, aState2, a.init);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(\n pending,\n a,\n getAtomState(a, atomState),\n force\n );\n if (isSync) {\n addDependency(pending, atom, atomState, a, aState);\n } else {\n const pending2 = createPending();\n addDependency(pending2, atom, atomState, a, aState);\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n return returnAtomValue(aState);\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n return writeAtom(atom, ...args);\n }\n };\n }\n return setSelf;\n }\n };\n try {\n const valueOrPromise = atom.read(getter, options);\n setAtomStateValueOrPromise(atom, atomState, valueOrPromise);\n if (isPromiseLike(valueOrPromise)) {\n (_a = valueOrPromise.onCancel) == null ? void 0 : _a.call(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n const complete = () => {\n if (atomState.m) {\n const pending2 = createPending();\n mountDependencies(pending2, atom, atomState);\n flushPending(pending2);\n }\n };\n valueOrPromise.then(complete, complete);\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n }\n };\n const readAtom = (atom) => returnAtomValue(readAtomState(void 0, atom, getAtomState(atom)));\n const getDependents = (pending, atom, atomState) => {\n var _a, _b;\n const dependents = /* @__PURE__ */ new Map();\n for (const a of ((_a = atomState.m) == null ? void 0 : _a.t) || []) {\n dependents.set(a, getAtomState(a, atomState));\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.set(\n atomWithPendingPromise,\n getAtomState(atomWithPendingPromise, atomState)\n );\n }\n (_b = getPendingDependents(pending, atom)) == null ? void 0 : _b.forEach((dependent) => {\n dependents.set(dependent, getAtomState(dependent, atomState));\n });\n return dependents;\n };\n const recomputeDependents = (pending, atom, atomState) => {\n const topsortedAtoms = [];\n const markedAtoms = /* @__PURE__ */ new Set();\n const visit = (a, aState) => {\n if (markedAtoms.has(a)) {\n return;\n }\n markedAtoms.add(a);\n for (const [d, s] of getDependents(pending, a, aState)) {\n if (a !== d) {\n visit(d, s);\n }\n }\n topsortedAtoms.push([a, aState, aState.n]);\n };\n visit(atom, atomState);\n const changedAtoms = /* @__PURE__ */ new Set([atom]);\n const isMarked = (a) => markedAtoms.has(a);\n for (let i = topsortedAtoms.length - 1; i >= 0; --i) {\n const [a, aState, prevEpochNumber] = topsortedAtoms[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(pending, a, aState, isMarked);\n mountDependencies(pending, a, aState);\n if (prevEpochNumber !== aState.n) {\n addPendingAtom(pending, a, aState);\n changedAtoms.add(a);\n }\n }\n markedAtoms.delete(a);\n }\n };\n const writeAtomState = (pending, atom, atomState, ...args) => {\n const getter = (a) => returnAtomValue(readAtomState(pending, a, getAtomState(a, atomState)));\n const setter = (a, ...args2) => {\n const aState = getAtomState(a, atomState);\n let r;\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const hasPrevValue = \"v\" in aState;\n const prevValue = aState.v;\n const v = args2[0];\n setAtomStateValueOrPromise(a, aState, v);\n mountDependencies(pending, a, aState);\n if (!hasPrevValue || !Object.is(prevValue, aState.v)) {\n addPendingAtom(pending, a, aState);\n recomputeDependents(pending, a, aState);\n }\n } else {\n r = writeAtomState(pending, a, aState, ...args2);\n }\n flushPending(pending);\n return r;\n };\n const result = atom.write(getter, setter, ...args);\n return result;\n };\n const writeAtom = (atom, ...args) => {\n const pending = createPending();\n const result = writeAtomState(pending, atom, getAtomState(atom), ...args);\n flushPending(pending);\n return result;\n };\n const mountDependencies = (pending, atom, atomState) => {\n if (atomState.m && !isPendingPromise(atomState.v)) {\n for (const a of atomState.d.keys()) {\n if (!atomState.m.d.has(a)) {\n const aMounted = mountAtom(pending, a, getAtomState(a, atomState));\n aMounted.t.add(atom);\n atomState.m.d.add(a);\n }\n }\n for (const a of atomState.m.d || []) {\n if (!atomState.d.has(a)) {\n atomState.m.d.delete(a);\n const aMounted = unmountAtom(pending, a, getAtomState(a, atomState));\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n };\n const mountAtom = (pending, atom, atomState) => {\n if (!atomState.m) {\n readAtomState(pending, atom, atomState);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(pending, a, getAtomState(a, atomState));\n aMounted.t.add(atom);\n }\n atomState.m = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.add(atom);\n }\n if (isActuallyWritableAtom(atom) && atom.onMount) {\n const mounted = atomState.m;\n const { onMount } = atom;\n addPendingFunction(pending, () => {\n const onUnmount = onMount(\n (...args) => writeAtomState(pending, atom, atomState, ...args)\n );\n if (onUnmount) {\n mounted.u = onUnmount;\n }\n });\n }\n }\n return atomState.m;\n };\n const unmountAtom = (pending, atom, atomState) => {\n if (atomState.m && !atomState.m.l.size && !Array.from(atomState.m.t).some(\n (a) => {\n var _a;\n return (_a = getAtomState(a, atomState).m) == null ? void 0 : _a.d.has(atom);\n }\n )) {\n const onUnmount = atomState.m.u;\n if (onUnmount) {\n addPendingFunction(pending, onUnmount);\n }\n delete atomState.m;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n debugMountedAtoms.delete(atom);\n }\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(pending, a, getAtomState(a, atomState));\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return atomState.m;\n };\n const subscribeAtom = (atom, listener) => {\n const pending = createPending();\n const atomState = getAtomState(atom);\n const mounted = mountAtom(pending, atom, atomState);\n flushPending(pending);\n const listeners = mounted.l;\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n const pending2 = createPending();\n unmountAtom(pending2, atom, atomState);\n flushPending(pending2);\n };\n };\n const unstable_derive = (fn) => buildStore(...fn(getAtomState));\n const store = {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom,\n unstable_derive\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => ({\n get: (atom) => {\n const atomState = getAtomState(atom);\n if (atomState.n === 0) {\n return void 0;\n }\n return atomState;\n }\n }),\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const pending = createPending();\n for (const [atom, value] of values) {\n if (hasInitialValue(atom)) {\n const atomState = getAtomState(atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n setAtomStateValueOrPromise(atom, atomState, value);\n mountDependencies(pending, atom, atomState);\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n addPendingAtom(pending, atom, atomState);\n recomputeDependents(pending, atom, atomState);\n }\n }\n }\n flushPending(pending);\n }\n };\n Object.assign(store, devStore);\n }\n return store;\n};\nconst createStore = () => {\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const getAtomState = (atom) => {\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n }\n return atomState;\n };\n return buildStore(getAtomState);\n};\nlet defaultStore;\nconst getDefaultStore = () => {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n};\n\nexport { atom, createStore, getDefaultStore };\n","import { atom } from 'jotai/vanilla';\n\nconst RESET = Symbol(\n (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" ? \"RESET\" : \"\"\n);\n\nfunction atomWithReset(initialValue) {\n const anAtom = atom(\n initialValue,\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(anAtom)) : update;\n set(anAtom, nextValue === RESET ? initialValue : nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithReducer(initialValue, reducer) {\n return atom(initialValue, function(get, set, action) {\n set(this, reducer(get(this), action));\n });\n}\n\nfunction atomFamily(initializeAtom, areEqual) {\n let shouldRemove = null;\n const atoms = /* @__PURE__ */ new Map();\n const listeners = /* @__PURE__ */ new Set();\n const createAtom = (param) => {\n let item;\n if (areEqual === void 0) {\n item = atoms.get(param);\n } else {\n for (const [key, value] of atoms) {\n if (areEqual(key, param)) {\n item = value;\n break;\n }\n }\n }\n if (item !== void 0) {\n if (shouldRemove == null ? void 0 : shouldRemove(item[1], param)) {\n createAtom.remove(param);\n } else {\n return item[0];\n }\n }\n const newAtom = initializeAtom(param);\n atoms.set(param, [newAtom, Date.now()]);\n notifyListeners(\"CREATE\", param, newAtom);\n return newAtom;\n };\n function notifyListeners(type, param, atom) {\n for (const listener of listeners) {\n listener({ type, param, atom });\n }\n }\n createAtom.unstable_listen = (callback) => {\n listeners.add(callback);\n return () => {\n listeners.delete(callback);\n };\n };\n createAtom.getParams = () => atoms.keys();\n createAtom.remove = (param) => {\n if (areEqual === void 0) {\n if (!atoms.has(param)) return;\n const [atom] = atoms.get(param);\n atoms.delete(param);\n notifyListeners(\"REMOVE\", param, atom);\n } else {\n for (const [key, [atom]] of atoms) {\n if (areEqual(key, param)) {\n atoms.delete(key);\n notifyListeners(\"REMOVE\", key, atom);\n break;\n }\n }\n }\n };\n createAtom.setShouldRemove = (fn) => {\n shouldRemove = fn;\n if (!shouldRemove) return;\n for (const [key, [atom, createdAt]] of atoms) {\n if (shouldRemove(createdAt, key)) {\n atoms.delete(key);\n notifyListeners(\"REMOVE\", key, atom);\n }\n }\n };\n return createAtom;\n}\n\nconst getCached$2 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$3 = /* @__PURE__ */ new WeakMap();\nconst memo3 = (create, dep1, dep2, dep3) => {\n const cache2 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache1$3, dep1);\n const cache3 = getCached$2(() => /* @__PURE__ */ new WeakMap(), cache2, dep2);\n return getCached$2(create, cache3, dep3);\n};\nfunction selectAtom(anAtom, selector, equalityFn = Object.is) {\n return memo3(\n () => {\n const EMPTY = Symbol();\n const selectValue = ([value, prevSlice]) => {\n if (prevSlice === EMPTY) {\n return selector(value);\n }\n const slice = selector(value, prevSlice);\n return equalityFn(prevSlice, slice) ? prevSlice : slice;\n };\n const derivedAtom = atom((get) => {\n const prev = get(derivedAtom);\n const value = get(anAtom);\n return selectValue([value, prev]);\n });\n derivedAtom.init = EMPTY;\n return derivedAtom;\n },\n anAtom,\n selector,\n equalityFn\n );\n}\n\nconst frozenAtoms = /* @__PURE__ */ new WeakSet();\nconst deepFreeze = (obj) => {\n if (typeof obj !== \"object\" || obj === null) return;\n Object.freeze(obj);\n const propNames = Object.getOwnPropertyNames(obj);\n for (const name of propNames) {\n const value = obj[name];\n deepFreeze(value);\n }\n return obj;\n};\nfunction freezeAtom(anAtom) {\n if (frozenAtoms.has(anAtom)) {\n return anAtom;\n }\n frozenAtoms.add(anAtom);\n const origRead = anAtom.read;\n anAtom.read = function(get, options) {\n return deepFreeze(origRead.call(this, get, options));\n };\n if (\"write\" in anAtom) {\n const origWrite = anAtom.write;\n anAtom.write = function(get, set, ...args) {\n return origWrite.call(\n this,\n get,\n (...setArgs) => {\n if (setArgs[0] === anAtom) {\n setArgs[1] = deepFreeze(setArgs[1]);\n }\n return set(...setArgs);\n },\n ...args\n );\n };\n }\n return anAtom;\n}\nfunction freezeAtomCreator(createAtom) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] freezeAtomCreator is deprecated, define it on users end\"\n );\n }\n return (...args) => freezeAtom(createAtom(...args));\n}\n\nconst getCached$1 = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1$2 = /* @__PURE__ */ new WeakMap();\nconst memo2$1 = (create, dep1, dep2) => {\n const cache2 = getCached$1(() => /* @__PURE__ */ new WeakMap(), cache1$2, dep1);\n return getCached$1(create, cache2, dep2);\n};\nconst cacheKeyForEmptyKeyExtractor = {};\nconst isWritable = (atom2) => !!atom2.write;\nconst isFunction = (x) => typeof x === \"function\";\nfunction splitAtom(arrAtom, keyExtractor) {\n return memo2$1(\n () => {\n const mappingCache = /* @__PURE__ */ new WeakMap();\n const getMapping = (arr, prev) => {\n let mapping = mappingCache.get(arr);\n if (mapping) {\n return mapping;\n }\n const prevMapping = prev && mappingCache.get(prev);\n const atomList = [];\n const keyList = [];\n arr.forEach((item, index) => {\n const key = keyExtractor ? keyExtractor(item) : index;\n keyList[index] = key;\n const cachedAtom = prevMapping && prevMapping.atomList[prevMapping.keyList.indexOf(key)];\n if (cachedAtom) {\n atomList[index] = cachedAtom;\n return;\n }\n const read = (get) => {\n const prev2 = get(mappingAtom);\n const currArr = get(arrAtom);\n const mapping2 = getMapping(currArr, prev2 == null ? void 0 : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= currArr.length) {\n const prevItem = arr[getMapping(arr).keyList.indexOf(key)];\n if (prevItem) {\n return prevItem;\n }\n throw new Error(\"splitAtom: index out of bounds for read\");\n }\n return currArr[index2];\n };\n const write = (get, set, update) => {\n const prev2 = get(mappingAtom);\n const arr2 = get(arrAtom);\n const mapping2 = getMapping(arr2, prev2 == null ? void 0 : prev2.arr);\n const index2 = mapping2.keyList.indexOf(key);\n if (index2 < 0 || index2 >= arr2.length) {\n throw new Error(\"splitAtom: index out of bounds for write\");\n }\n const nextItem = isFunction(update) ? update(arr2[index2]) : update;\n if (!Object.is(arr2[index2], nextItem)) {\n set(arrAtom, [\n ...arr2.slice(0, index2),\n nextItem,\n ...arr2.slice(index2 + 1)\n ]);\n }\n };\n atomList[index] = isWritable(arrAtom) ? atom(read, write) : atom(read);\n });\n if (prevMapping && prevMapping.keyList.length === keyList.length && prevMapping.keyList.every((x, i) => x === keyList[i])) {\n mapping = prevMapping;\n } else {\n mapping = { arr, atomList, keyList };\n }\n mappingCache.set(arr, mapping);\n return mapping;\n };\n const mappingAtom = atom((get) => {\n const prev = get(mappingAtom);\n const arr = get(arrAtom);\n const mapping = getMapping(arr, prev == null ? void 0 : prev.arr);\n return mapping;\n });\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n mappingAtom.debugPrivate = true;\n }\n mappingAtom.init = void 0;\n const splittedAtom = isWritable(arrAtom) ? atom(\n (get) => get(mappingAtom).atomList,\n (get, set, action) => {\n switch (action.type) {\n case \"remove\": {\n const index = get(splittedAtom).indexOf(action.atom);\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n ...arr.slice(index + 1)\n ]);\n }\n break;\n }\n case \"insert\": {\n const index = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index >= 0) {\n const arr = get(arrAtom);\n set(arrAtom, [\n ...arr.slice(0, index),\n action.value,\n ...arr.slice(index)\n ]);\n }\n break;\n }\n case \"move\": {\n const index1 = get(splittedAtom).indexOf(action.atom);\n const index2 = action.before ? get(splittedAtom).indexOf(action.before) : get(splittedAtom).length;\n if (index1 >= 0 && index2 >= 0) {\n const arr = get(arrAtom);\n if (index1 < index2) {\n set(arrAtom, [\n ...arr.slice(0, index1),\n ...arr.slice(index1 + 1, index2),\n arr[index1],\n ...arr.slice(index2)\n ]);\n } else {\n set(arrAtom, [\n ...arr.slice(0, index2),\n arr[index1],\n ...arr.slice(index2, index1),\n ...arr.slice(index1 + 1)\n ]);\n }\n }\n break;\n }\n }\n }\n ) : atom((get) => get(mappingAtom).atomList);\n return splittedAtom;\n },\n arrAtom,\n keyExtractor || cacheKeyForEmptyKeyExtractor\n );\n}\n\nfunction atomWithDefault(getDefault) {\n const EMPTY = Symbol();\n const overwrittenAtom = atom(EMPTY);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n overwrittenAtom.debugPrivate = true;\n }\n const anAtom = atom(\n (get, options) => {\n const overwritten = get(overwrittenAtom);\n if (overwritten !== EMPTY) {\n return overwritten;\n }\n return getDefault(get, options);\n },\n (get, set, update) => {\n if (update === RESET) {\n set(overwrittenAtom, EMPTY);\n } else if (typeof update === \"function\") {\n const prevValue = get(anAtom);\n set(overwrittenAtom, update(prevValue));\n } else {\n set(overwrittenAtom, update);\n }\n }\n );\n return anAtom;\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nfunction withStorageValidator(validator) {\n return (unknownStorage) => {\n const storage = {\n ...unknownStorage,\n getItem: (key, initialValue) => {\n const validate = (value2) => {\n if (!validator(value2)) {\n return initialValue;\n }\n return value2;\n };\n const value = unknownStorage.getItem(key, initialValue);\n if (isPromiseLike(value)) {\n return value.then(validate);\n }\n return validate(value);\n }\n };\n return storage;\n };\n}\nfunction createJSONStorage(getStringStorage = () => {\n try {\n return window.localStorage;\n } catch (e) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n if (typeof window !== \"undefined\") {\n console.warn(e);\n }\n }\n return void 0;\n }\n}, options) {\n var _a;\n let lastStr;\n let lastValue;\n const storage = {\n getItem: (key, initialValue) => {\n var _a2, _b;\n const parse = (str2) => {\n str2 = str2 || \"\";\n if (lastStr !== str2) {\n try {\n lastValue = JSON.parse(str2, options == null ? void 0 : options.reviver);\n } catch (e) {\n return initialValue;\n }\n lastStr = str2;\n }\n return lastValue;\n };\n const str = (_b = (_a2 = getStringStorage()) == null ? void 0 : _a2.getItem(key)) != null ? _b : null;\n if (isPromiseLike(str)) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (key, newValue) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? void 0 : _a2.setItem(\n key,\n JSON.stringify(newValue, options == null ? void 0 : options.replacer)\n );\n },\n removeItem: (key) => {\n var _a2;\n return (_a2 = getStringStorage()) == null ? void 0 : _a2.removeItem(key);\n }\n };\n const createHandleSubscribe = (subscriber2) => (key, callback, initialValue) => subscriber2(key, (v) => {\n let newValue;\n try {\n newValue = JSON.parse(v || \"\");\n } catch (e) {\n newValue = initialValue;\n }\n callback(newValue);\n });\n let subscriber;\n try {\n subscriber = (_a = getStringStorage()) == null ? void 0 : _a.subscribe;\n } catch (e) {\n }\n if (!subscriber && typeof window !== \"undefined\" && typeof window.addEventListener === \"function\" && window.Storage) {\n subscriber = (key, callback) => {\n if (!(getStringStorage() instanceof window.Storage)) {\n return () => {\n };\n }\n const storageEventCallback = (e) => {\n if (e.storageArea === getStringStorage() && e.key === key) {\n callback(e.newValue);\n }\n };\n window.addEventListener(\"storage\", storageEventCallback);\n return () => {\n window.removeEventListener(\"storage\", storageEventCallback);\n };\n };\n }\n if (subscriber) {\n storage.subscribe = createHandleSubscribe(subscriber);\n }\n return storage;\n}\nconst defaultStorage = createJSONStorage();\nfunction atomWithStorage(key, initialValue, storage = defaultStorage, options) {\n const getOnInit = options == null ? void 0 : options.getOnInit;\n const baseAtom = atom(\n getOnInit ? storage.getItem(key, initialValue) : initialValue\n );\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n baseAtom.debugPrivate = true;\n }\n baseAtom.onMount = (setAtom) => {\n setAtom(storage.getItem(key, initialValue));\n let unsub;\n if (storage.subscribe) {\n unsub = storage.subscribe(key, setAtom, initialValue);\n }\n return unsub;\n };\n const anAtom = atom(\n (get) => get(baseAtom),\n (get, set, update) => {\n const nextValue = typeof update === \"function\" ? update(get(baseAtom)) : update;\n if (nextValue === RESET) {\n set(baseAtom, initialValue);\n return storage.removeItem(key);\n }\n if (nextValue instanceof Promise) {\n return nextValue.then((resolvedValue) => {\n set(baseAtom, resolvedValue);\n return storage.setItem(key, resolvedValue);\n });\n }\n set(baseAtom, nextValue);\n return storage.setItem(key, nextValue);\n }\n );\n return anAtom;\n}\n\nfunction atomWithObservable(getObservable, options) {\n const returnResultData = (result) => {\n if (\"e\" in result) {\n throw result.e;\n }\n return result.d;\n };\n const observableResultAtom = atom((get) => {\n var _a;\n let observable = getObservable(get);\n const itself = (_a = observable[Symbol.observable]) == null ? void 0 : _a.call(observable);\n if (itself) {\n observable = itself;\n }\n let resolve;\n const makePending = () => new Promise((r) => {\n resolve = r;\n });\n const initialResult = options && \"initialValue\" in options ? {\n d: typeof options.initialValue === \"function\" ? options.initialValue() : options.initialValue\n } : makePending();\n let setResult;\n let lastResult;\n const listener = (result) => {\n lastResult = result;\n resolve == null ? void 0 : resolve(result);\n setResult == null ? void 0 : setResult(result);\n };\n let subscription;\n let timer;\n const isNotMounted = () => !setResult;\n const start = () => {\n if (subscription) {\n clearTimeout(timer);\n subscription.unsubscribe();\n }\n subscription = observable.subscribe({\n next: (d) => listener({ d }),\n error: (e) => listener({ e }),\n complete: () => {\n }\n });\n if (isNotMounted() && (options == null ? void 0 : options.unstable_timeout)) {\n timer = setTimeout(() => {\n if (subscription) {\n subscription.unsubscribe();\n subscription = void 0;\n }\n }, options.unstable_timeout);\n }\n };\n start();\n const resultAtom = atom(lastResult || initialResult);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n resultAtom.debugPrivate = true;\n }\n resultAtom.onMount = (update) => {\n setResult = update;\n if (lastResult) {\n update(lastResult);\n }\n if (subscription) {\n clearTimeout(timer);\n } else {\n start();\n }\n return () => {\n setResult = void 0;\n if (subscription) {\n subscription.unsubscribe();\n subscription = void 0;\n }\n };\n };\n return [resultAtom, observable, makePending, start, isNotMounted];\n });\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n observableResultAtom.debugPrivate = true;\n }\n const observableAtom = atom(\n (get) => {\n const [resultAtom] = get(observableResultAtom);\n const result = get(resultAtom);\n if (result instanceof Promise) {\n return result.then(returnResultData);\n }\n return returnResultData(result);\n },\n (get, set, data) => {\n const [resultAtom, observable, makePending, start, isNotMounted] = get(observableResultAtom);\n if (\"next\" in observable) {\n if (isNotMounted()) {\n set(resultAtom, makePending());\n start();\n }\n observable.next(data);\n } else {\n throw new Error(\"observable is not subject\");\n }\n }\n );\n return observableAtom;\n}\n\nconst cache1$1 = /* @__PURE__ */ new WeakMap();\nconst memo1 = (create, dep1) => (cache1$1.has(dep1) ? cache1$1 : cache1$1.set(dep1, create())).get(dep1);\nconst isPromise$1 = (x) => x instanceof Promise;\nconst LOADING = { state: \"loading\" };\nfunction loadable(anAtom) {\n return memo1(() => {\n const loadableCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const derivedAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n let value;\n try {\n value = get(anAtom);\n } catch (error) {\n return { state: \"hasError\", error };\n }\n if (!isPromise$1(value)) {\n return { state: \"hasData\", data: value };\n }\n const promise = value;\n const cached1 = loadableCache.get(promise);\n if (cached1) {\n return cached1;\n }\n promise.then(\n (data) => {\n loadableCache.set(promise, { state: \"hasData\", data });\n },\n (error) => {\n loadableCache.set(promise, { state: \"hasError\", error });\n }\n ).finally(setSelf);\n const cached2 = loadableCache.get(promise);\n if (cached2) {\n return cached2;\n }\n loadableCache.set(promise, LOADING);\n return LOADING;\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n derivedAtom.debugPrivate = true;\n }\n return atom((get) => get(derivedAtom));\n }, anAtom);\n}\n\nconst getCached = (c, m, k) => (m.has(k) ? m : m.set(k, c())).get(k);\nconst cache1 = /* @__PURE__ */ new WeakMap();\nconst memo2 = (create, dep1, dep2) => {\n const cache2 = getCached(() => /* @__PURE__ */ new WeakMap(), cache1, dep1);\n return getCached(create, cache2, dep2);\n};\nconst isPromise = (x) => x instanceof Promise;\nconst defaultFallback = () => void 0;\nfunction unwrap(anAtom, fallback = defaultFallback) {\n return memo2(\n () => {\n const promiseErrorCache = /* @__PURE__ */ new WeakMap();\n const promiseResultCache = /* @__PURE__ */ new WeakMap();\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n const promiseAndValueAtom = atom(\n (get, { setSelf }) => {\n get(refreshAtom);\n const prev = get(promiseAndValueAtom);\n const promise = get(anAtom);\n if (!isPromise(promise)) {\n return { v: promise };\n }\n if (promise !== (prev == null ? void 0 : prev.p)) {\n promise.then(\n (v) => promiseResultCache.set(promise, v),\n (e) => promiseErrorCache.set(promise, e)\n ).finally(setSelf);\n }\n if (promiseErrorCache.has(promise)) {\n throw promiseErrorCache.get(promise);\n }\n if (promiseResultCache.has(promise)) {\n return {\n p: promise,\n v: promiseResultCache.get(promise)\n };\n }\n if (prev && \"v\" in prev) {\n return { p: promise, f: fallback(prev.v), v: prev.v };\n }\n return { p: promise, f: fallback() };\n },\n (_get, set) => {\n set(refreshAtom, (c) => c + 1);\n }\n );\n promiseAndValueAtom.init = void 0;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n promiseAndValueAtom.debugPrivate = true;\n }\n return atom(\n (get) => {\n const state = get(promiseAndValueAtom);\n if (\"f\" in state) {\n return state.f;\n }\n return state.v;\n },\n (_get, set, ...args) => set(anAtom, ...args)\n );\n },\n anAtom,\n fallback\n );\n}\n\nfunction atomWithRefresh(read, write) {\n const refreshAtom = atom(0);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n refreshAtom.debugPrivate = true;\n }\n return atom(\n (get, options) => {\n get(refreshAtom);\n return read(get, options);\n },\n (get, set, ...args) => {\n if (args.length === 0) {\n set(refreshAtom, (c) => c + 1);\n } else if (write) {\n return write(get, set, ...args);\n }\n }\n );\n}\n\nfunction atomWithLazy(makeInitial) {\n const a = atom(void 0);\n delete a.init;\n Object.defineProperty(a, \"init\", {\n get() {\n return makeInitial();\n }\n });\n return a;\n}\n\nexport { RESET, atomFamily, atomWithDefault, atomWithLazy, atomWithObservable, atomWithReducer, atomWithRefresh, atomWithReset, atomWithStorage, createJSONStorage, freezeAtom, freezeAtomCreator, loadable, selectAtom, splitAtom, withStorageValidator as unstable_withStorageValidator, unwrap };\n","/**\n * @fileoverview\n * 所有有关 PrebuiltLyricPlayer 组件中开发者需要在预设歌词组件中根据当前播放内容实时更新的状态都在这里\n */\n\nimport type { LyricLine } from \"@applemusic-like-lyrics/core\";\nimport { atom } from \"jotai\";\nimport { atomWithStorage } from \"jotai/utils\";\n\nexport interface ArtistStateEntry {\n\tname: string;\n\tid: string;\n}\n\nexport enum AudioQualityType {\n\tNone = \"none\",\n\tLossless = \"lossless\",\n\tHiRes = \"hires\",\n\tDolbyAtmos = \"dolby-atmos\",\n}\n\n/**\n * 当前播放的音乐名称,将会显示在专辑图下方(横向布局)或专辑图右侧(竖向布局)\n */\nexport const musicNameAtom = atom(\"未知歌曲\");\n/**\n * 当前播放的音乐创作者列表,会显示在音乐名称下方\n */\nexport const musicArtistsAtom = atom<ArtistStateEntry[]>([\n\t{\n\t\tname: \"未知创作者\",\n\t\tid: \"unknown\",\n\t},\n]);\n/**\n * 当前播放的音乐所属专辑名称,会显示在音乐名称/创作者下方\n */\nexport const musicAlbumNameAtom = atom(\"未知专辑\");\n/**\n * 当前播放的音乐专辑封面 URL,除了图片也可以是视频资源\n */\nexport const musicCoverAtom = atom(\"\");\n/**\n * 当前播放的音乐专辑封面资源是否为视频\n */\nexport const musicCoverIsVideoAtom = atom(false);\n/**\n * 当前音乐的音乐时长,单位为毫秒\n */\nexport const musicDurationAtom = atom(0);\n/**\n * 当前是否正在播放音乐\n */\nexport const musicPlayingAtom = atom(false);\n/**\n * 当前音乐的音质水平,如有提供则会显示在进度条下\n */\nexport const musicQualityAtom = atom<AudioQualityType>(AudioQualityType.None);\n/**\n * 当前音乐的播放进度,单位为毫秒\n */\nexport const musicPlayingPositionAtom = atom(0);\n/**\n * 当前播放的音乐音量大小,范围在 [0.0-1.0] 之间\n *\n * 本状态将会保存在 localStorage 中\n */\nexport const musicVolumeAtom = atomWithStorage(\n\t\"amll-react-full.musicVolumeAtom\",\n\t0.5,\n);\n/**\n * 当前播放的音乐专辑封面 URL,除了图片也可以是视频资源\n */\nexport const musicLyricLinesAtom = atom<LyricLine[]>([]);\n/**\n * 是否隐藏歌词视图\n */\nexport const hideLyricViewAtom = atomWithStorage(\n\t\"amll-react-full.hideLyricViewAtom\",\n\tfalse,\n);\n/**\n * 用于音频可视化频谱图的数据\n * 如需呈现背景跳动效果,请设置 lowFreqVolumeAtom 的值\n */\nexport const fftDataAtom = atom<number[]>([]);\n/**\n * 低频音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间\n *\n * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)\n *\n * 如需呈现音频可视化频谱图,请设置 fftDataAtom 的值\n */\nexport const lowFreqVolumeAtom = atom<number>(1);\n/**\n * 当前是否正在展示 AMLL 播放页面,设置为 true 时将会让背景和歌词实时展示动画效果\n * 推荐在页面被隐藏的时候将其设置为 false,这样会减少其对性能的影响(例如暂停背景渲染和歌词行变换等)\n */\nexport const isLyricPageOpenedAtom = atom(false);\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconDolbyAtmos = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 192, height: 36, viewBox: \"0 0 192 36\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M139.11 15.884H135.582V23.8C135.582 24.6027 135.732 25.1814 136.03 25.536C136.329 25.872 136.805 26.04 137.458 26.04C137.701 26.04 137.962 26.012 138.242 25.956C138.522 25.9 138.774 25.816 138.998 25.704L139.082 27.86C138.765 27.972 138.41 28.056 138.018 28.112C137.645 28.1867 137.253 28.224 136.842 28.224C135.592 28.224 134.63 27.8787 133.958 27.188C133.305 26.4974 132.978 25.4614 132.978 24.08V15.884H130.43V13.728H132.978V7.92004H135.582V13.728H139.11V15.884ZM117.188 20.692H124.608L120.912 11.396L117.188 20.692ZM114.22 28H111.14L119.736 8.17604H122.256L130.768 28H127.632L125.616 23.128H116.208L114.22 28ZM145.441 15.12C144.713 15.6054 144.181 16.2027 143.845 16.912H143.761C143.761 16.632 143.752 16.2867 143.733 15.876C143.715 15.4467 143.687 15.064 143.649 14.728H141.157C141.195 15.1574 141.223 15.652 141.241 16.212C141.26 16.772 141.269 17.2294 141.269 17.584V28H143.901V20.944C143.901 19.6187 144.219 18.564 144.853 17.78C145.507 16.9774 146.319 16.576 147.289 16.576C147.812 16.576 148.251 16.6694 148.605 16.856C148.96 17.024 149.249 17.2667 149.473 17.584C149.697 17.8827 149.856 18.2467 149.949 18.676C150.043 19.1054 150.089 19.5814 150.089 20.104V28H152.721V20.832C152.721 20.3094 152.777 19.796 152.889 19.292C153.02 18.788 153.216 18.34 153.477 17.948C153.757 17.5374 154.112 17.2107 154.541 16.968C154.971 16.7067 155.484 16.576 156.081 16.576C156.66 16.576 157.136 16.688 157.509 16.912C157.883 17.136 158.181 17.4347 158.405 17.808C158.629 18.1814 158.788 18.6107 158.881 19.096C158.975 19.5814 159.021 20.0947 159.021 20.636V28H161.653V19.768C161.653 19.0214 161.551 18.3214 161.345 17.668C161.159 17.0147 160.86 16.4454 160.449 15.96C160.039 15.4747 159.525 15.092 158.909 14.812C158.293 14.5134 157.556 14.364 156.697 14.364C155.745 14.364 154.868 14.5974 154.065 15.064C153.263 15.512 152.637 16.1654 152.189 17.024C151.779 16.072 151.209 15.3907 150.481 14.98C149.772 14.5694 148.969 14.364 148.073 14.364C147.065 14.364 146.188 14.616 145.441 15.12ZM176.233 21.336C176.233 20.7014 176.131 20.0947 175.925 19.516C175.739 18.9374 175.459 18.4334 175.085 18.004C174.712 17.556 174.245 17.2014 173.685 16.94C173.144 16.6787 172.519 16.548 171.809 16.548C171.1 16.548 170.465 16.6787 169.905 16.94C169.364 17.2014 168.907 17.556 168.533 18.004C168.16 18.4334 167.871 18.9374 167.665 19.516C167.479 20.0947 167.385 20.7014 167.385 21.336C167.385 21.9707 167.479 22.5774 167.665 23.156C167.871 23.7347 168.16 24.248 168.533 24.696C168.907 25.144 169.364 25.4987 169.905 25.76C170.465 26.0214 171.1 26.152 171.809 26.152C172.519 26.152 173.144 26.0214 173.685 25.76C174.245 25.4987 174.712 25.144 175.085 24.696C175.459 24.248 175.739 23.7347 175.925 23.156C176.131 22.5774 176.233 21.9707 176.233 21.336ZM178.977 21.336C178.977 22.3627 178.791 23.3054 178.417 24.164C178.063 25.0227 177.559 25.7694 176.905 26.404C176.271 27.02 175.515 27.5054 174.637 27.86C173.76 28.196 172.817 28.364 171.809 28.364C170.801 28.364 169.859 28.196 168.981 27.86C168.104 27.5054 167.348 27.02 166.713 26.404C166.079 25.7694 165.575 25.0227 165.201 24.164C164.847 23.3054 164.669 22.3627 164.669 21.336C164.669 20.3094 164.847 19.376 165.201 18.536C165.575 17.6774 166.079 16.94 166.713 16.324C167.348 15.708 168.104 15.232 168.981 14.896C169.859 14.5414 170.801 14.364 171.809 14.364C172.817 14.364 173.76 14.5414 174.637 14.896C175.515 15.232 176.271 15.708 176.905 16.324C177.559 16.94 178.063 17.6774 178.417 18.536C178.791 19.376 178.977 20.3094 178.977 21.336ZM187.975 16.912C188.517 17.2107 188.937 17.6027 189.235 18.088L191.055 16.548C190.57 15.8387 189.879 15.2974 188.983 14.924C188.106 14.5507 187.191 14.364 186.239 14.364C185.605 14.364 184.989 14.448 184.391 14.616C183.794 14.7654 183.262 15.008 182.795 15.344C182.329 15.6614 181.946 16.0814 181.647 16.604C181.367 17.108 181.227 17.7147 181.227 18.424C181.227 19.04 181.339 19.5627 181.563 19.992C181.806 20.4027 182.114 20.748 182.487 21.028C182.861 21.308 183.271 21.532 183.719 21.7C184.186 21.8494 184.643 21.98 185.091 22.092C186.23 22.3534 187.089 22.6334 187.667 22.932C188.265 23.2307 188.563 23.688 188.563 24.304C188.563 24.6774 188.489 24.9854 188.339 25.228C188.19 25.4707 187.985 25.6667 187.723 25.816C187.481 25.9654 187.201 26.0774 186.883 26.152C186.585 26.208 186.267 26.236 185.931 26.236C185.185 26.236 184.494 26.0587 183.859 25.704C183.243 25.3494 182.758 24.9107 182.403 24.388L180.527 25.984C181.162 26.7867 181.955 27.384 182.907 27.776C183.878 28.168 184.867 28.364 185.875 28.364C186.547 28.364 187.201 28.2894 187.835 28.14C188.47 27.9907 189.03 27.748 189.515 27.412C190.019 27.0574 190.421 26.6094 190.719 26.068C191.018 25.5267 191.167 24.864 191.167 24.08C191.167 23.5014 191.055 22.9974 190.831 22.568C190.607 22.1387 190.29 21.7747 189.879 21.476C189.487 21.1587 189.021 20.8974 188.479 20.692C187.938 20.4867 187.35 20.3094 186.715 20.16C185.707 19.936 184.951 19.6934 184.447 19.432C183.943 19.152 183.691 18.732 183.691 18.172C183.691 17.8547 183.757 17.5934 183.887 17.388C184.037 17.164 184.223 16.9867 184.447 16.856C184.69 16.7067 184.961 16.604 185.259 16.548C185.558 16.4734 185.857 16.436 186.155 16.436C186.827 16.436 187.434 16.5947 187.975 16.912ZM2.95973 27.9533H0V7.93701H2.95973C8.48624 7.93701 12.9927 12.4323 12.9927 17.9451C12.9927 23.4579 8.48624 27.9533 2.95973 27.9533ZM25.5841 7.93701H28.5439V27.9533H25.5841C20.0576 27.9533 15.5511 23.4579 15.5511 17.9451C15.5511 12.4323 20.0576 7.93701 25.5841 7.93701ZM34.6222 7.93701H41.8682C47.4003 7.93701 51.9012 12.4268 51.9012 17.9451C51.9012 23.4635 47.4003 27.9533 41.8682 27.9533H34.6222V7.93701ZM37.6627 24.9175H41.8682C45.717 24.9175 48.8579 21.7871 48.8579 17.9424C48.8579 14.1031 45.7198 10.97 41.8682 10.97H37.6627V24.9175ZM53.4424 21.0365C53.4424 17.2112 56.561 14.1003 60.3958 14.1003C64.2307 14.1003 67.3492 17.2112 67.3492 21.0365C67.3492 24.8619 64.2307 27.9727 60.3958 27.9727C56.561 27.9727 53.4424 24.8619 53.4424 21.0365ZM56.2043 21.0115C56.2043 23.305 58.0687 25.1927 60.3958 25.1927C62.6978 25.1927 64.5874 23.3301 64.5874 21.0115C64.5874 18.718 62.695 16.8303 60.3958 16.8303C58.0966 16.8303 56.2043 18.6902 56.2043 21.0115ZM73.3574 27.9755H70.3168V7.93979H73.3574V27.9755ZM79.9647 15.3514C81.0906 14.5646 82.4618 14.1003 83.9389 14.1003C87.7709 14.1003 90.8895 17.2112 90.8923 21.0365C90.8923 24.8619 87.7737 27.9727 83.9389 27.9727C82.4618 27.9727 81.0934 27.5084 79.9647 26.7217V27.9755H76.9158V7.93979H79.9647V15.3514ZM79.9647 22.3292C80.5165 23.9861 82.08 25.1927 83.9389 25.1927C86.2381 25.1927 88.1304 23.3328 88.1304 21.0115C88.1304 18.718 86.2381 16.8303 83.9389 16.8303C82.0995 16.8303 80.5221 18.023 79.9647 19.691C79.8254 20.1052 79.7473 20.55 79.7473 21.0115C79.7473 21.473 79.8254 21.915 79.9647 22.3292ZM99.0715 22.9937L103.035 14.1059H106.357C105.983 14.9363 103.631 20.1804 101.593 24.7238C99.933 28.4242 98.4816 31.6599 98.4778 31.6674C97.5944 33.6468 95.2589 34.5419 93.283 33.6607L92.2295 33.1908L92.224 33.1881L93.453 30.4386L93.8905 30.6332C94.7043 30.9974 95.6658 30.6276 96.0309 29.8131C96.0337 29.8048 97.4104 26.7161 97.4104 26.7161L91.7864 14.1059H95.1084L99.0715 22.9937Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgIconDolbyAtmos);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgTagHiresLossless = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 97, height: 20, viewBox: \"0 0 97 20\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_2_55)\" }, /* @__PURE__ */ React.createElement(\"path\", { opacity: 0.4, fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.08442 0H89.9156C92.379 0 93.2723 0.256492 94.1729 0.73813C95.0735 1.21977 95.7802 1.92655 96.2619 2.82714C96.7435 3.72772 97 4.62101 97 7.08442V12.9156C97 15.379 96.7435 16.2723 96.2619 17.1729C95.7802 18.0734 95.0735 18.7802 94.1729 19.2619C93.2723 19.7435 92.379 20 89.9156 20H7.08442C4.62101 20 3.72772 19.7435 2.82714 19.2619C1.92655 18.7802 1.21977 18.0734 0.73813 17.1729C0.256492 16.2723 0 15.379 0 12.9156V7.08442C0 4.62101 0.256492 3.72772 0.73813 2.82714C1.21977 1.92655 1.92655 1.21977 2.82714 0.73813C3.72772 0.256492 4.62101 0 7.08442 0Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M16.1838 6C17.4176 6 18.1597 7.44851 18.7119 8.98359L18.7656 9.13482L18.8181 9.28631L18.8696 9.43778C19.0393 9.94235 19.1919 10.4418 19.3379 10.8882C19.6733 9.49163 19.4974 9.19176 19.8567 9.19176C19.9903 9.19176 20.1256 9.28262 20.1256 9.44819C20.1256 9.5152 20.0165 10.2254 19.8647 10.937L19.8367 11.0663L19.8078 11.1947C19.759 11.4076 19.7071 11.6135 19.6538 11.7945C21.1981 15.8408 22.3448 10.5111 22.4743 9.42163C22.4933 9.26453 22.6116 9.19176 22.7312 9.19176C22.8909 9.19176 23.0219 9.31208 22.9969 9.49314C22.7204 11.255 22.2952 14 20.5468 14C19.582 14 19.0396 13.245 18.6112 12.3798C18.3137 11.7953 18.0608 11.1006 17.8281 10.4019L17.7726 10.2342C17.7542 10.1784 17.736 10.1225 17.7178 10.0667L17.6637 9.89971C17.1342 8.26093 16.6851 6.74258 15.9967 6.74258C15.6603 6.74258 15.4108 7.09385 15.3936 7.09385C15.3618 7.09385 15.3369 6.95073 15.0227 6.55859C15.3217 6.21716 15.7338 6 16.1838 6ZM10.4581 6.0043C13.2111 6.0043 13.456 13.2682 15.0141 13.2682C15.197 13.2682 15.3942 13.1573 15.6097 12.9062C15.729 13.1082 15.8513 13.2877 15.9779 13.4456C15.6669 13.8006 15.2799 13.9997 14.7953 13.9997C13.0544 13.9995 12.3064 11.0842 11.6626 9.11601C11.511 9.74737 11.4323 10.3188 11.4015 10.5753C11.3824 10.7383 11.2629 10.8126 11.1425 10.8126C11.0091 10.8126 10.8745 10.7212 10.8745 10.5581C10.8745 10.546 10.8752 10.5334 10.8768 10.5205C10.9659 9.8735 11.1456 8.89326 11.3468 8.20982C11.079 7.50821 10.7445 6.74138 10.2518 6.74138C9.25694 6.74138 8.68725 9.24149 8.52704 10.5753C8.50792 10.7383 8.38843 10.8126 8.26806 10.8126C8.13458 10.8126 8 10.7212 8 10.5581C8 10.546 8.00075 10.5334 8.0023 10.5205C8.02539 10.353 8.05014 10.1824 8.07704 10.0104L8.10064 9.86273C8.10466 9.83807 8.10874 9.81339 8.11286 9.78869L8.13817 9.64039C8.45345 7.83491 9.0412 6.0043 10.4581 6.0043ZM13.3146 6.00033C13.809 6.00033 14.3394 6.2576 14.7966 6.86121C14.8221 6.89052 15.0784 7.28879 15.1593 7.42686C15.4387 7.93316 15.6821 8.55194 15.9066 9.19532L15.9647 9.36366C16.6095 11.2484 17.1067 13.277 17.8811 13.277C18.0647 13.277 18.2638 13.163 18.4842 12.9061C18.6035 13.1082 18.7258 13.2876 18.8523 13.4455C18.5421 13.7999 18.1553 13.9997 17.6698 13.9997C14.9332 13.9993 14.6358 6.73978 13.1281 6.73978C12.7879 6.73978 12.5364 7.09388 12.5191 7.09388C12.4873 7.09388 12.4624 6.95077 12.1482 6.55866C12.4553 6.20796 12.8704 6.00033 13.3146 6.00033Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M32.28 5.24001C32.37 5.49001 32.46 5.76001 32.55 6.06001H36.44V6.94001H27.55V6.06001H31.52C31.43 5.83001 31.33 5.62001 31.22 5.42001L32.28 5.24001ZM34.82 14.5H33.99L33.77 13.65L34.54 13.69C34.91 13.69 35.1 13.55 35.1 13.29V10.76H28.9V14.53H28V9.94001H36V13.49C36 14.16 35.6 14.5 34.82 14.5ZM29.12 7.41001H34.89V9.49001H29.12V7.41001ZM33.98 8.77001V8.13001H30.03V8.77001H33.98ZM29.97 11.24H34.04V13.34H29.97V11.24ZM33.2 12.64V11.94H30.82V12.64H33.2Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M43.49 10.8C43.33 11.12 43.13 11.39 42.91 11.63L42.36 10.96C42.78 10.5 43.07 9.89001 43.21 9.13001L43.99 9.27001C43.94 9.51001 43.89 9.74001 43.83 9.95001H44.56V9.09001H45.49V9.95001H46.86V10.8H45.49V11.81H47.07V12.68H45.49V14.56H44.56V12.68H42.43V11.81H44.56V10.8H43.49ZM43.73 6.67001H42.49V5.83001H46.8C46.79 7.25001 46.69 8.10001 46.5 8.38001C46.31 8.66001 45.98 8.80001 45.52 8.80001C45.28 8.80001 45 8.78001 44.67 8.76001L44.45 7.98001C44.8 8.00001 45.09 8.02001 45.32 8.04001C45.56 8.03001 45.72 7.95001 45.78 7.81001C45.84 7.67001 45.87 7.29001 45.89 6.67001H44.62C44.52 7.10001 44.37 7.48001 44.19 7.82001C43.92 8.25001 43.53 8.64001 43.02 8.99001L42.46 8.28001C42.88 8.04001 43.2 7.76001 43.41 7.43001C43.55 7.21001 43.65 6.96001 43.73 6.67001ZM39.24 10.27V11.4H39.94V10.27H39.24ZM39.19 12.19C39.1 13.15 38.88 13.95 38.52 14.61L37.88 14.02C38.24 13.31 38.42 12.41 38.43 11.31V8.33001L37.92 7.71001C38.48 7.12001 38.96 6.30001 39.36 5.26001L40.22 5.46001C40.15 5.64001 40.08 5.82001 40.01 5.99001H41.71V6.64001C41.52 7.01001 41.33 7.34001 41.14 7.62001H42.21V13.67C42.21 14.19 41.93 14.45 41.38 14.45H40.89L40.69 13.74V14.36H39.94V12.19H39.19ZM40.18 7.62001C40.35 7.37001 40.52 7.08001 40.7 6.76001H39.64C39.48 7.07001 39.31 7.36001 39.13 7.62001H40.18ZM40.69 13.67C40.84 13.69 40.98 13.71 41.11 13.71C41.31 13.71 41.41 13.6 41.41 13.39V12.19H40.69V13.67ZM41.41 11.4V10.27H40.69V11.4H41.41ZM41.41 9.49001V8.43001H40.69V9.49001H41.41ZM39.94 8.43001H39.24V9.49001H39.94V8.43001Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M50.87 9.55001V14.5H49.94V9.75001C49.62 10.65 49.22 11.47 48.74 12.22L48.33 11.18C49.04 10.28 49.56 9.25001 49.88 8.09001H48.56V7.18001H49.94V5.30001H50.87V7.18001H52.14V8.09001H50.87V8.54001C51.33 9.01001 51.79 9.52001 52.25 10.07L51.74 10.83C51.4 10.31 51.11 9.88001 50.87 9.55001ZM56.8 5.31001L57.27 6.16001C56.15 6.54001 54.9 6.77001 53.52 6.84001V8.42001H57.5V9.33001H56.1V14.51H55.14V9.33001H53.52C53.44 11.48 52.93 13.19 51.98 14.46L51.3 13.75C52.11 12.69 52.55 11.21 52.61 9.32001V6.03001C54.17 5.99001 55.57 5.75001 56.8 5.31001Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M61.08 10.79H67V11.49C66.49 12.11 65.88 12.63 65.16 13.07C66.01 13.39 66.99 13.63 68.09 13.77L67.68 14.59C66.35 14.37 65.21 14.02 64.26 13.56C63.26 14.03 62.09 14.37 60.77 14.59L60.36 13.76C61.47 13.6 62.46 13.36 63.32 13.03C62.69 12.61 62.17 12.14 61.75 11.6H61.08V10.79ZM62.77 11.6C63.17 12 63.64 12.34 64.19 12.64C64.77 12.34 65.28 11.99 65.72 11.6H62.77ZM60.64 8.70001V9.26001C60.6 11.44 60.25 13.18 59.57 14.5L58.85 13.86C59.39 12.76 59.68 11.22 59.7 9.26001V6.00001H63.49C63.38 5.78001 63.26 5.57001 63.14 5.39001L64.15 5.23001C64.26 5.46001 64.37 5.72001 64.47 6.00001H67.83V6.90001H60.64V7.82001H62.14V7.15001H63.06V7.82001H65.41V7.14001H66.33V7.82001H67.83V8.70001H66.33V10.24H62.14V8.70001H60.64ZM63.06 8.70001V9.45001H65.41V8.70001H63.06Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M70.28 5.75001H77.56V6.68001H74.04V7.28001C74.02 7.84001 73.98 8.36001 73.92 8.86001H78.35V9.78001H75.33V12.99C75.33 13.31 75.48 13.48 75.79 13.48H76.92C77.12 13.48 77.27 13.41 77.37 13.27C77.48 13.13 77.56 12.67 77.6 11.91L78.49 12.2C78.41 13.25 78.25 13.88 78.03 14.08C77.83 14.27 77.52 14.37 77.1 14.37H75.5C74.76 14.37 74.39 13.97 74.39 13.19V9.78001H73.77C73.59 10.64 73.34 11.38 73.01 12.01C72.39 13.1 71.39 13.94 70.01 14.53L69.48 13.68C70.86 13.05 71.79 12.25 72.28 11.29C72.49 10.83 72.66 10.33 72.78 9.78001H69.63V8.86001H72.95C73.01 8.36001 73.05 7.84001 73.07 7.28001V6.68001H70.28V5.75001Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M88.66 8.59001V12.51H87.73V9.43001H84.55V12.52H83.62V8.59001H88.66ZM83.95 5.63001H88.36V8.07001H83.95V5.63001ZM87.44 7.28001V6.44001H84.87V7.28001H87.44ZM85.63 9.90001H86.58V10.93C86.54 11.91 86.28 12.69 85.8 13.29C85.32 13.83 84.56 14.26 83.5 14.56L82.99 13.75C83.99 13.47 84.68 13.12 85.05 12.69C85.41 12.24 85.6 11.65 85.63 10.93V9.90001ZM81.21 14.42H80.27L80.06 13.51C80.34 13.55 80.62 13.57 80.88 13.57C81.14 13.57 81.27 13.44 81.27 13.19V11.02C80.87 11.18 80.46 11.32 80.05 11.45L79.81 10.49C80.31 10.38 80.79 10.24 81.27 10.06V7.97001H80.01V7.06001H81.27V5.31001H82.2V7.06001H83.31V7.97001H82.2V9.69001C82.55 9.53001 82.9 9.35001 83.24 9.17001V10.13C82.9 10.31 82.55 10.48 82.2 10.64V13.43C82.2 14.09 81.87 14.42 81.21 14.42ZM86.82 12.41C87.65 12.79 88.41 13.24 89.1 13.77L88.57 14.59C87.85 13.97 87.11 13.47 86.35 13.11L86.82 12.41Z\", fill: \"currentColor\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_2_55\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 97, height: 20, fill: \"currentColor\" }))));\nconst ForwardRef = forwardRef(SvgTagHiresLossless);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgTagLossless = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 55, height: 20, viewBox: \"0 0 55 20\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_2_24)\" }, /* @__PURE__ */ React.createElement(\"path\", { opacity: 0.4, fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M7.08442 0H47.9156C50.379 0 51.2723 0.256492 52.1729 0.73813C53.0735 1.21977 53.7802 1.92655 54.2619 2.82714C54.7435 3.72772 55 4.62101 55 7.08442V12.9156C55 15.379 54.7435 16.2723 54.2619 17.1729C53.7802 18.0734 53.0735 18.7802 52.1729 19.2619C51.2723 19.7435 50.379 20 47.9156 20H7.08442C4.62101 20 3.72772 19.7435 2.82714 19.2619C1.92655 18.7802 1.21977 18.0734 0.73813 17.1729C0.256492 16.2723 0 15.379 0 12.9156V7.08442C0 4.62101 0.256492 3.72772 0.73813 2.82714C1.21977 1.92655 1.92655 1.21977 2.82714 0.73813C3.72772 0.256492 4.62101 0 7.08442 0Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M16.1838 6C17.4176 6 18.1597 7.44851 18.7119 8.98359L18.7656 9.13482L18.8181 9.28631L18.8696 9.43778C19.0393 9.94235 19.1919 10.4418 19.3379 10.8882C19.6733 9.49163 19.4974 9.19176 19.8567 9.19176C19.9903 9.19176 20.1256 9.28262 20.1256 9.44819C20.1256 9.5152 20.0165 10.2254 19.8647 10.937L19.8367 11.0663L19.8078 11.1947C19.759 11.4076 19.7071 11.6135 19.6538 11.7945C21.1981 15.8408 22.3448 10.5111 22.4743 9.42163C22.4933 9.26453 22.6116 9.19176 22.7312 9.19176C22.8909 9.19176 23.0219 9.31208 22.9969 9.49314C22.7204 11.255 22.2952 14 20.5468 14C19.582 14 19.0396 13.245 18.6112 12.3798C18.3137 11.7953 18.0608 11.1006 17.8281 10.4019L17.7726 10.2342C17.7542 10.1784 17.736 10.1225 17.7178 10.0667L17.6637 9.89971C17.1342 8.26093 16.6851 6.74258 15.9967 6.74258C15.6603 6.74258 15.4108 7.09385 15.3936 7.09385C15.3618 7.09385 15.3369 6.95073 15.0227 6.55859C15.3217 6.21716 15.7338 6 16.1838 6ZM10.4581 6.0043C13.2111 6.0043 13.456 13.2682 15.0141 13.2682C15.197 13.2682 15.3942 13.1573 15.6097 12.9062C15.729 13.1082 15.8513 13.2877 15.9779 13.4456C15.6669 13.8006 15.2799 13.9997 14.7953 13.9997C13.0544 13.9995 12.3064 11.0842 11.6626 9.11601C11.511 9.74737 11.4323 10.3188 11.4015 10.5753C11.3824 10.7383 11.2629 10.8126 11.1425 10.8126C11.0091 10.8126 10.8745 10.7212 10.8745 10.5581C10.8745 10.546 10.8752 10.5334 10.8768 10.5205C10.9659 9.8735 11.1456 8.89326 11.3468 8.20982C11.079 7.50821 10.7445 6.74138 10.2518 6.74138C9.25694 6.74138 8.68725 9.24149 8.52704 10.5753C8.50792 10.7383 8.38843 10.8126 8.26806 10.8126C8.13458 10.8126 8 10.7212 8 10.5581C8 10.546 8.00075 10.5334 8.0023 10.5205C8.02539 10.353 8.05014 10.1824 8.07704 10.0104L8.10064 9.86273C8.10466 9.83807 8.10874 9.81339 8.11286 9.78869L8.13817 9.64039C8.45345 7.83491 9.0412 6.0043 10.4581 6.0043ZM13.3146 6.00033C13.809 6.00033 14.3394 6.2576 14.7966 6.86121C14.8221 6.89052 15.0784 7.28879 15.1593 7.42686C15.4387 7.93316 15.6821 8.55194 15.9066 9.19532L15.9647 9.36366C16.6095 11.2484 17.1067 13.277 17.8811 13.277C18.0647 13.277 18.2638 13.163 18.4842 12.9061C18.6035 13.1082 18.7258 13.2876 18.8523 13.4455C18.5421 13.7999 18.1553 13.9997 17.6698 13.9997C14.9332 13.9993 14.6358 6.73978 13.1281 6.73978C12.7879 6.73978 12.5364 7.09388 12.5191 7.09388C12.4873 7.09388 12.4624 6.95077 12.1482 6.55866C12.4553 6.20796 12.8704 6.00033 13.3146 6.00033Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M28.28 5.75H35.56V6.68H32.04V7.28C32.02 7.84 31.98 8.36 31.92 8.86H36.35V9.78H33.33V12.99C33.33 13.31 33.48 13.48 33.79 13.48H34.92C35.12 13.48 35.27 13.41 35.37 13.27C35.48 13.13 35.56 12.67 35.6 11.91L36.49 12.2C36.41 13.25 36.25 13.88 36.03 14.08C35.83 14.27 35.52 14.37 35.1 14.37H33.5C32.76 14.37 32.39 13.97 32.39 13.19V9.78H31.77C31.59 10.64 31.34 11.38 31.01 12.01C30.39 13.1 29.39 13.94 28.01 14.53L27.48 13.68C28.86 13.05 29.79 12.25 30.28 11.29C30.49 10.83 30.66 10.33 30.78 9.78H27.63V8.86H30.95C31.01 8.36 31.05 7.84 31.07 7.28V6.68H28.28V5.75Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M46.66 8.59V12.51H45.73V9.43H42.55V12.52H41.62V8.59H46.66ZM41.95 5.63H46.36V8.07H41.95V5.63ZM45.44 7.28V6.44H42.87V7.28H45.44ZM43.63 9.9H44.58V10.93C44.54 11.91 44.28 12.69 43.8 13.29C43.32 13.83 42.56 14.26 41.5 14.56L40.99 13.75C41.99 13.47 42.68 13.12 43.05 12.69C43.41 12.24 43.6 11.65 43.63 10.93V9.9ZM39.21 14.42H38.27L38.06 13.51C38.34 13.55 38.62 13.57 38.88 13.57C39.14 13.57 39.27 13.44 39.27 13.19V11.02C38.87 11.18 38.46 11.32 38.05 11.45L37.81 10.49C38.31 10.38 38.79 10.24 39.27 10.06V7.97H38.01V7.06H39.27V5.31H40.2V7.06H41.31V7.97H40.2V9.69C40.55 9.53 40.9 9.35 41.24 9.17V10.13C40.9 10.31 40.55 10.48 40.2 10.64V13.43C40.2 14.09 39.87 14.42 39.21 14.42ZM44.82 12.41C45.65 12.79 46.41 13.24 47.1 13.77L46.57 14.59C45.85 13.97 45.11 13.47 44.35 13.11L44.82 12.41Z\", fill: \"currentColor\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_2_24\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 55, height: 20, fill: \"currentColor\" }))));\nconst ForwardRef = forwardRef(SvgTagLossless);\nexport default ForwardRef;\n","import classNames from \"classnames\";\nimport { AnimatePresence, type Variants, motion } from \"framer-motion\";\nimport { type FC, type HTMLProps, memo } from \"react\";\nimport { AudioQualityType } from \"../../states/music\";\nimport IconDolbyAtmos from \"./icon_dolby_atmos.svg?react\";\nimport styles from \"./index.module.css\";\nimport TagHiresLossless from \"./tag_hires_lossless.svg?react\";\nimport TagLossless from \"./tag_lossless.svg?react\";\n\nconst COMMON_VARIENTS: Variants = {\n\thide: {\n\t\topacity: 0,\n\t\tscale: 0.8,\n\t\ttransition: {\n\t\t\tduration: 0.25,\n\t\t\tease: \"circIn\",\n\t\t},\n\t},\n\tshow: {\n\t\topacity: 1,\n\t\tscale: 1,\n\t\ttransition: {\n\t\t\tduration: 1,\n\t\t\tease: [0, 0.71, 0.2, 1.01],\n\t\t},\n\t},\n};\n\nconst DOLBY_VARIENTS: Variants = {\n\thide: {\n\t\topacity: 0,\n\t\tscale: 0.8,\n\t\ttransition: {\n\t\t\tduration: 0.25,\n\t\t\tease: \"circIn\",\n\t\t},\n\t},\n\tshow: {\n\t\topacity: [0, 1],\n\t\tscale: 1,\n\t\ttransition: {\n\t\t\tduration: 1,\n\t\t\tease: [0, 0.71, 0.2, 1.01],\n\t\t},\n\t},\n};\n\nexport const AudioQualityTag: FC<\n\t{\n\t\tquality: AudioQualityType;\n\t} & HTMLProps<HTMLDivElement>\n> = memo(({ quality, className, ...rest }) => {\n\treturn (\n\t\t<div className={classNames(className, styles.audioQualityTag)} {...rest}>\n\t\t\t<AnimatePresence mode=\"wait\">\n\t\t\t\t{quality === AudioQualityType.Lossless && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial=\"hide\"\n\t\t\t\t\t\tanimate=\"show\"\n\t\t\t\t\t\texit=\"hide\"\n\t\t\t\t\t\tvariants={COMMON_VARIENTS}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TagLossless />\n\t\t\t\t\t</motion.div>\n\t\t\t\t)}\n\t\t\t\t{quality === AudioQualityType.HiRes && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial=\"hide\"\n\t\t\t\t\t\tanimate=\"show\"\n\t\t\t\t\t\texit=\"hide\"\n\t\t\t\t\t\tvariants={COMMON_VARIENTS}\n\t\t\t\t\t>\n\t\t\t\t\t\t<TagHiresLossless />\n\t\t\t\t\t</motion.div>\n\t\t\t\t)}\n\t\t\t\t{quality === AudioQualityType.DolbyAtmos && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial=\"hide\"\n\t\t\t\t\t\tanimate=\"show\"\n\t\t\t\t\t\texit=\"hide\"\n\t\t\t\t\t\tclassName={styles.dolbyLogo}\n\t\t\t\t\t\tvariants={DOLBY_VARIENTS}\n\t\t\t\t\t>\n\t\t\t\t\t\t<IconDolbyAtmos className={styles.dolbyLogoGlow} />\n\t\t\t\t\t\t<IconDolbyAtmos />\n\t\t\t\t\t</motion.div>\n\t\t\t\t)}\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n});\n","/** MIT License github.com/pushkine/ */\nexport interface SpringParams {\n\tmass: number; // = 1.0\n\tdamping: number; // = 10.0\n\tstiffness: number; // = 100.0\n\tsoft: boolean; // = false\n}\n\ntype seconds = number;\n\nexport class Spring {\n\tprivate currentPosition = 0;\n\tprivate targetPosition = 0;\n\tprivate currentTime = 0;\n\tprivate params: Partial<SpringParams> = {};\n\tprivate currentSolver: (t: seconds) => number;\n\tprivate getV: (t: seconds) => number;\n\tprivate queueParams:\n\t\t| (Partial<SpringParams> & {\n\t\t\t\ttime: number;\n\t\t })\n\t\t| undefined;\n\tprivate queuePosition:\n\t\t| {\n\t\t\t\ttime: number;\n\t\t\t\tposition: number;\n\t\t }\n\t\t| undefined;\n\tconstructor(currentPosition = 0) {\n\t\tthis.targetPosition = currentPosition;\n\t\tthis.currentPosition = this.targetPosition;\n\t\tthis.currentSolver = () => this.targetPosition;\n\t\tthis.getV = () => 0;\n\t}\n\tprivate resetSolver() {\n\t\tconst curV = this.getV(this.currentTime);\n\t\tthis.currentTime = 0;\n\t\tthis.currentSolver = solveSpring(\n\t\t\tthis.currentPosition,\n\t\t\tcurV,\n\t\t\tthis.targetPosition,\n\t\t\t0,\n\t\t\tthis.params,\n\t\t);\n\t\tthis.getV = getVelocity(this.currentSolver);\n\t}\n\tarrived() {\n\t\treturn (\n\t\t\tMath.abs(this.targetPosition - this.currentPosition) < 0.01 &&\n\t\t\tthis.getV(this.currentTime) < 0.01 &&\n\t\t\tthis.queueParams === undefined &&\n\t\t\tthis.queuePosition === undefined\n\t\t);\n\t}\n\tsetPosition(targetPosition: number) {\n\t\tthis.targetPosition = targetPosition;\n\t\tthis.currentPosition = targetPosition;\n\t\tthis.currentSolver = () => this.targetPosition;\n\t\tthis.getV = () => 0;\n\t}\n\tupdate(delta = 0) {\n\t\tthis.currentTime += delta;\n\t\tthis.currentPosition = this.currentSolver(this.currentTime);\n\t\tif (this.queueParams) {\n\t\t\tthis.queueParams.time -= delta;\n\t\t\tif (this.queueParams.time <= 0) {\n\t\t\t\tthis.updateParams({\n\t\t\t\t\t...this.queueParams,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (this.queuePosition) {\n\t\t\tthis.queuePosition.time -= delta;\n\t\t\tif (this.queuePosition.time <= 0) {\n\t\t\t\tthis.setTargetPosition(this.queuePosition.position);\n\t\t\t}\n\t\t}\n\t\tif (this.arrived()) {\n\t\t\tthis.setPosition(this.targetPosition);\n\t\t}\n\t}\n\tupdateParams(params: Partial<SpringParams>, delay = 0) {\n\t\tif (delay > 0) {\n\t\t\tthis.queueParams = {\n\t\t\t\t...params,\n\t\t\t\ttime: delay,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.params = {\n\t\t\t\t...this.params,\n\t\t\t\t...params,\n\t\t\t};\n\t\t\tthis.resetSolver();\n\t\t}\n\t}\n\tsetTargetPosition(targetPosition: number, delay = 0) {\n\t\tif (delay > 0) {\n\t\t\tthis.queuePosition = {\n\t\t\t\tposition: targetPosition,\n\t\t\t\ttime: delay,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.queuePosition = undefined;\n\t\t\tthis.targetPosition = targetPosition;\n\t\t\tthis.resetSolver();\n\t\t}\n\t}\n\tgetCurrentPosition() {\n\t\treturn this.currentPosition;\n\t}\n}\n\nfunction solveSpring(\n\tfrom: number,\n\tvelocity: number,\n\tto: number,\n\tdelay: seconds = 0,\n\tparams?: Partial<SpringParams>,\n): (t: seconds) => number {\n\tconst soft = params?.soft ?? false;\n\tconst stiffness = params?.stiffness ?? 100;\n\tconst damping = params?.damping ?? 10;\n\tconst mass = params?.mass ?? 1;\n\tconst delta = to - from;\n\tif (soft || 1.0 <= damping / (2.0 * Math.sqrt(stiffness * mass))) {\n\t\tconst angularFrequency = -Math.sqrt(stiffness / mass);\n\t\tconst leftover = -angularFrequency * delta - velocity;\n\t\treturn (t: seconds) => {\n\t\t\tt -= delay;\n\t\t\tif (t < 0) return from;\n\t\t\treturn to - (delta + t * leftover) * Math.E ** (t * angularFrequency);\n\t\t};\n\t}\n\tconst dampingFrequency = Math.sqrt(4.0 * mass * stiffness - damping ** 2.0);\n\tconst leftover = (damping * delta - 2.0 * mass * velocity) / dampingFrequency;\n\tconst dfm = (0.5 * dampingFrequency) / mass;\n\tconst dm = -(0.5 * damping) / mass;\n\treturn (t: seconds) => {\n\t\tt -= delay;\n\t\tif (t < 0) return from;\n\t\treturn (\n\t\t\tto -\n\t\t\t(Math.cos(t * dfm) * delta + Math.sin(t * dfm) * leftover) *\n\t\t\t\tMath.E ** (t * dm)\n\t\t);\n\t};\n}\n\nfunction derivative(f: (x: number) => number) {\n\tconst h = 0.001;\n\treturn (x: number) => (f(x + h) - f(x - h)) / (2 * h);\n}\n\nfunction getVelocity(f: (t: seconds) => number): (t: seconds) => number {\n\treturn derivative(f);\n}\n","import { type HTMLProps, useEffect, useRef, useState } from \"react\";\nimport styles from \"./index.module.css\";\nimport { Spring } from \"../../utils/spring\";\nimport classNames from \"classnames\";\n\nexport interface SliderProps {\n\tonAfterChange?: (v: number) => void;\n\tonBeforeChange?: () => void;\n\tonChange?: (v: number) => void;\n\tonSeeking?: (v: boolean) => void;\n\tvalue: number;\n\tmin: number;\n\tmax: number;\n\tbeforeIcon?: JSX.Element;\n\tafterIcon?: JSX.Element;\n}\n\nexport const BouncingSlider: React.FC<\n\tSliderProps & Omit<HTMLProps<HTMLDivElement>, keyof SliderProps>\n> = (props) => {\n\tconst {\n\t\tclassName,\n\t\tonAfterChange,\n\t\tonBeforeChange,\n\t\tonChange,\n\t\tonSeeking,\n\t\tvalue,\n\t\tmin,\n\t\tmax,\n\t\tbeforeIcon,\n\t\tafterIcon,\n\t\t...others\n\t} = props;\n\tconst [curValue, setCurValue] = useState(value);\n\tconst outerRef = useRef<HTMLDivElement>(null);\n\tconst innerRef = useRef<HTMLDivElement>(null);\n\tconst isSeekingRef = useRef(false);\n\tuseEffect(() => {\n\t\tconst outer = outerRef.current;\n\t\tconst inner = innerRef.current;\n\t\tif (outer && inner) {\n\t\t\tconst heightSpring = new Spring(80);\n\t\t\tconst bounceSpring = new Spring(0);\n\t\t\tlet dragging = false;\n\t\t\theightSpring.updateParams({\n\t\t\t\tstiffness: 150,\n\t\t\t\tmass: 1,\n\t\t\t\tdamping: 10,\n\t\t\t});\n\t\t\tbounceSpring.updateParams({\n\t\t\t\tstiffness: 150,\n\t\t\t});\n\t\t\tlet lastTime: number | null = null;\n\t\t\tlet handler = 0;\n\t\t\tconst onFrame = (dt: number) => {\n\t\t\t\tlastTime ??= dt;\n\t\t\t\tconst delta = (dt - lastTime) / 1000;\n\n\t\t\t\tbounceSpring.update(delta);\n\t\t\t\theightSpring.update(delta);\n\t\t\t\touter.style.transform = `translateX(${\n\t\t\t\t\tbounceSpring.getCurrentPosition() / 100\n\t\t\t\t}px)`;\n\t\t\t\tif (innerHeight <= 1000)\n\t\t\t\t\tinner.style.height = `${heightSpring.getCurrentPosition() * 0.08}px`;\n\t\t\t\telse inner.style.height = `${heightSpring.getCurrentPosition() / 10}px`;\n\n\t\t\t\tlastTime = dt;\n\n\t\t\t\tif (!(heightSpring.arrived() && bounceSpring.arrived())) {\n\t\t\t\t\tif (handler) cancelAnimationFrame(handler);\n\t\t\t\t\thandler = requestAnimationFrame(onFrame);\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst setValue = (evt: MouseEvent) => {\n\t\t\t\tconst rect = inner.getBoundingClientRect();\n\t\t\t\tconst relPos = (evt.clientX - rect.left) / rect.width;\n\t\t\t\tif (relPos > 1) {\n\t\t\t\t\tconst o = (relPos - 1) * 900;\n\t\t\t\t\tbounceSpring.setPosition(o);\n\t\t\t\t\tbounceSpring.setTargetPosition(o);\n\t\t\t\t} else if (relPos < 0) {\n\t\t\t\t\tconst o = relPos * 900;\n\t\t\t\t\tbounceSpring.setPosition(o);\n\t\t\t\t\tbounceSpring.setTargetPosition(o);\n\t\t\t\t} else {\n\t\t\t\t\tbounceSpring.setPosition(0);\n\t\t\t\t\tbounceSpring.setTargetPosition(0);\n\t\t\t\t}\n\t\t\t\tconst v = Math.min(max, Math.max(min, min + (max - min) * relPos));\n\t\t\t\tonChange?.(v);\n\t\t\t\tonSeeking?.(true);\n\t\t\t\tsetCurValue(v);\n\t\t\t\tif (handler) cancelAnimationFrame(handler);\n\t\t\t\thandler = requestAnimationFrame(onFrame);\n\t\t\t};\n\t\t\tconst onMouseEnter = (evt: MouseEvent) => {\n\t\t\t\theightSpring.setTargetPosition(189);\n\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t\tif (handler) cancelAnimationFrame(handler);\n\t\t\t\thandler = requestAnimationFrame(onFrame);\n\t\t\t};\n\t\t\tconst onMouseLeave = (evt: MouseEvent) => {\n\t\t\t\tif (!dragging) {\n\t\t\t\t\theightSpring.setTargetPosition(80);\n\t\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\tif (handler) cancelAnimationFrame(handler);\n\t\t\t\t\thandler = requestAnimationFrame(onFrame);\n\t\t\t\t\tonSeeking?.(false);\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst onMouseDown = (evt: MouseEvent) => {\n\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t\theightSpring.setTargetPosition(189);\n\t\t\t\tlastTime = null;\n\t\t\t\tdragging = true;\n\t\t\t\tisSeekingRef.current = true;\n\t\t\t\twindow.addEventListener(\"mousemove\", onMouseMove);\n\t\t\t\twindow.addEventListener(\"mouseup\", onMouseUp);\n\t\t\t\tonBeforeChange?.();\n\t\t\t\tsetValue(evt);\n\t\t\t};\n\t\t\tconst onMouseUp = (evt: MouseEvent) => {\n\t\t\t\tevt.stopImmediatePropagation();\n\t\t\t\tevt.stopPropagation();\n\t\t\t\tevt.preventDefault();\n\t\t\t\theightSpring.setTargetPosition(80);\n\t\t\t\tlastTime = null;\n\t\t\t\tdragging = false;\n\t\t\t\tisSeekingRef.current = false;\n\t\t\t\twindow.removeEventListener(\"mousemove\", onMouseMove);\n\t\t\t\twindow.removeEventListener(\"mouseup\", onMouseUp);\n\t\t\t\tsetValue(evt);\n\t\t\t\tbounceSpring.setTargetPosition(0);\n\t\t\t\tonSeeking?.(false);\n\t\t\t};\n\t\t\tconst onMouseMove = (evt: MouseEvent) => {\n\t\t\t\tsetValue(evt);\n\t\t\t};\n\t\t\tinner.addEventListener(\"mousedown\", onMouseDown);\n\t\t\touter.addEventListener(\"mouseenter\", onMouseEnter);\n\t\t\touter.addEventListener(\"mouseleave\", onMouseLeave);\n\t\t\treturn () => {\n\t\t\t\tinner.removeEventListener(\"mousedown\", onMouseDown);\n\t\t\t\touter.removeEventListener(\"mouseenter\", onMouseEnter);\n\t\t\t\touter.removeEventListener(\"mouseleave\", onMouseLeave);\n\t\t\t\twindow.removeEventListener(\"mouseup\", onMouseUp);\n\t\t\t\twindow.removeEventListener(\"mousemove\", onMouseMove);\n\t\t\t};\n\t\t}\n\t}, [onChange, onSeeking, onBeforeChange, min, max]);\n\tuseEffect(() => {\n\t\tif (!isSeekingRef.current) {\n\t\t\tsetCurValue(value);\n\t\t}\n\t}, [value]);\n\treturn (\n\t\t<div\n\t\t\tref={outerRef}\n\t\t\tclassName={classNames(styles.nowPlayingSlider, className)}\n\t\t\t{...others}\n\t\t>\n\t\t\t{beforeIcon}\n\t\t\t<div ref={innerRef} className={styles.inner}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={styles.thumb}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\twidth: `${((curValue - min) / (max - min)) * 100}%`,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{afterIcon}\n\t\t</div>\n\t);\n};\n","import { useRef, useState } from \"react\";\nimport { motion } from \"framer-motion\";\nimport styles from \"./index.module.css\";\nimport type { HTMLProps, FC } from \"react\";\nimport classNames from \"classnames\";\n\nexport const ControlThumb: FC<\n\t{\n\t\tonClick?: () => void;\n\t} & HTMLProps<HTMLDivElement>\n> = ({ onClick, className, ...rest }) => {\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst hoveringRef = useRef(false);\n\tconst [thumbOffset, setThumbOffset] = useState({\n\t\tmarginLeft: -25,\n\t\tmarginTop: -4,\n\t});\n\tconst onMouseMove = (e: MouseEvent) => {\n\t\tconst container = containerRef.current;\n\t\tif (container && hoveringRef.current) {\n\t\t\tconst rect = container.getBoundingClientRect();\n\t\t\tconst left = (e.clientX - rect.left) / 2;\n\t\t\tconst top = (e.clientY - rect.top) / 2;\n\t\t\tif (Math.abs(left) > 25 || Math.abs(top) > 25) {\n\t\t\t\tsetThumbOffset({\n\t\t\t\t\tmarginLeft: -25,\n\t\t\t\t\tmarginTop: -4,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tsetThumbOffset({\n\t\t\t\t\tmarginLeft: left - 25 / 2,\n\t\t\t\t\tmarginTop: top - 25 / 2,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(styles.controlThumb, className)}\n\t\t\tref={containerRef}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<motion.button\n\t\t\t\ttype=\"button\"\n\t\t\t\tvariants={{\n\t\t\t\t\trest: {\n\t\t\t\t\t\twidth: 50,\n\t\t\t\t\t\theight: 8,\n\t\t\t\t\t},\n\t\t\t\t\thover: {\n\t\t\t\t\t\twidth: 25,\n\t\t\t\t\t\theight: 25,\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t\tanimate={thumbOffset}\n\t\t\t\twhileTap={{\n\t\t\t\t\tscale: 0.9,\n\t\t\t\t}}\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\tinitial=\"rest\"\n\t\t\t\ttransition={{\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tduration: 0.5,\n\t\t\t\t}}\n\t\t\t\tonMouseMove={(evt) => {\n\t\t\t\t\tonMouseMove(evt.nativeEvent);\n\t\t\t\t}}\n\t\t\t\tonHoverStart={(evt, info) => {\n\t\t\t\t\tonMouseMove(evt);\n\t\t\t\t\thoveringRef.current = true;\n\t\t\t\t}}\n\t\t\t\tonHoverEnd={() => {\n\t\t\t\t\thoveringRef.current = false;\n\t\t\t\t\tsetThumbOffset({\n\t\t\t\t\t\tmarginLeft: -25,\n\t\t\t\t\t\tmarginTop: -4,\n\t\t\t\t\t});\n\t\t\t\t}}\n\t\t\t\tonClick={onClick}\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={{\n\t\t\t\t\t\trest: {\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\tmarginLeft: 50 / 2,\n\t\t\t\t\t\t\ttransform: \"rotate(0)\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\thover: {\n\t\t\t\t\t\t\theight: 2,\n\t\t\t\t\t\t\twidth: 15,\n\t\t\t\t\t\t\tmarginTop: -1,\n\t\t\t\t\t\t\tmarginLeft: 5,\n\t\t\t\t\t\t\ttransform: \"rotate(45deg)\",\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\ttransition={{\n\t\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\t\tduration: 0.5,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={{\n\t\t\t\t\t\trest: {\n\t\t\t\t\t\t\theight: 0,\n\t\t\t\t\t\t\twidth: 0,\n\t\t\t\t\t\t\tmarginTop: 0,\n\t\t\t\t\t\t\tmarginLeft: 50 / 2,\n\t\t\t\t\t\t\ttransform: \"rotate(0)\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\thover: {\n\t\t\t\t\t\t\theight: 2,\n\t\t\t\t\t\t\twidth: 15,\n\t\t\t\t\t\t\tmarginTop: -1,\n\t\t\t\t\t\t\tmarginLeft: 5,\n\t\t\t\t\t\t\ttransform: \"rotate(-45deg)\",\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\ttransition={{\n\t\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\t\tduration: 0.5,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</motion.button>\n\t\t</div>\n\t);\n};\n","function $8164c72eb32cbbfc$export$3d870b97f7a56ca3({ topLeftCornerRadius: topLeftCornerRadius , topRightCornerRadius: topRightCornerRadius , bottomRightCornerRadius: bottomRightCornerRadius , bottomLeftCornerRadius: bottomLeftCornerRadius , width: width , height: height }) {\n const roundingAndSmoothingBudgetMap = {\n topLeft: -1,\n topRight: -1,\n bottomLeft: -1,\n bottomRight: -1\n };\n const cornerRadiusMap = {\n topLeft: topLeftCornerRadius,\n topRight: topRightCornerRadius,\n bottomLeft: bottomLeftCornerRadius,\n bottomRight: bottomRightCornerRadius\n };\n Object.entries(cornerRadiusMap)// Let the bigger corners choose first\n .sort(([, radius1], [, radius2])=>{\n return radius2 - radius1;\n }).forEach(([cornerName, radius])=>{\n const corner = cornerName;\n const adjacents = $8164c72eb32cbbfc$var$adjacentsByCorner[corner];\n // Look at the 2 adjacent sides, figure out how much space we can have on both sides,\n // then take the smaller one\n const budget = Math.min(...adjacents.map((adjacent)=>{\n const adjacentCornerRadius = cornerRadiusMap[adjacent.corner];\n if (radius === 0 && adjacentCornerRadius === 0) return 0;\n const adjacentCornerBudget = roundingAndSmoothingBudgetMap[adjacent.corner];\n const sideLength = adjacent.side === \"top\" || adjacent.side === \"bottom\" ? width : height;\n // If the adjacent corner's already been given the rounding and smoothing budget,\n // we'll just take the rest\n if (adjacentCornerBudget >= 0) return sideLength - roundingAndSmoothingBudgetMap[adjacent.corner];\n else return radius / (radius + adjacentCornerRadius) * sideLength;\n }));\n roundingAndSmoothingBudgetMap[corner] = budget;\n cornerRadiusMap[corner] = Math.min(radius, budget);\n });\n return {\n topLeft: {\n radius: cornerRadiusMap.topLeft,\n roundingAndSmoothingBudget: roundingAndSmoothingBudgetMap.topLeft\n },\n topRight: {\n radius: cornerRadiusMap.topRight,\n roundingAndSmoothingBudget: roundingAndSmoothingBudgetMap.topRight\n },\n bottomLeft: {\n radius: cornerRadiusMap.bottomLeft,\n roundingAndSmoothingBudget: roundingAndSmoothingBudgetMap.bottomLeft\n },\n bottomRight: {\n radius: cornerRadiusMap.bottomRight,\n roundingAndSmoothingBudget: roundingAndSmoothingBudgetMap.bottomRight\n }\n };\n}\nconst $8164c72eb32cbbfc$var$adjacentsByCorner = {\n topLeft: [\n {\n corner: \"topRight\",\n side: \"top\"\n },\n {\n corner: \"bottomLeft\",\n side: \"left\"\n }, \n ],\n topRight: [\n {\n corner: \"topLeft\",\n side: \"top\"\n },\n {\n corner: \"bottomRight\",\n side: \"right\"\n }, \n ],\n bottomLeft: [\n {\n corner: \"bottomRight\",\n side: \"bottom\"\n },\n {\n corner: \"topLeft\",\n side: \"left\"\n }, \n ],\n bottomRight: [\n {\n corner: \"bottomLeft\",\n side: \"bottom\"\n },\n {\n corner: \"topRight\",\n side: \"right\"\n }, \n ]\n};\n\n\nfunction $be0670f6a5a657f9$export$a2f9a538d41e7bd0({ cornerRadius: cornerRadius , cornerSmoothing: cornerSmoothing , preserveSmoothing: preserveSmoothing , roundingAndSmoothingBudget: roundingAndSmoothingBudget }) {\n // From figure 12.2 in the article\n // p = (1 + cornerSmoothing) * q\n // in this case q = R because theta = 90deg\n let p = (1 + cornerSmoothing) * cornerRadius;\n // When there's not enough space left (p > roundingAndSmoothingBudget), there are 2 options:\n //\n // 1. What figma's currently doing: limit the smoothing value to make sure p <= roundingAndSmoothingBudget\n // But what this means is that at some point when cornerRadius is large enough,\n // increasing the smoothing value wouldn't do anything\n //\n // 2. Keep the original smoothing value and use it to calculate the bezier curve normally,\n // then adjust the control points to achieve similar curvature profile\n //\n // preserveSmoothing is a new option I added\n //\n // If preserveSmoothing is on then we'll just keep using the original smoothing value\n // and adjust the bezier curve later\n if (!preserveSmoothing) {\n const maxCornerSmoothing = roundingAndSmoothingBudget / cornerRadius - 1;\n cornerSmoothing = Math.min(cornerSmoothing, maxCornerSmoothing);\n p = Math.min(p, roundingAndSmoothingBudget);\n }\n // In a normal rounded rectangle (cornerSmoothing = 0), this is 90\n // The larger the smoothing, the smaller the arc\n const arcMeasure = 90 * (1 - cornerSmoothing);\n const arcSectionLength = Math.sin($be0670f6a5a657f9$var$toRadians(arcMeasure / 2)) * cornerRadius * Math.sqrt(2);\n // In the article this is the distance between 2 control points: P3 and P4\n const angleAlpha = (90 - arcMeasure) / 2;\n const p3ToP4Distance = cornerRadius * Math.tan($be0670f6a5a657f9$var$toRadians(angleAlpha / 2));\n // a, b, c and d are from figure 11.1 in the article\n const angleBeta = 45 * cornerSmoothing;\n const c = p3ToP4Distance * Math.cos($be0670f6a5a657f9$var$toRadians(angleBeta));\n const d = c * Math.tan($be0670f6a5a657f9$var$toRadians(angleBeta));\n let b = (p - arcSectionLength - c - d) / 3;\n let a = 2 * b;\n // Adjust the P1 and P2 control points if there's not enough space left\n if (preserveSmoothing && p > roundingAndSmoothingBudget) {\n const p1ToP3MaxDistance = roundingAndSmoothingBudget - d - arcSectionLength - c;\n // Try to maintain some distance between P1 and P2 so the curve wouldn't look weird\n const minA = p1ToP3MaxDistance / 6;\n const maxB = p1ToP3MaxDistance - minA;\n b = Math.min(b, maxB);\n a = p1ToP3MaxDistance - b;\n p = Math.min(p, roundingAndSmoothingBudget);\n }\n return {\n a: a,\n b: b,\n c: c,\n d: d,\n p: p,\n arcSectionLength: arcSectionLength,\n cornerRadius: cornerRadius\n };\n}\nfunction $be0670f6a5a657f9$export$a4b62df84ac6ef86({ width: width , height: height , topLeftPathParams: topLeftPathParams , topRightPathParams: topRightPathParams , bottomLeftPathParams: bottomLeftPathParams , bottomRightPathParams: bottomRightPathParams }) {\n return `\n M ${width - topRightPathParams.p} 0\n ${$be0670f6a5a657f9$var$drawTopRightPath(topRightPathParams)}\n L ${width} ${height - bottomRightPathParams.p}\n ${$be0670f6a5a657f9$var$drawBottomRightPath(bottomRightPathParams)}\n L ${bottomLeftPathParams.p} ${height}\n ${$be0670f6a5a657f9$var$drawBottomLeftPath(bottomLeftPathParams)}\n L 0 ${topLeftPathParams.p}\n ${$be0670f6a5a657f9$var$drawTopLeftPath(topLeftPathParams)}\n Z\n `.replace(/[\\t\\s\\n]+/g, \" \").trim();\n}\nfunction $be0670f6a5a657f9$var$drawTopRightPath({ cornerRadius: cornerRadius , a: a , b: b , c: c , d: d , p: p , arcSectionLength: arcSectionLength }) {\n if (cornerRadius) return $be0670f6a5a657f9$var$rounded`\n c ${a} 0 ${a + b} 0 ${a + b + c} ${d}\n a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} ${arcSectionLength}\n c ${d} ${c}\n ${d} ${b + c}\n ${d} ${a + b + c}`;\n else return $be0670f6a5a657f9$var$rounded`l ${p} 0`;\n}\nfunction $be0670f6a5a657f9$var$drawBottomRightPath({ cornerRadius: cornerRadius , a: a , b: b , c: c , d: d , p: p , arcSectionLength: arcSectionLength }) {\n if (cornerRadius) return $be0670f6a5a657f9$var$rounded`\n c 0 ${a}\n 0 ${a + b}\n ${-d} ${a + b + c}\n a ${cornerRadius} ${cornerRadius} 0 0 1 -${arcSectionLength} ${arcSectionLength}\n c ${-c} ${d}\n ${-(b + c)} ${d}\n ${-(a + b + c)} ${d}`;\n else return $be0670f6a5a657f9$var$rounded`l 0 ${p}`;\n}\nfunction $be0670f6a5a657f9$var$drawBottomLeftPath({ cornerRadius: cornerRadius , a: a , b: b , c: c , d: d , p: p , arcSectionLength: arcSectionLength }) {\n if (cornerRadius) return $be0670f6a5a657f9$var$rounded`\n c ${-a} 0\n ${-(a + b)} 0\n ${-(a + b + c)} ${-d}\n a ${cornerRadius} ${cornerRadius} 0 0 1 -${arcSectionLength} -${arcSectionLength}\n c ${-d} ${-c}\n ${-d} ${-(b + c)}\n ${-d} ${-(a + b + c)}`;\n else return $be0670f6a5a657f9$var$rounded`l ${-p} 0`;\n}\nfunction $be0670f6a5a657f9$var$drawTopLeftPath({ cornerRadius: cornerRadius , a: a , b: b , c: c , d: d , p: p , arcSectionLength: arcSectionLength }) {\n if (cornerRadius) return $be0670f6a5a657f9$var$rounded`\n c 0 ${-a}\n 0 ${-(a + b)}\n ${d} ${-(a + b + c)}\n a ${cornerRadius} ${cornerRadius} 0 0 1 ${arcSectionLength} -${arcSectionLength}\n c ${c} ${-d}\n ${b + c} ${-d}\n ${a + b + c} ${-d}`;\n else return $be0670f6a5a657f9$var$rounded`l 0 ${-p}`;\n}\nfunction $be0670f6a5a657f9$var$toRadians(degrees) {\n return degrees * Math.PI / 180;\n}\nfunction $be0670f6a5a657f9$var$rounded(strings, ...values) {\n return strings.reduce((acc, str, i)=>{\n let value = values[i];\n if (typeof value === \"number\") return acc + str + value.toFixed(4);\n else return acc + str + (value ?? \"\");\n }, \"\");\n}\n\n\nfunction $6424334e4a2a8c1c$export$4d0751d7849c93f6({ cornerRadius: cornerRadius = 0 , topLeftCornerRadius: topLeftCornerRadius , topRightCornerRadius: topRightCornerRadius , bottomRightCornerRadius: bottomRightCornerRadius , bottomLeftCornerRadius: bottomLeftCornerRadius , cornerSmoothing: cornerSmoothing , width: width , height: height , preserveSmoothing: preserveSmoothing = false }) {\n topLeftCornerRadius = topLeftCornerRadius ?? cornerRadius;\n topRightCornerRadius = topRightCornerRadius ?? cornerRadius;\n bottomLeftCornerRadius = bottomLeftCornerRadius ?? cornerRadius;\n bottomRightCornerRadius = bottomRightCornerRadius ?? cornerRadius;\n if (topLeftCornerRadius === topRightCornerRadius && topRightCornerRadius === bottomRightCornerRadius && bottomRightCornerRadius === bottomLeftCornerRadius && bottomLeftCornerRadius === topLeftCornerRadius) {\n const roundingAndSmoothingBudget = Math.min(width, height) / 2;\n const cornerRadius = Math.min(topLeftCornerRadius, roundingAndSmoothingBudget);\n const pathParams = (0, $be0670f6a5a657f9$export$a2f9a538d41e7bd0)({\n cornerRadius: cornerRadius,\n cornerSmoothing: cornerSmoothing,\n preserveSmoothing: preserveSmoothing,\n roundingAndSmoothingBudget: roundingAndSmoothingBudget\n });\n return (0, $be0670f6a5a657f9$export$a4b62df84ac6ef86)({\n width: width,\n height: height,\n topLeftPathParams: pathParams,\n topRightPathParams: pathParams,\n bottomLeftPathParams: pathParams,\n bottomRightPathParams: pathParams\n });\n }\n const { topLeft: topLeft , topRight: topRight , bottomLeft: bottomLeft , bottomRight: bottomRight } = (0, $8164c72eb32cbbfc$export$3d870b97f7a56ca3)({\n topLeftCornerRadius: topLeftCornerRadius,\n topRightCornerRadius: topRightCornerRadius,\n bottomRightCornerRadius: bottomRightCornerRadius,\n bottomLeftCornerRadius: bottomLeftCornerRadius,\n width: width,\n height: height\n });\n return (0, $be0670f6a5a657f9$export$a4b62df84ac6ef86)({\n width: width,\n height: height,\n topLeftPathParams: (0, $be0670f6a5a657f9$export$a2f9a538d41e7bd0)({\n cornerSmoothing: cornerSmoothing,\n preserveSmoothing: preserveSmoothing,\n cornerRadius: topLeft.radius,\n roundingAndSmoothingBudget: topLeft.roundingAndSmoothingBudget\n }),\n topRightPathParams: (0, $be0670f6a5a657f9$export$a2f9a538d41e7bd0)({\n cornerSmoothing: cornerSmoothing,\n preserveSmoothing: preserveSmoothing,\n cornerRadius: topRight.radius,\n roundingAndSmoothingBudget: topRight.roundingAndSmoothingBudget\n }),\n bottomRightPathParams: (0, $be0670f6a5a657f9$export$a2f9a538d41e7bd0)({\n cornerSmoothing: cornerSmoothing,\n preserveSmoothing: preserveSmoothing,\n cornerRadius: bottomRight.radius,\n roundingAndSmoothingBudget: bottomRight.roundingAndSmoothingBudget\n }),\n bottomLeftPathParams: (0, $be0670f6a5a657f9$export$a2f9a538d41e7bd0)({\n cornerSmoothing: cornerSmoothing,\n preserveSmoothing: preserveSmoothing,\n cornerRadius: bottomLeft.radius,\n roundingAndSmoothingBudget: bottomLeft.roundingAndSmoothingBudget\n })\n });\n}\n\n\nexport {$6424334e4a2a8c1c$export$4d0751d7849c93f6 as getSvgPath};\n//# sourceMappingURL=module.js.map\n","import { getSvgPath } from \"figma-squircle\";\nconst createClassName = (length = 8) => {\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n let result = \"\";\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n return `squircle-${result}`;\n};\nconst setCss = (css, styleId) => {\n let styleEl = document.getElementById(styleId);\n if (!styleEl) {\n styleEl = document.createElement(\"style\");\n styleEl.id = styleId;\n document.head.appendChild(styleEl);\n }\n styleEl.textContent = css;\n};\nexport const renderSquircle = (el, opts, className) => {\n const width = el.clientWidth;\n const height = el.clientHeight;\n const augmentedOpts = {\n preserveSmoothing: true,\n cornerSmoothing: 1,\n width,\n height,\n ...opts,\n };\n if (!opts.borderWidth) {\n el.style.clipPath = `path('${getSvgPath(augmentedOpts)}')`;\n }\n else {\n el.classList.add(className);\n setCss(`\n .${className} {\n position: relative;\n clip-path: path('${getSvgPath(augmentedOpts)}');\n }\n\n .${className}::before {\n content: '';\n display: block;\n position: absolute;\n inset: ${opts.borderWidth}px; \n z-index: -1;\n clip-path: path('${getSvgPath({\n ...augmentedOpts,\n width: width - opts.borderWidth * 2,\n height: height - opts.borderWidth * 2,\n cornerRadius: opts.cornerRadius - opts.borderWidth,\n })}');\n }\n `, `style-${className}`);\n }\n};\nexport const squircleObserver = (el, opts) => {\n const className = createClassName();\n // Initialize as `undefined` to always run directly when instantiating.\n let dimensions = undefined;\n const func = (newOpts) => {\n if (newOpts !== undefined) {\n opts = newOpts;\n }\n return renderSquircle(el, opts, className);\n };\n const resizeObserver = new ResizeObserver(() => {\n const prevDimemsions = dimensions;\n dimensions = [el.clientWidth, el.clientHeight];\n // Run only if dimensions changed, for performance.\n if (prevDimemsions?.[0] !== dimensions[0] ||\n prevDimemsions?.[1] !== dimensions[1]) {\n func();\n }\n });\n // It calls the callback directly.\n resizeObserver.observe(el);\n // The native code `resizeObserver.disconnect` needs the correct context.\n // Retain the context by wrapping in arrow function. Read more about this:\n // https://stackoverflow.com/a/9678166/19306180\n func.disconnect = () => {\n el.classList.remove(className);\n document.querySelector(`#style-${className}`)?.remove();\n resizeObserver.disconnect();\n };\n return func;\n};\n//# sourceMappingURL=corner-smoothing-vanilla.js.map","import React, { forwardRef, useCallback, useRef, } from \"react\";\nimport { squircleObserver } from \"./corner-smoothing-vanilla\";\nconst omitUndefined = (obj) => {\n const result = {};\n for (const key in obj) {\n if (obj[key] !== undefined) {\n // @ts-ignore\n result[key] = obj[key];\n }\n }\n return result;\n};\nexport const Squircle = forwardRef(({ children, as: Component = \"div\", cornerRadius, topLeftCornerRadius, topRightCornerRadius, bottomRightCornerRadius, bottomLeftCornerRadius, cornerSmoothing, preserveSmoothing, borderWidth, ...rest }, forwardedRef) => {\n const funcRef = useRef();\n const refCallback = useCallback((el) => {\n const opts = omitUndefined({\n cornerRadius,\n topLeftCornerRadius,\n topRightCornerRadius,\n bottomRightCornerRadius,\n bottomLeftCornerRadius,\n cornerSmoothing,\n preserveSmoothing,\n borderWidth,\n });\n funcRef.current?.disconnect();\n if (el) {\n funcRef.current = squircleObserver(el, opts);\n }\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el);\n }\n else if (forwardedRef) {\n forwardedRef.current = el;\n }\n }, [\n cornerRadius,\n topLeftCornerRadius,\n topRightCornerRadius,\n bottomRightCornerRadius,\n bottomLeftCornerRadius,\n cornerSmoothing,\n preserveSmoothing,\n borderWidth,\n ]);\n return (React.createElement(Component, { ref: refCallback, ...rest }, children));\n});\n/**\n * HOC that wraps `Component` and injects the squircle style.\n */\nexport const squircle = (Component, opts) => forwardRef((props, forwardedRef) => {\n const funcRef = useRef();\n const refCallback = useCallback((el) => {\n funcRef.current?.disconnect();\n if (el) {\n funcRef.current = squircleObserver(el, opts);\n }\n if (typeof forwardedRef === \"function\") {\n forwardedRef(el);\n }\n else if (forwardedRef) {\n forwardedRef.current = el;\n }\n }, [opts]);\n // @ts-ignore\n return React.createElement(Component, { ref: refCallback, ...props });\n});\n//# sourceMappingURL=corner-smoothing-react.js.map","/**\n * @fileoverview\n * 一个专辑图组件\n */\n\nimport classNames from \"classnames\";\nimport { Squircle } from \"corner-smoothing\";\nimport {\n\ttype HTMLProps,\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport styles from \"./index.module.css\";\n\n/**\n * 一个专辑图组件\n */\nexport const Cover = forwardRef<\n\tHTMLDivElement | null,\n\t{\n\t\tcoverUrl?: string;\n\t\tcoverIsVideo?: boolean;\n\t\tcoverVideoPaused?: boolean;\n\t\tmusicPaused?: boolean;\n\t\tpauseShrinkAspect?: number;\n\t} & HTMLProps<HTMLDivElement>\n>(\n\t(\n\t\t{\n\t\t\tcoverUrl,\n\t\t\tcoverIsVideo,\n\t\t\tcoverVideoPaused,\n\t\t\tclassName,\n\t\t\tmusicPaused,\n\t\t\tpauseShrinkAspect,\n\t\t\t...rest\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst frameRef = useRef<HTMLDivElement>(null);\n\t\tconst clsNames = useMemo(\n\t\t\t() =>\n\t\t\t\tclassNames(styles.cover, musicPaused && styles.musicPaused, className),\n\t\t\t[className, musicPaused],\n\t\t);\n\t\tconst videoRef = useRef<HTMLVideoElement>(null);\n\t\tuseEffect(() => {\n\t\t\tconst videoEl = videoRef.current;\n\t\t\tif (videoEl) {\n\t\t\t\tif (coverVideoPaused) {\n\t\t\t\t\tvideoEl.pause();\n\t\t\t\t} else {\n\t\t\t\t\tvideoEl.play();\n\t\t\t\t}\n\t\t\t}\n\t\t}, [coverVideoPaused]);\n\t\tconst [cornerRadius, setCornerRadius] = useState(20);\n\n\t\tuseLayoutEffect(() => {\n\t\t\tconst frameEl = frameRef.current;\n\t\t\tif (frameEl) {\n\t\t\t\tconst onResize = () => {\n\t\t\t\t\tconst size = Math.min(frameEl.clientWidth, frameEl.clientHeight);\n\t\t\t\t\tsetCornerRadius(Math.max(size * 0.02, window.innerHeight * 0.007));\n\t\t\t\t};\n\t\t\t\tconst obz = new ResizeObserver(onResize);\n\t\t\t\tonResize();\n\t\t\t\tobz.observe(frameEl);\n\t\t\t\treturn () => {\n\t\t\t\t\tobz.disconnect();\n\t\t\t\t};\n\t\t\t}\n\t\t}, []);\n\n\t\tuseImperativeHandle(ref, () => frameRef.current!, []);\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={clsNames}\n\t\t\t\tstyle={{\n\t\t\t\t\t\"--scale-level\": pauseShrinkAspect ?? 0.75,\n\t\t\t\t}}\n\t\t\t\tref={frameRef}\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t<Squircle\n\t\t\t\t\tcornerRadius={cornerRadius}\n\t\t\t\t\tcornerSmoothing={0.7}\n\t\t\t\t\talt=\"cover\"\n\t\t\t\t\tclassName={styles.coverInner}\n\t\t\t\t>\n\t\t\t\t\t{coverIsVideo ? (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName={styles.coverInner}\n\t\t\t\t\t\t\tsrc={coverUrl}\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\tplaysInline\n\t\t\t\t\t\t\tcrossOrigin=\"anonymous\"\n\t\t\t\t\t\t\tref={videoRef}\n\t\t\t\t\t\t\t{...rest}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={styles.coverInner}\n\t\t\t\t\t\t\talt=\"cover\"\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\tbackgroundImage: `url(${coverUrl})`,\n\t\t\t\t\t\t\t\t\"--scale-level\": pauseShrinkAspect ?? 0.75,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t{...rest}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Squircle>\n\t\t\t</div>\n\t\t);\n\t},\n);\n","import { memo, type FC, type HTMLProps, type PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./index.module.css\";\n\nexport const MediaButton: FC<PropsWithChildren<HTMLProps<HTMLButtonElement>>> =\n\tmemo(({ className, children, type, ...rest }) => {\n\t\treturn (\n\t\t\t<button\n\t\t\t\tclassName={classNames(styles.mediaButton, className)}\n\t\t\t\ttype=\"button\"\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconMore = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"vector\", xmlns: \"http://www.w3.org/2000/svg\", width: 24, height: 24, viewBox: \"0 0 24 24\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M5.5161,14.1665C5.8687,14.1665 6.1856,14.083 6.467,13.916C6.7485,13.749 6.9742,13.5264 7.1443,13.248C7.3144,12.9697 7.3994,12.6574 7.3994,12.311C7.3994,11.7977 7.217,11.3601 6.8521,10.9983C6.4871,10.6365 6.0418,10.4556 5.5161,10.4556C5.1759,10.4556 4.8652,10.5391 4.5837,10.7061C4.3023,10.873 4.0781,11.0972 3.9111,11.3787C3.7441,11.6601 3.6606,11.9709 3.6606,12.311C3.6606,12.6574 3.7441,12.9697 3.9111,13.248C4.0781,13.5264 4.3023,13.749 4.5837,13.916C4.8652,14.083 5.1759,14.1665 5.5161,14.1665ZM12.4092,14.1665C12.7555,14.1665 13.0679,14.083 13.3462,13.916C13.6245,13.749 13.8472,13.5264 14.0142,13.248C14.1812,12.9697 14.2646,12.6574 14.2646,12.311C14.2646,11.7977 14.0837,11.3601 13.7219,10.9983C13.3601,10.6365 12.9225,10.4556 12.4092,10.4556C12.069,10.4556 11.7582,10.5391 11.4768,10.7061C11.1954,10.873 10.9727,11.0972 10.8088,11.3787C10.6449,11.6601 10.563,11.9709 10.563,12.311C10.563,12.6574 10.6449,12.9697 10.8088,13.248C10.9727,13.5264 11.1954,13.749 11.4768,13.916C11.7582,14.083 12.069,14.1665 12.4092,14.1665ZM19.3022,14.1665C19.6424,14.1665 19.9532,14.083 20.2346,13.916C20.516,13.749 20.7402,13.5264 20.9072,13.248C21.0742,12.9697 21.1577,12.6574 21.1577,12.311C21.1577,11.7977 20.9768,11.3601 20.615,10.9983C20.2532,10.6365 19.8156,10.4556 19.3022,10.4556C18.9559,10.4556 18.6405,10.5391 18.356,10.7061C18.0715,10.873 17.8457,11.0972 17.6787,11.3787C17.5117,11.6601 17.4282,11.9709 17.4282,12.311C17.4282,12.6574 17.5117,12.9697 17.6787,13.248C17.8457,13.5264 18.0715,13.749 18.356,13.916C18.6405,14.083 18.9559,14.1665 19.3022,14.1665Z\", fill: \"currentColor\", fillRule: \"nonzero\", id: \"path_0\" }));\nconst ForwardRef = forwardRef(SvgIconMore);\nexport default ForwardRef;\n","import { memo, type HTMLProps } from \"react\";\nimport IconMore from \"./icon_more.svg?react\";\nimport styles from \"./index.module.css\";\nimport classNames from \"classnames\";\n\nexport const MenuButton: React.FC<HTMLProps<HTMLButtonElement>> = memo(\n\t({ className, type, ...rest }) => {\n\t\treturn (\n\t\t\t<button\n\t\t\t\tclassName={classNames(styles.menuButton, className)}\n\t\t\t\ttype=\"button\"\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t<IconMore />\n\t\t\t</button>\n\t\t);\n\t},\n);\n","import classNames from \"classnames\";\nimport styles from \"./index.module.css\";\nimport type { FC, HTMLProps, PropsWithChildren } from \"react\";\nimport { useEffect, useRef } from \"react\";\n\nexport const TextMarquee: FC<PropsWithChildren<HTMLProps<HTMLDivElement>>> = ({\n\tchildren,\n\tclassName,\n\t...rest\n}) => {\n\tconst outerDiv = useRef<HTMLDivElement>(null);\n\tconst innerDiv = useRef<HTMLDivElement>(null);\n\tconst currentAnimationsRef = useRef(new Set<Animation>());\n\n\tconst onMouseEnter = () => {\n\t\tif (innerDiv.current && outerDiv.current) {\n\t\t\tconst outerWidth = outerDiv.current.clientWidth;\n\t\t\tconst innerWidth = innerDiv.current.clientWidth;\n\n\t\t\tif (innerWidth <= outerWidth * 0.95) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\touterDiv.current?.classList.add(styles.animating);\n\n\t\t\tconst distance = innerWidth - outerWidth * 0.95;\n\n\t\t\tconst ani = innerDiv.current.animate(\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\ttransform: \"translateX(0px)\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttransform: `translateX(${-distance}px)`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\titerations: 2,\n\t\t\t\t\tdirection: \"alternate\",\n\t\t\t\t\teasing: \"linear\",\n\t\t\t\t\tduration: Math.max(0, ((distance * 2) / 64) * 1000),\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tani.finished.then(() => {\n\t\t\t\touterDiv.current?.classList.remove(styles.animating);\n\t\t\t});\n\n\t\t\tcurrentAnimationsRef.current.add(ani);\n\t\t}\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tfor (const ani of currentAnimationsRef.current) {\n\t\t\tani.finish();\n\t\t}\n\t\touterDiv.current?.classList.remove(styles.animating);\n\t\tcurrentAnimationsRef.current.clear();\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tref={outerDiv}\n\t\t\tclassName={classNames(styles.textMarquee, className)}\n\t\t\tonMouseEnter={onMouseEnter}\n\t\t\tonMouseLeave={onMouseLeave}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div ref={innerDiv}>{children}</div>\n\t\t</div>\n\t);\n};\n","import classNames from \"classnames\";\nimport type { HTMLProps } from \"react\";\nimport { MenuButton } from \"../MenuButton\";\nimport { TextMarquee } from \"../TextMarquee\";\nimport styles from \"./index.module.css\";\n\nexport const MusicInfo: React.FC<\n\t{\n\t\tname?: string;\n\t\tartists?: string[];\n\t\talbum?: string;\n\t\tonArtistClicked?: (artist: string, index: number) => void;\n\t\tonAlbumClicked?: () => void;\n\t\tonMenuButtonClicked?: () => void;\n\t} & HTMLProps<HTMLDivElement>\n> = ({\n\tname,\n\tartists,\n\talbum,\n\tonArtistClicked,\n\tonAlbumClicked,\n\tonMenuButtonClicked,\n\tclassName,\n\t...rest\n}) => {\n\treturn (\n\t\t<div className={classNames(styles.musicInfo, className)} {...rest}>\n\t\t\t<div className={styles.info}>\n\t\t\t\t{name !== undefined && (\n\t\t\t\t\t<TextMarquee className={styles.name}>{name}</TextMarquee>\n\t\t\t\t)}\n\t\t\t\t{artists !== undefined && (\n\t\t\t\t\t<TextMarquee className={styles.artists}>\n\t\t\t\t\t\t{artists.map((v) => (\n\t\t\t\t\t\t\t<a key={`artist-${v}`}>{v}</a>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TextMarquee>\n\t\t\t\t)}\n\t\t\t\t{album !== undefined && (\n\t\t\t\t\t<TextMarquee className={styles.album}>{album}</TextMarquee>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<MenuButton onClick={onMenuButtonClicked} />\n\t\t</div>\n\t);\n};\n","import { jsx as q, jsxs as W, Fragment as z } from \"react/jsx-runtime\";\nimport { BackgroundRender as C, MeshGradientRenderer as D, LyricPlayer as J } from \"@applemusic-like-lyrics/core\";\nimport { BaseRenderer as X, MeshGradientRenderer as Y, PixiRenderer as V } from \"@applemusic-like-lyrics/core\";\nimport { forwardRef as I, useRef as x, useEffect as n, useImperativeHandle as P } from \"react\";\nimport { createPortal as K } from \"react-dom\";\nconst T = I(\n ({\n album: p,\n albumIsVideo: E,\n fps: o,\n playing: l,\n flowSpeed: a,\n renderScale: B,\n staticMode: h,\n lowFreqVolume: v,\n hasLyric: m,\n renderer: R,\n style: A,\n ...L\n }, F) => {\n const s = x(), f = x(null), y = x(), c = R ?? D;\n return n(() => {\n var t;\n (y.current !== c || s.current === void 0) && (y.current = c, (t = s.current) == null || t.dispose(), s.current = C.new(c));\n }, [c]), n(() => {\n var t;\n c && p && ((t = s.current) == null || t.setAlbum(p, E));\n }, [c, p, E]), n(() => {\n var t;\n c && o && ((t = s.current) == null || t.setFPS(o));\n }, [c, o]), n(() => {\n var t, d, k;\n c && (l === void 0 ? (t = s.current) == null || t.resume() : l ? (d = s.current) == null || d.resume() : (k = s.current) == null || k.pause());\n }, [c, l]), n(() => {\n var t;\n c && a && ((t = s.current) == null || t.setFlowSpeed(a));\n }, [c, a]), n(() => {\n var t;\n c && ((t = s.current) == null || t.setStaticMode(h ?? !1));\n }, [c, h]), n(() => {\n var t;\n c && B && ((t = s.current) == null || t.setRenderScale(B ?? 0.5));\n }, [c, B]), n(() => {\n var t;\n c && v && ((t = s.current) == null || t.setLowFreqVolume(v ?? 1));\n }, [c, v]), n(() => {\n var t;\n c && m !== void 0 && ((t = s.current) == null || t.setHasLyric(m ?? !0));\n }, [c, m]), n(() => {\n var t;\n if (s.current) {\n const d = s.current.getElement();\n d.style.width = \"100%\", d.style.height = \"100%\", (t = f.current) == null || t.appendChild(d);\n }\n }, [s.current]), P(\n F,\n () => ({\n wrapperEl: f.current,\n bgRender: s.current\n }),\n [f.current, s.current]\n ), /* @__PURE__ */ q(\n \"div\",\n {\n style: {\n display: \"contents\",\n ...A\n },\n ...L,\n ref: f\n }\n );\n }\n), U = I(\n ({\n disabled: p,\n playing: E,\n alignAnchor: o,\n alignPosition: l,\n enableSpring: a,\n enableBlur: B,\n enableScale: h,\n hidePassedLines: v,\n lyricLines: m,\n currentTime: R,\n isSeeking: A,\n wordFadeWidth: L,\n linePosXSpringParams: F,\n linePosYSpringParams: s,\n lineScaleSpringParams: f,\n bottomLine: y,\n onLyricLineClick: c,\n onLyricLineContextMenu: t,\n ...d\n }, k) => {\n var j, $;\n const r = x(), G = x(null), H = x(R);\n return n(() => (r.current = new J(), () => {\n var e;\n (e = r.current) == null || e.dispose();\n }), []), n(() => {\n if (!p) {\n let e = !1, u = -1;\n const i = (w) => {\n var g;\n e || (u === -1 && (u = w), (g = r.current) == null || g.update(w - u), u = w, requestAnimationFrame(i));\n };\n return requestAnimationFrame(i), () => {\n e = !0;\n };\n }\n }, [p]), n(() => {\n var e, u, i;\n E !== void 0 ? E ? (e = r.current) == null || e.resume() : (u = r.current) == null || u.pause() : (i = r.current) == null || i.resume();\n }, [E]), n(() => {\n var e;\n r.current && ((e = G.current) == null || e.appendChild(r.current.getElement()));\n }, []), n(() => {\n var e;\n o !== void 0 && ((e = r.current) == null || e.setAlignAnchor(o));\n }, [o]), n(() => {\n var e;\n v !== void 0 && ((e = r.current) == null || e.setHidePassedLines(v));\n }, [v]), n(() => {\n var e;\n l !== void 0 && ((e = r.current) == null || e.setAlignPosition(l));\n }, [l]), n(() => {\n var e, u;\n a !== void 0 ? (e = r.current) == null || e.setEnableSpring(a) : (u = r.current) == null || u.setEnableSpring(!0);\n }, [a]), n(() => {\n var e, u;\n h !== void 0 ? (e = r.current) == null || e.setEnableScale(h) : (u = r.current) == null || u.setEnableScale(!0);\n }, [h]), n(() => {\n var e;\n (e = r.current) == null || e.setEnableBlur(B ?? !0);\n }, [B]), n(() => {\n var e, u;\n R !== void 0 ? ((e = r.current) == null || e.setCurrentTime(R), H.current = R) : (u = r.current) == null || u.setCurrentTime(0);\n }, [R]), n(() => {\n var e, u, i, w;\n m !== void 0 ? ((e = r.current) == null || e.setLyricLines(\n m,\n H.current\n ), (u = r.current) == null || u.update()) : ((i = r.current) == null || i.setLyricLines([]), (w = r.current) == null || w.update());\n }, [m]), n(() => {\n var e;\n (e = r.current) == null || e.setIsSeeking(!!A);\n }, [A]), n(() => {\n var e;\n (e = r.current) == null || e.setWordFadeWidth(L);\n }, [L]), n(() => {\n var e;\n F !== void 0 && ((e = r.current) == null || e.setLinePosXSpringParams(F));\n }, [F]), n(() => {\n var e;\n s !== void 0 && ((e = r.current) == null || e.setLinePosYSpringParams(s));\n }, [s]), n(() => {\n var e;\n f !== void 0 && ((e = r.current) == null || e.setLineScaleSpringParams(f));\n }, [f]), n(() => {\n var e;\n if (c) {\n const u = (i) => c(i);\n return (e = r.current) == null || e.addEventListener(\"line-click\", u), () => {\n var i;\n return (i = r.current) == null ? void 0 : i.removeEventListener(\"line-click\", u);\n };\n }\n }, [c]), n(() => {\n var e;\n if (t) {\n const u = (i) => t(i);\n return (e = r.current) == null || e.addEventListener(\"line-contextmenu\", u), () => {\n var i;\n return (i = r.current) == null ? void 0 : i.removeEventListener(\n \"line-contextmenu\",\n u\n );\n };\n }\n }, [t]), P(\n k,\n () => ({\n wrapperEl: G.current,\n lyricPlayer: r.current\n }),\n []\n ), /* @__PURE__ */ W(z, { children: [\n /* @__PURE__ */ q(\"div\", { ...d, ref: G }),\n (j = r.current) != null && j.getBottomLineElement() && y ? K(\n y,\n ($ = r.current) == null ? void 0 : $.getBottomLineElement()\n ) : null\n ] });\n }\n);\nexport {\n T as BackgroundRender,\n X as BaseRenderer,\n U as LyricPlayer,\n Y as MeshGradientRenderer,\n V as PixiRenderer\n};\n//# sourceMappingURL=amll-react.js.map\n","export const VOID = -1;\nexport const PRIMITIVE = 0;\nexport const ARRAY = 1;\nexport const OBJECT = 2;\nexport const DATE = 3;\nexport const REGEXP = 4;\nexport const MAP = 5;\nexport const SET = 6;\nexport const ERROR = 7;\nexport const BIGINT = 8;\n// export const SYMBOL = 9;\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(new env[name](message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n }\n return as(new env[type](value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type)\n return as([type, [...value]], value);\n \n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array<string,any>} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","/**\n * @fileoverview\n * 一个适用于歌词页面横向布局的组件\n */\n\nimport classnames from \"classnames\";\nimport { motion } from \"framer-motion\";\nimport type { HTMLProps } from \"react\";\nimport styles from \"./horizontal.module.css\";\n\nexport const HorizontalLayout: React.FC<\n\t{\n\t\tthumbSlot?: React.ReactNode;\n\t\tcoverSlot?: React.ReactNode;\n\t\tcontrolsSlot?: React.ReactNode;\n\t\tlyricSlot?: React.ReactNode;\n\t\tbackgroundSlot?: React.ReactNode;\n\t\tbottomControls?: React.ReactNode;\n\t\thideLyric?: boolean;\n\t\tasChild?: boolean;\n\t} & HTMLProps<HTMLDivElement>\n> = ({\n\tthumbSlot,\n\tcoverSlot,\n\tcontrolsSlot,\n\tlyricSlot,\n\tbottomControls,\n\thideLyric,\n\tclassName,\n\tasChild,\n\t...rest\n}) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classnames(\n\t\t\t\tclassName,\n\t\t\t\t!asChild && styles.horizontalLayout,\n\t\t\t\t!asChild && hideLyric && styles.hideLyric,\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<motion.div layout layoutId=\"amll-player-thumb\" className={styles.thumb}>\n\t\t\t\t{thumbSlot}\n\t\t\t</motion.div>\n\t\t\t<motion.div layout layoutId=\"amll-player-cover\" className={styles.cover}>\n\t\t\t\t{coverSlot}\n\t\t\t</motion.div>\n\t\t\t<motion.div\n\t\t\t\tlayout\n\t\t\t\tlayoutId=\"amll-player-controls\"\n\t\t\t\tclassName={styles.controls}\n\t\t\t>\n\t\t\t\t{controlsSlot}\n\t\t\t</motion.div>\n\t\t\t<div className={styles.lyric}>{lyricSlot}</div>\n\t\t\t<div className={styles.bottomControls}>{bottomControls}</div>\n\t\t</div>\n\t);\n};\n","/**\n * @fileoverview\n * 一个适用于歌词页面竖向布局的组件\n */\n\nimport classNames from \"classnames\";\nimport { type MotionProps, type Target, motion } from \"framer-motion\";\nimport type { HTMLProps } from \"react\";\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\nimport styles from \"./vertical.module.css\";\n\nexport const VerticalLayout: React.FC<\n\t{\n\t\tthumbSlot?: React.ReactNode;\n\t\tsmallControlsSlot?: React.ReactNode;\n\t\tbigControlsSlot?: React.ReactNode;\n\t\tcoverSlot?: React.ReactNode;\n\t\tlyricSlot?: React.ReactNode;\n\t\tasChild?: boolean;\n\t\thideLyric?: boolean;\n\t} & HTMLProps<HTMLDivElement>\n> = ({\n\tthumbSlot,\n\tcoverSlot,\n\tsmallControlsSlot,\n\tbigControlsSlot,\n\tlyricSlot,\n\thideLyric,\n\tasChild,\n\tclassName,\n\t...rest\n}) => {\n\tconst rootRef = useRef<HTMLDivElement>(null);\n\tconst phonyBigCoverRef = useRef<HTMLDivElement>(null);\n\tconst phonySmallCoverRef = useRef<HTMLDivElement>(null);\n\tconst coverFrameRef = useRef<HTMLDivElement>(null);\n\tconst hideLyricRef = useRef(hideLyric ?? false);\n\tconst [currentCoverStyle, setCurrentCoverStyle] =\n\t\tuseState<MotionProps[\"animate\"]>(undefined);\n\tconst calcCoverLayout = useCallback((hideLyric = hideLyricRef.current) => {\n\t\tif (!rootRef.current) return;\n\t\tlet rootEl: HTMLElement = rootRef.current;\n\t\tconst targetCover = hideLyric\n\t\t\t? phonyBigCoverRef.current\n\t\t\t: phonySmallCoverRef.current;\n\t\tif (!targetCover || !rootEl) return;\n\t\tconst targetCoverSize = Math.min(\n\t\t\ttargetCover.clientWidth,\n\t\t\ttargetCover.clientHeight,\n\t\t);\n\t\twhile (getComputedStyle(rootEl).display === \"contents\") {\n\t\t\trootEl = rootEl.parentElement!;\n\t\t}\n\t\tconst rootB = rootEl.getBoundingClientRect();\n\t\tconst targetCoverB = targetCover.getBoundingClientRect();\n\t\tconst targetCoverLeft =\n\t\t\ttargetCoverB.x - rootB.x + (targetCoverB.width - targetCoverSize) / 2;\n\t\tconst targetCoverTop =\n\t\t\ttargetCoverB.y - rootB.y + (targetCoverB.height - targetCoverSize) / 2;\n\t\treturn {\n\t\t\twidth: targetCoverSize,\n\t\t\theight: targetCoverSize,\n\t\t\tleft: targetCoverLeft,\n\t\t\ttop: targetCoverTop,\n\t\t} as Target;\n\t}, []);\n\tuseLayoutEffect(() => {\n\t\tconst phonyBigCoverEl = phonyBigCoverRef.current;\n\t\tconst phonySmallCoverEl = phonySmallCoverRef.current;\n\t\t// const coverFrameEl = coverFrameRef.current;\n\t\tif (!phonyBigCoverEl || !phonySmallCoverEl) return;\n\t\tconst obz = new ResizeObserver(() => {\n\t\t\tsetCurrentCoverStyle(calcCoverLayout(hideLyricRef.current));\n\t\t});\n\t\tobz.observe(phonyBigCoverEl);\n\t\tobz.observe(phonySmallCoverEl);\n\t\tconst init = calcCoverLayout(hideLyricRef.current);\n\t\tsetCurrentCoverStyle(init);\n\t\treturn () => {\n\t\t\tobz.disconnect();\n\t\t};\n\t}, [calcCoverLayout]);\n\tuseLayoutEffect(() => {\n\t\thideLyricRef.current = hideLyric ?? false;\n\t\tsetCurrentCoverStyle(calcCoverLayout(hideLyricRef.current));\n\t}, [hideLyric, calcCoverLayout]);\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\tclassName,\n\t\t\t\t!asChild && styles.verticalLayout,\n\t\t\t\t!asChild && hideLyric && styles.hideLyric,\n\t\t\t)}\n\t\t\tref={rootRef}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className={styles.thumb}>{thumbSlot}</div>\n\t\t\t<div className={styles.lyricLayout}>\n\t\t\t\t{/** 用于占位,测量布局的大小用 */}\n\t\t\t\t<div className={styles.phonySmallCover} ref={phonySmallCoverRef} />\n\t\t\t\t<div className={styles.smallControls}>{smallControlsSlot}</div>\n\t\t\t\t<div className={styles.lyric}>{lyricSlot}</div>\n\t\t\t</div>\n\t\t\t<div className={styles.noLyricLayout}>\n\t\t\t\t{/** 用于占位,测量布局的大小用 */}\n\t\t\t\t<div className={styles.phonyBigCover} ref={phonyBigCoverRef} />\n\t\t\t\t<div className={styles.bigControls}>{bigControlsSlot}</div>\n\t\t\t</div>\n\t\t\t<motion.div\n\t\t\t\tclassName={styles.coverFrame}\n\t\t\t\tanimate={currentCoverStyle}\n\t\t\t\tinitial={false}\n\t\t\t\ttransition={{\n\t\t\t\t\ttype: \"spring\",\n\t\t\t\t\tstiffness: 200,\n\t\t\t\t\tdamping: 30,\n\t\t\t\t}}\n\t\t\t\tref={coverFrameRef}\n\t\t\t>\n\t\t\t\t{coverSlot}\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n};\n","import type { HTMLProps } from \"react\";\nimport { forwardRef, useImperativeHandle, useRef, useState } from \"react\";\n\nimport { useLayoutEffect } from \"react\";\nimport styles from \"./auto.module.css\";\nimport { HorizontalLayout } from \"./horizontal\";\nimport { VerticalLayout } from \"./vertical\";\n\n/**\n * 会根据当前元素的宽高比自动选择横向或者纵向布局的组件\n */\nexport const AutoLyricLayout: React.FC<\n\t{\n\t\tthumbSlot?: React.ReactNode;\n\t\tcontrolsSlot?: React.ReactNode;\n\t\thorizontalBottomControls?: React.ReactNode;\n\t\tsmallControlsSlot?: React.ReactNode;\n\t\tbigControlsSlot?: React.ReactNode;\n\t\tcoverSlot?: React.ReactNode;\n\t\tlyricSlot?: React.ReactNode;\n\t\tbackgroundSlot?: React.ReactNode;\n\t\thideLyric?: boolean;\n\t\tonLayoutChange?: (isVertical: boolean) => void;\n\t} & HTMLProps<HTMLDivElement>\n> = forwardRef(\n\t(\n\t\t{\n\t\t\tthumbSlot,\n\t\t\tcontrolsSlot,\n\t\t\thorizontalBottomControls,\n\t\t\tsmallControlsSlot,\n\t\t\tbigControlsSlot,\n\t\t\tcoverSlot,\n\t\t\tlyricSlot,\n\t\t\tbackgroundSlot,\n\t\t\thideLyric,\n\t\t\tonLayoutChange,\n\t\t\t...rest\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [isVertical, setIsVertical] = useState(false);\n\t\tconst rootRef = useRef<HTMLDivElement>(null);\n\n\t\tuseImperativeHandle(ref, () => rootRef.current!);\n\n\t\tuseLayoutEffect(() => {\n\t\t\tconst rootEl = rootRef.current;\n\t\t\tif (!rootEl) return;\n\t\t\tsetIsVertical(rootEl.clientWidth < rootEl.clientHeight);\n\t\t\tconst obz = new ResizeObserver(() => {\n\t\t\t\tconst rootB = rootEl.getBoundingClientRect();\n\t\t\t\tsetIsVertical(rootB.width < rootB.height);\n\t\t\t});\n\t\t\tobz.observe(rootEl);\n\t\t\treturn () => obz.disconnect();\n\t\t}, []);\n\n\t\tuseLayoutEffect(() => {\n\t\t\tonLayoutChange?.(isVertical);\n\t\t}, [isVertical, onLayoutChange]);\n\n\t\t// 如果分开使用两个布局,会导致不能衔接背景组件,导致两者间切换有闪屏情况\n\t\t// 如果直接使用背景并各套一个 div,会导致无法应用 plus-lighter 效果\n\t\t// 故借助 display: contents 来融合布局\n\n\t\treturn (\n\t\t\t<div ref={rootRef} {...rest}>\n\t\t\t\t<div className={styles.background}>{backgroundSlot}</div>\n\t\t\t\t{isVertical ? (\n\t\t\t\t\t<VerticalLayout\n\t\t\t\t\t\tthumbSlot={thumbSlot}\n\t\t\t\t\t\tsmallControlsSlot={smallControlsSlot}\n\t\t\t\t\t\tbigControlsSlot={bigControlsSlot}\n\t\t\t\t\t\tcoverSlot={coverSlot}\n\t\t\t\t\t\tlyricSlot={lyricSlot}\n\t\t\t\t\t\thideLyric={hideLyric}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<HorizontalLayout\n\t\t\t\t\t\t// style={{ display: \"contents\" }}\n\t\t\t\t\t\t// asChild\n\t\t\t\t\t\tthumbSlot={thumbSlot}\n\t\t\t\t\t\tcontrolsSlot={controlsSlot}\n\t\t\t\t\t\tcoverSlot={coverSlot}\n\t\t\t\t\t\tlyricSlot={lyricSlot}\n\t\t\t\t\t\tbottomControls={horizontalBottomControls}\n\t\t\t\t\t\thideLyric={hideLyric}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n","/**\n * @fileoverview\n * 所有有关 PrebuiltLyricPlayer 组件中开发者需要在预设歌词组件中配置的回调函数状态在这里\n */\n\nimport type { LyricLineMouseEvent } from \"@applemusic-like-lyrics/core\";\nimport type { LyricPlayerProps } from \"@applemusic-like-lyrics/react\";\nimport { atom } from \"jotai\";\n\nexport interface Callback<Args extends any[], Result = void> {\n\tonEmit?: (...args: Args) => Result;\n}\n\nconst c = <Args extends any[], Result = void>(\n\t_onEmit: (...args: Args) => Result,\n): Callback<Args, Result> => ({});\n\n/**\n * 当点击歌曲专辑图上方的控制横条按钮时触发的回调函数\n */\nexport const onClickControlThumbAtom = atom(c(() => {}));\n/**\n * 当任意企图打开菜单或点击菜单按钮时触发的回调函数\n */\nexport const onRequestOpenMenuAtom = atom(c(() => {}));\n\n/**\n * 当触发播放或恢复播放时触发的回调函数\n */\nexport const onPlayOrResumeAtom = atom(c(() => {}));\n\n/**\n * 当触发暂停播放时触发的回调函数\n */\nexport const onPauseAtom = atom(c(() => {}));\n\n/**\n * 当触发上一首歌曲时触发的回调函数\n */\nexport const onRequestPrevSongAtom = atom(c(() => {}));\n\n/**\n * 当触发下一首歌曲时触发的回调函数\n */\nexport const onRequestNextSongAtom = atom(c(() => {}));\n/**\n * 当触发设置歌曲播放位置时触发的回调函数\n * @param _position 播放位置,单位为毫秒\n */\nexport const onSeekPositionAtom = atom(c((_position: number) => {}));\n/**\n * 当点击歌词行时触发的回调函数\n * @param _evt 对应的歌词行事件对象\n */\nexport const onLyricLineClickAtom = atom(\n\tc(((_evt: LyricLineMouseEvent) => {}) as NonNullable<\n\t\tLyricPlayerProps[\"onLyricLineClick\"]\n\t>),\n);\n/**\n * 当试图对歌词行打开上下文菜单(例如右键点击)时触发的回调函数\n * @param _evt 对应的歌词行事件对象\n */\nexport const onLyricLineContextMenuAtom = atom(\n\tc(((_evt: LyricLineMouseEvent) => {}) as NonNullable<\n\t\tLyricPlayerProps[\"onLyricLineContextMenu\"]\n\t>),\n);\n/**\n * 当触发设置音量大小时触发的回调函数\n * @param _volume 音量大小,取值范围为 [0-1]\n */\nexport const onChangeVolumeAtom = atom(c((_volume: number) => {}));\n/**\n * 当点击位于控制按钮左侧的按钮时触发的回调函数\n */\nexport const onClickLeftFunctionButtonAtom = atom(c(() => {}));\n\n/**\n * 当点击位于控制按钮右侧的按钮时触发的回调函数\n */\nexport const onClickRightFunctionButtonAtom = atom(c(() => {}));\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconSpeaker = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 40, height: 40, viewBox: \"0 0 64 64\", fill: \"currentColor\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M36.6465 43.4883C35.8721 43.4883 35.2754 43.1836 34.5518 42.498L29.4102 37.6738C29.334 37.6104 29.2578 37.585 29.1562 37.585H25.627C23.5322 37.585 22.3896 36.4043 22.3896 34.208V29.5107C22.3896 27.3145 23.5322 26.1211 25.627 26.1211H29.1689C29.2578 26.1211 29.3467 26.083 29.4102 26.0195L34.5518 21.2334C35.3262 20.4971 35.8975 20.2051 36.6211 20.2051C37.7764 20.2051 38.627 21.1064 38.627 22.2363V41.4951C38.627 42.625 37.7764 43.4883 36.6465 43.4883Z\", className: \"speaker-bounce-1\" }));\nconst ForwardRef = forwardRef(SvgIconSpeaker);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconSpeaker3 = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: 40, height: 40, viewBox: \"0 0 64 64\", fill: \"currentColor\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M27.2646 43.4883C26.5029 43.4883 25.9062 43.1836 25.1826 42.498L20.0283 37.6738C19.9648 37.6104 19.876 37.585 19.7871 37.585H16.2578C14.1631 37.585 13.0205 36.4043 13.0205 34.208V29.5107C13.0205 27.3145 14.1631 26.1211 16.2578 26.1211H19.7871C19.8887 26.1211 19.9648 26.083 20.041 26.0195L25.1826 21.2334C25.957 20.4971 26.5156 20.2051 27.252 20.2051C28.4072 20.2051 29.2578 21.1064 29.2578 22.2363V41.4951C29.2578 42.625 28.4072 43.4883 27.2646 43.4883Z\", className: \"speaker-bounce-1\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M33.752 37.8645C32.9649 37.3694 32.7998 36.4299 33.4346 35.3762C34.0694 34.3986 34.4375 33.1418 34.4375 31.8342C34.4375 30.5139 34.082 29.257 33.4346 28.2922C32.7871 27.2512 32.9649 26.299 33.752 25.8039C34.4756 25.3469 35.377 25.5246 35.8467 26.1721C36.9385 27.6955 37.586 29.7141 37.586 31.8342C37.586 33.9543 36.9385 35.9729 35.8467 37.4836C35.377 38.1438 34.4756 38.3088 33.752 37.8645Z\", className: \"speaker-bounce-2\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M39.4775 41.3937C38.6523 40.9113 38.5508 39.9084 39.1093 39.007C40.4043 37.0011 41.1533 34.4748 41.1533 31.8342C41.1533 29.1935 40.417 26.6545 39.1093 24.6613C38.5508 23.7599 38.6523 22.757 39.4775 22.2619C40.2265 21.8302 41.1406 22.008 41.623 22.7443C43.3369 25.2453 44.3017 28.4826 44.3017 31.8342C44.3017 35.1857 43.3242 38.3976 41.623 40.924C41.1406 41.6603 40.2265 41.8381 39.4775 41.3937Z\", className: \"speaker-bounce-3\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M45.1778 44.9611C44.378 44.4787 44.251 43.4884 44.7969 42.5998C46.7012 39.5656 47.8565 35.8712 47.8565 31.8595C47.8565 27.8351 46.7012 24.1408 44.7969 21.1066C44.251 20.2179 44.378 19.2277 45.1778 18.7453C45.9395 18.2882 46.8916 18.5041 47.374 19.2912C49.6211 22.8585 50.9922 27.1623 50.9922 31.8595C50.9922 36.5441 49.6465 40.8605 47.374 44.4279C46.8916 45.2023 45.9395 45.4181 45.1778 44.9611Z\", className: \"speaker-bounce-4\" }));\nconst ForwardRef = forwardRef(SvgIconSpeaker3);\nexport default ForwardRef;\n","import { useEffect, useRef } from \"react\";\nimport { BouncingSlider } from \"../BouncingSlider\";\nimport IconSpeaker from \"./icon_speaker.svg?react\";\nimport IconSpeaker3 from \"./icon_speaker_3.svg?react\";\nimport styles from \"./index.module.css\";\n\nexport const VolumeControl: typeof BouncingSlider = (props) => {\n\tconst lastValueRef = useRef(props.value);\n\tconst minSpeakerRef = useRef<SVGSVGElement>(null);\n\tconst maxSpeakerRef = useRef<SVGSVGElement>(null);\n\n\tuseEffect(() => {\n\t\tif (lastValueRef.current !== props.value) {\n\t\t\tlastValueRef.current = props.value;\n\t\t\tif (props.value <= props.min && minSpeakerRef.current) {\n\t\t\t\tminSpeakerRef.current.classList.remove(styles.speakerAnimate);\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tminSpeakerRef.current?.classList?.add(styles.speakerAnimate);\n\t\t\t\t});\n\t\t\t} else if (props.value >= props.max && maxSpeakerRef.current) {\n\t\t\t\tmaxSpeakerRef.current.classList.remove(styles.speakerAnimate);\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tmaxSpeakerRef.current?.classList?.add(styles.speakerAnimate);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}, [props.value, props.min, props.max]);\n\n\treturn (\n\t\t<BouncingSlider\n\t\t\tclassName={styles.volumeControl}\n\t\t\tbeforeIcon={<IconSpeaker ref={minSpeakerRef} color=\"#FFFFFF\" />}\n\t\t\tafterIcon={<IconSpeaker3 ref={maxSpeakerRef} color=\"#FFFFFF\" />}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n","/**\n * @fileoverview\n * 所有有关 PrebuiltLyricPlayer 组件中用户可配置的状态都在这里\n * 如无特殊注明,此处所有配置均会被存储在 localStorage 中\n */\n\nimport { MeshGradientRenderer } from \"@applemusic-like-lyrics/core\";\nimport type { BackgroundRenderProps } from \"@applemusic-like-lyrics/react\";\nimport { atom } from \"jotai\";\nimport { atomWithStorage } from \"jotai/utils\";\n\n// ======================== 歌词效果配置 ========================\n\n/**\n * 是否启用歌词行模糊效果,默认启用\n *\n * 性能影响情况:高\n */\nexport const enableLyricLineBlurEffectAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricLineBlurEffectAtom\",\n\ttrue,\n);\n/**\n * 是否启用歌词行缩放效果,默认启用\n *\n * 性能影响情况:无\n */\nexport const enableLyricLineScaleEffectAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricLineScaleEffectAtom\",\n\ttrue,\n);\n/**\n * 是否启用歌词行弹簧动画效果,默认启用\n *\n * 如果禁用,则会回退到基础的 CSS 属性动画效果\n *\n * 性能影响情况:中\n */\nexport const enableLyricLineSpringAnimationAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricLineSpringAnimationAtom\",\n\ttrue,\n);\n/**\n * 是否显示翻译歌词行,默认启用\n *\n * 性能影响情况:低\n */\nexport const enableLyricTranslationLineAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricTranslationLineAtom\",\n\ttrue,\n);\n/**\n * 是否显示音译歌词行,默认启用\n *\n * 性能影响情况:低\n */\nexport const enableLyricRomanLineAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricRomanLineAtom\",\n\ttrue,\n);\n/**\n * 是否交换音译歌词行和翻译歌词行,默认禁用\n *\n * 性能影响情况:无\n */\nexport const enableLyricSwapTransRomanLineAtom = atomWithStorage(\n\t\"amll-react-full.enableLyricSwapTransRomanLineAtom\",\n\tfalse,\n);\n/**\n * 调节逐词歌词时单词的渐变过渡宽度,单位为一个全角字的宽度,默认为 0.5\n *\n * 如果要模拟 Apple Music for Android 的效果,可以设置为 1\n *\n * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5\n *\n * 如需关闭逐词歌词时单词的渐变过渡效果,可以设置为 0\n *\n * 性能影响情况:无\n */\nexport const lyricWordFadeWidthAtom = atomWithStorage(\n\t\"amll-react-full.lyricWordFadeWidth\",\n\t0.5,\n);\n/**\n * 设置仅歌词组件的字体家族(CSS Font Family 属性),默认为空(即继承自父元素)\n */\nexport const lyricFontFamilyAtom = atomWithStorage(\n\t\"amll-react-full.lyricFontFamily\",\n\t\"\",\n);\n/**\n * 设置仅歌词组件的字体字重(CSS Font Weight 属性),默认为 0 (即继承自父元素)\n */\nexport const lyricFontWeightAtom = atomWithStorage(\n\t\"amll-react-full.lyricFontWeight\",\n\t0,\n);\n/**\n * 设置仅歌词组件的字符间距(CSS Font Weight 属性),默认为 0 (即继承自父元素)\n */\nexport const lyricLetterSpacingAtom = atomWithStorage(\n\t\"amll-react-full.lyricLetterSpacing\",\n\t\"normal\",\n);\n\n// ====================== 歌曲信息展示配置 ======================\n\nexport enum PlayerControlsType {\n\tControls = \"controls\",\n\tFFT = \"fft\",\n\tNone = \"none\",\n}\n\n/**\n * 播放器控制器类型,默认为 `PlayerControlsType.Controls`\n */\nexport const playerControlsTypeAtom = atomWithStorage(\n\t\"amll-react-full.playerControlsType\",\n\tPlayerControlsType.Controls,\n);\n/**\n * 是否显示歌曲名称,默认启用\n */\nexport const showMusicNameAtom = atomWithStorage(\n\t\"amll-react-full.showMusicName\",\n\ttrue,\n);\n/**\n * 是否显示歌曲作者,默认启用\n */\nexport const showMusicArtistsAtom = atomWithStorage(\n\t\"amll-react-full.showMusicArtists\",\n\ttrue,\n);\n/**\n * 是否显示歌曲专辑名称,默认启用\n */\nexport const showMusicAlbumAtom = atomWithStorage(\n\t\"amll-react-full.showMusicAlbum\",\n\tfalse,\n);\n/**\n * 是否显示音量滑块条,默认启用\n */\nexport const showVolumeControlAtom = atomWithStorage(\n\t\"amll-react-full.showVolumeControl\",\n\ttrue,\n);\n/**\n * 是否显示底部控制按钮组,默认启用\n */\nexport const showBottomControlAtom = atomWithStorage(\n\t\"amll-react-full.showBottomControl\",\n\ttrue,\n);\n\n// ======================== 歌词内容配置 ========================\n\n/**\n * 调节全局歌词时间戳位移,单位为毫秒,正值为提前,负值为推迟,默认为 0\n *\n * 性能影响情况:无\n */\nexport const globalLyricTimelineOffsetAtom = atomWithStorage(\n\t\"amll-react-full.globalLyricTimelineOffsetAtom\",\n\t0,\n);\n\n// ======================== 歌词背景配置 ========================\n\n/**\n * 配置所使用的歌词背景渲染器,默认使用 MeshGradientRenderer\n *\n * 由于存储状态特殊,故不使用 atomWithStorage,请另外处理配置存储\n *\n * 性能影响情况:高\n */\nexport const lyricBackgroundRendererAtom = atom<{\n\trenderer: BackgroundRenderProps[\"renderer\"];\n}>({\n\trenderer: MeshGradientRenderer,\n});\n\n/**\n * 调节背景的最大帧率,默认 60\n *\n * 性能影响情况:高\n */\nexport const lyricBackgroundFPSAtom = atomWithStorage<\n\tNonNullable<BackgroundRenderProps[\"fps\"]>\n>(\"amll-react-full.lyricBackgroundFPSAtom\", 60);\n\n/**\n * 调节背景的渲染倍率,默认为 1\n *\n * 性能影响情况:高\n */\nexport const lyricBackgroundRenderScaleAtom = atomWithStorage<\n\tNonNullable<BackgroundRenderProps[\"renderScale\"]>\n>(\"amll-react-full.lyricBackgroundRenderScaleAtom\", 1);\n\n/**\n * 是否启用背景静态模式,即除了切换背景以外的情况都将停止渲染以优化性能,默认禁用\n *\n * 性能影响情况:中\n */\nexport const lyricBackgroundStaticModeAtom = atomWithStorage<\n\tNonNullable<BackgroundRenderProps[\"staticMode\"]>\n>(\"amll-react-full.lyricBackgroundStaticModeAtom\", false);\n","export function toDuration(duration: number) {\n\tconst isRemainTime = duration < 0;\n\n\tconst d = Math.abs(duration | 0);\n\tconst sec = d % 60;\n\tconst min = Math.floor((d - sec) / 60);\n\tconst secText = \"0\".repeat(2 - sec.toString().length) + sec;\n\n\treturn `${isRemainTime ? \"-\" : \"\"}${min}:${secText}`;\n}\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgAirplay = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 64, height: 64, viewBox: \"0 0 64 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M11.8633 31.8984C11.8633 29.138 12.3841 26.5469 13.4258 24.125C14.4674 21.6901 15.9128 19.5482 17.7617 17.6992C19.6107 15.8372 21.7526 14.3854 24.1875 13.3438C26.6224 12.2891 29.2266 11.7617 32 11.7617C34.7734 11.7617 37.3776 12.2891 39.8125 13.3438C42.2474 14.3854 44.3893 15.8372 46.2383 17.6992C48.0872 19.5482 49.5326 21.6901 50.5742 24.125C51.6159 26.5469 52.1367 29.138 52.1367 31.8984C52.1367 34.6719 51.6029 37.2826 50.5352 39.7305C49.4674 42.1784 48.0156 44.3073 46.1797 46.1172C46.0365 46.2604 45.8802 46.332 45.7109 46.332C45.5547 46.332 45.4049 46.2539 45.2617 46.0977L44.3438 45.0625C44.0964 44.763 44.1094 44.4635 44.3828 44.1641C45.9453 42.6016 47.1823 40.7656 48.0938 38.6562C49.0182 36.5339 49.4805 34.2812 49.4805 31.8984C49.4805 29.5026 49.0247 27.2565 48.1133 25.1602C47.2018 23.0508 45.9388 21.1953 44.3242 19.5938C42.7227 17.9792 40.8672 16.7161 38.7578 15.8047C36.6484 14.8932 34.3958 14.4375 32 14.4375C29.6042 14.4375 27.3516 14.8932 25.2422 15.8047C23.1328 16.7161 21.2708 17.9792 19.6562 19.5938C18.0547 21.1953 16.7982 23.0508 15.8867 25.1602C14.9753 27.2565 14.5195 29.5026 14.5195 31.8984C14.5195 34.2812 14.9753 36.5273 15.8867 38.6367C16.7982 40.7461 18.0417 42.5885 19.6172 44.1641C19.8776 44.4635 19.8841 44.7565 19.6367 45.043L18.7188 46.0781C18.5885 46.2344 18.4323 46.3125 18.25 46.3125C18.0807 46.3125 17.9245 46.2409 17.7812 46.0977C15.9583 44.2878 14.513 42.1654 13.4453 39.7305C12.3906 37.2826 11.8633 34.6719 11.8633 31.8984ZM17.5469 31.8984C17.5469 29.9193 17.918 28.0573 18.6602 26.3125C19.4154 24.5677 20.457 23.0312 21.7852 21.7031C23.1133 20.375 24.6497 19.3333 26.3945 18.5781C28.1393 17.8229 30.0078 17.4453 32 17.4453C33.9792 17.4453 35.8411 17.8229 37.5859 18.5781C39.3438 19.3333 40.8867 20.375 42.2148 21.7031C43.543 23.0312 44.5781 24.5677 45.3203 26.3125C46.0755 28.0573 46.4531 29.9193 46.4531 31.8984C46.4531 33.8255 46.0885 35.6419 45.3594 37.3477C44.6432 39.0404 43.6667 40.5312 42.4297 41.8203C42.2865 41.9766 42.1237 42.0547 41.9414 42.0547C41.7721 42.0547 41.6224 41.9766 41.4922 41.8203L40.5547 40.7852C40.3073 40.5117 40.3073 40.2122 40.5547 39.8867C41.5573 38.8581 42.3451 37.6602 42.918 36.293C43.4909 34.9128 43.7773 33.4479 43.7773 31.8984C43.7773 30.2839 43.4714 28.7669 42.8594 27.3477C42.2474 25.9284 41.3945 24.6784 40.3008 23.5977C39.2201 22.5169 37.9701 21.6706 36.5508 21.0586C35.1315 20.4336 33.6146 20.1211 32 20.1211C30.3724 20.1211 28.849 20.4336 27.4297 21.0586C26.0104 21.6706 24.7604 22.5169 23.6797 23.5977C22.599 24.6784 21.7526 25.9284 21.1406 27.3477C20.5286 28.7669 20.2227 30.2839 20.2227 31.8984C20.2227 33.4349 20.5026 34.8932 21.0625 36.2734C21.6354 37.6536 22.4232 38.8581 23.4258 39.8867C23.6732 40.2122 23.6732 40.5117 23.4258 40.7852L22.5078 41.8008C22.3776 41.957 22.2214 42.0417 22.0391 42.0547C21.8568 42.0547 21.694 41.9701 21.5508 41.8008C20.3138 40.5117 19.3372 39.0208 18.6211 37.3281C17.9049 35.6224 17.5469 33.8125 17.5469 31.8984ZM23.2305 31.8984C23.2305 30.2969 23.6276 28.832 24.4219 27.5039C25.2161 26.1758 26.2708 25.1146 27.5859 24.3203C28.9141 23.526 30.3854 23.1289 32 23.1289C33.6146 23.1289 35.0794 23.526 36.3945 24.3203C37.7227 25.1146 38.7839 26.1758 39.5781 27.5039C40.3724 28.832 40.7695 30.2969 40.7695 31.8984C40.7695 32.9661 40.5807 33.9753 40.2031 34.9258C39.8255 35.8633 39.3047 36.7031 38.6406 37.4453C38.5104 37.6276 38.3542 37.7188 38.1719 37.7188C38.0026 37.7188 37.8398 37.6406 37.6836 37.4844L36.7266 36.4688C36.4792 36.2214 36.4596 35.9414 36.668 35.6289C37.1237 35.1341 37.4753 34.5677 37.7227 33.9297C37.9701 33.2917 38.0938 32.6146 38.0938 31.8984C38.0938 30.7917 37.8138 29.776 37.2539 28.8516C36.707 27.9271 35.9714 27.1914 35.0469 26.6445C34.1224 26.0846 33.1068 25.8047 32 25.8047C30.8932 25.8047 29.8776 26.0846 28.9531 26.6445C28.0286 27.1914 27.2865 27.9271 26.7266 28.8516C26.1797 29.776 25.9062 30.7917 25.9062 31.8984C25.9062 32.6016 26.0299 33.2721 26.2773 33.9102C26.5247 34.5482 26.8698 35.1146 27.3125 35.6094C27.5078 35.9219 27.4883 36.2018 27.2539 36.4492L26.2969 37.4648C26.1406 37.6211 25.9714 37.6992 25.7891 37.6992C25.6198 37.6992 25.4701 37.6146 25.3398 37.4453C24.6758 36.7031 24.1549 35.8568 23.7773 34.9062C23.4128 33.9557 23.2305 32.9531 23.2305 31.8984ZM19.8906 51.3711C19.4089 51.3711 19.0898 51.1758 18.9336 50.7852C18.7773 50.3945 18.8555 50.0299 19.168 49.6914L31.1016 36.1758C31.3359 35.9023 31.6289 35.7656 31.9805 35.7656C32.332 35.7656 32.625 35.9023 32.8594 36.1758L44.8125 49.6914C45.112 50.0299 45.1836 50.3945 45.0273 50.7852C44.8711 51.1758 44.5586 51.3711 44.0898 51.3711H19.8906Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgAirplay);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgLyricsOff = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 64, height: 64, viewBox: \"0 0 64 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M22.8594 53.9102C22 53.9102 21.3229 53.6302 20.8281 53.0703C20.3464 52.5104 20.1055 51.7617 20.1055 50.8242V46.1953H18.9727C17.1237 46.1953 15.5156 45.8242 14.1484 45.082C12.7812 44.3398 11.7201 43.2721 10.9648 41.8789C10.2227 40.4857 9.85156 38.8125 9.85156 36.8594V21.5664C9.85156 19.6133 10.2161 17.9401 10.9453 16.5469C11.6875 15.1536 12.7552 14.0859 14.1484 13.3438C15.5417 12.5885 17.2214 12.2109 19.1875 12.2109H44.793C46.7721 12.2109 48.4518 12.5885 49.832 13.3438C51.2253 14.0859 52.2865 15.1536 53.0156 16.5469C53.7578 17.9401 54.1289 19.6133 54.1289 21.5664V36.8594C54.1289 38.8125 53.7578 40.4857 53.0156 41.8789C52.2865 43.2721 51.2253 44.3398 49.832 45.082C48.4518 45.8242 46.7721 46.1953 44.793 46.1953H33.0742L26.4336 52.0547C25.7044 52.6927 25.0729 53.1615 24.5391 53.4609C24.0182 53.7604 23.4583 53.9102 22.8594 53.9102ZM23.9141 49.0469L30.0859 42.9727C30.5156 42.5299 30.9193 42.237 31.2969 42.0938C31.6745 41.9375 32.1758 41.8594 32.8008 41.8594H44.5977C46.3424 41.8594 47.6445 41.4232 48.5039 40.5508C49.3633 39.6784 49.793 38.3828 49.793 36.6641V21.7422C49.793 20.0365 49.3633 18.7474 48.5039 17.875C47.6445 17.0026 46.3424 16.5664 44.5977 16.5664H19.3828C17.625 16.5664 16.3164 17.0026 15.457 17.875C14.6107 18.7474 14.1875 20.0365 14.1875 21.7422V36.6641C14.1875 38.3828 14.6107 39.6784 15.457 40.5508C16.3164 41.4232 17.625 41.8594 19.3828 41.8594H22.2344C22.8073 41.8594 23.2305 41.9896 23.5039 42.25C23.7773 42.4974 23.9141 42.9271 23.9141 43.5391V49.0469ZM22.4492 27.1914C22.4492 25.9935 22.8529 25.0104 23.6602 24.2422C24.4674 23.474 25.4701 23.0898 26.668 23.0898C28.0221 23.0898 29.1029 23.5716 29.9102 24.5352C30.7305 25.4857 31.1406 26.6576 31.1406 28.0508C31.1406 29.2096 30.9323 30.2383 30.5156 31.1367C30.112 32.0221 29.5911 32.7708 28.9531 33.3828C28.3281 33.9948 27.6771 34.457 27 34.7695C26.3229 35.082 25.7174 35.2383 25.1836 35.2383C24.8841 35.2383 24.6367 35.1536 24.4414 34.9844C24.2461 34.8151 24.1484 34.5938 24.1484 34.3203C24.1484 34.0859 24.2135 33.8906 24.3438 33.7344C24.487 33.5651 24.7214 33.4414 25.0469 33.3633C25.5677 33.2331 26.0625 33.0312 26.5312 32.7578C27.013 32.4714 27.4362 32.1328 27.8008 31.7422C28.1654 31.3385 28.4453 30.8828 28.6406 30.375H28.3867C28.1263 30.7005 27.7943 30.9284 27.3906 31.0586C26.987 31.1758 26.5573 31.2344 26.1016 31.2344C25.0078 31.2344 24.1224 30.8503 23.4453 30.082C22.7812 29.3008 22.4492 28.3372 22.4492 27.1914ZM33.0742 27.1914C33.0742 25.9935 33.4714 25.0104 34.2656 24.2422C35.0729 23.474 36.082 23.0898 37.293 23.0898C38.6471 23.0898 39.7279 23.5716 40.5352 24.5352C41.3555 25.4857 41.7656 26.6576 41.7656 28.0508C41.7656 29.2096 41.5573 30.2383 41.1406 31.1367C40.737 32.0221 40.2161 32.7708 39.5781 33.3828C38.9531 33.9948 38.2956 34.457 37.6055 34.7695C36.9284 35.082 36.3294 35.2383 35.8086 35.2383C35.5091 35.2383 35.2617 35.1536 35.0664 34.9844C34.8711 34.8151 34.7734 34.5938 34.7734 34.3203C34.7734 34.0859 34.8385 33.8906 34.9688 33.7344C35.112 33.5651 35.3529 33.4414 35.6914 33.3633C36.1992 33.2331 36.6875 33.0312 37.1562 32.7578C37.638 32.4714 38.0612 32.1328 38.4258 31.7422C38.7904 31.3385 39.0703 30.8828 39.2656 30.375H39.0117C38.7513 30.7005 38.4193 30.9284 38.0156 31.0586C37.612 31.1758 37.1823 31.2344 36.7266 31.2344C35.6328 31.2344 34.7474 30.8503 34.0703 30.082C33.4062 29.3008 33.0742 28.3372 33.0742 27.1914Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgLyricsOff);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgLyricsOn = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 64, height: 64, viewBox: \"0 0 64 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1.91256 7.67068C0 11.0858 0 15.6405 0 24.75V39.25C0 48.3595 0 52.9142 1.91256 56.3293C3.26425 58.7429 5.25707 60.7357 7.67068 62.0874C11.0858 64 15.6405 64 24.75 64H39.25C48.3595 64 52.9142 64 56.3293 62.0874C58.7429 60.7357 60.7357 58.7429 62.0874 56.3293C64 52.9142 64 48.3595 64 39.25V24.75C64 15.6405 64 11.0858 62.0874 7.67068C60.7357 5.25707 58.7429 3.26425 56.3293 1.91256C52.9142 0 48.3595 0 39.25 0H24.75C15.6405 0 11.0858 0 7.67068 1.91256C5.25707 3.26425 3.26425 5.25707 1.91256 7.67068ZM20.8281 53.0703C21.3229 53.6302 22 53.9102 22.8594 53.9102C23.4583 53.9102 24.0182 53.7604 24.5391 53.4609C25.0729 53.1615 25.7044 52.6927 26.4336 52.0547L33.0742 46.1953H44.793C46.7721 46.1953 48.4518 45.8242 49.832 45.082C51.2253 44.3398 52.2865 43.2721 53.0156 41.8789C53.7578 40.4857 54.1289 38.8125 54.1289 36.8594V21.5664C54.1289 19.6133 53.7578 17.9401 53.0156 16.5469C52.2865 15.1536 51.2253 14.0859 49.832 13.3438C48.4518 12.5885 46.7721 12.2109 44.793 12.2109H19.1875C17.2214 12.2109 15.5417 12.5885 14.1484 13.3438C12.7552 14.0859 11.6875 15.1536 10.9453 16.5469C10.2161 17.9401 9.85156 19.6133 9.85156 21.5664V36.8594C9.85156 38.8125 10.2227 40.4857 10.9648 41.8789C11.7201 43.2721 12.7812 44.3398 14.1484 45.082C15.5156 45.8242 17.1237 46.1953 18.9727 46.1953H20.1055V50.8242C20.1055 51.7617 20.3464 52.5104 20.8281 53.0703Z\", fill: \"currentColor\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M22.4492 27.1914C22.4492 25.9935 22.8529 25.0104 23.6602 24.2422C24.4674 23.474 25.4701 23.0898 26.668 23.0898C28.0221 23.0898 29.1029 23.5716 29.9102 24.5352C30.7305 25.4857 31.1406 26.6576 31.1406 28.0508C31.1406 29.2096 30.9323 30.2383 30.5156 31.1367C30.112 32.0221 29.5911 32.7708 28.9531 33.3828C28.3281 33.9948 27.6771 34.457 27 34.7695C26.3229 35.082 25.7174 35.2383 25.1836 35.2383C24.8841 35.2383 24.6367 35.1536 24.4414 34.9844C24.2461 34.8151 24.1484 34.5938 24.1484 34.3203C24.1484 34.0859 24.2135 33.8906 24.3438 33.7344C24.487 33.5651 24.7214 33.4414 25.0469 33.3633C25.5677 33.2331 26.0625 33.0312 26.5312 32.7578C27.013 32.4714 27.4362 32.1328 27.8008 31.7422C28.1654 31.3385 28.4453 30.8828 28.6406 30.375H28.3867C28.1263 30.7005 27.7943 30.9284 27.3906 31.0586C26.987 31.1758 26.5573 31.2344 26.1016 31.2344C25.0078 31.2344 24.1224 30.8503 23.4453 30.082C22.7812 29.3008 22.4492 28.3372 22.4492 27.1914ZM33.0742 27.1914C33.0742 25.9935 33.4714 25.0104 34.2656 24.2422C35.0729 23.474 36.082 23.0898 37.293 23.0898C38.6471 23.0898 39.7279 23.5716 40.5352 24.5352C41.3555 25.4857 41.7656 26.6576 41.7656 28.0508C41.7656 29.2096 41.5573 30.2383 41.1406 31.1367C40.737 32.0221 40.2161 32.7708 39.5781 33.3828C38.9531 33.9948 38.2956 34.457 37.6055 34.7695C36.9284 35.082 36.3294 35.2383 35.8086 35.2383C35.5091 35.2383 35.2617 35.1536 35.0664 34.9844C34.8711 34.8151 34.7734 34.5938 34.7734 34.3203C34.7734 34.0859 34.8385 33.8906 34.9688 33.7344C35.112 33.5651 35.3529 33.4414 35.6914 33.3633C36.1992 33.2331 36.6875 33.0312 37.1562 32.7578C37.638 32.4714 38.0612 32.1328 38.4258 31.7422C38.7904 31.3385 39.0703 30.8828 39.2656 30.375H39.0117C38.7513 30.7005 38.4193 30.9284 38.0156 31.0586C37.612 31.1758 37.1823 31.2344 36.7266 31.2344C35.6328 31.2344 34.7474 30.8503 34.0703 30.082C33.4062 29.3008 33.0742 28.3372 33.0742 27.1914Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgLyricsOn);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgPlaylistOff = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 64, height: 64, viewBox: \"0 0 64 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M23.9922 21.8594C23.4062 21.8594 22.9115 21.6641 22.5078 21.2734C22.1172 20.8698 21.9219 20.375 21.9219 19.7891C21.9219 19.2161 22.1172 18.7279 22.5078 18.3242C22.9115 17.9206 23.4062 17.7188 23.9922 17.7188H50.418C50.9909 17.7188 51.4792 17.9206 51.8828 18.3242C52.2865 18.7279 52.4883 19.2161 52.4883 19.7891C52.4883 20.375 52.2865 20.8698 51.8828 21.2734C51.4792 21.6641 50.9909 21.8594 50.418 21.8594H23.9922ZM23.9922 33.9883C23.4062 33.9883 22.9115 33.7865 22.5078 33.3828C22.1172 32.9792 21.9219 32.4909 21.9219 31.918C21.9219 31.3451 22.1172 30.8633 22.5078 30.4727C22.9115 30.069 23.4062 29.8672 23.9922 29.8672H50.418C50.9909 29.8672 51.4792 30.069 51.8828 30.4727C52.2865 30.8633 52.4883 31.3451 52.4883 31.918C52.4883 32.5039 52.2865 32.9987 51.8828 33.4023C51.4792 33.793 50.9909 33.9883 50.418 33.9883H23.9922ZM23.9922 46.1172C23.4062 46.1172 22.9115 45.9219 22.5078 45.5312C22.1172 45.1276 21.9219 44.6328 21.9219 44.0469C21.9219 43.474 22.1172 42.9857 22.5078 42.582C22.9115 42.1784 23.4062 41.9766 23.9922 41.9766H50.418C50.9909 41.9766 51.4792 42.1784 51.8828 42.582C52.2865 42.9857 52.4883 43.474 52.4883 44.0469C52.4883 44.6328 52.2865 45.1276 51.8828 45.5312C51.4792 45.9219 50.9909 46.1172 50.418 46.1172H23.9922ZM14.4805 22.7383C13.6602 22.7383 12.957 22.4518 12.3711 21.8789C11.7982 21.306 11.5117 20.6094 11.5117 19.7891C11.5117 18.9688 11.7982 18.2721 12.3711 17.6992C12.957 17.1263 13.6602 16.8398 14.4805 16.8398C15.2878 16.8398 15.9844 17.1263 16.5703 17.6992C17.1562 18.2721 17.4492 18.9688 17.4492 19.7891C17.4492 20.6094 17.1562 21.306 16.5703 21.8789C15.9844 22.4518 15.2878 22.7383 14.4805 22.7383ZM14.4805 34.8867C13.6602 34.8867 12.957 34.5938 12.3711 34.0078C11.7982 33.4219 11.5117 32.7253 11.5117 31.918C11.5117 31.1107 11.7982 30.4141 12.3711 29.8281C12.957 29.2422 13.6602 28.9492 14.4805 28.9492C15.2878 28.9492 15.9844 29.2422 16.5703 29.8281C17.1562 30.4141 17.4492 31.1107 17.4492 31.918C17.4492 32.7253 17.1562 33.4219 16.5703 34.0078C15.9844 34.5938 15.2878 34.8867 14.4805 34.8867ZM14.4805 47.0156C13.6602 47.0156 12.957 46.7227 12.3711 46.1367C11.7982 45.5638 11.5117 44.8672 11.5117 44.0469C11.5117 43.2266 11.7982 42.5299 12.3711 41.957C12.957 41.3841 13.6602 41.0977 14.4805 41.0977C15.2878 41.0977 15.9844 41.3841 16.5703 41.957C17.1562 42.5299 17.4492 43.2266 17.4492 44.0469C17.4492 44.8672 17.1562 45.5638 16.5703 46.1367C15.9844 46.7227 15.2878 47.0156 14.4805 47.0156Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgPlaylistOff);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgPlaylistOn = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 64, height: 64, viewBox: \"0 0 64 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1.91256 7.67068C0 11.0858 0 15.6405 0 24.75V39.25C0 48.3595 0 52.9142 1.91256 56.3293C3.26425 58.7429 5.25707 60.7357 7.67068 62.0874C11.0858 64 15.6405 64 24.75 64H39.25C48.3595 64 52.9142 64 56.3293 62.0874C58.7429 60.7357 60.7357 58.7429 62.0874 56.3293C64 52.9142 64 48.3595 64 39.25V24.75C64 15.6405 64 11.0858 62.0874 7.67068C60.7357 5.25706 58.7429 3.26425 56.3293 1.91256C52.9142 0 48.3595 0 39.25 0H24.75C15.6405 0 11.0858 0 7.67068 1.91256C5.25707 3.26425 3.26425 5.25706 1.91256 7.67068ZM22.5078 21.2734C22.9115 21.6641 23.4062 21.8594 23.9922 21.8594H50.418C50.9909 21.8594 51.4792 21.6641 51.8828 21.2734C52.2865 20.8698 52.4883 20.375 52.4883 19.7891C52.4883 19.2161 52.2865 18.7279 51.8828 18.3242C51.4792 17.9206 50.9909 17.7188 50.418 17.7188H23.9922C23.4062 17.7188 22.9115 17.9206 22.5078 18.3242C22.1172 18.7279 21.9219 19.2161 21.9219 19.7891C21.9219 20.375 22.1172 20.8698 22.5078 21.2734ZM22.5078 33.3828C22.9115 33.7865 23.4062 33.9883 23.9922 33.9883H50.418C50.9909 33.9883 51.4792 33.793 51.8828 33.4023C52.2865 32.9987 52.4883 32.5039 52.4883 31.918C52.4883 31.3451 52.2865 30.8633 51.8828 30.4727C51.4792 30.069 50.9909 29.8672 50.418 29.8672H23.9922C23.4062 29.8672 22.9115 30.069 22.5078 30.4727C22.1172 30.8633 21.9219 31.3451 21.9219 31.918C21.9219 32.4909 22.1172 32.9792 22.5078 33.3828ZM22.5078 45.5312C22.9115 45.9219 23.4062 46.1172 23.9922 46.1172H50.418C50.9909 46.1172 51.4792 45.9219 51.8828 45.5312C52.2865 45.1276 52.4883 44.6328 52.4883 44.0469C52.4883 43.474 52.2865 42.9857 51.8828 42.582C51.4792 42.1784 50.9909 41.9766 50.418 41.9766H23.9922C23.4062 41.9766 22.9115 42.1784 22.5078 42.582C22.1172 42.9857 21.9219 43.474 21.9219 44.0469C21.9219 44.6328 22.1172 45.1276 22.5078 45.5312ZM12.3711 21.8789C12.957 22.4518 13.6602 22.7383 14.4805 22.7383C15.2878 22.7383 15.9844 22.4518 16.5703 21.8789C17.1562 21.306 17.4492 20.6094 17.4492 19.7891C17.4492 18.9688 17.1562 18.2721 16.5703 17.6992C15.9844 17.1263 15.2878 16.8398 14.4805 16.8398C13.6602 16.8398 12.957 17.1263 12.3711 17.6992C11.7982 18.2721 11.5117 18.9688 11.5117 19.7891C11.5117 20.6094 11.7982 21.306 12.3711 21.8789ZM12.3711 34.0078C12.957 34.5938 13.6602 34.8867 14.4805 34.8867C15.2878 34.8867 15.9844 34.5938 16.5703 34.0078C17.1562 33.4219 17.4492 32.7253 17.4492 31.918C17.4492 31.1107 17.1562 30.4141 16.5703 29.8281C15.9844 29.2422 15.2878 28.9492 14.4805 28.9492C13.6602 28.9492 12.957 29.2422 12.3711 29.8281C11.7982 30.4141 11.5117 31.1107 11.5117 31.918C11.5117 32.7253 11.7982 33.4219 12.3711 34.0078ZM12.3711 46.1367C12.957 46.7227 13.6602 47.0156 14.4805 47.0156C15.2878 47.0156 15.9844 46.7227 16.5703 46.1367C17.1562 45.5638 17.4492 44.8672 17.4492 44.0469C17.4492 43.2266 17.1562 42.5299 16.5703 41.957C15.9844 41.3841 15.2878 41.0977 14.4805 41.0977C13.6602 41.0977 12.957 41.3841 12.3711 41.957C11.7982 42.5299 11.5117 43.2266 11.5117 44.0469C11.5117 44.8672 11.7982 45.5638 12.3711 46.1367Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgPlaylistOn);\nexport default ForwardRef;\n","export enum PrebuiltToggleIconButtonType {\n\tLyrics = \"lyrics\",\n\tPlaylist = \"playlist\",\n\tRepeat = \"repeat\",\n\tShuffle = \"shuffle\",\n\tStar = \"star\",\n\tAirPlay = \"airplay\",\n}\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgRepeatOff = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 56, height: 56, viewBox: \"0 0 56 56\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M13.0293 28.9805C12.4727 28.9805 12.0039 28.79 11.623 28.4092C11.2422 28.0186 11.0518 27.5498 11.0518 27.0029V25.3623C11.0518 23.7998 11.4033 22.457 12.1064 21.334C12.8096 20.2109 13.8057 19.3516 15.0947 18.7559C16.3838 18.1504 17.9219 17.8477 19.709 17.8477H30.6367V14.7422C30.6367 14.2832 30.7637 13.9268 31.0176 13.6729C31.2715 13.4092 31.623 13.2773 32.0723 13.2773C32.2871 13.2773 32.4775 13.3115 32.6436 13.3799C32.8193 13.4482 32.9805 13.541 33.127 13.6582L39.2354 18.8145C39.5869 19.0977 39.7578 19.4443 39.748 19.8545C39.748 20.2549 39.5771 20.5967 39.2354 20.8799L33.127 26.0361C32.9805 26.1533 32.8193 26.2461 32.6436 26.3145C32.4775 26.3828 32.2871 26.417 32.0723 26.417C31.623 26.417 31.2715 26.29 31.0176 26.0361C30.7637 25.7725 30.6367 25.416 30.6367 24.9668V21.6855H19.4893C18.1025 21.6855 17.0039 22.0615 16.1934 22.8135C15.3926 23.5557 14.9922 24.5713 14.9922 25.8604V27.0029C14.9922 27.5498 14.8018 28.0186 14.4209 28.4092C14.04 28.79 13.5762 28.9805 13.0293 28.9805ZM42.9707 26.959C43.5176 26.959 43.9814 27.1494 44.3623 27.5303C44.7529 27.9111 44.9482 28.3799 44.9482 28.9365V30.5771C44.9482 32.1299 44.5967 33.4727 43.8936 34.6055C43.1904 35.7285 42.1895 36.5928 40.8906 37.1982C39.6016 37.7939 38.0684 38.0918 36.291 38.0918H25.3633V41.1973C25.3633 41.6465 25.2363 41.998 24.9824 42.252C24.7285 42.5156 24.377 42.6475 23.9277 42.6475C23.7129 42.6475 23.5176 42.6133 23.3418 42.5449C23.166 42.4766 23.0098 42.3838 22.873 42.2666L16.75 37.1104C16.418 36.8271 16.252 36.4854 16.252 36.085C16.252 35.6846 16.418 35.3379 16.75 35.0449L22.873 29.8887C23.0098 29.7715 23.166 29.6787 23.3418 29.6104C23.5176 29.542 23.7129 29.5078 23.9277 29.5078C24.377 29.5078 24.7285 29.6396 24.9824 29.9033C25.2363 30.1572 25.3633 30.5137 25.3633 30.9727V34.2393H36.5107C37.8975 34.2393 38.9912 33.8682 39.792 33.126C40.6025 32.3838 41.0078 31.3682 41.0078 30.0791V28.9365C41.0078 28.3799 41.1934 27.9111 41.5645 27.5303C41.9453 27.1494 42.4141 26.959 42.9707 26.959Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgRepeatOff);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgRepeatOnNormal = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 56, height: 56, viewBox: \"0 0 56 56\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1.65755 6.64792C0 9.6077 0 13.5551 0 21.45V34.55C0 42.4449 0 46.3923 1.65755 49.3521C2.82902 51.4439 4.55612 53.171 6.64792 54.3424C9.6077 56 13.5551 56 21.45 56H34.55C42.4449 56 46.3923 56 49.3521 54.3424C51.4439 53.171 53.171 51.4439 54.3424 49.3521C56 46.3923 56 42.4449 56 34.55V21.45C56 13.5551 56 9.6077 54.3424 6.64792C53.171 4.55612 51.4439 2.82902 49.3521 1.65755C46.3923 0 42.4449 0 34.55 0H21.45C13.5551 0 9.6077 0 6.64792 1.65755C4.55612 2.82902 2.82902 4.55612 1.65755 6.64792ZM11.623 28.4092C12.0039 28.79 12.4727 28.9805 13.0293 28.9805C13.5762 28.9805 14.04 28.79 14.4209 28.4092C14.8018 28.0186 14.9922 27.5498 14.9922 27.0029V25.8604C14.9922 24.5713 15.3926 23.5557 16.1934 22.8135C17.0039 22.0615 18.1025 21.6855 19.4893 21.6855H30.6367V24.9668C30.6367 25.416 30.7637 25.7725 31.0176 26.0361C31.2715 26.29 31.623 26.417 32.0723 26.417C32.2871 26.417 32.4775 26.3828 32.6436 26.3145C32.8193 26.2461 32.9805 26.1533 33.127 26.0361L39.2354 20.8799C39.5771 20.5967 39.748 20.2549 39.748 19.8545C39.7578 19.4443 39.5869 19.0977 39.2354 18.8145L33.127 13.6582C32.9805 13.541 32.8193 13.4482 32.6436 13.3799C32.4775 13.3115 32.2871 13.2773 32.0723 13.2773C31.623 13.2773 31.2715 13.4092 31.0176 13.6729C30.7637 13.9268 30.6367 14.2832 30.6367 14.7422V17.8477H19.709C17.9219 17.8477 16.3838 18.1504 15.0947 18.7559C13.8057 19.3516 12.8096 20.2109 12.1064 21.334C11.4033 22.457 11.0518 23.7998 11.0518 25.3623V27.0029C11.0518 27.5498 11.2422 28.0186 11.623 28.4092ZM44.3623 27.5303C43.9814 27.1494 43.5176 26.959 42.9707 26.959C42.4141 26.959 41.9453 27.1494 41.5645 27.5303C41.1934 27.9111 41.0078 28.3799 41.0078 28.9365V30.0791C41.0078 31.3682 40.6025 32.3838 39.792 33.126C38.9912 33.8682 37.8975 34.2393 36.5107 34.2393H25.3633V30.9727C25.3633 30.5137 25.2363 30.1572 24.9824 29.9033C24.7285 29.6396 24.377 29.5078 23.9277 29.5078C23.7129 29.5078 23.5176 29.542 23.3418 29.6104C23.166 29.6787 23.0098 29.7715 22.873 29.8887L16.75 35.0449C16.418 35.3379 16.252 35.6846 16.252 36.085C16.252 36.4854 16.418 36.8271 16.75 37.1104L22.873 42.2666C23.0098 42.3838 23.166 42.4766 23.3418 42.5449C23.5176 42.6133 23.7129 42.6475 23.9277 42.6475C24.377 42.6475 24.7285 42.5156 24.9824 42.252C25.2363 41.998 25.3633 41.6465 25.3633 41.1973V38.0918H36.291C38.0684 38.0918 39.6016 37.7939 40.8906 37.1982C42.1895 36.5928 43.1904 35.7285 43.8936 34.6055C44.5967 33.4727 44.9482 32.1299 44.9482 30.5771V28.9365C44.9482 28.3799 44.7529 27.9111 44.3623 27.5303Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgRepeatOnNormal);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgShuffleOff = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 56, height: 56, viewBox: \"0 0 56 56\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.55762 36.7148C9.55762 36.1777 9.74316 35.7285 10.1143 35.3672C10.4951 35.0059 10.9639 34.8252 11.5205 34.8252H14.7285C15.6562 34.8252 16.4375 34.6592 17.0723 34.3271C17.707 33.9951 18.3369 33.4434 18.9619 32.6719L27.7656 21.8613C28.8008 20.5918 29.8457 19.7275 30.9004 19.2686C31.9551 18.7998 33.2051 18.5654 34.6504 18.5654H37.3311V15.1963C37.3311 14.7471 37.458 14.3955 37.7119 14.1416C37.9658 13.8779 38.3174 13.7461 38.7666 13.7461C38.9814 13.7461 39.1719 13.7803 39.3379 13.8486C39.5137 13.917 39.6748 14.0098 39.8213 14.127L45.9297 19.2832C46.2715 19.5664 46.4424 19.9131 46.4424 20.3232C46.4424 20.7236 46.2715 21.0654 45.9297 21.3486L39.8213 26.5049C39.6748 26.6221 39.5137 26.7148 39.3379 26.7832C39.1719 26.8516 38.9814 26.8857 38.7666 26.8857C38.3174 26.8857 37.9658 26.7588 37.7119 26.5049C37.458 26.2412 37.3311 25.8848 37.3311 25.4355V22.3447H34.4746C33.8496 22.3447 33.3076 22.4131 32.8486 22.5498C32.3896 22.6768 31.96 22.8965 31.5596 23.209C31.1689 23.5215 30.7588 23.9414 30.3291 24.4688L21.1006 35.748C20.2607 36.7539 19.3916 37.4814 18.4932 37.9307C17.5947 38.3701 16.4766 38.5898 15.1387 38.5898H11.5205C10.9639 38.5898 10.4951 38.4092 10.1143 38.0479C9.74316 37.6865 9.55762 37.2422 9.55762 36.7148ZM9.55762 20.4551C9.55762 19.918 9.74316 19.4688 10.1143 19.1074C10.4951 18.7461 10.9639 18.5654 11.5205 18.5654H14.8896C16.2178 18.5654 17.375 18.79 18.3613 19.2393C19.3477 19.6787 20.2607 20.4062 21.1006 21.4219L30.2998 32.6719C30.9248 33.4336 31.5742 33.9854 32.248 34.3271C32.9219 34.6592 33.7373 34.8252 34.6943 34.8252H37.3311V31.7344C37.3311 31.2852 37.458 30.9287 37.7119 30.665C37.9658 30.4014 38.3174 30.2695 38.7666 30.2695C38.9814 30.2695 39.1719 30.3086 39.3379 30.3867C39.5137 30.4551 39.6748 30.5479 39.8213 30.665L45.9297 35.8066C46.2715 36.0996 46.4424 36.4463 46.4424 36.8467C46.4424 37.2471 46.2715 37.5938 45.9297 37.8867L39.8213 43.0283C39.6748 43.1455 39.5137 43.2383 39.3379 43.3066C39.1719 43.375 38.9814 43.4092 38.7666 43.4092C38.3174 43.4092 37.9658 43.2822 37.7119 43.0283C37.458 42.7744 37.3311 42.418 37.3311 41.959V38.5898H34.6211C33.2832 38.5898 32.0723 38.3652 30.9883 37.916C29.9141 37.457 28.9229 36.6758 28.0146 35.5723L18.9619 24.498C18.3369 23.7266 17.6631 23.1748 16.9404 22.8428C16.2275 22.5107 15.4023 22.3447 14.4648 22.3447H11.5205C10.9639 22.3447 10.4951 22.1641 10.1143 21.8027C9.74316 21.4316 9.55762 20.9824 9.55762 20.4551Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgShuffleOff);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgShuffleOn = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 56, height: 56, viewBox: \"0 0 56 56\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M1.65755 6.64792C0 9.6077 0 13.5551 0 21.45V34.55C0 42.4449 0 46.3923 1.65755 49.3521C2.82902 51.4439 4.55612 53.171 6.64792 54.3424C9.6077 56 13.5551 56 21.45 56H34.55C42.4449 56 46.3923 56 49.3521 54.3424C51.4439 53.171 53.171 51.4439 54.3424 49.3521C56 46.3923 56 42.4449 56 34.55V21.45C56 13.5551 56 9.6077 54.3424 6.64792C53.171 4.55612 51.4439 2.82902 49.3521 1.65755C46.3923 0 42.4449 0 34.55 0H21.45C13.5551 0 9.6077 0 6.64792 1.65755C4.55612 2.82902 2.82902 4.55612 1.65755 6.64792ZM10.1143 35.3672C9.74316 35.7285 9.55762 36.1777 9.55762 36.7148C9.55762 37.2422 9.74316 37.6865 10.1143 38.0479C10.4951 38.4092 10.9639 38.5898 11.5205 38.5898H15.1387C16.4766 38.5898 17.5947 38.3701 18.4932 37.9307C19.3916 37.4814 20.2607 36.7539 21.1006 35.748L24.631 31.4331L28.0146 35.5723C28.9229 36.6758 29.9141 37.457 30.9883 37.916C32.0723 38.3652 33.2832 38.5898 34.6211 38.5898H37.3311V41.959C37.3311 42.418 37.458 42.7744 37.7119 43.0283C37.9658 43.2822 38.3174 43.4092 38.7666 43.4092C38.9814 43.4092 39.1719 43.375 39.3379 43.3066C39.5137 43.2383 39.6748 43.1455 39.8213 43.0283L45.9297 37.8867C46.2715 37.5938 46.4424 37.2471 46.4424 36.8467C46.4424 36.4463 46.2715 36.0996 45.9297 35.8066L39.8213 30.665C39.6748 30.5479 39.5137 30.4551 39.3379 30.3867C39.1719 30.3086 38.9814 30.2695 38.7666 30.2695C38.3174 30.2695 37.9658 30.4014 37.7119 30.665C37.458 30.9287 37.3311 31.2852 37.3311 31.7344V34.8252H34.6943C33.7373 34.8252 32.9219 34.6592 32.248 34.3271C31.5742 33.9854 30.9248 33.4336 30.2998 32.6719L26.9596 28.587L30.3291 24.4688C30.7588 23.9414 31.1689 23.5215 31.5596 23.209C31.96 22.8965 32.3896 22.6768 32.8486 22.5498C33.3076 22.4131 33.8496 22.3447 34.4746 22.3447H37.3311V25.4355C37.3311 25.8848 37.458 26.2412 37.7119 26.5049C37.9658 26.7588 38.3174 26.8857 38.7666 26.8857C38.9814 26.8857 39.1719 26.8516 39.3379 26.7832C39.5137 26.7148 39.6748 26.6221 39.8213 26.5049L45.9297 21.3486C46.2715 21.0654 46.4424 20.7236 46.4424 20.3232C46.4424 19.9131 46.2715 19.5664 45.9297 19.2832L39.8213 14.127C39.6748 14.0098 39.5137 13.917 39.3379 13.8486C39.1719 13.7803 38.9814 13.7461 38.7666 13.7461C38.3174 13.7461 37.9658 13.8779 37.7119 14.1416C37.458 14.3955 37.3311 14.7471 37.3311 15.1963V18.5654H34.6504C33.2051 18.5654 31.9551 18.7998 30.9004 19.2686C29.8457 19.7275 28.8008 20.5918 27.7656 21.8613L24.6192 25.7249L21.1006 21.4219C20.2607 20.4062 19.3477 19.6787 18.3613 19.2393C17.375 18.79 16.2178 18.5654 14.8896 18.5654H11.5205C10.9639 18.5654 10.4951 18.7461 10.1143 19.1074C9.74316 19.4688 9.55762 19.918 9.55762 20.4551C9.55762 20.9824 9.74316 21.4316 10.1143 21.8027C10.4951 22.1641 10.9639 22.3447 11.5205 22.3447H14.4648C15.4023 22.3447 16.2275 22.5107 16.9404 22.8428C17.6631 23.1748 18.3369 23.7266 18.9619 24.498L22.2965 28.5772L18.9619 32.6719C18.3369 33.4434 17.707 33.9951 17.0723 34.3271C16.4375 34.6592 15.6562 34.8252 14.7285 34.8252H11.5205C10.9639 34.8252 10.4951 35.0059 10.1143 35.3672Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgShuffleOn);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgStar = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 36, height: 36, viewBox: \"0 0 36 36\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7.83396 32.7793C7.49216 32.5254 7.2822 32.1836 7.20407 31.7539C7.13571 31.334 7.19919 30.8359 7.3945 30.2598L10.4121 21.3096L2.72165 15.7871C2.2236 15.4355 1.87692 15.0693 1.68161 14.6885C1.4863 14.2979 1.457 13.8975 1.59372 13.4873C1.73044 13.0869 1.98923 12.7891 2.37009 12.5938C2.75095 12.3887 3.24899 12.291 3.86423 12.3008L13.2832 12.3594L16.1543 3.36523C16.3398 2.7793 16.584 2.33496 16.8867 2.03223C17.1992 1.71973 17.5654 1.56348 17.9853 1.56348C18.415 1.56348 18.7812 1.71973 19.084 2.03223C19.3965 2.33496 19.6455 2.7793 19.831 3.36523L22.7021 12.3594L32.1211 12.3008C32.7363 12.291 33.2343 12.3887 33.6152 12.5938C33.9961 12.7891 34.2549 13.0869 34.3916 13.4873C34.5283 13.8975 34.499 14.2979 34.3037 14.6885C34.1084 15.0693 33.7617 15.4355 33.2636 15.7871L25.5732 21.3096L28.5908 30.2598C28.7861 30.8359 28.8447 31.334 28.7666 31.7539C28.6982 32.1836 28.4931 32.5254 28.1513 32.7793C27.8095 33.0527 27.4238 33.1504 26.9941 33.0723C26.5644 32.9941 26.1054 32.7793 25.6172 32.4277L17.9853 26.8174L10.3681 32.4277C9.87985 32.7793 9.42087 32.9941 8.99118 33.0723C8.56149 33.1504 8.17575 33.0527 7.83396 32.7793ZM10.4121 29.2344C10.4316 29.2637 10.4707 29.2588 10.5293 29.2197L17.1357 24.1221C17.4287 23.8877 17.7119 23.7705 17.9853 23.7705C18.2685 23.7705 18.5566 23.8877 18.8496 24.1221L25.456 29.2197C25.5146 29.2588 25.5537 29.2637 25.5732 29.2344C25.583 29.2148 25.583 29.1758 25.5732 29.1172L22.79 21.2656C22.7119 21.0312 22.6679 20.8213 22.6582 20.6357C22.6582 20.4404 22.707 20.2646 22.8047 20.1084C22.9121 19.9521 23.0732 19.8008 23.2881 19.6543L30.1728 14.9521C30.2314 14.9131 30.2558 14.874 30.2461 14.835C30.2363 14.8057 30.1924 14.791 30.1142 14.791L21.7939 14.9961C21.4131 15.0059 21.1152 14.9424 20.9004 14.8057C20.6855 14.6592 20.5244 14.3955 20.417 14.0146L18.0732 6.03125C18.0537 5.96289 18.0244 5.92871 17.9853 5.92871C17.956 5.92871 17.9316 5.96289 17.9121 6.03125L15.5683 14.0146C15.4609 14.3955 15.2998 14.6592 15.0849 14.8057C14.8701 14.9424 14.5722 15.0059 14.1914 14.9961L5.87107 14.791C5.79294 14.791 5.74899 14.8057 5.73923 14.835C5.72946 14.874 5.75388 14.9131 5.81247 14.9521L12.6972 19.6543C12.9121 19.8008 13.0683 19.9521 13.166 20.1084C13.2734 20.2646 13.3222 20.4404 13.3125 20.6357C13.3125 20.8213 13.2734 21.0312 13.1953 21.2656L10.4121 29.1172C10.3925 29.1758 10.3925 29.2148 10.4121 29.2344Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgStar);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgStarFilled = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { width: 36, height: 36, viewBox: \"0 0 36 36\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7.83396 32.7793C7.49216 32.5254 7.2822 32.1836 7.20407 31.7539C7.13571 31.334 7.19919 30.8359 7.3945 30.2598L10.4121 21.3096L2.72165 15.7871C2.2236 15.4355 1.87692 15.0693 1.68161 14.6885C1.4863 14.2979 1.457 13.8975 1.59372 13.4873C1.73044 13.0869 1.98923 12.7891 2.37009 12.5938C2.75095 12.3984 3.24899 12.3008 3.86423 12.3008H13.2832L16.1543 3.36523C16.3398 2.7793 16.584 2.33496 16.8867 2.03223C17.1992 1.71973 17.5654 1.56348 17.9853 1.56348C18.415 1.56348 18.7812 1.71973 19.084 2.03223C19.3965 2.33496 19.6455 2.7793 19.831 3.36523L22.7021 12.3008H32.1211C32.7363 12.3008 33.2343 12.3984 33.6152 12.5938C33.9961 12.7891 34.2549 13.0869 34.3916 13.4873C34.5283 13.8975 34.499 14.2979 34.3037 14.6885C34.1084 15.0693 33.7617 15.4355 33.2636 15.7871L25.5732 21.3096L28.5908 30.2598C28.7861 30.8359 28.8447 31.334 28.7666 31.7539C28.6982 32.1836 28.4931 32.5254 28.1513 32.7793C27.8095 33.0527 27.4238 33.1504 26.9941 33.0723C26.5644 32.9941 26.1054 32.7793 25.6172 32.4277L17.9853 26.8174L10.3681 32.4277C9.87985 32.7793 9.42087 32.9941 8.99118 33.0723C8.56149 33.1504 8.17575 33.0527 7.83396 32.7793Z\", fill: \"currentColor\" }));\nconst ForwardRef = forwardRef(SvgStarFilled);\nexport default ForwardRef;\n","import classNames from \"classnames\";\nimport { type FC, type HTMLProps, type ReactNode, memo } from \"react\";\nimport airplayIcon from \"../IconButton/airplay.svg?react\";\nimport styles from \"./index.module.css\";\nimport lyricsOffIcon from \"./lyrics_off.svg?react\";\nimport lyricsOnIcon from \"./lyrics_on.svg?react\";\nimport playlistOffIcon from \"./playlist_off.svg?react\";\nimport playlistOnIcon from \"./playlist_on.svg?react\";\nimport { PrebuiltToggleIconButtonType } from \"./prebuilt-enum\";\nimport repeatOffIcon from \"./repeat_off.svg?react\";\nimport repeatOnNormalIcon from \"./repeat_on_normal.svg?react\";\nimport shuffleOffIcon from \"./shuffle_off.svg?react\";\nimport shuffleOnIcon from \"./shuffle_on.svg?react\";\nimport starIcon from \"./star.svg?react\";\nimport starFilledIcon from \"./star_filled.svg?react\";\n\nexport const ToggleIconButton: FC<\n\t{\n\t\tuncheckedIcon: ReactNode;\n\t\tcheckedIcon: ReactNode;\n\t\tchecked?: boolean;\n\t} & Omit<HTMLProps<HTMLButtonElement>, \"type\">\n> = memo(({ uncheckedIcon, checkedIcon, checked, className, ...rest }) => {\n\treturn (\n\t\t<button\n\t\t\tclassName={classNames(className, styles.toggleIconButton)}\n\t\t\ttype=\"button\"\n\t\t\t{...rest}\n\t\t>\n\t\t\t{checked ? checkedIcon : uncheckedIcon}\n\t\t</button>\n\t);\n});\n\nconst PREBUILT_ICONS_MAP: Record<PrebuiltToggleIconButtonType, [FC, FC]> = {\n\t[PrebuiltToggleIconButtonType.Lyrics]: [lyricsOffIcon, lyricsOnIcon],\n\t[PrebuiltToggleIconButtonType.Playlist]: [playlistOffIcon, playlistOnIcon],\n\t[PrebuiltToggleIconButtonType.Repeat]: [repeatOffIcon, repeatOnNormalIcon],\n\t[PrebuiltToggleIconButtonType.Shuffle]: [shuffleOffIcon, shuffleOnIcon],\n\t[PrebuiltToggleIconButtonType.Star]: [starIcon, starFilledIcon],\n\t[PrebuiltToggleIconButtonType.AirPlay]: [airplayIcon, airplayIcon],\n};\n\nexport const PrebuiltToggleIconButton: FC<\n\t{\n\t\ttype: PrebuiltToggleIconButtonType;\n\t\tchecked?: boolean;\n\t} & Omit<HTMLProps<HTMLButtonElement>, \"type\">\n> = memo(({ type, checked, onClick, ...rest }) => {\n\tconst [UncheckedIcon, CheckedIcon] = PREBUILT_ICONS_MAP[type];\n\treturn (\n\t\t<ToggleIconButton\n\t\t\tuncheckedIcon={<UncheckedIcon />}\n\t\t\tcheckedIcon={<CheckedIcon />}\n\t\t\tchecked={checked ?? false}\n\t\t\tonClick={onClick}\n\t\t\t{...rest}\n\t\t/>\n\t);\n});\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconForward = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"vector\", xmlns: \"http://www.w3.org/2000/svg\", width: 32, height: 32, viewBox: \"0 0 134 134\", fill: \"currentColor\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M62 60.0717C65.938 62.3453 67.9069 63.4821 68.5677 64.9662C69.1441 66.2608 69.1441 67.7391 68.5677 69.0336C67.9069 70.5177 65.938 71.6545 62 73.9281L41 86.0525C37.062 88.326 35.0931 89.4628 33.4774 89.293C32.0681 89.1449 30.7878 88.4057 29.9549 87.2593C29 85.945 29 83.6714 29 79.1243V54.8755C29 50.3284 29 48.0548 29.9549 46.7405C30.7878 45.5941 32.0681 44.8549 33.4774 44.7068C35.0931 44.537 37.062 45.6738 41 47.9473L62 60.0717Z\", className: \"amll-forward-left-arrow\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M62 60.0717C65.938 62.3453 67.9069 63.4821 68.5677 64.9662C69.1441 66.2608 69.1441 67.7391 68.5677 69.0336C67.9069 70.5177 65.938 71.6545 62 73.9281L41 86.0525C37.062 88.326 35.0931 89.4628 33.4774 89.293C32.0681 89.1449 30.7878 88.4057 29.9549 87.2593C29 85.945 29 83.6714 29 79.1243V54.8755C29 50.3284 29 48.0548 29.9549 46.7405C30.7878 45.5941 32.0681 44.8549 33.4774 44.7068C35.0931 44.537 37.062 45.6738 41 47.9473L62 60.0717Z\", className: \"amll-forward-left-standby\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M102 60.0717C105.938 62.3453 107.907 63.4821 108.568 64.9662C109.144 66.2608 109.144 67.7391 108.568 69.0336C107.907 70.5177 105.938 71.6545 102 73.9281L81 86.0525C77.062 88.326 75.0931 89.4628 73.4774 89.293C72.0681 89.1449 70.7878 88.4057 69.9549 87.2593C69 85.945 69 83.6714 69 79.1243V54.8755C69 50.3284 69 48.0548 69.9549 46.7405C70.7878 45.5941 72.0681 44.8549 73.4774 44.7068C75.0931 44.537 77.062 45.6738 81 47.9473L102 60.0717Z\", className: \"amll-forward-right-arrow\" }));\nconst ForwardRef = forwardRef(SvgIconForward);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconPause = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"vector\", xmlns: \"http://www.w3.org/2000/svg\", width: 38, height: 38, viewBox: \"0 0 38 38\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.7384,36C6.3594,36 5,34.5857 5,32.4261L5,5.593C5,3.4143 6.3594,2 8.7384,2L12.911,2C15.2711,2 16.6305,3.4143 16.6305,5.593L16.6305,32.4261C16.6305,34.6048 15.2711,36 12.911,36L8.7384,36ZM25.089,36C22.7289,36 21.3695,34.6048 21.3695,32.4261L21.3695,5.593C21.3695,3.4143 22.7289,2 25.089,2L29.2616,2C31.6406,2 33,3.4143 33,5.593L33,32.4261C33,34.5857 31.6406,36 29.2616,36L25.089,36Z\", fill: \"currentColor\", strokeWidth: 1, fillRule: \"nonzero\", id: \"path_0\" }));\nconst ForwardRef = forwardRef(SvgIconPause);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconPlay = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"vector\", xmlns: \"http://www.w3.org/2000/svg\", width: 38, height: 38, viewBox: \"0 0 38 38\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M7.5776,36C5.619,36 4.1567,34.6943 4,32.5008L4,5.4992C4.1567,3.3057 5.619,2 7.5776,2C8.5438,2 9.2227,2.2873 10.3195,2.8618L35.1536,15.5269C36.9293,16.4409 38,17.3287 38,19C38,20.6713 36.9293,21.5591 35.1536,22.4731L10.3195,35.1382C9.2227,35.7127 8.5438,36 7.5776,36Z\", fill: \"currentColor\", fillRule: \"nonzero\" }));\nconst ForwardRef = forwardRef(SvgIconPlay);\nexport default ForwardRef;\n","import * as React from \"react\";\nimport { forwardRef } from \"react\";\nconst SvgIconRewind = (props, ref) => /* @__PURE__ */ React.createElement(\"svg\", { id: \"vector\", xmlns: \"http://www.w3.org/2000/svg\", width: 32, height: 32, viewBox: \"0 0 134 134\", fill: \"currentColor\", ref, ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M72 60.0717C68.062 62.3453 66.0931 63.4821 65.4323 64.9662C64.8559 66.2608 64.8559 67.7391 65.4323 69.0336C66.0931 70.5177 68.062 71.6545 72 73.9281L93 86.0525C96.938 88.326 98.9069 89.4628 100.523 89.293C101.932 89.1449 103.212 88.4057 104.045 87.2593C105 85.945 105 83.6714 105 79.1243V54.8755C105 50.3284 105 48.0548 104.045 46.7405C103.212 45.5941 101.932 44.8549 100.523 44.7068C98.9069 44.537 96.938 45.6738 93 47.9473L72 60.0717Z\", className: \"amll-rewind-right-arrow\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M72 60.0717C68.062 62.3453 66.0931 63.4821 65.4323 64.9662C64.8559 66.2608 64.8559 67.7391 65.4323 69.0336C66.0931 70.5177 68.062 71.6545 72 73.9281L93 86.0525C96.938 88.326 98.9069 89.4628 100.523 89.293C101.932 89.1449 103.212 88.4057 104.045 87.2593C105 85.945 105 83.6714 105 79.1243V54.8755C105 50.3284 105 48.0548 104.045 46.7405C103.212 45.5941 101.932 44.8549 100.523 44.7068C98.9069 44.537 96.938 45.6738 93 47.9473L72 60.0717Z\", className: \"amll-rewind-right-standby\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M32 60.0717C28.062 62.3453 26.0931 63.4821 25.4323 64.9662C24.8559 66.2608 24.8559 67.7391 25.4323 69.0336C26.0931 70.5177 28.062 71.6545 32 73.9281L53 86.0525C56.938 88.326 58.9069 89.4628 60.5226 89.293C61.9319 89.1449 63.2122 88.4057 64.0451 87.2593C65 85.945 65 83.6714 65 79.1243V54.8755C65 50.3284 65 48.0548 64.0451 46.7405C63.2122 45.5941 61.9319 44.8549 60.5226 44.7068C58.9069 44.537 56.938 45.6738 53 47.9473L32 60.0717Z\", className: \"amll-rewind-left-arrow\" }));\nconst ForwardRef = forwardRef(SvgIconRewind);\nexport default ForwardRef;\n","/**\n * @fileoverview\n * 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用\n */\n\nimport { BackgroundRender, LyricPlayer } from \"@applemusic-like-lyrics/react\";\nimport structuredClone from \"@ungap/structured-clone\";\nimport { useAtom, useAtomValue } from \"jotai\";\nimport {\n\ttype FC,\n\ttype HTMLProps,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from \"react\";\nimport { AutoLyricLayout } from \"../../layout/auto\";\nimport {\n\tonChangeVolumeAtom,\n\tonClickControlThumbAtom,\n\tonLyricLineClickAtom,\n\tonLyricLineContextMenuAtom,\n\tonPlayOrResumeAtom,\n\tonRequestNextSongAtom,\n\tonRequestOpenMenuAtom,\n\tonRequestPrevSongAtom,\n\tonSeekPositionAtom,\n} from \"../../states/callback\";\nimport {\n\tfftDataAtom,\n\thideLyricViewAtom,\n\tisLyricPageOpenedAtom,\n\tlowFreqVolumeAtom,\n\tmusicAlbumNameAtom,\n\tmusicArtistsAtom,\n\tmusicCoverAtom,\n\tmusicCoverIsVideoAtom,\n\tmusicDurationAtom,\n\tmusicLyricLinesAtom,\n\tmusicNameAtom,\n\tmusicPlayingAtom,\n\tmusicPlayingPositionAtom,\n\tmusicQualityAtom,\n\tmusicVolumeAtom,\n} from \"../../states/music\";\nimport { BouncingSlider } from \"../BouncingSlider\";\nimport { ControlThumb } from \"../ControlThumb\";\nimport { Cover } from \"../Cover\";\nimport { MusicInfo } from \"../MusicInfo\";\nimport { VolumeControl } from \"../VolumeControlSlider\";\nimport \"./icon-animations.css\";\nimport styles from \"./index.module.css\";\n\nimport classNames from \"classnames\";\nimport { LayoutGroup } from \"framer-motion\";\nimport {\n\tPlayerControlsType,\n\tenableLyricLineBlurEffectAtom,\n\tenableLyricLineScaleEffectAtom,\n\tenableLyricLineSpringAnimationAtom,\n\tenableLyricRomanLineAtom,\n\tenableLyricSwapTransRomanLineAtom,\n\tenableLyricTranslationLineAtom,\n\tlyricBackgroundFPSAtom,\n\tlyricBackgroundRenderScaleAtom,\n\tlyricBackgroundRendererAtom,\n\tlyricBackgroundStaticModeAtom,\n\tlyricFontFamilyAtom,\n\tlyricFontWeightAtom,\n\tlyricLetterSpacingAtom,\n\tlyricWordFadeWidthAtom,\n\tplayerControlsTypeAtom,\n\tshowBottomControlAtom,\n\tshowMusicAlbumAtom,\n\tshowMusicArtistsAtom,\n\tshowMusicNameAtom,\n\tshowVolumeControlAtom,\n} from \"../../states/config\";\nimport { toDuration } from \"../../utils\";\nimport { AudioFFTVisualizer } from \"../AudioFFTVisualizer\";\nimport { AudioQualityTag } from \"../AudioQualityTag\";\nimport { MediaButton } from \"../MediaButton\";\nimport { PrebuiltToggleIconButton } from \"../ToggleIconButton\";\nimport { PrebuiltToggleIconButtonType } from \"../ToggleIconButton/prebuilt-enum\";\nimport IconForward from \"./icon_forward.svg?react\";\nimport IconPause from \"./icon_pause.svg?react\";\nimport IconPlay from \"./icon_play.svg?react\";\nimport IconRewind from \"./icon_rewind.svg?react\";\n\nconst PrebuiltMusicInfo: FC<{\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n}> = ({ className, style }) => {\n\tconst musicName = useAtomValue(musicNameAtom);\n\tconst musicArtists = useAtomValue(musicArtistsAtom);\n\tconst musicAlbum = useAtomValue(musicAlbumNameAtom);\n\tconst onMenuClicked = useAtomValue(onRequestOpenMenuAtom).onEmit;\n\tconst showMusicName = useAtomValue(showMusicNameAtom);\n\tconst showMusicArtists = useAtomValue(showMusicArtistsAtom);\n\tconst showMusicAlbum = useAtomValue(showMusicAlbumAtom);\n\treturn (\n\t\t<MusicInfo\n\t\t\tclassName={className}\n\t\t\tstyle={style}\n\t\t\tname={showMusicName ? musicName : undefined}\n\t\t\tartists={showMusicArtists ? musicArtists.map((v) => v.name) : undefined}\n\t\t\talbum={showMusicAlbum ? musicAlbum : undefined}\n\t\t\tonMenuButtonClicked={onMenuClicked}\n\t\t/>\n\t);\n};\n\nconst PrebuiltMediaButtons: FC<{\n\tshowOtherButtons?: boolean;\n}> = ({ showOtherButtons }) => {\n\tconst musicIsPlaying = useAtomValue(musicPlayingAtom);\n\tconst onRequestPrevSong = useAtomValue(onRequestPrevSongAtom).onEmit;\n\tconst onRequestNextSong = useAtomValue(onRequestNextSongAtom).onEmit;\n\tconst onPlayOrResume = useAtomValue(onPlayOrResumeAtom).onEmit;\n\treturn (\n\t\t<>\n\t\t\t{showOtherButtons && (\n\t\t\t\t<PrebuiltToggleIconButton type={PrebuiltToggleIconButtonType.Shuffle} />\n\t\t\t)}\n\t\t\t<MediaButton\n\t\t\t\tclassName={styles.songMediaButton}\n\t\t\t\tonClick={onRequestPrevSong}\n\t\t\t>\n\t\t\t\t<IconRewind color=\"#FFFFFF\" />\n\t\t\t</MediaButton>\n\t\t\t<MediaButton\n\t\t\t\tclassName={styles.songMediaPlayButton}\n\t\t\t\tonClick={onPlayOrResume}\n\t\t\t>\n\t\t\t\t{musicIsPlaying ? (\n\t\t\t\t\t<IconPause color=\"#FFFFFF\" />\n\t\t\t\t) : (\n\t\t\t\t\t<IconPlay color=\"#FFFFFF\" />\n\t\t\t\t)}\n\t\t\t</MediaButton>\n\t\t\t<MediaButton\n\t\t\t\tclassName={styles.songMediaButton}\n\t\t\t\tonClick={onRequestNextSong}\n\t\t\t>\n\t\t\t\t<IconForward color=\"#FFFFFF\" />\n\t\t\t</MediaButton>\n\t\t\t{showOtherButtons && (\n\t\t\t\t<PrebuiltToggleIconButton type={PrebuiltToggleIconButtonType.Repeat} />\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst PrebuiltProgressBar: FC = () => {\n\tconst musicDuration = useAtomValue(musicDurationAtom);\n\tconst musicPosition = useAtomValue(musicPlayingPositionAtom);\n\tconst musicQuality = useAtomValue(musicQualityAtom);\n\tconst onSeekPosition = useAtomValue(onSeekPositionAtom).onEmit;\n\n\treturn (\n\t\t<div>\n\t\t\t<BouncingSlider\n\t\t\t\tvalue={musicPosition}\n\t\t\t\tmin={0}\n\t\t\t\tmax={musicDuration}\n\t\t\t\tonChange={onSeekPosition}\n\t\t\t/>\n\t\t\t<div className={styles.progressBarLabels}>\n\t\t\t\t<div>{toDuration(musicPosition / 1000)}</div>\n\t\t\t\t<div>\n\t\t\t\t\t<AudioQualityTag\n\t\t\t\t\t\tclassName={styles.qualityTag}\n\t\t\t\t\t\tquality={musicQuality}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div>{toDuration((musicPosition - musicDuration) / 1000)}</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nconst PrebuiltCoreLyricPlayer: FC<{\n\talignPosition: number;\n\talignAnchor: \"center\" | \"bottom\" | \"top\";\n}> = ({ alignPosition, alignAnchor }) => {\n\tconst musicIsPlaying = useAtomValue(musicPlayingAtom);\n\tconst lyricLines = useAtomValue(musicLyricLinesAtom);\n\tconst isLyricPageOpened = useAtomValue(isLyricPageOpenedAtom);\n\tconst musicPlayingPosition = useAtomValue(musicPlayingPositionAtom);\n\n\tconst lyricFontFamily = useAtomValue(lyricFontFamilyAtom);\n\tconst lyricFontWeight = useAtomValue(lyricFontWeightAtom);\n\tconst lyricLetterSpacing = useAtomValue(lyricLetterSpacingAtom);\n\n\tconst enableLyricLineBlurEffect = useAtomValue(enableLyricLineBlurEffectAtom);\n\tconst enableLyricLineScaleEffect = useAtomValue(\n\t\tenableLyricLineScaleEffectAtom,\n\t);\n\tconst enableLyricLineSpringAnimation = useAtomValue(\n\t\tenableLyricLineSpringAnimationAtom,\n\t);\n\tconst lyricWordFadeWidth = useAtomValue(lyricWordFadeWidthAtom);\n\tconst enableLyricTranslationLine = useAtomValue(\n\t\tenableLyricTranslationLineAtom,\n\t);\n\tconst enableLyricRomanLine = useAtomValue(enableLyricRomanLineAtom);\n\tconst enableLyricSwapTransRomanLine = useAtomValue(\n\t\tenableLyricSwapTransRomanLineAtom,\n\t);\n\tconst onLyricLineClick = useAtomValue(onLyricLineClickAtom).onEmit;\n\tconst onLyricLineContextMenu = useAtomValue(\n\t\tonLyricLineContextMenuAtom,\n\t).onEmit;\n\n\tconst processedLyricLines = useMemo(() => {\n\t\tconst processed = structuredClone(lyricLines);\n\t\tif (!enableLyricTranslationLine) {\n\t\t\tfor (const line of processed) {\n\t\t\t\tline.translatedLyric = \"\";\n\t\t\t}\n\t\t}\n\t\tif (!enableLyricRomanLine) {\n\t\t\tfor (const line of processed) {\n\t\t\t\tline.romanLyric = \"\";\n\t\t\t}\n\t\t}\n\t\tif (enableLyricSwapTransRomanLine) {\n\t\t\tfor (const line of processed) {\n\t\t\t\t[line.translatedLyric, line.romanLyric] = [\n\t\t\t\t\tline.romanLyric,\n\t\t\t\t\tline.translatedLyric,\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t\treturn processed;\n\t}, [\n\t\tlyricLines,\n\t\tenableLyricTranslationLine,\n\t\tenableLyricRomanLine,\n\t\tenableLyricSwapTransRomanLine,\n\t]);\n\n\treturn (\n\t\t<LyricPlayer\n\t\t\tstyle={{\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: \"100%\",\n\t\t\t\tfontFamily: lyricFontFamily || undefined,\n\t\t\t\tfontWeight: lyricFontWeight || undefined,\n\t\t\t\tletterSpacing: lyricLetterSpacing || undefined,\n\t\t\t}}\n\t\t\tplaying={musicIsPlaying}\n\t\t\tdisabled={!isLyricPageOpened}\n\t\t\talignPosition={alignPosition}\n\t\t\talignAnchor={alignAnchor}\n\t\t\tcurrentTime={musicPlayingPosition}\n\t\t\tlyricLines={processedLyricLines}\n\t\t\tenableBlur={enableLyricLineBlurEffect}\n\t\t\tenableScale={enableLyricLineScaleEffect}\n\t\t\tenableSpring={enableLyricLineSpringAnimation}\n\t\t\twordFadeWidth={Math.max(0.01, lyricWordFadeWidth)}\n\t\t\tonLyricLineClick={onLyricLineClick}\n\t\t\tonLyricLineContextMenu={onLyricLineContextMenu}\n\t\t/>\n\t);\n};\n\nconst PrebuiltVolumeControl: FC<{\n\tstyle?: React.CSSProperties;\n\tclassName?: string;\n}> = ({ style, className }) => {\n\tconst musicVolume = useAtomValue(musicVolumeAtom);\n\tconst onChangeVolume = useAtomValue(onChangeVolumeAtom).onEmit;\n\tconst showVolumeControl = useAtomValue(showVolumeControlAtom);\n\tif (showVolumeControl)\n\t\treturn (\n\t\t\t<VolumeControl\n\t\t\t\tvalue={musicVolume}\n\t\t\t\tmin={0}\n\t\t\t\tmax={1}\n\t\t\t\tstyle={style}\n\t\t\t\tclassName={className}\n\t\t\t\tonChange={onChangeVolume}\n\t\t\t/>\n\t\t);\n\treturn null;\n};\n\nconst PrebuiltMusicControls: FC<\n\t{\n\t\tshowOtherButtons?: boolean;\n\t} & HTMLProps<HTMLDivElement>\n> = ({ className, showOtherButtons, ...props }) => {\n\tconst playerControlsType = useAtomValue(playerControlsTypeAtom);\n\tconst fftData = useAtomValue(fftDataAtom);\n\treturn (\n\t\t<div className={classNames(styles.controls, className)} {...props}>\n\t\t\t{playerControlsType === PlayerControlsType.Controls && (\n\t\t\t\t<PrebuiltMediaButtons showOtherButtons={showOtherButtons} />\n\t\t\t)}\n\t\t\t{playerControlsType === PlayerControlsType.FFT && (\n\t\t\t\t<AudioFFTVisualizer\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\t\theight: \"8vh\",\n\t\t\t\t\t}}\n\t\t\t\t\tfftData={fftData}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\n/**\n * 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用\n */\nexport const PrebuiltLyricPlayer: FC<HTMLProps<HTMLDivElement>> = ({\n\tclassName,\n\t...rest\n}) => {\n\tconst [hideLyricView, setHideLyricView] = useAtom(hideLyricViewAtom);\n\tconst musicCover = useAtomValue(musicCoverAtom);\n\tconst musicCoverIsVideo = useAtomValue(musicCoverIsVideoAtom);\n\tconst musicIsPlaying = useAtomValue(musicPlayingAtom);\n\tconst lowFreqVolume = useAtomValue(lowFreqVolumeAtom);\n\tconst isLyricPageOpened = useAtomValue(isLyricPageOpenedAtom);\n\tconst lyricBackgroundFPS = useAtomValue(lyricBackgroundFPSAtom);\n\tconst lyricBackgroundStaticMode = useAtomValue(lyricBackgroundStaticModeAtom);\n\tconst lyricBackgroundRenderScale = useAtomValue(\n\t\tlyricBackgroundRenderScaleAtom,\n\t);\n\tconst onClickControlThumb = useAtomValue(onClickControlThumbAtom).onEmit;\n\tconst [isVertical, setIsVertical] = useState(false);\n\tconst [alignPosition, setAlignPosition] = useState(0.25);\n\tconst [alignAnchor, setAlignAnchor] = useState<\"center\" | \"bottom\" | \"top\">(\n\t\t\"top\",\n\t);\n\tconst coverElRef = useRef<HTMLElement>(null);\n\tconst layoutRef = useRef<HTMLDivElement>(null);\n\tconst backgroundRenderer = useAtomValue(lyricBackgroundRendererAtom);\n\tconst showBottomControl = useAtomValue(showBottomControlAtom);\n\n\tuseLayoutEffect(() => {\n\t\t// 如果是水平布局,则让歌词对齐到封面的中心\n\t\tif (!isVertical && coverElRef.current && layoutRef.current) {\n\t\t\tconst obz = new ResizeObserver(() => {\n\t\t\t\tif (!(coverElRef.current && layoutRef.current)) return;\n\t\t\t\tconst coverB = coverElRef.current.getBoundingClientRect();\n\t\t\t\tconst layoutB = layoutRef.current.getBoundingClientRect();\n\t\t\t\tsetAlignPosition(\n\t\t\t\t\t(coverB.top + coverB.height / 2 - layoutB.top) / layoutB.height,\n\t\t\t\t);\n\t\t\t});\n\t\t\tobz.observe(coverElRef.current);\n\t\t\tobz.observe(layoutRef.current);\n\t\t\tsetAlignAnchor(\"center\");\n\t\t\treturn () => obz.disconnect();\n\t\t}\n\t\t// 如果是垂直布局,则把歌词对齐到顶部(歌曲信息下方)\n\t\tif (isVertical && layoutRef.current) {\n\t\t\tsetAlignPosition(0.1);\n\t\t\tsetAlignAnchor(\"top\");\n\t\t}\n\t}, [isVertical]);\n\n\treturn (\n\t\t<LayoutGroup>\n\t\t\t<AutoLyricLayout\n\t\t\t\tref={layoutRef}\n\t\t\t\tclassName={classNames(styles.autoLyricLayout, className)}\n\t\t\t\tonLayoutChange={setIsVertical}\n\t\t\t\tcoverSlot={\n\t\t\t\t\t<Cover\n\t\t\t\t\t\tcoverUrl={musicCover}\n\t\t\t\t\t\tcoverIsVideo={musicCoverIsVideo}\n\t\t\t\t\t\tref={coverElRef}\n\t\t\t\t\t\tmusicPaused={!musicIsPlaying}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tthumbSlot={<ControlThumb onClick={onClickControlThumb} />}\n\t\t\t\tsmallControlsSlot={\n\t\t\t\t\t<PrebuiltMusicInfo\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\tstyles.smallMusicInfo,\n\t\t\t\t\t\t\thideLyricView && styles.hideLyric,\n\t\t\t\t\t\t)}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbackgroundSlot={\n\t\t\t\t\t<BackgroundRender\n\t\t\t\t\t\talbum={musicCover}\n\t\t\t\t\t\talbumIsVideo={musicCoverIsVideo}\n\t\t\t\t\t\tlowFreqVolume={lowFreqVolume}\n\t\t\t\t\t\trenderScale={lyricBackgroundRenderScale}\n\t\t\t\t\t\tfps={lyricBackgroundFPS}\n\t\t\t\t\t\trenderer={backgroundRenderer.renderer}\n\t\t\t\t\t\tstaticMode={lyricBackgroundStaticMode || !isLyricPageOpened}\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tzIndex: -1,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbigControlsSlot={\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PrebuiltMusicInfo\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\tstyles.bigMusicInfo,\n\t\t\t\t\t\t\t\thideLyricView && styles.hideLyric,\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PrebuiltProgressBar />\n\t\t\t\t\t\t<PrebuiltMusicControls className={styles.bigControls} />\n\t\t\t\t\t\t{showBottomControl && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\t\t\t\t\tjustifyContent: \"space-evenly\",\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.Lyrics}\n\t\t\t\t\t\t\t\t\tchecked={!hideLyricView}\n\t\t\t\t\t\t\t\t\tonClick={() => setHideLyricView(!hideLyricView)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.AirPlay}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.Playlist}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<PrebuiltVolumeControl className={styles.bigVolumeControl} />\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tcontrolsSlot={\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PrebuiltMusicInfo className={styles.horizontalControls} />\n\t\t\t\t\t\t<PrebuiltProgressBar />\n\t\t\t\t\t\t<PrebuiltMusicControls\n\t\t\t\t\t\t\tclassName={styles.controls}\n\t\t\t\t\t\t\tshowOtherButtons\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PrebuiltVolumeControl />\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\thorizontalBottomControls={\n\t\t\t\t\tshowBottomControl && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.Playlist}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.Lyrics}\n\t\t\t\t\t\t\t\tchecked={!hideLyricView}\n\t\t\t\t\t\t\t\tonClick={() => setHideLyricView(!hideLyricView)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div style={{ flex: \"1\" }} />\n\t\t\t\t\t\t\t<PrebuiltToggleIconButton\n\t\t\t\t\t\t\t\ttype={PrebuiltToggleIconButtonType.AirPlay}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tlyricSlot={\n\t\t\t\t\t<PrebuiltCoreLyricPlayer\n\t\t\t\t\t\talignPosition={alignPosition}\n\t\t\t\t\t\talignAnchor={alignAnchor}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\thideLyric={hideLyricView}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</LayoutGroup>\n\t);\n};\n"],"names":["AudioFFTVisualizer","fftData","props","canvasRef","useRef","fftDataRef","useEffect","useLayoutEffect","canvas","ctx","onFrame","stopped","width","height","targetSize","processed","buf","i","t","targetMaxValue","maxValue","len","barWidth","barBeginY","x","obs","sizes","size","jsx","hasOwn","classNames","classes","arg","appendClass","parseValue","key","value","newClass","module","warned","warnOnce","condition","message","element","createDOMMotionComponentProxy","componentFactory","componentCache","deprecatedFactoryFunction","args","_target","isAnimationControls","v","isKeyframesTarget","shallowCompare","next","prev","prevLength","isVariantLabel","getValueState","visualElement","state","resolveVariantFromProps","definition","custom","current","velocity","resolveVariant","variantPriorityOrder","variantProps","transformPropOrder","transformProps","secondsToMilliseconds","seconds","millisecondsToSeconds","milliseconds","underDampedSpring","criticallyDampedSpring","target","keyframesTransition","ease","getDefaultTransition","valueKey","keyframes","isTransitionDefined","when","_delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","transition","getValueTransition","MotionGlobalConfig","isNotNull","getFinalKeyframe","finalKeyframe","resolvedKeyframes","index","noop","any","createRenderStep","runNextFrame","thisFrame","nextFrame","isProcessing","flushNextFrame","toKeepAlive","latestFrameData","triggerCallback","callback","step","keepAlive","immediate","queue","frameData","stepsOrder","maxElapsed","createRenderBatcher","scheduleNextBatch","allowKeepAlive","useDefaultElapsed","flagRunNextFrame","steps","acc","read","resolveKeyframes","update","preRender","render","postRender","processBatch","timestamp","wake","process","frame","cancelFrame","frameSteps","isZeroValueString","isNone","warning","invariant","check","isNumericalString","checkStringStartsWith","token","isCSSVariableName","startsAsVariableToken","isCSSVariableToken","singleCssVariableRegex","splitCSSVariableRegex","parseCSSVariable","match","token1","token2","fallback","maxDepth","getVariableValue","depth","resolved","trimmed","clamp","min","max","number","alpha","scale","sanitize","floatRegex","colorRegex","singleColorRegex","isString","isNullish","createUnitType","unit","degrees","percent","px","vh","vw","progressPercentage","positionalKeys","isNumOrPxType","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","_bbox","transform","matrix3d","transformKeys","nonTranslationalTransformKeys","removeNonTranslationalTransform","removedTransforms","positionalValues","paddingLeft","paddingRight","y","paddingTop","paddingBottom","top","left","testValueType","type","auto","dimensionValueTypes","findDimensionValueType","toResolve","isScheduled","anyNeedsMeasurement","measureAllKeyframes","resolversToMeasure","resolver","elementsToMeasure","transformsToRestore","restore","_a","readAllKeyframes","flushKeyframeResolvers","KeyframeResolver","unresolvedKeyframes","onComplete","name","motionValue","isAsync","currentValue","valueAsRead","isColorString","testProp","splitColor","aName","bName","cName","a","b","c","clampRgbUnit","rgbUnit","rgba","red","green","blue","alpha$1","parseHex","r","g","hex","hsla","hue","saturation","lightness","color","test","_b","NUMBER_TOKEN","COLOR_TOKEN","VAR_TOKEN","VAR_FUNCTION_TOKEN","SPLIT_TOKEN","complexRegex","analyseComplexValue","originalValue","values","indexes","types","split","parsedValue","parseComplexValue","createTransformer","source","numSections","output","convertNumbersToZero","getAnimatableNone","parsed","complex","maxDefaults","applyDefaultFilter","defaultValue","functionRegex","filter","functions","int","numberValueTypes","defaultValueTypes","getDefaultValueType","defaultValueType","invalidTemplates","makeNoneKeyframesAnimatable","noneKeyframeIndexes","animatableTemplate","keyframe","noneIndex","DOMKeyframesResolver","origin","originType","targetType","measureKeyframe","finalKeyframeIndex","unsetTransformName","unsetTransformValue","memo","result","isGenerator","now","clearTime","time","newTime","isAnimatable","hasKeyframesChanged","canAnimate","originKeyframe","targetKeyframe","isOriginAnimatable","isTargetAnimatable","MAX_RESOLVE_DELAY","BaseAnimation","autoplay","delay","options","onUpdate","resolvedAnimation","resolve","reject","velocityPerSecond","frameDuration","velocitySampleDuration","calcGeneratorVelocity","resolveValue","prevT","safeMin","minDuration","maxDuration","minDamping","maxDamping","findSpring","duration","bounce","mass","envelope","derivative","dampingRatio","undampedFreq","exponentialDecay","delta","calcAngularFreq","e","f","initialGuess","approximateRoot","stiffness","rootIterations","durationKeys","physicsKeys","isSpringType","keys","getSpringOptions","springOptions","derived","spring","restDelta","restSpeed","damping","isResolvedFromDuration","initialVelocity","initialDelta","undampedAngularFreq","isGranularScale","resolveSpring","angularFreq","dampedAngularFreq","freqForT","currentVelocity","isBelowVelocityThreshold","isBelowDisplacementThreshold","inertia","power","timeConstant","bounceDamping","bounceStiffness","modifyTarget","isOutOfBounds","nearestBoundary","amplitude","ideal","calcDelta","calcLatest","applyFriction","latest","timeReachedBoundary","spring$1","checkCatchBoundary","hasUpdatedFrame","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","binarySubdivide","lowerBound","upperBound","mX1","mX2","currentX","currentT","cubicBezier","mY1","mY2","getTForX","aX","easeIn","easeOut","easeInOut","isEasingArray","mirrorEasing","easing","p","reverseEasing","circIn","circOut","circInOut","backOut","backIn","backInOut","anticipate","easingLookup","easingDefinitionToFunction","x1","y1","x2","y2","combineFunctions","pipe","transformers","progress","to","toFromDifference","mixNumber","hueToRgb","q","hslaToRgba","mixImmediate","mixLinearColor","fromExpo","expo","colorTypes","getColorType","asRGBA","model","mixColor","fromRGBA","toRGBA","blended","invisibleValues","mixVisibility","mixNumber$1","getMixer","mixComplex","mixArray","mixObject","numValues","blendValue","matchOrder","orderedOrigin","pointers","originIndex","originValue","template","originStats","targetStats","mix","createMixers","customMixer","mixers","mixerFactory","numMixers","mixer","easingFunction","interpolate","input","isClamp","inputLength","interpolator","progressInRange","fillOffset","offset","remaining","offsetProgress","defaultOffset","arr","convertOffsetToTimes","o","defaultEasing","keyframeValues","times","easingFunctions","absoluteTimes","mapTimeToKeyframe","maxGeneratorDuration","calcGeneratorDuration","generator","timeStep","frameloopDriver","passTimestamp","generators","percentToProgress","MainThreadAnimation","onStop","KeyframeResolver$1","onResolved","keyframes$1","generatorFactory","mapPercentToKeyframes","mirroredGenerator","calculatedDuration","resolvedDuration","totalDuration","sample","timeWithoutDelay","isInDelayPhase","frameGenerator","currentIteration","iterationProgress","done","isAnimationFinished","newSpeed","hasChanged","driver","onPlay","startTime","acceleratedValues","isBezierDefinition","isWaapiSupportedEasing","supportedWaapiEasing","cubicBezierAsString","d","mapEasingToNativeEasingWithDefault","mapEasingToNativeEasing","animateStyle","valueName","keyframeOptions","supportsWaapi","sampleDelta","requiresPregeneratedKeyframes","pregenerateKeyframes","sampleAnimation","pregeneratedKeyframes","AcceleratedAnimation","pregeneratedAnimation","animation","timeline","sampleTime","observeTimeline","prevProgress","currentTime","supportsScrollTimeline","GroupPlaybackControls","animations","onResolve","onReject","propName","newValue","cancelAll","cancelTimeline","speed","methodName","controls","animateMotionValue","isHandoff","valueTransition","shouldSkip","isCustomValue","resolveFinalValueInKeyframes","addUniqueItem","item","removeItem","SubscriptionManager","handler","numSubscriptions","MAX_VELOCITY_DELTA","isFloat","MotionValue","init","prevFrameValue","subscription","eventName","unsubscribe","eventManagers","passiveEffect","stopPassiveEffect","endAnimation","startAnimation","setMotionValue","setTarget","transitionEnd","camelToDash","str","optimizedAppearDataId","optimizedAppearDataAttribute","getOptimisedAppearId","getWillChangeName","WillChangeMotionValue","styleName","isMotionValue","isWillChangeMotionValue","addValueToWillChange","willChange","shouldBlockAnimation","protectedKeys","needsAnimating","shouldBlock","animateTarget","targetAndTransition","transitionOverride","animationTypeState","valueTarget","appearId","animateVariant","variant","getAnimation","getChildAnimations","forwardDelay","animateChildren","first","last","maxStaggerDuration","generateStaggerDuration","sortByTreeOrder","child","animateVisualElement","resolvedDefinition","numVariantProps","getVariantContext","context","prop","reversePriorityOrder","numAnimationTypes","animateList","createAnimationState","animate","createState","isInitialRender","buildResolvedTypeValues","setAnimateFunction","makeAnimator","animateChanges","changedActiveType","removedKeys","encounteredKeys","removedVariantIndex","typeState","propIsVariant","activeDelta","isInherited","variantDidChange","checkVariantsDidChange","shouldAnimateType","handledRemovedValues","definitionList","resolvedValues","prevResolvedValues","allKeys","markToAnimate","valueHasChanged","fallbackAnimation","fallbackTarget","shouldAnimate","setActive","isActive","createTypeState","Feature","node","AnimationFeature","prevAnimate","id","ExitAnimationFeature","isPresent","onExitComplete","prevIsPresent","exitAnimation","register","isPrimaryPointer","event","extractEventInfo","pointType","addPointerInfo","addDomEvent","addPointerEvent","distance","distance2D","xDelta","yDelta","PanSession","handlers","transformPagePoint","contextWindow","dragSnapToOrigin","info","getPanInfo","isPanStarted","isDistancePastThreshold","point","onStart","onMove","transformPoint","onEnd","onSessionEnd","resumeAnimation","panInfo","initialInfo","onSessionStart","subtractPoint","history","lastDevicePoint","startDevicePoint","getVelocity","timeDelta","timestampedPoint","lastPoint","createLock","lock","openLock","globalHorizontalLock","globalVerticalLock","getGlobalLock","drag","openHorizontal","openVertical","isDragActive","openGestureLock","isRefObject","ref","SCALE_PRECISION","SCALE_MIN","SCALE_MAX","TRANSLATE_PRECISION","TRANSLATE_MIN","TRANSLATE_MAX","calcLength","axis","isNear","maxDistance","calcAxisDelta","calcBoxDelta","calcRelativeAxis","relative","parent","calcRelativeBox","calcRelativeAxisPosition","layout","calcRelativePosition","applyConstraints","elastic","calcRelativeAxisConstraints","calcRelativeConstraints","layoutBox","bottom","right","calcViewportAxisConstraints","layoutAxis","constraintsAxis","calcViewportConstraints","constraintsBox","calcOrigin","sourceLength","targetLength","rebaseAxisConstraints","constraints","relativeConstraints","defaultElastic","resolveDragElastic","dragElastic","resolveAxisElastic","minLabel","maxLabel","resolvePointElastic","label","createAxisDelta","createDelta","createAxis","createBox","eachAxis","convertBoundingBoxToBox","convertBoxToBoundingBox","transformBoxPoints","topLeft","bottomRight","isIdentityScale","hasScale","scaleX","scaleY","hasTransform","has2DTranslate","is2DTranslate","scalePoint","originPoint","distanceFromOrigin","scaled","applyPointDelta","translate","boxScale","applyAxisDelta","applyBoxDelta","box","TREE_SCALE_SNAP_MIN","TREE_SCALE_SNAP_MAX","applyTreeDeltas","treeScale","treePath","isSharedTransition","treeLength","transformBox","translateAxis","transformAxis","axisTranslate","axisScale","axisOrigin","measureViewportBox","instance","measurePageBox","rootProjectionNode","viewportBox","scroll","getContextWindow","elementDragControls","VisualElementDragControls","originEvent","snapToCursor","presenceContext","dragPropagation","onDragStart","projection","measuredAxis","animationState","dragDirectionLock","onDirectionLock","onDrag","getCurrentDirection","isDragging","onDragEnd","_point","shouldDrag","axisValue","dragConstraints","prevConstraints","onMeasureDragConstraints","constraintsElement","measuredConstraints","userConstraints","dragMomentum","dragTransition","onDragTransitionEnd","momentumAnimations","dragKey","externalMotionValue","boxProgress","transformTemplate","stopPointerListener","dragListener","measureDragConstraints","stopMeasureLayoutListener","stopResizeListener","stopLayoutUpdateListener","hasLayoutChanged","direction","currentDirection","lockThreshold","DragGesture","dragControls","asyncHandler","PanGesture","pointerDownEvent","onPanSessionStart","onPanStart","onPan","onPanEnd","PresenceContext","createContext","usePresence","useContext","useId","safeToRemove","useCallback","LayoutGroupContext","SwitchLayoutGroupContext","globalProjectionState","pixelsToPercent","pixels","correctBorderRadius","correctBoxShadow","projectionDelta","original","shadow","xScale","yScale","averageScale","scaleCorrectors","addScaleCorrector","correctors","microtask","cancelMicrotask","MeasureLayoutWithContext","Component","layoutGroup","switchLayoutGroup","layoutId","defaultScaleCorrectors","prevProps","layoutDependency","stack","promoteContext","MeasureLayout","borders","numBorders","asNumber","isPx","mixValues","follow","lead","shouldCrossfadeOpacity","isOnlyMember","easeCrossfadeIn","easeCrossfadeOut","borderLabel","followRadius","getRadius","leadRadius","radiusName","compress","copyAxisInto","originAxis","copyBoxInto","originBox","copyAxisDeltaInto","originDelta","removePointDelta","removeAxisDelta","sourceAxis","removeAxisTransforms","transforms","scaleKey","originKey","xKeys","yKeys","removeBoxTransforms","sourceBox","isAxisDeltaZero","isDeltaZero","axisEquals","boxEquals","axisEqualsRounded","boxEqualsRounded","aspectRatio","axisDeltaEquals","NodeStack","prevLead","indexOfNode","member","preserveFollowOpacity","crossfade","resumingFrom","buildProjectionTransform","latestTransform","xTranslate","yTranslate","zTranslate","transformPerspective","rotate","rotateX","rotateY","skewX","skewY","elementScaleX","elementScaleY","compareByDepth","FlatTree","resolveMotionValue","unwrappedValue","timeout","start","checkElapsed","isSVGElement","animateSingleValue","motionValue$1","metrics","isDebug","transformAxes","hiddenVisibility","animationTarget","resetDistortingTransform","sharedAnimationValues","latestValues","cancelTreeOptimisedTransformAnimations","projectionNode","createProjectionNode","attachResizeListener","defaultParent","measureScroll","checkIsScrollRoot","resetTransform","propagateDirtyNodes","resolveTargetDelta","calcProjection","cleanDirtyNodes","subscriptionManager","isLayoutDirty","cancelDelay","resizeUnblockUpdate","finishAnimation","hasRelativeTargetChanged","newLayout","layoutTransition","defaultLayoutTransition","onLayoutAnimationStart","onLayoutAnimationComplete","targetChanged","hasOnlyRelativeTargetChanged","animationOptions","resetSkewAndRotation","shouldNotifyListeners","clearMeasurements","clearIsLayoutDirty","resetTransformStyle","updateLayout","notifyLayoutUpdate","clearSnapshot","removeLeadSnapshots","prevLayout","phase","needsMeasurement","isRoot","isResetRequested","hasProjection","transformTemplateValue","transformTemplateHasChanged","removeTransform","pageBox","roundBox","checkNodeWasScrollRoot","boxWithoutScroll","transformOnly","withTransforms","boxWithoutTransform","nodeBox","forceRecalculation","isShared","relativeParent","canSkip","prevTreeScaleX","prevTreeScaleY","notifyAll","snapshot","snapshotLatestValues","mixedValues","targetDelta","relativeLayout","snapshotSource","layoutSource","isSharedLayoutAnimation","hasOpacityCrossfade","prevRelativeTarget","mixAxisDelta","mixBox","targetWithTransforms","shouldAnimatePositionOnly","xLength","yLength","config","needsReset","hasDistortingTransform","resetValues","styleProp","styles","emptyStyles","valuesToRender","correct","applyTo","corrected","num","measuredLayout","animationType","axisSnapshot","length","layoutDelta","visualDelta","parentSnapshot","parentLayout","relativeSnapshot","mixAxis","userAgentContains","string","roundPoint","roundAxis","DocumentProjectionNode","notify","HTMLProjectionNode","documentNode","addHoverEvent","callbackName","handleEvent","HoverGesture","FocusGesture","isFocusVisible","isNodeOrChild","fireSyntheticPointerEvent","syntheticPointerEvent","PressGesture","startEvent","startInfo","removePointerUpListener","endEvent","endInfo","onTap","onTapCancel","globalTapTarget","removePointerCancelListener","cancelEvent","cancelInfo","handleKeydown","keydownEvent","handleKeyup","keyupEvent","removeKeydownListener","handleBlur","removeBlurListener","onTapStart","whileTap","removePointerListener","removeFocusListener","observerCallbacks","observers","fireObserverCallback","entry","fireAllObserverCallbacks","entries","initIntersectionObserver","root","lookupRoot","rootObservers","observeIntersection","rootInteresectionObserver","thresholdNames","InViewFeature","viewport","rootMargin","amount","once","onIntersectionUpdate","isIntersecting","onViewportEnter","onViewportLeave","hasViewportOptionChanged","prevViewport","gestureAnimations","MotionConfigContext","MotionContext","isBrowser","useIsomorphicLayoutEffect","LazyContext","scheduleHandoffComplete","useVisualElement","visualState","createVisualElement","ProjectionNodeConstructor","lazyContext","reducedMotionConfig","visualElementRef","initialLayoutGroupConfig","useInsertionEffect","optimisedAppearId","wantsHandoff","completeHandoff","initialPromotionConfig","layoutScroll","layoutRoot","getClosestProjectingNode","useMotionRef","externalRef","isControllingVariants","isVariantNode","getCurrentTreeVariants","initial","useCreateMotionContext","useMemo","variantLabelsAsDependency","featureProps","featureDefinitions","loadFeatures","features","motionComponentSymbol","createRendererMotionComponent","preloadedFeatures","useRender","useVisualState","MotionComponent","configAndProps","useLayoutId","isStatic","useStrictMode","layoutProjection","getProjectionFunctionality","jsxs","ForwardRefMotionComponent","forwardRef","layoutGroupId","isStrict","strictMessage","combined","lowercaseSVGElements","isSVGComponent","renderHTML","style","vars","camelCaseAttributes","renderSVG","renderState","_styleProp","isForcedMotionValue","scrapeMotionValuesFromProps","newValues","scrapeMotionValuesFromProps$1","targetKey","useConstant","makeState","applyWillChange","createRenderState","onMount","makeLatestValues","makeUseVisualState","make","addWillChange","memberName","forEachDefinition","list","shouldApplyWillChange","scrapeMotionValues","motionValues","isControllingVariants$1","isVariantNode$1","isInitialAnimationBlocked","variantToSet","createHtmlRenderState","createSvgRenderState","getValueAsType","translateAlias","numTransforms","buildTransform","transformString","transformIsDefault","valueIsDefault","valueAsType","transformName","buildHTMLStyles","transformOrigin","hasTransformOrigin","originX","originY","originZ","calcSVGTransformOrigin","dimensions","pxOriginX","pxOriginY","dashKeys","camelKeys","buildSVGPath","attrs","spacing","useDashCase","pathLength","pathSpacing","buildSVGAttrs","attrX","attrY","attrScale","pathOffset","isSVGTag","tag","svgMotionConfig","htmlMotionConfig","copyRawValuesOnly","useInitialMotionValues","useStyle","useHTMLProps","htmlProps","validMotionProps","isValidMotionProp","shouldForward","loadExternalIsValidProp","isValidProp","filterProps","isDom","forwardMotionProps","filteredProps","useSVGProps","_isStatic","visualProps","rawStyles","createUseRender","elementProps","Fragment","children","renderedChildren","createElement","createMotionComponentFactory","prefersReducedMotion","hasReducedMotionListener","initPrefersReducedMotion","motionMediaQuery","setReducedMotionPreferences","updateMotionValuesFromProps","nextValue","prevValue","existingValue","latestValue","visualElementStore","valueTypes","findValueType","propEventHandlers","VisualElement","_props","_prevProps","_visualElement","blockInitialAnimation","initialMotionValues","remove","feature","valueIsTransform","removeOnChange","removeOnRenderRequest","removeSyncCheck","other","featureDefinition","isEnabled","FeatureConstructor","listenerName","listener","closestVariantNode","valueFromInitial","DOMVisualElement","getComputedStyle","HTMLVisualElement","defaultType","computedStyle","SVGVisualElement","createDomVisualElement","createMotionComponent","motion","PopChildMeasure","React","PopChild","nonce","PresenceChild","presenceAffectsLayout","mode","presenceChildren","newChildrenMap","childId","isComplete","_","getChildKey","onlyElements","filtered","Children","isValidElement","AnimatePresence","exitBeforeEnter","presentChildren","presentKeys","pendingPresentChildren","exitComplete","diffedChildren","setDiffedChildren","useState","setRenderedChildren","exitingChildren","nextChildren","forceRender","onExit","isEveryExitComplete","isExitComplete","DeprecatedLayoutGroupContext","useIsMounted","isMounted","useForceUpdate","forcedRenderCount","setForcedRenderCount","nodeGroup","nodes","subscriptions","dirtyAll","shouldInheritGroup","inherit","shouldInheritId","LayoutGroup","layoutGroupContext","deprecatedLayoutGroupContext","upstreamId","memoizedContext","keyCount","atom","write","__vite_import_meta_env__","defaultRead","defaultWrite","get","set","RESET","isPromiseLike","createJSONStorage","getStringStorage","lastStr","lastValue","storage","initialValue","_a2","parse","str2","createHandleSubscribe","subscriber2","subscriber","storageEventCallback","defaultStorage","atomWithStorage","baseAtom","setAtom","unsub","resolvedValue","AudioQualityType","musicNameAtom","musicArtistsAtom","musicAlbumNameAtom","musicCoverAtom","musicCoverIsVideoAtom","musicDurationAtom","musicPlayingAtom","musicQualityAtom","musicPlayingPositionAtom","musicVolumeAtom","musicLyricLinesAtom","hideLyricViewAtom","fftDataAtom","lowFreqVolumeAtom","isLyricPageOpenedAtom","SvgIconDolbyAtmos","ForwardRef","SvgTagHiresLossless","SvgTagLossless","COMMON_VARIENTS","DOLBY_VARIENTS","AudioQualityTag","quality","className","rest","TagLossless","TagHiresLossless","IconDolbyAtmos","Spring","currentPosition","__publicField","curV","solveSpring","targetPosition","params","soft","angularFrequency","leftover","dampingFrequency","dfm","dm","BouncingSlider","onAfterChange","onBeforeChange","onChange","onSeeking","beforeIcon","afterIcon","others","curValue","setCurValue","outerRef","innerRef","isSeekingRef","outer","inner","heightSpring","bounceSpring","dragging","lastTime","dt","setValue","evt","rect","relPos","onMouseEnter","onMouseLeave","onMouseDown","onMouseMove","onMouseUp","ControlThumb","onClick","containerRef","hoveringRef","thumbOffset","setThumbOffset","container","$8164c72eb32cbbfc$export$3d870b97f7a56ca3","topLeftCornerRadius","topRightCornerRadius","bottomRightCornerRadius","bottomLeftCornerRadius","roundingAndSmoothingBudgetMap","cornerRadiusMap","radius1","radius2","cornerName","radius","corner","adjacents","$8164c72eb32cbbfc$var$adjacentsByCorner","budget","adjacent","adjacentCornerRadius","adjacentCornerBudget","sideLength","$be0670f6a5a657f9$export$a2f9a538d41e7bd0","cornerRadius","cornerSmoothing","preserveSmoothing","roundingAndSmoothingBudget","maxCornerSmoothing","arcMeasure","arcSectionLength","$be0670f6a5a657f9$var$toRadians","angleAlpha","p3ToP4Distance","angleBeta","p1ToP3MaxDistance","minA","maxB","$be0670f6a5a657f9$export$a4b62df84ac6ef86","topLeftPathParams","topRightPathParams","bottomLeftPathParams","bottomRightPathParams","$be0670f6a5a657f9$var$drawTopRightPath","$be0670f6a5a657f9$var$drawBottomRightPath","$be0670f6a5a657f9$var$drawBottomLeftPath","$be0670f6a5a657f9$var$drawTopLeftPath","$be0670f6a5a657f9$var$rounded","strings","$6424334e4a2a8c1c$export$4d0751d7849c93f6","pathParams","topRight","bottomLeft","createClassName","chars","setCss","css","styleId","styleEl","renderSquircle","el","opts","augmentedOpts","getSvgPath","squircleObserver","func","newOpts","resizeObserver","prevDimemsions","omitUndefined","obj","Squircle","borderWidth","forwardedRef","funcRef","refCallback","Cover","coverUrl","coverIsVideo","coverVideoPaused","musicPaused","pauseShrinkAspect","frameRef","clsNames","videoRef","videoEl","setCornerRadius","frameEl","onResize","obz","useImperativeHandle","MediaButton","SvgIconMore","MenuButton","IconMore","TextMarquee","outerDiv","innerDiv","currentAnimationsRef","outerWidth","innerWidth","ani","MusicInfo","artists","album","onArtistClicked","onAlbumClicked","onMenuButtonClicked","T","I","E","l","B","h","m","R","A","L","F","s","D","n","C","k","P","U","j","$","G","H","J","u","w","W","z","K","VOID","PRIMITIVE","ARRAY","OBJECT","DATE","REGEXP","MAP","SET","ERROR","BIGINT","env","deserializer","as","out","unpair","object","flags","map","deserialize","serialized","EMPTY","toString","typeOf","asString","TYPE","serializer","strict","json","pair","serialize","lossy","structuredClone$1","HorizontalLayout","thumbSlot","coverSlot","controlsSlot","lyricSlot","bottomControls","hideLyric","asChild","classnames","VerticalLayout","smallControlsSlot","bigControlsSlot","rootRef","phonyBigCoverRef","phonySmallCoverRef","coverFrameRef","hideLyricRef","currentCoverStyle","setCurrentCoverStyle","calcCoverLayout","rootEl","targetCover","targetCoverSize","rootB","targetCoverB","targetCoverLeft","targetCoverTop","phonyBigCoverEl","phonySmallCoverEl","AutoLyricLayout","horizontalBottomControls","backgroundSlot","onLayoutChange","isVertical","setIsVertical","_onEmit","onClickControlThumbAtom","onRequestOpenMenuAtom","onPlayOrResumeAtom","onPauseAtom","onRequestPrevSongAtom","onRequestNextSongAtom","onSeekPositionAtom","onLyricLineClickAtom","onLyricLineContextMenuAtom","onChangeVolumeAtom","onClickLeftFunctionButtonAtom","onClickRightFunctionButtonAtom","SvgIconSpeaker","SvgIconSpeaker3","VolumeControl","lastValueRef","minSpeakerRef","maxSpeakerRef","IconSpeaker","IconSpeaker3","enableLyricLineBlurEffectAtom","enableLyricLineScaleEffectAtom","enableLyricLineSpringAnimationAtom","enableLyricTranslationLineAtom","enableLyricRomanLineAtom","enableLyricSwapTransRomanLineAtom","lyricWordFadeWidthAtom","lyricFontFamilyAtom","lyricFontWeightAtom","lyricLetterSpacingAtom","PlayerControlsType","playerControlsTypeAtom","showMusicNameAtom","showMusicArtistsAtom","showMusicAlbumAtom","showVolumeControlAtom","showBottomControlAtom","globalLyricTimelineOffsetAtom","lyricBackgroundRendererAtom","MeshGradientRenderer","lyricBackgroundFPSAtom","lyricBackgroundRenderScaleAtom","lyricBackgroundStaticModeAtom","toDuration","isRemainTime","sec","secText","SvgAirplay","SvgLyricsOff","SvgLyricsOn","SvgPlaylistOff","SvgPlaylistOn","PrebuiltToggleIconButtonType","SvgRepeatOff","SvgRepeatOnNormal","SvgShuffleOff","SvgShuffleOn","SvgStar","SvgStarFilled","ToggleIconButton","uncheckedIcon","checkedIcon","checked","PREBUILT_ICONS_MAP","lyricsOffIcon","lyricsOnIcon","playlistOffIcon","playlistOnIcon","repeatOffIcon","repeatOnNormalIcon","shuffleOffIcon","shuffleOnIcon","starIcon","starFilledIcon","airplayIcon","PrebuiltToggleIconButton","UncheckedIcon","CheckedIcon","SvgIconForward","SvgIconPause","SvgIconPlay","SvgIconRewind","PrebuiltMusicInfo","musicName","useAtomValue","musicArtists","musicAlbum","onMenuClicked","showMusicName","showMusicArtists","showMusicAlbum","PrebuiltMediaButtons","showOtherButtons","musicIsPlaying","onRequestPrevSong","onRequestNextSong","onPlayOrResume","IconRewind","IconPause","IconPlay","IconForward","PrebuiltProgressBar","musicDuration","musicPosition","musicQuality","onSeekPosition","PrebuiltCoreLyricPlayer","alignPosition","alignAnchor","lyricLines","isLyricPageOpened","musicPlayingPosition","lyricFontFamily","lyricFontWeight","lyricLetterSpacing","enableLyricLineBlurEffect","enableLyricLineScaleEffect","enableLyricLineSpringAnimation","lyricWordFadeWidth","enableLyricTranslationLine","enableLyricRomanLine","enableLyricSwapTransRomanLine","onLyricLineClick","onLyricLineContextMenu","processedLyricLines","structuredClone","line","LyricPlayer","PrebuiltVolumeControl","musicVolume","onChangeVolume","PrebuiltMusicControls","playerControlsType","PrebuiltLyricPlayer","hideLyricView","setHideLyricView","useAtom","musicCover","musicCoverIsVideo","lowFreqVolume","lyricBackgroundFPS","lyricBackgroundStaticMode","lyricBackgroundRenderScale","onClickControlThumb","setAlignPosition","setAlignAnchor","coverElRef","layoutRef","backgroundRenderer","showBottomControl","coverB","layoutB","BackgroundRender"],"mappings":"mqBAQaA,GAIT,CAAC,CAAE,QAAAC,EAAS,GAAGC,KAAY,CACxB,MAAAC,EAAYC,SAA0B,IAAI,EAC1CC,EAAaD,EAAAA,SACf,OAAAC,EAAW,UAAY,SAC1BA,EAAW,QAAUJ,GAGtBK,EAAAA,UAAU,IAAM,CACfD,EAAW,QAAUJ,CAAA,EACnB,CAACA,CAAO,CAAC,EAEZM,EAAAA,gBAAgB,IAAM,CACrB,MAAMC,EAASL,EAAU,QAEzB,GAAIK,EAAQ,CACL,MAAAC,EAAMD,EAAO,WAAW,IAAI,EAClC,GAAIC,EAAK,CAkBR,IAASC,EAAT,UAAmB,CACd,GAAA,EAAEF,GAAUC,IAAQE,EAAS,OACjC,MAAMC,EAAQJ,EAAO,MACfK,EAASL,EAAO,QAClBM,EAAW,QAAUF,GAASE,EAAW,SAAWD,KACvDL,EAAO,MAAQM,EAAW,MAC1BN,EAAO,OAASM,EAAW,QAGtB,MAAAC,EAAYV,EAAW,SAAW,GACpC,GAAAW,EAAI,SAAWD,EAAU,OACtBC,EAAA,CAAC,GAAGD,CAAS,MAEnB,SAASE,EAAI,EAAGA,EAAID,EAAI,OAAQC,IAAK,CAChC,IAAAC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tD,GAAA,CACA,KAAMvB,EAA6B,QAAA,CACpC,CAAA,CAAA,CACD,EAEAtsD,EAAAA,IAAAkxD,GAAA,CAAsB,UAAWzvB,EAAO,gBAAkB,CAAA,CAAA,EAC5D,EAED,aAEEiI,EAAA,KAAAkG,WAAA,CAAA,SAAA,CAAC5vC,EAAAA,IAAAouD,GAAA,CAAkB,UAAW3sB,EAAO,kBAAoB,CAAA,QACxD8tB,GAAoB,EAAA,EACrBvvD,EAAA,IAACqxD,GAAA,CACA,UAAW5vB,EAAO,SAClB,iBAAgB,EAAA,CACjB,QACCyvB,GAAsB,EAAA,CAAA,EACxB,EAED,yBACCqB,GAEE7oB,EAAAA,KAAAkG,EAAA,SAAA,CAAA,SAAA,CAAA5vC,EAAA,IAAC6tD,GAAA,CACA,KAAMvB,EAA6B,QAAA,CACpC,EACAtsD,EAAA,IAAC6tD,GAAA,CACA,KAAMvB,EAA6B,OACnC,QAAS,CAACkF,EACV,QAAS,IAAMC,EAAiB,CAACD,CAAa,CAAA,CAC/C,QACC,MAAI,CAAA,MAAO,CAAE,KAAM,KAAO,EAC3BxxD,EAAA,IAAC6tD,GAAA,CACA,KAAMvB,EAA6B,OAAA,CACpC,CAAA,EACD,EAGF,UACCtsD,EAAA,IAAC4vD,GAAA,CACA,cAAAC,EACA,YAAAC,CAAA,CACD,EAED,UAAW0B,EACV,GAAGnY,CAAA,CAEN,CAAA,CAAA,CAEF","x_google_ignoreList":[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,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,243,244,245,253,254,255,256]}