motion-v 0.2.6 → 0.3.1-beta.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.
- package/dist/cjs/index.js +5858 -0
- package/dist/es/animation/use-animate.mjs +31 -0
- package/dist/es/components/AnimatePresence.vue.mjs +71 -0
- package/dist/es/components/AnimatePresence.vue2.mjs +4 -0
- package/dist/es/components/Motion.vue.mjs +116 -0
- package/dist/es/components/Motion.vue2.mjs +4 -0
- package/dist/es/components/Primitive.mjs +29 -0
- package/dist/es/components/Slot.mjs +36 -0
- package/dist/es/components/context.mjs +6 -0
- package/dist/es/components/presence.mjs +16 -0
- package/dist/es/components/renderSlotFragments.mjs +13 -0
- package/dist/es/constants/index.mjs +20 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +76 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animate/index.mjs +27 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +16 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animate/sequence.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animate/single-value.mjs +11 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animate/subject.mjs +38 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +243 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +95 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +275 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +30 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +162 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +31 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +13 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/easing.mjs +37 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +20 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs +13 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +5 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/inertia.mjs +67 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/keyframes.mjs +37 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/spring/find.mjs +83 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/spring/index.mjs +83 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +15 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/utils/is-generator.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +73 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +59 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/sequence/create.mjs +153 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +15 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +26 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +43 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +33 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/get-value-transition.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +16 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-none.mjs +13 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/animation/utils/stagger.mjs +26 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/anticipate.mjs +5 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/back.mjs +11 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/circ.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/cubic-bezier.mjs +28 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/ease.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/steps.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/easing/utils/map.mjs +35 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/frameloop/batcher.mjs +75 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/frameloop/frame.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/frameloop/index-legacy.mjs +11 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/frameloop/render-step.mjs +63 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/frameloop/sync-time.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/motion/features/definitions.mjs +29 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +8 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/projection/geometry/conversion.mjs +22 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/projection/geometry/models.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/projection/utils/measure.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/VisualElement.mjs +372 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +101 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +62 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +31 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/index.mjs +63 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/info.mjs +51 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +33 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +38 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +36 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +23 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +39 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/scroll/track.mjs +67 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +31 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +23 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +65 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +25 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/find.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +41 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/number.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/test.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +31 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/dom/viewport/index.mjs +37 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +55 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +42 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +47 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +22 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/render.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +16 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/html/utils/transform.mjs +24 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +41 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/store.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +45 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +46 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +28 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/path.mjs +20 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/render.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +16 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +134 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/motion-values.mjs +37 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +8 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +25 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/setters.mjs +22 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/render/utils/variant-props.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/GlobalConfig.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/array.mjs +13 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/clamp.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/delay.mjs +22 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/distance.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/errors.mjs +19 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +39 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/interpolate.mjs +49 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/is-browser.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/is-numerical-string.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/memo.mjs +11 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/color.mjs +44 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/complex.mjs +84 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/immediate.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/index.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/number.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/mix/visibility.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/noop.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/offsets/default.mjs +9 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/offsets/time.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/pipe.mjs +5 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/progress.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/resolve-value.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/subscription-manager.mjs +32 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/time-conversion.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/transform.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/velocity-per-second.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/warn-once.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/utils/wrap.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/index.mjs +282 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/color/hex.mjs +37 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/color/hsla.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/color/index.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/color/rgba.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/color/utils.mjs +21 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/complex/filter.mjs +27 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/complex/index.mjs +84 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/numbers/index.mjs +19 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/numbers/units.mjs +23 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +6 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +4 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
- package/dist/es/external/.pnpm/framer-motion@11.11.11/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +4 -0
- package/dist/es/external/.pnpm/hey-listen@1.0.8/external/hey-listen/dist/hey-listen.es.mjs +20 -0
- package/dist/es/features/events.mjs +69 -0
- package/dist/es/features/feature-manager.mjs +29 -0
- package/dist/es/features/feature.mjs +10 -0
- package/dist/es/features/gestures/base.mjs +19 -0
- package/dist/es/features/gestures/hover.mjs +42 -0
- package/dist/es/features/gestures/in-view.mjs +35 -0
- package/dist/es/features/gestures/press.mjs +37 -0
- package/dist/es/features/svg.mjs +31 -0
- package/dist/es/index.mjs +104 -0
- package/dist/es/state/event.mjs +6 -0
- package/dist/es/state/motion-state.mjs +175 -0
- package/dist/es/state/schedule.mjs +30 -0
- package/dist/es/state/style.mjs +117 -0
- package/dist/es/state/transform.mjs +68 -0
- package/dist/es/state/utils.mjs +119 -0
- package/dist/es/utils/createContext.mjs +25 -0
- package/dist/es/utils/events.mjs +8 -0
- package/dist/es/utils/motion-value.mjs +6 -0
- package/dist/es/utils/use-animation-frame.mjs +20 -0
- package/dist/es/utils/use-in-view.mjs +25 -0
- package/dist/es/value/use-combine-values.mjs +27 -0
- package/dist/es/value/use-computed.mjs +20 -0
- package/dist/es/value/use-motion-template.mjs +22 -0
- package/dist/es/value/use-scroll.mjs +56 -0
- package/dist/es/value/use-spring.mjs +59 -0
- package/dist/es/value/use-time.mjs +10 -0
- package/dist/es/value/use-transform.mjs +29 -0
- package/dist/src/animation/index.d.ts +1 -0
- package/dist/src/animation/use-animate.d.ts +8 -0
- package/dist/src/components/Motion.d.ts +3 -3
- package/dist/src/features/events.d.ts +1 -1
- package/dist/src/features/feature-manager.d.ts +9 -0
- package/dist/src/features/feature.d.ts +0 -7
- package/dist/src/features/index.d.ts +2 -1
- package/dist/src/index.d.ts +3 -0
- package/dist/src/state/motion-state.d.ts +1 -1
- package/dist/src/state/utils.d.ts +1 -1
- package/dist/src/types/state.d.ts +3 -2
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/use-dom-ref.d.ts +1 -0
- package/dist/src/utils/use-in-view.d.ts +3 -0
- package/package.json +8 -7
- package/dist/index.js +0 -4011
- package/dist/index.umd.cjs +0 -1
- package/dist/src/components/usePrimitiveElement.d.ts +0 -5
package/dist/index.js
DELETED
|
@@ -1,4011 +0,0 @@
|
|
|
1
|
-
import { inject as Zs, provide as Js, Fragment as Qs, defineComponent as Ot, Comment as ti, mergeProps as Rn, cloneVNode as ei, h as $t, mergeDefaults as ni, ref as si, useAttrs as ii, getCurrentInstance as ri, onMounted as In, onUnmounted as Dt, onUpdated as oi, openBlock as Ln, createBlock as Nn, unref as ai, withCtx as $n, renderSlot as Kn, toRefs as li, resolveDynamicComponent as ui, TransitionGroup as ci, Transition as fi, onBeforeUpdate as _n, watch as Wn, onBeforeUnmount as hi } from "vue";
|
|
2
|
-
function di(e, t) {
|
|
3
|
-
e.indexOf(t) === -1 && e.push(t);
|
|
4
|
-
}
|
|
5
|
-
function kn(e, t) {
|
|
6
|
-
const n = e.indexOf(t);
|
|
7
|
-
n > -1 && e.splice(n, 1);
|
|
8
|
-
}
|
|
9
|
-
class Gn {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.subscriptions = [];
|
|
12
|
-
}
|
|
13
|
-
add(t) {
|
|
14
|
-
return di(this.subscriptions, t), () => kn(this.subscriptions, t);
|
|
15
|
-
}
|
|
16
|
-
notify(t, n, s) {
|
|
17
|
-
const i = this.subscriptions.length;
|
|
18
|
-
if (i)
|
|
19
|
-
if (i === 1)
|
|
20
|
-
this.subscriptions[0](t, n, s);
|
|
21
|
-
else
|
|
22
|
-
for (let r = 0; r < i; r++) {
|
|
23
|
-
const o = this.subscriptions[r];
|
|
24
|
-
o && o(t, n, s);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
getSize() {
|
|
28
|
-
return this.subscriptions.length;
|
|
29
|
-
}
|
|
30
|
-
clear() {
|
|
31
|
-
this.subscriptions.length = 0;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function oe(e, t) {
|
|
35
|
-
return t ? e * (1e3 / t) : 0;
|
|
36
|
-
}
|
|
37
|
-
const We = /* @__PURE__ */ new Set();
|
|
38
|
-
function Bt(e, t, n) {
|
|
39
|
-
e || We.has(t) || (console.warn(t), We.add(t));
|
|
40
|
-
}
|
|
41
|
-
const pi = {
|
|
42
|
-
skipAnimations: !1,
|
|
43
|
-
useManualTiming: !1
|
|
44
|
-
}, K = (e) => e;
|
|
45
|
-
function mi(e) {
|
|
46
|
-
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, i = !1;
|
|
47
|
-
const r = /* @__PURE__ */ new WeakSet();
|
|
48
|
-
let o = {
|
|
49
|
-
delta: 0,
|
|
50
|
-
timestamp: 0,
|
|
51
|
-
isProcessing: !1
|
|
52
|
-
};
|
|
53
|
-
function a(u) {
|
|
54
|
-
r.has(u) && (l.schedule(u), e()), u(o);
|
|
55
|
-
}
|
|
56
|
-
const l = {
|
|
57
|
-
/**
|
|
58
|
-
* Schedule a process to run on the next frame.
|
|
59
|
-
*/
|
|
60
|
-
schedule: (u, c = !1, f = !1) => {
|
|
61
|
-
const p = f && s ? t : n;
|
|
62
|
-
return c && r.add(u), p.has(u) || p.add(u), u;
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* Cancel the provided callback from running on the next frame.
|
|
66
|
-
*/
|
|
67
|
-
cancel: (u) => {
|
|
68
|
-
n.delete(u), r.delete(u);
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
* Execute all schedule callbacks.
|
|
72
|
-
*/
|
|
73
|
-
process: (u) => {
|
|
74
|
-
if (o = u, s) {
|
|
75
|
-
i = !0;
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
s = !0, [t, n] = [n, t], n.clear(), t.forEach(a), s = !1, i && (i = !1, l.process(u));
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
return l;
|
|
82
|
-
}
|
|
83
|
-
const st = [
|
|
84
|
-
"read",
|
|
85
|
-
// Read
|
|
86
|
-
"resolveKeyframes",
|
|
87
|
-
// Write/Read/Write/Read
|
|
88
|
-
"update",
|
|
89
|
-
// Compute
|
|
90
|
-
"preRender",
|
|
91
|
-
// Compute
|
|
92
|
-
"render",
|
|
93
|
-
// Write
|
|
94
|
-
"postRender"
|
|
95
|
-
// Compute
|
|
96
|
-
], gi = 40;
|
|
97
|
-
function yi(e, t) {
|
|
98
|
-
let n = !1, s = !0;
|
|
99
|
-
const i = {
|
|
100
|
-
delta: 0,
|
|
101
|
-
timestamp: 0,
|
|
102
|
-
isProcessing: !1
|
|
103
|
-
}, r = () => n = !0, o = st.reduce((g, y) => (g[y] = mi(r), g), {}), { read: a, resolveKeyframes: l, update: u, preRender: c, render: f, postRender: h } = o, p = () => {
|
|
104
|
-
const g = performance.now();
|
|
105
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, gi), 1), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && t && (s = !1, e(p));
|
|
106
|
-
}, m = () => {
|
|
107
|
-
n = !0, s = !0, i.isProcessing || e(p);
|
|
108
|
-
};
|
|
109
|
-
return { schedule: st.reduce((g, y) => {
|
|
110
|
-
const T = o[y];
|
|
111
|
-
return g[y] = (x, w = !1, A = !1) => (n || m(), T.schedule(x, w, A)), g;
|
|
112
|
-
}, {}), cancel: (g) => {
|
|
113
|
-
for (let y = 0; y < st.length; y++)
|
|
114
|
-
o[st[y]].cancel(g);
|
|
115
|
-
}, state: i, steps: o };
|
|
116
|
-
}
|
|
117
|
-
const { schedule: M, cancel: R, state: J, steps: Ll } = yi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : K, !0);
|
|
118
|
-
let St;
|
|
119
|
-
function vi() {
|
|
120
|
-
St = void 0;
|
|
121
|
-
}
|
|
122
|
-
const N = {
|
|
123
|
-
now: () => (St === void 0 && N.set(J.isProcessing || pi.useManualTiming ? J.timestamp : performance.now()), St),
|
|
124
|
-
set: (e) => {
|
|
125
|
-
St = e, queueMicrotask(vi);
|
|
126
|
-
}
|
|
127
|
-
}, ke = 30, bi = (e) => !isNaN(parseFloat(e)), k = {
|
|
128
|
-
current: void 0
|
|
129
|
-
};
|
|
130
|
-
class Si {
|
|
131
|
-
/**
|
|
132
|
-
* @param init - The initiating value
|
|
133
|
-
* @param config - Optional configuration options
|
|
134
|
-
*
|
|
135
|
-
* - `transformer`: A function to transform incoming values with.
|
|
136
|
-
*
|
|
137
|
-
* @internal
|
|
138
|
-
*/
|
|
139
|
-
constructor(t, n = {}) {
|
|
140
|
-
this.version = "11.11.11", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
141
|
-
const r = N.now();
|
|
142
|
-
this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
143
|
-
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
144
|
-
}
|
|
145
|
-
setCurrent(t) {
|
|
146
|
-
this.current = t, this.updatedAt = N.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = bi(this.current));
|
|
147
|
-
}
|
|
148
|
-
setPrevFrameValue(t = this.current) {
|
|
149
|
-
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
153
|
-
*
|
|
154
|
-
* It returns a function that, when called, will cancel the subscription.
|
|
155
|
-
*
|
|
156
|
-
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
157
|
-
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
158
|
-
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
159
|
-
*
|
|
160
|
-
* ```jsx
|
|
161
|
-
* export const MyComponent = () => {
|
|
162
|
-
* const x = useMotionValue(0)
|
|
163
|
-
* const y = useMotionValue(0)
|
|
164
|
-
* const opacity = useMotionValue(1)
|
|
165
|
-
*
|
|
166
|
-
* useEffect(() => {
|
|
167
|
-
* function updateOpacity() {
|
|
168
|
-
* const maxXY = Math.max(x.get(), y.get())
|
|
169
|
-
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
170
|
-
* opacity.set(newOpacity)
|
|
171
|
-
* }
|
|
172
|
-
*
|
|
173
|
-
* const unsubscribeX = x.on("change", updateOpacity)
|
|
174
|
-
* const unsubscribeY = y.on("change", updateOpacity)
|
|
175
|
-
*
|
|
176
|
-
* return () => {
|
|
177
|
-
* unsubscribeX()
|
|
178
|
-
* unsubscribeY()
|
|
179
|
-
* }
|
|
180
|
-
* }, [])
|
|
181
|
-
*
|
|
182
|
-
* return <motion.div style={{ x }} />
|
|
183
|
-
* }
|
|
184
|
-
* ```
|
|
185
|
-
*
|
|
186
|
-
* @param subscriber - A function that receives the latest value.
|
|
187
|
-
* @returns A function that, when called, will cancel this subscription.
|
|
188
|
-
*
|
|
189
|
-
* @deprecated
|
|
190
|
-
*/
|
|
191
|
-
onChange(t) {
|
|
192
|
-
return process.env.NODE_ENV !== "production" && Bt(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
193
|
-
}
|
|
194
|
-
on(t, n) {
|
|
195
|
-
this.events[t] || (this.events[t] = new Gn());
|
|
196
|
-
const s = this.events[t].add(n);
|
|
197
|
-
return t === "change" ? () => {
|
|
198
|
-
s(), M.read(() => {
|
|
199
|
-
this.events.change.getSize() || this.stop();
|
|
200
|
-
});
|
|
201
|
-
} : s;
|
|
202
|
-
}
|
|
203
|
-
clearListeners() {
|
|
204
|
-
for (const t in this.events)
|
|
205
|
-
this.events[t].clear();
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Attaches a passive effect to the `MotionValue`.
|
|
209
|
-
*
|
|
210
|
-
* @internal
|
|
211
|
-
*/
|
|
212
|
-
attach(t, n) {
|
|
213
|
-
this.passiveEffect = t, this.stopPassiveEffect = n;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Sets the state of the `MotionValue`.
|
|
217
|
-
*
|
|
218
|
-
* @remarks
|
|
219
|
-
*
|
|
220
|
-
* ```jsx
|
|
221
|
-
* const x = useMotionValue(0)
|
|
222
|
-
* x.set(10)
|
|
223
|
-
* ```
|
|
224
|
-
*
|
|
225
|
-
* @param latest - Latest value to set.
|
|
226
|
-
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
227
|
-
*
|
|
228
|
-
* @public
|
|
229
|
-
*/
|
|
230
|
-
set(t, n = !0) {
|
|
231
|
-
!n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify);
|
|
232
|
-
}
|
|
233
|
-
setWithVelocity(t, n, s) {
|
|
234
|
-
this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Set the state of the `MotionValue`, stopping any active animations,
|
|
238
|
-
* effects, and resets velocity to `0`.
|
|
239
|
-
*/
|
|
240
|
-
jump(t, n = !0) {
|
|
241
|
-
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Returns the latest state of `MotionValue`
|
|
245
|
-
*
|
|
246
|
-
* @returns - The latest state of `MotionValue`
|
|
247
|
-
*
|
|
248
|
-
* @public
|
|
249
|
-
*/
|
|
250
|
-
get() {
|
|
251
|
-
return k.current && k.current.push(this), this.current;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* @public
|
|
255
|
-
*/
|
|
256
|
-
getPrevious() {
|
|
257
|
-
return this.prev;
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Returns the latest velocity of `MotionValue`
|
|
261
|
-
*
|
|
262
|
-
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
263
|
-
*
|
|
264
|
-
* @public
|
|
265
|
-
*/
|
|
266
|
-
getVelocity() {
|
|
267
|
-
const t = N.now();
|
|
268
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > ke)
|
|
269
|
-
return 0;
|
|
270
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ke);
|
|
271
|
-
return oe(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Registers a new animation to control this `MotionValue`. Only one
|
|
275
|
-
* animation can drive a `MotionValue` at one time.
|
|
276
|
-
*
|
|
277
|
-
* ```jsx
|
|
278
|
-
* value.start()
|
|
279
|
-
* ```
|
|
280
|
-
*
|
|
281
|
-
* @param animation - A function that starts the provided animation
|
|
282
|
-
*
|
|
283
|
-
* @internal
|
|
284
|
-
*/
|
|
285
|
-
start(t) {
|
|
286
|
-
return this.stop(), new Promise((n) => {
|
|
287
|
-
this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
|
|
288
|
-
}).then(() => {
|
|
289
|
-
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Stop the currently active animation.
|
|
294
|
-
*
|
|
295
|
-
* @public
|
|
296
|
-
*/
|
|
297
|
-
stop() {
|
|
298
|
-
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Returns `true` if this value is currently animating.
|
|
302
|
-
*
|
|
303
|
-
* @public
|
|
304
|
-
*/
|
|
305
|
-
isAnimating() {
|
|
306
|
-
return !!this.animation;
|
|
307
|
-
}
|
|
308
|
-
clearAnimation() {
|
|
309
|
-
delete this.animation;
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Destroy and clean up subscribers to this `MotionValue`.
|
|
313
|
-
*
|
|
314
|
-
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
315
|
-
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
316
|
-
* created a `MotionValue` via the `motionValue` function.
|
|
317
|
-
*
|
|
318
|
-
* @public
|
|
319
|
-
*/
|
|
320
|
-
destroy() {
|
|
321
|
-
this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
function D(e, t) {
|
|
325
|
-
return new Si(e, t);
|
|
326
|
-
}
|
|
327
|
-
function Rt(e) {
|
|
328
|
-
let t;
|
|
329
|
-
return () => (t === void 0 && (t = e()), t);
|
|
330
|
-
}
|
|
331
|
-
const zn = Rt(() => window.ScrollTimeline !== void 0);
|
|
332
|
-
class ae {
|
|
333
|
-
constructor(t) {
|
|
334
|
-
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
|
|
335
|
-
}
|
|
336
|
-
then(t, n) {
|
|
337
|
-
return Promise.all(this.animations).then(t).catch(n);
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* TODO: Filter out cancelled or stopped animations before returning
|
|
341
|
-
*/
|
|
342
|
-
getAll(t) {
|
|
343
|
-
return this.animations[0][t];
|
|
344
|
-
}
|
|
345
|
-
setAll(t, n) {
|
|
346
|
-
for (let s = 0; s < this.animations.length; s++)
|
|
347
|
-
this.animations[s][t] = n;
|
|
348
|
-
}
|
|
349
|
-
attachTimeline(t, n) {
|
|
350
|
-
const s = this.animations.map((i) => zn() && i.attachTimeline ? i.attachTimeline(t) : n(i));
|
|
351
|
-
return () => {
|
|
352
|
-
s.forEach((i, r) => {
|
|
353
|
-
i && i(), this.animations[r].stop();
|
|
354
|
-
});
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
get time() {
|
|
358
|
-
return this.getAll("time");
|
|
359
|
-
}
|
|
360
|
-
set time(t) {
|
|
361
|
-
this.setAll("time", t);
|
|
362
|
-
}
|
|
363
|
-
get speed() {
|
|
364
|
-
return this.getAll("speed");
|
|
365
|
-
}
|
|
366
|
-
set speed(t) {
|
|
367
|
-
this.setAll("speed", t);
|
|
368
|
-
}
|
|
369
|
-
get startTime() {
|
|
370
|
-
return this.getAll("startTime");
|
|
371
|
-
}
|
|
372
|
-
get duration() {
|
|
373
|
-
let t = 0;
|
|
374
|
-
for (let n = 0; n < this.animations.length; n++)
|
|
375
|
-
t = Math.max(t, this.animations[n].duration);
|
|
376
|
-
return t;
|
|
377
|
-
}
|
|
378
|
-
runAll(t) {
|
|
379
|
-
this.animations.forEach((n) => n[t]());
|
|
380
|
-
}
|
|
381
|
-
play() {
|
|
382
|
-
this.runAll("play");
|
|
383
|
-
}
|
|
384
|
-
pause() {
|
|
385
|
-
this.runAll("pause");
|
|
386
|
-
}
|
|
387
|
-
cancel() {
|
|
388
|
-
this.runAll("cancel");
|
|
389
|
-
}
|
|
390
|
-
complete() {
|
|
391
|
-
this.runAll("complete");
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
const C = (e) => e * 1e3, B = (e) => e / 1e3, wi = 5;
|
|
395
|
-
function Un(e, t, n) {
|
|
396
|
-
const s = Math.max(t - wi, 0);
|
|
397
|
-
return oe(n - e(s), t - s);
|
|
398
|
-
}
|
|
399
|
-
let ft = K, I = K;
|
|
400
|
-
process.env.NODE_ENV !== "production" && (ft = (e, t) => {
|
|
401
|
-
!e && typeof console < "u" && console.warn(t);
|
|
402
|
-
}, I = (e, t) => {
|
|
403
|
-
if (!e)
|
|
404
|
-
throw new Error(t);
|
|
405
|
-
});
|
|
406
|
-
const H = (e, t, n) => n > t ? t : n < e ? e : n, Kt = 1e-3, Ti = 0.01, Ge = 10, xi = 0.05, Vi = 1;
|
|
407
|
-
function Ai({ duration: e = 800, bounce: t = 0.25, velocity: n = 0, mass: s = 1 }) {
|
|
408
|
-
let i, r;
|
|
409
|
-
ft(e <= C(Ge), "Spring duration must be 10 seconds or less");
|
|
410
|
-
let o = 1 - t;
|
|
411
|
-
o = H(xi, Vi, o), e = H(Ti, Ge, B(e)), o < 1 ? (i = (u) => {
|
|
412
|
-
const c = u * o, f = c * e, h = c - n, p = Ht(u, o), m = Math.exp(-f);
|
|
413
|
-
return Kt - h / p * m;
|
|
414
|
-
}, r = (u) => {
|
|
415
|
-
const f = u * o * e, h = f * n + n, p = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-f), S = Ht(Math.pow(u, 2), o);
|
|
416
|
-
return (-i(u) + Kt > 0 ? -1 : 1) * ((h - p) * m) / S;
|
|
417
|
-
}) : (i = (u) => {
|
|
418
|
-
const c = Math.exp(-u * e), f = (u - n) * e + 1;
|
|
419
|
-
return -Kt + c * f;
|
|
420
|
-
}, r = (u) => {
|
|
421
|
-
const c = Math.exp(-u * e), f = (n - u) * (e * e);
|
|
422
|
-
return c * f;
|
|
423
|
-
});
|
|
424
|
-
const a = 5 / e, l = Ei(i, r, a);
|
|
425
|
-
if (e = C(e), isNaN(l))
|
|
426
|
-
return {
|
|
427
|
-
stiffness: 100,
|
|
428
|
-
damping: 10,
|
|
429
|
-
duration: e
|
|
430
|
-
};
|
|
431
|
-
{
|
|
432
|
-
const u = Math.pow(l, 2) * s;
|
|
433
|
-
return {
|
|
434
|
-
stiffness: u,
|
|
435
|
-
damping: o * 2 * Math.sqrt(s * u),
|
|
436
|
-
duration: e
|
|
437
|
-
};
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
const Mi = 12;
|
|
441
|
-
function Ei(e, t, n) {
|
|
442
|
-
let s = n;
|
|
443
|
-
for (let i = 1; i < Mi; i++)
|
|
444
|
-
s = s - e(s) / t(s);
|
|
445
|
-
return s;
|
|
446
|
-
}
|
|
447
|
-
function Ht(e, t) {
|
|
448
|
-
return e * Math.sqrt(1 - t * t);
|
|
449
|
-
}
|
|
450
|
-
const Pi = ["duration", "bounce"], Ci = ["stiffness", "damping", "mass"];
|
|
451
|
-
function ze(e, t) {
|
|
452
|
-
return t.some((n) => e[n] !== void 0);
|
|
453
|
-
}
|
|
454
|
-
function Fi(e) {
|
|
455
|
-
let t = {
|
|
456
|
-
velocity: 0,
|
|
457
|
-
stiffness: 100,
|
|
458
|
-
damping: 10,
|
|
459
|
-
mass: 1,
|
|
460
|
-
isResolvedFromDuration: !1,
|
|
461
|
-
...e
|
|
462
|
-
};
|
|
463
|
-
if (!ze(e, Ci) && ze(e, Pi)) {
|
|
464
|
-
const n = Ai(e);
|
|
465
|
-
t = {
|
|
466
|
-
...t,
|
|
467
|
-
...n,
|
|
468
|
-
mass: 1
|
|
469
|
-
}, t.isResolvedFromDuration = !0;
|
|
470
|
-
}
|
|
471
|
-
return t;
|
|
472
|
-
}
|
|
473
|
-
function le({ keyframes: e, restDelta: t, restSpeed: n, ...s }) {
|
|
474
|
-
const i = e[0], r = e[e.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: f, isResolvedFromDuration: h } = Fi({
|
|
475
|
-
...s,
|
|
476
|
-
velocity: -B(s.velocity || 0)
|
|
477
|
-
}), p = f || 0, m = l / (2 * Math.sqrt(a * u)), S = r - i, b = B(Math.sqrt(a / u)), g = Math.abs(S) < 5;
|
|
478
|
-
n || (n = g ? 0.01 : 2), t || (t = g ? 5e-3 : 0.5);
|
|
479
|
-
let y;
|
|
480
|
-
if (m < 1) {
|
|
481
|
-
const T = Ht(b, m);
|
|
482
|
-
y = (x) => {
|
|
483
|
-
const w = Math.exp(-m * b * x);
|
|
484
|
-
return r - w * ((p + m * b * S) / T * Math.sin(T * x) + S * Math.cos(T * x));
|
|
485
|
-
};
|
|
486
|
-
} else if (m === 1)
|
|
487
|
-
y = (T) => r - Math.exp(-b * T) * (S + (p + b * S) * T);
|
|
488
|
-
else {
|
|
489
|
-
const T = b * Math.sqrt(m * m - 1);
|
|
490
|
-
y = (x) => {
|
|
491
|
-
const w = Math.exp(-m * b * x), A = Math.min(T * x, 300);
|
|
492
|
-
return r - w * ((p + m * b * S) * Math.sinh(A) + T * S * Math.cosh(A)) / T;
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
|
-
return {
|
|
496
|
-
calculatedDuration: h && c || null,
|
|
497
|
-
next: (T) => {
|
|
498
|
-
const x = y(T);
|
|
499
|
-
if (h)
|
|
500
|
-
o.done = T >= c;
|
|
501
|
-
else {
|
|
502
|
-
let w = 0;
|
|
503
|
-
m < 1 && (w = T === 0 ? C(p) : Un(y, T, x));
|
|
504
|
-
const A = Math.abs(w) <= n, F = Math.abs(r - x) <= t;
|
|
505
|
-
o.done = A && F;
|
|
506
|
-
}
|
|
507
|
-
return o.value = o.done ? r : x, o;
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
const Yt = 2e4;
|
|
512
|
-
function jn(e) {
|
|
513
|
-
let t = 0;
|
|
514
|
-
const n = 50;
|
|
515
|
-
let s = e.next(t);
|
|
516
|
-
for (; !s.done && t < Yt; )
|
|
517
|
-
t += n, s = e.next(t);
|
|
518
|
-
return t >= Yt ? 1 / 0 : t;
|
|
519
|
-
}
|
|
520
|
-
function Hn(e, t = 100, n) {
|
|
521
|
-
const s = n({ ...e, keyframes: [0, t] }), i = Math.min(jn(s), Yt);
|
|
522
|
-
return {
|
|
523
|
-
type: "keyframes",
|
|
524
|
-
ease: (r) => s.next(i * r).value / t,
|
|
525
|
-
duration: B(i)
|
|
526
|
-
};
|
|
527
|
-
}
|
|
528
|
-
const ht = (e, t, n) => e + (t - e) * n, dt = (e, t, n) => {
|
|
529
|
-
const s = t - e;
|
|
530
|
-
return s === 0 ? 1 : (n - e) / s;
|
|
531
|
-
};
|
|
532
|
-
function Yn(e, t) {
|
|
533
|
-
const n = e[e.length - 1];
|
|
534
|
-
for (let s = 1; s <= t; s++) {
|
|
535
|
-
const i = dt(0, t, s);
|
|
536
|
-
e.push(ht(n, 1, i));
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
function ue(e) {
|
|
540
|
-
const t = [0];
|
|
541
|
-
return Yn(t, e.length - 1), t;
|
|
542
|
-
}
|
|
543
|
-
const P = (e) => !!(e && e.getVelocity);
|
|
544
|
-
function It(e, t, n) {
|
|
545
|
-
var s;
|
|
546
|
-
if (typeof e == "string") {
|
|
547
|
-
let i = document;
|
|
548
|
-
t && (I(!!t.current, "Scope provided, but no element detected."), i = t.current), n ? ((s = n[e]) !== null && s !== void 0 || (n[e] = i.querySelectorAll(e)), e = n[e]) : e = i.querySelectorAll(e);
|
|
549
|
-
} else e instanceof Element && (e = [e]);
|
|
550
|
-
return Array.from(e || []);
|
|
551
|
-
}
|
|
552
|
-
function ce(e) {
|
|
553
|
-
return typeof e == "object" && !Array.isArray(e);
|
|
554
|
-
}
|
|
555
|
-
function Xn(e, t, n, s) {
|
|
556
|
-
return typeof e == "string" && ce(t) ? It(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
|
|
557
|
-
}
|
|
558
|
-
function pt(e) {
|
|
559
|
-
return typeof e == "function";
|
|
560
|
-
}
|
|
561
|
-
function Ue(e, t, n, s) {
|
|
562
|
-
var i;
|
|
563
|
-
return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : (i = s.get(t)) !== null && i !== void 0 ? i : e;
|
|
564
|
-
}
|
|
565
|
-
const Oi = (e, t, n) => {
|
|
566
|
-
const s = t - e;
|
|
567
|
-
return ((n - e) % s + s) % s + e;
|
|
568
|
-
}, qn = (e) => Array.isArray(e) && typeof e[0] != "number";
|
|
569
|
-
function Di(e, t) {
|
|
570
|
-
return qn(e) ? e[Oi(0, e.length, t)] : e;
|
|
571
|
-
}
|
|
572
|
-
function Bi(e, t, n) {
|
|
573
|
-
for (let s = 0; s < e.length; s++) {
|
|
574
|
-
const i = e[s];
|
|
575
|
-
i.at > t && i.at < n && (kn(e, i), s--);
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
function Ri(e, t, n, s, i, r) {
|
|
579
|
-
Bi(e, i, r);
|
|
580
|
-
for (let o = 0; o < t.length; o++)
|
|
581
|
-
e.push({
|
|
582
|
-
value: t[o],
|
|
583
|
-
at: ht(i, r, s[o]),
|
|
584
|
-
easing: Di(n, o)
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
function Ii(e, t) {
|
|
588
|
-
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
|
|
589
|
-
}
|
|
590
|
-
const Li = "easeInOut";
|
|
591
|
-
function Ni(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
|
|
592
|
-
const r = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, u = /* @__PURE__ */ new Map();
|
|
593
|
-
let c = 0, f = 0, h = 0;
|
|
594
|
-
for (let p = 0; p < e.length; p++) {
|
|
595
|
-
const m = e[p];
|
|
596
|
-
if (typeof m == "string") {
|
|
597
|
-
u.set(m, f);
|
|
598
|
-
continue;
|
|
599
|
-
} else if (!Array.isArray(m)) {
|
|
600
|
-
u.set(m.name, Ue(f, m.at, c, u));
|
|
601
|
-
continue;
|
|
602
|
-
}
|
|
603
|
-
let [S, b, g = {}] = m;
|
|
604
|
-
g.at !== void 0 && (f = Ue(f, g.at, c, u));
|
|
605
|
-
let y = 0;
|
|
606
|
-
const T = (x, w, A, F = 0, v = 0) => {
|
|
607
|
-
const V = $i(x), { delay: O = 0, times: z = ue(V), type: Nt = "keyframes", ...Xs } = w;
|
|
608
|
-
let { ease: Oe = t.ease || "easeOut", duration: L } = w;
|
|
609
|
-
const De = typeof O == "function" ? O(F, v) : O, Be = V.length, Re = pt(Nt) ? Nt : i == null ? void 0 : i[Nt];
|
|
610
|
-
if (Be <= 2 && Re) {
|
|
611
|
-
let $e = 100;
|
|
612
|
-
if (Be === 2 && Wi(V)) {
|
|
613
|
-
const qs = V[1] - V[0];
|
|
614
|
-
$e = Math.abs(qs);
|
|
615
|
-
}
|
|
616
|
-
const Ke = { ...Xs };
|
|
617
|
-
L !== void 0 && (Ke.duration = C(L));
|
|
618
|
-
const _e = Hn(Ke, $e, Re);
|
|
619
|
-
Oe = _e.ease, L = _e.duration;
|
|
620
|
-
}
|
|
621
|
-
L ?? (L = r);
|
|
622
|
-
const Ie = f + De, Le = Ie + L;
|
|
623
|
-
z.length === 1 && z[0] === 0 && (z[1] = 1);
|
|
624
|
-
const Ne = z.length - V.length;
|
|
625
|
-
Ne > 0 && Yn(z, Ne), V.length === 1 && V.unshift(null), Ri(A, V, Oe, z, Ie, Le), y = Math.max(De + L, y), h = Math.max(Le, h);
|
|
626
|
-
};
|
|
627
|
-
if (P(S)) {
|
|
628
|
-
const x = je(S, a);
|
|
629
|
-
T(b, g, He("default", x));
|
|
630
|
-
} else {
|
|
631
|
-
const x = Xn(S, b, s, l), w = x.length;
|
|
632
|
-
for (let A = 0; A < w; A++) {
|
|
633
|
-
b = b, g = g;
|
|
634
|
-
const F = x[A], v = je(F, a);
|
|
635
|
-
for (const V in b)
|
|
636
|
-
T(b[V], Ki(g, V), He(V, v), A, w);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
c = f, f += y;
|
|
640
|
-
}
|
|
641
|
-
return a.forEach((p, m) => {
|
|
642
|
-
for (const S in p) {
|
|
643
|
-
const b = p[S];
|
|
644
|
-
b.sort(Ii);
|
|
645
|
-
const g = [], y = [], T = [];
|
|
646
|
-
for (let w = 0; w < b.length; w++) {
|
|
647
|
-
const { at: A, value: F, easing: v } = b[w];
|
|
648
|
-
g.push(F), y.push(dt(0, h, A)), T.push(v || "easeOut");
|
|
649
|
-
}
|
|
650
|
-
y[0] !== 0 && (y.unshift(0), g.unshift(g[0]), T.unshift(Li)), y[y.length - 1] !== 1 && (y.push(1), g.push(null)), o.has(m) || o.set(m, {
|
|
651
|
-
keyframes: {},
|
|
652
|
-
transition: {}
|
|
653
|
-
});
|
|
654
|
-
const x = o.get(m);
|
|
655
|
-
x.keyframes[S] = g, x.transition[S] = {
|
|
656
|
-
...t,
|
|
657
|
-
duration: h,
|
|
658
|
-
ease: T,
|
|
659
|
-
times: y,
|
|
660
|
-
...n
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
}), o;
|
|
664
|
-
}
|
|
665
|
-
function je(e, t) {
|
|
666
|
-
return !t.has(e) && t.set(e, {}), t.get(e);
|
|
667
|
-
}
|
|
668
|
-
function He(e, t) {
|
|
669
|
-
return t[e] || (t[e] = []), t[e];
|
|
670
|
-
}
|
|
671
|
-
function $i(e) {
|
|
672
|
-
return Array.isArray(e) ? e : [e];
|
|
673
|
-
}
|
|
674
|
-
function Ki(e, t) {
|
|
675
|
-
return e && e[t] ? {
|
|
676
|
-
...e,
|
|
677
|
-
...e[t]
|
|
678
|
-
} : { ...e };
|
|
679
|
-
}
|
|
680
|
-
const _i = (e) => typeof e == "number", Wi = (e) => e.every(_i), $ = /* @__PURE__ */ new WeakMap(), mt = [
|
|
681
|
-
"transformPerspective",
|
|
682
|
-
"x",
|
|
683
|
-
"y",
|
|
684
|
-
"z",
|
|
685
|
-
"translateX",
|
|
686
|
-
"translateY",
|
|
687
|
-
"translateZ",
|
|
688
|
-
"scale",
|
|
689
|
-
"scaleX",
|
|
690
|
-
"scaleY",
|
|
691
|
-
"rotate",
|
|
692
|
-
"rotateX",
|
|
693
|
-
"rotateY",
|
|
694
|
-
"rotateZ",
|
|
695
|
-
"skew",
|
|
696
|
-
"skewX",
|
|
697
|
-
"skewY"
|
|
698
|
-
], X = new Set(mt), ki = {
|
|
699
|
-
type: "spring",
|
|
700
|
-
stiffness: 500,
|
|
701
|
-
damping: 25,
|
|
702
|
-
restSpeed: 10
|
|
703
|
-
}, Gi = (e) => ({
|
|
704
|
-
type: "spring",
|
|
705
|
-
stiffness: 550,
|
|
706
|
-
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
707
|
-
restSpeed: 10
|
|
708
|
-
}), zi = {
|
|
709
|
-
type: "keyframes",
|
|
710
|
-
duration: 0.8
|
|
711
|
-
}, Ui = {
|
|
712
|
-
type: "keyframes",
|
|
713
|
-
ease: [0.25, 0.1, 0.35, 1],
|
|
714
|
-
duration: 0.3
|
|
715
|
-
}, ji = (e, { keyframes: t }) => t.length > 2 ? zi : X.has(e) ? e.startsWith("scale") ? Gi(t[1]) : ki : Ui;
|
|
716
|
-
function fe(e, t) {
|
|
717
|
-
return e ? e[t] || e.default || e : void 0;
|
|
718
|
-
}
|
|
719
|
-
const Hi = (e) => e !== null;
|
|
720
|
-
function gt(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
721
|
-
const i = e.filter(Hi), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
722
|
-
return !r || s === void 0 ? i[r] : s;
|
|
723
|
-
}
|
|
724
|
-
const Zn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Yi = 1e-7, Xi = 12;
|
|
725
|
-
function qi(e, t, n, s, i) {
|
|
726
|
-
let r, o, a = 0;
|
|
727
|
-
do
|
|
728
|
-
o = t + (n - t) / 2, r = Zn(o, s, i) - e, r > 0 ? n = o : t = o;
|
|
729
|
-
while (Math.abs(r) > Yi && ++a < Xi);
|
|
730
|
-
return o;
|
|
731
|
-
}
|
|
732
|
-
function yt(e, t, n, s) {
|
|
733
|
-
if (e === t && n === s)
|
|
734
|
-
return K;
|
|
735
|
-
const i = (r) => qi(r, 0, 1, e, n);
|
|
736
|
-
return (r) => r === 0 || r === 1 ? r : Zn(i(r), t, s);
|
|
737
|
-
}
|
|
738
|
-
const Jn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Qn = (e) => (t) => 1 - e(1 - t), ts = /* @__PURE__ */ yt(0.33, 1.53, 0.69, 0.99), he = /* @__PURE__ */ Qn(ts), es = /* @__PURE__ */ Jn(he), ns = (e) => (e *= 2) < 1 ? 0.5 * he(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), de = (e) => 1 - Math.sin(Math.acos(e)), Zi = Qn(de), ss = Jn(de), is = (e) => /^0[^.\s]+$/u.test(e);
|
|
739
|
-
function Ji(e) {
|
|
740
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || is(e) : !0;
|
|
741
|
-
}
|
|
742
|
-
const rs = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), os = (e) => (t) => typeof t == "string" && t.startsWith(e), as = /* @__PURE__ */ os("--"), Qi = /* @__PURE__ */ os("var(--"), pe = (e) => Qi(e) ? tr.test(e.split("/*")[0].trim()) : !1, tr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, er = (
|
|
743
|
-
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
744
|
-
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
745
|
-
);
|
|
746
|
-
function nr(e) {
|
|
747
|
-
const t = er.exec(e);
|
|
748
|
-
if (!t)
|
|
749
|
-
return [,];
|
|
750
|
-
const [, n, s, i] = t;
|
|
751
|
-
return [`--${n ?? s}`, i];
|
|
752
|
-
}
|
|
753
|
-
const sr = 4;
|
|
754
|
-
function ls(e, t, n = 1) {
|
|
755
|
-
I(n <= sr, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
756
|
-
const [s, i] = nr(e);
|
|
757
|
-
if (!s)
|
|
758
|
-
return;
|
|
759
|
-
const r = window.getComputedStyle(t).getPropertyValue(s);
|
|
760
|
-
if (r) {
|
|
761
|
-
const o = r.trim();
|
|
762
|
-
return rs(o) ? parseFloat(o) : o;
|
|
763
|
-
}
|
|
764
|
-
return pe(i) ? ls(i, t, n + 1) : i;
|
|
765
|
-
}
|
|
766
|
-
const tt = {
|
|
767
|
-
test: (e) => typeof e == "number",
|
|
768
|
-
parse: parseFloat,
|
|
769
|
-
transform: (e) => e
|
|
770
|
-
}, at = {
|
|
771
|
-
...tt,
|
|
772
|
-
transform: (e) => H(0, 1, e)
|
|
773
|
-
}, bt = {
|
|
774
|
-
...tt,
|
|
775
|
-
default: 1
|
|
776
|
-
}, vt = (e) => ({
|
|
777
|
-
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
778
|
-
parse: parseFloat,
|
|
779
|
-
transform: (t) => `${t}${e}`
|
|
780
|
-
}), _ = /* @__PURE__ */ vt("deg"), Z = /* @__PURE__ */ vt("%"), d = /* @__PURE__ */ vt("px"), ir = /* @__PURE__ */ vt("vh"), rr = /* @__PURE__ */ vt("vw"), Ye = {
|
|
781
|
-
...Z,
|
|
782
|
-
parse: (e) => Z.parse(e) / 100,
|
|
783
|
-
transform: (e) => Z.transform(e * 100)
|
|
784
|
-
}, or = /* @__PURE__ */ new Set([
|
|
785
|
-
"width",
|
|
786
|
-
"height",
|
|
787
|
-
"top",
|
|
788
|
-
"left",
|
|
789
|
-
"right",
|
|
790
|
-
"bottom",
|
|
791
|
-
"x",
|
|
792
|
-
"y",
|
|
793
|
-
"translateX",
|
|
794
|
-
"translateY"
|
|
795
|
-
]), Xe = (e) => e === tt || e === d, qe = (e, t) => parseFloat(e.split(", ")[t]), Ze = (e, t) => (n, { transform: s }) => {
|
|
796
|
-
if (s === "none" || !s)
|
|
797
|
-
return 0;
|
|
798
|
-
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
799
|
-
if (i)
|
|
800
|
-
return qe(i[1], t);
|
|
801
|
-
{
|
|
802
|
-
const r = s.match(/^matrix\((.+)\)$/u);
|
|
803
|
-
return r ? qe(r[1], e) : 0;
|
|
804
|
-
}
|
|
805
|
-
}, ar = /* @__PURE__ */ new Set(["x", "y", "z"]), lr = mt.filter((e) => !ar.has(e));
|
|
806
|
-
function ur(e) {
|
|
807
|
-
const t = [];
|
|
808
|
-
return lr.forEach((n) => {
|
|
809
|
-
const s = e.getValue(n);
|
|
810
|
-
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
811
|
-
}), t;
|
|
812
|
-
}
|
|
813
|
-
const Q = {
|
|
814
|
-
// Dimensions
|
|
815
|
-
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
816
|
-
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
817
|
-
top: (e, { top: t }) => parseFloat(t),
|
|
818
|
-
left: (e, { left: t }) => parseFloat(t),
|
|
819
|
-
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
820
|
-
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
821
|
-
// Transform
|
|
822
|
-
x: Ze(4, 13),
|
|
823
|
-
y: Ze(5, 14)
|
|
824
|
-
};
|
|
825
|
-
Q.translateX = Q.x;
|
|
826
|
-
Q.translateY = Q.y;
|
|
827
|
-
const us = (e) => (t) => t.test(e), cr = {
|
|
828
|
-
test: (e) => e === "auto",
|
|
829
|
-
parse: (e) => e
|
|
830
|
-
}, cs = [tt, d, Z, _, rr, ir, cr], Je = (e) => cs.find(us(e)), j = /* @__PURE__ */ new Set();
|
|
831
|
-
let Xt = !1, qt = !1;
|
|
832
|
-
function fs() {
|
|
833
|
-
if (qt) {
|
|
834
|
-
const e = Array.from(j).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
835
|
-
t.forEach((s) => {
|
|
836
|
-
const i = ur(s);
|
|
837
|
-
i.length && (n.set(s, i), s.render());
|
|
838
|
-
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
839
|
-
s.render();
|
|
840
|
-
const i = n.get(s);
|
|
841
|
-
i && i.forEach(([r, o]) => {
|
|
842
|
-
var a;
|
|
843
|
-
(a = s.getValue(r)) === null || a === void 0 || a.set(o);
|
|
844
|
-
});
|
|
845
|
-
}), e.forEach((s) => s.measureEndState()), e.forEach((s) => {
|
|
846
|
-
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
847
|
-
});
|
|
848
|
-
}
|
|
849
|
-
qt = !1, Xt = !1, j.forEach((e) => e.complete()), j.clear();
|
|
850
|
-
}
|
|
851
|
-
function hs() {
|
|
852
|
-
j.forEach((e) => {
|
|
853
|
-
e.readKeyframes(), e.needsMeasurement && (qt = !0);
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
function fr() {
|
|
857
|
-
hs(), fs();
|
|
858
|
-
}
|
|
859
|
-
class me {
|
|
860
|
-
constructor(t, n, s, i, r, o = !1) {
|
|
861
|
-
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
862
|
-
}
|
|
863
|
-
scheduleResolve() {
|
|
864
|
-
this.isScheduled = !0, this.isAsync ? (j.add(this), Xt || (Xt = !0, M.read(hs), M.resolveKeyframes(fs))) : (this.readKeyframes(), this.complete());
|
|
865
|
-
}
|
|
866
|
-
readKeyframes() {
|
|
867
|
-
const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
|
|
868
|
-
for (let r = 0; r < t.length; r++)
|
|
869
|
-
if (t[r] === null)
|
|
870
|
-
if (r === 0) {
|
|
871
|
-
const o = i == null ? void 0 : i.get(), a = t[t.length - 1];
|
|
872
|
-
if (o !== void 0)
|
|
873
|
-
t[0] = o;
|
|
874
|
-
else if (s && n) {
|
|
875
|
-
const l = s.readValue(n, a);
|
|
876
|
-
l != null && (t[0] = l);
|
|
877
|
-
}
|
|
878
|
-
t[0] === void 0 && (t[0] = a), i && o === void 0 && i.set(t[0]);
|
|
879
|
-
} else
|
|
880
|
-
t[r] = t[r - 1];
|
|
881
|
-
}
|
|
882
|
-
setFinalKeyframe() {
|
|
883
|
-
}
|
|
884
|
-
measureInitialState() {
|
|
885
|
-
}
|
|
886
|
-
renderEndStyles() {
|
|
887
|
-
}
|
|
888
|
-
measureEndState() {
|
|
889
|
-
}
|
|
890
|
-
complete() {
|
|
891
|
-
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), j.delete(this);
|
|
892
|
-
}
|
|
893
|
-
cancel() {
|
|
894
|
-
this.isComplete || (this.isScheduled = !1, j.delete(this));
|
|
895
|
-
}
|
|
896
|
-
resume() {
|
|
897
|
-
this.isComplete || this.scheduleResolve();
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
const rt = (e) => Math.round(e * 1e5) / 1e5, ge = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
901
|
-
function hr(e) {
|
|
902
|
-
return e == null;
|
|
903
|
-
}
|
|
904
|
-
const dr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, ye = (e, t) => (n) => !!(typeof n == "string" && dr.test(n) && n.startsWith(e) || t && !hr(n) && Object.prototype.hasOwnProperty.call(n, t)), ds = (e, t, n) => (s) => {
|
|
905
|
-
if (typeof s != "string")
|
|
906
|
-
return s;
|
|
907
|
-
const [i, r, o, a] = s.match(ge);
|
|
908
|
-
return {
|
|
909
|
-
[e]: parseFloat(i),
|
|
910
|
-
[t]: parseFloat(r),
|
|
911
|
-
[n]: parseFloat(o),
|
|
912
|
-
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
913
|
-
};
|
|
914
|
-
}, pr = (e) => H(0, 255, e), _t = {
|
|
915
|
-
...tt,
|
|
916
|
-
transform: (e) => Math.round(pr(e))
|
|
917
|
-
}, U = {
|
|
918
|
-
test: /* @__PURE__ */ ye("rgb", "red"),
|
|
919
|
-
parse: /* @__PURE__ */ ds("red", "green", "blue"),
|
|
920
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + _t.transform(e) + ", " + _t.transform(t) + ", " + _t.transform(n) + ", " + rt(at.transform(s)) + ")"
|
|
921
|
-
};
|
|
922
|
-
function mr(e) {
|
|
923
|
-
let t = "", n = "", s = "", i = "";
|
|
924
|
-
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
|
|
925
|
-
red: parseInt(t, 16),
|
|
926
|
-
green: parseInt(n, 16),
|
|
927
|
-
blue: parseInt(s, 16),
|
|
928
|
-
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
929
|
-
};
|
|
930
|
-
}
|
|
931
|
-
const Zt = {
|
|
932
|
-
test: /* @__PURE__ */ ye("#"),
|
|
933
|
-
parse: mr,
|
|
934
|
-
transform: U.transform
|
|
935
|
-
}, q = {
|
|
936
|
-
test: /* @__PURE__ */ ye("hsl", "hue"),
|
|
937
|
-
parse: /* @__PURE__ */ ds("hue", "saturation", "lightness"),
|
|
938
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + Z.transform(rt(t)) + ", " + Z.transform(rt(n)) + ", " + rt(at.transform(s)) + ")"
|
|
939
|
-
}, E = {
|
|
940
|
-
test: (e) => U.test(e) || Zt.test(e) || q.test(e),
|
|
941
|
-
parse: (e) => U.test(e) ? U.parse(e) : q.test(e) ? q.parse(e) : Zt.parse(e),
|
|
942
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? U.transform(e) : q.transform(e)
|
|
943
|
-
}, gr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
944
|
-
function yr(e) {
|
|
945
|
-
var t, n;
|
|
946
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(ge)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(gr)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
947
|
-
}
|
|
948
|
-
const ps = "number", ms = "color", vr = "var", br = "var(", Qe = "${}", Sr = /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;
|
|
949
|
-
function lt(e) {
|
|
950
|
-
const t = e.toString(), n = [], s = {
|
|
951
|
-
color: [],
|
|
952
|
-
number: [],
|
|
953
|
-
var: []
|
|
954
|
-
}, i = [];
|
|
955
|
-
let r = 0;
|
|
956
|
-
const a = t.replace(Sr, (l) => (E.test(l) ? (s.color.push(r), i.push(ms), n.push(E.parse(l))) : l.startsWith(br) ? (s.var.push(r), i.push(vr), n.push(l)) : (s.number.push(r), i.push(ps), n.push(parseFloat(l))), ++r, Qe)).split(Qe);
|
|
957
|
-
return { values: n, split: a, indexes: s, types: i };
|
|
958
|
-
}
|
|
959
|
-
function gs(e) {
|
|
960
|
-
return lt(e).values;
|
|
961
|
-
}
|
|
962
|
-
function ys(e) {
|
|
963
|
-
const { split: t, types: n } = lt(e), s = t.length;
|
|
964
|
-
return (i) => {
|
|
965
|
-
let r = "";
|
|
966
|
-
for (let o = 0; o < s; o++)
|
|
967
|
-
if (r += t[o], i[o] !== void 0) {
|
|
968
|
-
const a = n[o];
|
|
969
|
-
a === ps ? r += rt(i[o]) : a === ms ? r += E.transform(i[o]) : r += i[o];
|
|
970
|
-
}
|
|
971
|
-
return r;
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
|
-
const wr = (e) => typeof e == "number" ? 0 : e;
|
|
975
|
-
function Tr(e) {
|
|
976
|
-
const t = gs(e);
|
|
977
|
-
return ys(e)(t.map(wr));
|
|
978
|
-
}
|
|
979
|
-
const et = {
|
|
980
|
-
test: yr,
|
|
981
|
-
parse: gs,
|
|
982
|
-
createTransformer: ys,
|
|
983
|
-
getAnimatableNone: Tr
|
|
984
|
-
}, xr = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
985
|
-
function Vr(e) {
|
|
986
|
-
const [t, n] = e.slice(0, -1).split("(");
|
|
987
|
-
if (t === "drop-shadow")
|
|
988
|
-
return e;
|
|
989
|
-
const [s] = n.match(ge) || [];
|
|
990
|
-
if (!s)
|
|
991
|
-
return e;
|
|
992
|
-
const i = n.replace(s, "");
|
|
993
|
-
let r = xr.has(t) ? 1 : 0;
|
|
994
|
-
return s !== n && (r *= 100), t + "(" + r + i + ")";
|
|
995
|
-
}
|
|
996
|
-
const Ar = /\b([a-z-]*)\(.*?\)/gu, Jt = {
|
|
997
|
-
...et,
|
|
998
|
-
getAnimatableNone: (e) => {
|
|
999
|
-
const t = e.match(Ar);
|
|
1000
|
-
return t ? t.map(Vr).join(" ") : e;
|
|
1001
|
-
}
|
|
1002
|
-
}, Qt = {
|
|
1003
|
-
// Border props
|
|
1004
|
-
borderWidth: d,
|
|
1005
|
-
borderTopWidth: d,
|
|
1006
|
-
borderRightWidth: d,
|
|
1007
|
-
borderBottomWidth: d,
|
|
1008
|
-
borderLeftWidth: d,
|
|
1009
|
-
borderRadius: d,
|
|
1010
|
-
radius: d,
|
|
1011
|
-
borderTopLeftRadius: d,
|
|
1012
|
-
borderTopRightRadius: d,
|
|
1013
|
-
borderBottomRightRadius: d,
|
|
1014
|
-
borderBottomLeftRadius: d,
|
|
1015
|
-
// Positioning props
|
|
1016
|
-
width: d,
|
|
1017
|
-
maxWidth: d,
|
|
1018
|
-
height: d,
|
|
1019
|
-
maxHeight: d,
|
|
1020
|
-
top: d,
|
|
1021
|
-
right: d,
|
|
1022
|
-
bottom: d,
|
|
1023
|
-
left: d,
|
|
1024
|
-
// Spacing props
|
|
1025
|
-
padding: d,
|
|
1026
|
-
paddingTop: d,
|
|
1027
|
-
paddingRight: d,
|
|
1028
|
-
paddingBottom: d,
|
|
1029
|
-
paddingLeft: d,
|
|
1030
|
-
margin: d,
|
|
1031
|
-
marginTop: d,
|
|
1032
|
-
marginRight: d,
|
|
1033
|
-
marginBottom: d,
|
|
1034
|
-
marginLeft: d,
|
|
1035
|
-
// Misc
|
|
1036
|
-
backgroundPositionX: d,
|
|
1037
|
-
backgroundPositionY: d
|
|
1038
|
-
}, Mr = {
|
|
1039
|
-
rotate: _,
|
|
1040
|
-
rotateX: _,
|
|
1041
|
-
rotateY: _,
|
|
1042
|
-
rotateZ: _,
|
|
1043
|
-
scale: bt,
|
|
1044
|
-
scaleX: bt,
|
|
1045
|
-
scaleY: bt,
|
|
1046
|
-
scaleZ: bt,
|
|
1047
|
-
skew: _,
|
|
1048
|
-
skewX: _,
|
|
1049
|
-
skewY: _,
|
|
1050
|
-
distance: d,
|
|
1051
|
-
translateX: d,
|
|
1052
|
-
translateY: d,
|
|
1053
|
-
translateZ: d,
|
|
1054
|
-
x: d,
|
|
1055
|
-
y: d,
|
|
1056
|
-
z: d,
|
|
1057
|
-
perspective: d,
|
|
1058
|
-
transformPerspective: d,
|
|
1059
|
-
opacity: at,
|
|
1060
|
-
originX: Ye,
|
|
1061
|
-
originY: Ye,
|
|
1062
|
-
originZ: d
|
|
1063
|
-
}, tn = {
|
|
1064
|
-
...tt,
|
|
1065
|
-
transform: Math.round
|
|
1066
|
-
}, ve = {
|
|
1067
|
-
...Qt,
|
|
1068
|
-
...Mr,
|
|
1069
|
-
zIndex: tn,
|
|
1070
|
-
size: d,
|
|
1071
|
-
// SVG
|
|
1072
|
-
fillOpacity: at,
|
|
1073
|
-
strokeOpacity: at,
|
|
1074
|
-
numOctaves: tn
|
|
1075
|
-
}, Er = {
|
|
1076
|
-
...ve,
|
|
1077
|
-
// Color props
|
|
1078
|
-
color: E,
|
|
1079
|
-
backgroundColor: E,
|
|
1080
|
-
outlineColor: E,
|
|
1081
|
-
fill: E,
|
|
1082
|
-
stroke: E,
|
|
1083
|
-
// Border props
|
|
1084
|
-
borderColor: E,
|
|
1085
|
-
borderTopColor: E,
|
|
1086
|
-
borderRightColor: E,
|
|
1087
|
-
borderBottomColor: E,
|
|
1088
|
-
borderLeftColor: E,
|
|
1089
|
-
filter: Jt,
|
|
1090
|
-
WebkitFilter: Jt
|
|
1091
|
-
}, be = (e) => Er[e];
|
|
1092
|
-
function vs(e, t) {
|
|
1093
|
-
let n = be(e);
|
|
1094
|
-
return n !== Jt && (n = et), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1095
|
-
}
|
|
1096
|
-
const Pr = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1097
|
-
function Cr(e, t, n) {
|
|
1098
|
-
let s = 0, i;
|
|
1099
|
-
for (; s < e.length && !i; ) {
|
|
1100
|
-
const r = e[s];
|
|
1101
|
-
typeof r == "string" && !Pr.has(r) && lt(r).values.length && (i = e[s]), s++;
|
|
1102
|
-
}
|
|
1103
|
-
if (i && n)
|
|
1104
|
-
for (const r of t)
|
|
1105
|
-
e[r] = vs(n, i);
|
|
1106
|
-
}
|
|
1107
|
-
class bs extends me {
|
|
1108
|
-
constructor(t, n, s, i, r) {
|
|
1109
|
-
super(t, n, s, i, r, !0);
|
|
1110
|
-
}
|
|
1111
|
-
readKeyframes() {
|
|
1112
|
-
const { unresolvedKeyframes: t, element: n, name: s } = this;
|
|
1113
|
-
if (!n || !n.current)
|
|
1114
|
-
return;
|
|
1115
|
-
super.readKeyframes();
|
|
1116
|
-
for (let l = 0; l < t.length; l++) {
|
|
1117
|
-
let u = t[l];
|
|
1118
|
-
if (typeof u == "string" && (u = u.trim(), pe(u))) {
|
|
1119
|
-
const c = ls(u, n.current);
|
|
1120
|
-
c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = u);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
if (this.resolveNoneKeyframes(), !or.has(s) || t.length !== 2)
|
|
1124
|
-
return;
|
|
1125
|
-
const [i, r] = t, o = Je(i), a = Je(r);
|
|
1126
|
-
if (o !== a)
|
|
1127
|
-
if (Xe(o) && Xe(a))
|
|
1128
|
-
for (let l = 0; l < t.length; l++) {
|
|
1129
|
-
const u = t[l];
|
|
1130
|
-
typeof u == "string" && (t[l] = parseFloat(u));
|
|
1131
|
-
}
|
|
1132
|
-
else
|
|
1133
|
-
this.needsMeasurement = !0;
|
|
1134
|
-
}
|
|
1135
|
-
resolveNoneKeyframes() {
|
|
1136
|
-
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
1137
|
-
for (let i = 0; i < t.length; i++)
|
|
1138
|
-
Ji(t[i]) && s.push(i);
|
|
1139
|
-
s.length && Cr(t, s, n);
|
|
1140
|
-
}
|
|
1141
|
-
measureInitialState() {
|
|
1142
|
-
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
1143
|
-
if (!t || !t.current)
|
|
1144
|
-
return;
|
|
1145
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Q[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
1146
|
-
const i = n[n.length - 1];
|
|
1147
|
-
i !== void 0 && t.getValue(s, i).jump(i, !1);
|
|
1148
|
-
}
|
|
1149
|
-
measureEndState() {
|
|
1150
|
-
var t;
|
|
1151
|
-
const { element: n, name: s, unresolvedKeyframes: i } = this;
|
|
1152
|
-
if (!n || !n.current)
|
|
1153
|
-
return;
|
|
1154
|
-
const r = n.getValue(s);
|
|
1155
|
-
r && r.jump(this.measuredOrigin, !1);
|
|
1156
|
-
const o = i.length - 1, a = i[o];
|
|
1157
|
-
i[o] = Q[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([l, u]) => {
|
|
1158
|
-
n.getValue(l).set(u);
|
|
1159
|
-
}), this.resolveNoneKeyframes();
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
const en = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1163
|
-
(et.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1164
|
-
!e.startsWith("url("));
|
|
1165
|
-
function Fr(e) {
|
|
1166
|
-
const t = e[0];
|
|
1167
|
-
if (e.length === 1)
|
|
1168
|
-
return !0;
|
|
1169
|
-
for (let n = 0; n < e.length; n++)
|
|
1170
|
-
if (e[n] !== t)
|
|
1171
|
-
return !0;
|
|
1172
|
-
}
|
|
1173
|
-
function Or(e, t, n, s) {
|
|
1174
|
-
const i = e[0];
|
|
1175
|
-
if (i === null)
|
|
1176
|
-
return !1;
|
|
1177
|
-
if (t === "display" || t === "visibility")
|
|
1178
|
-
return !0;
|
|
1179
|
-
const r = e[e.length - 1], o = en(i, t), a = en(r, t);
|
|
1180
|
-
return ft(o === a, `You are trying to animate ${t} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !o || !a ? !1 : Fr(e) || (n === "spring" || pt(n)) && s;
|
|
1181
|
-
}
|
|
1182
|
-
const Dr = 40;
|
|
1183
|
-
class Ss {
|
|
1184
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
|
|
1185
|
-
this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = N.now(), this.options = {
|
|
1186
|
-
autoplay: t,
|
|
1187
|
-
delay: n,
|
|
1188
|
-
type: s,
|
|
1189
|
-
repeat: i,
|
|
1190
|
-
repeatDelay: r,
|
|
1191
|
-
repeatType: o,
|
|
1192
|
-
...a
|
|
1193
|
-
}, this.updateFinishedPromise();
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* This method uses the createdAt and resolvedAt to calculate the
|
|
1197
|
-
* animation startTime. *Ideally*, we would use the createdAt time as t=0
|
|
1198
|
-
* as the following frame would then be the first frame of the animation in
|
|
1199
|
-
* progress, which would feel snappier.
|
|
1200
|
-
*
|
|
1201
|
-
* However, if there's a delay (main thread work) between the creation of
|
|
1202
|
-
* the animation and the first commited frame, we prefer to use resolvedAt
|
|
1203
|
-
* to avoid a sudden jump into the animation.
|
|
1204
|
-
*/
|
|
1205
|
-
calcStartTime() {
|
|
1206
|
-
return this.resolvedAt ? this.resolvedAt - this.createdAt > Dr ? this.resolvedAt : this.createdAt : this.createdAt;
|
|
1207
|
-
}
|
|
1208
|
-
/**
|
|
1209
|
-
* A getter for resolved data. If keyframes are not yet resolved, accessing
|
|
1210
|
-
* this.resolved will synchronously flush all pending keyframe resolvers.
|
|
1211
|
-
* This is a deoptimisation, but at its worst still batches read/writes.
|
|
1212
|
-
*/
|
|
1213
|
-
get resolved() {
|
|
1214
|
-
return !this._resolved && !this.hasAttemptedResolve && fr(), this._resolved;
|
|
1215
|
-
}
|
|
1216
|
-
/**
|
|
1217
|
-
* A method to be called when the keyframes resolver completes. This method
|
|
1218
|
-
* will check if its possible to run the animation and, if not, skip it.
|
|
1219
|
-
* Otherwise, it will call initPlayback on the implementing class.
|
|
1220
|
-
*/
|
|
1221
|
-
onKeyframesResolved(t, n) {
|
|
1222
|
-
this.resolvedAt = N.now(), this.hasAttemptedResolve = !0;
|
|
1223
|
-
const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
|
|
1224
|
-
if (!u && !Or(t, s, i, r))
|
|
1225
|
-
if (o)
|
|
1226
|
-
this.options.duration = 0;
|
|
1227
|
-
else {
|
|
1228
|
-
l == null || l(gt(t, this.options, n)), a == null || a(), this.resolveFinishedPromise();
|
|
1229
|
-
return;
|
|
1230
|
-
}
|
|
1231
|
-
const c = this.initPlayback(t, n);
|
|
1232
|
-
c !== !1 && (this._resolved = {
|
|
1233
|
-
keyframes: t,
|
|
1234
|
-
finalKeyframe: n,
|
|
1235
|
-
...c
|
|
1236
|
-
}, this.onPostResolved());
|
|
1237
|
-
}
|
|
1238
|
-
onPostResolved() {
|
|
1239
|
-
}
|
|
1240
|
-
/**
|
|
1241
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
1242
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
1243
|
-
* reject if its cancels.
|
|
1244
|
-
*/
|
|
1245
|
-
then(t, n) {
|
|
1246
|
-
return this.currentFinishedPromise.then(t, n);
|
|
1247
|
-
}
|
|
1248
|
-
updateFinishedPromise() {
|
|
1249
|
-
this.currentFinishedPromise = new Promise((t) => {
|
|
1250
|
-
this.resolveFinishedPromise = t;
|
|
1251
|
-
});
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
function nn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
1255
|
-
const f = e[0], h = {
|
|
1256
|
-
done: !1,
|
|
1257
|
-
value: f
|
|
1258
|
-
}, p = (v) => a !== void 0 && v < a || l !== void 0 && v > l, m = (v) => a === void 0 ? l : l === void 0 || Math.abs(a - v) < Math.abs(l - v) ? a : l;
|
|
1259
|
-
let S = n * t;
|
|
1260
|
-
const b = f + S, g = o === void 0 ? b : o(b);
|
|
1261
|
-
g !== b && (S = g - f);
|
|
1262
|
-
const y = (v) => -S * Math.exp(-v / s), T = (v) => g + y(v), x = (v) => {
|
|
1263
|
-
const V = y(v), O = T(v);
|
|
1264
|
-
h.done = Math.abs(V) <= u, h.value = h.done ? g : O;
|
|
1265
|
-
};
|
|
1266
|
-
let w, A;
|
|
1267
|
-
const F = (v) => {
|
|
1268
|
-
p(h.value) && (w = v, A = le({
|
|
1269
|
-
keyframes: [h.value, m(h.value)],
|
|
1270
|
-
velocity: Un(T, v, h.value),
|
|
1271
|
-
// TODO: This should be passing * 1000
|
|
1272
|
-
damping: i,
|
|
1273
|
-
stiffness: r,
|
|
1274
|
-
restDelta: u,
|
|
1275
|
-
restSpeed: c
|
|
1276
|
-
}));
|
|
1277
|
-
};
|
|
1278
|
-
return F(0), {
|
|
1279
|
-
calculatedDuration: null,
|
|
1280
|
-
next: (v) => {
|
|
1281
|
-
let V = !1;
|
|
1282
|
-
return !A && w === void 0 && (V = !0, x(v), F(v)), w !== void 0 && v >= w ? A.next(v - w) : (!V && x(v), h);
|
|
1283
|
-
}
|
|
1284
|
-
};
|
|
1285
|
-
}
|
|
1286
|
-
const Br = /* @__PURE__ */ yt(0.42, 0, 1, 1), Rr = /* @__PURE__ */ yt(0, 0, 0.58, 1), ws = /* @__PURE__ */ yt(0.42, 0, 0.58, 1), Se = (e) => Array.isArray(e) && typeof e[0] == "number", sn = {
|
|
1287
|
-
linear: K,
|
|
1288
|
-
easeIn: Br,
|
|
1289
|
-
easeInOut: ws,
|
|
1290
|
-
easeOut: Rr,
|
|
1291
|
-
circIn: de,
|
|
1292
|
-
circInOut: ss,
|
|
1293
|
-
circOut: Zi,
|
|
1294
|
-
backIn: he,
|
|
1295
|
-
backInOut: es,
|
|
1296
|
-
backOut: ts,
|
|
1297
|
-
anticipate: ns
|
|
1298
|
-
}, te = (e) => {
|
|
1299
|
-
if (Se(e)) {
|
|
1300
|
-
I(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1301
|
-
const [t, n, s, i] = e;
|
|
1302
|
-
return yt(t, n, s, i);
|
|
1303
|
-
} else if (typeof e == "string")
|
|
1304
|
-
return I(sn[e] !== void 0, `Invalid easing type '${e}'`), sn[e];
|
|
1305
|
-
return e;
|
|
1306
|
-
}, Ir = (e, t) => (n) => t(e(n)), we = (...e) => e.reduce(Ir);
|
|
1307
|
-
function Wt(e, t, n) {
|
|
1308
|
-
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
1309
|
-
}
|
|
1310
|
-
function Lr({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
1311
|
-
e /= 360, t /= 100, n /= 100;
|
|
1312
|
-
let i = 0, r = 0, o = 0;
|
|
1313
|
-
if (!t)
|
|
1314
|
-
i = r = o = n;
|
|
1315
|
-
else {
|
|
1316
|
-
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
|
|
1317
|
-
i = Wt(l, a, e + 1 / 3), r = Wt(l, a, e), o = Wt(l, a, e - 1 / 3);
|
|
1318
|
-
}
|
|
1319
|
-
return {
|
|
1320
|
-
red: Math.round(i * 255),
|
|
1321
|
-
green: Math.round(r * 255),
|
|
1322
|
-
blue: Math.round(o * 255),
|
|
1323
|
-
alpha: s
|
|
1324
|
-
};
|
|
1325
|
-
}
|
|
1326
|
-
function Vt(e, t) {
|
|
1327
|
-
return (n) => n > 0 ? t : e;
|
|
1328
|
-
}
|
|
1329
|
-
const kt = (e, t, n) => {
|
|
1330
|
-
const s = e * e, i = n * (t * t - s) + s;
|
|
1331
|
-
return i < 0 ? 0 : Math.sqrt(i);
|
|
1332
|
-
}, Nr = [Zt, U, q], $r = (e) => Nr.find((t) => t.test(e));
|
|
1333
|
-
function rn(e) {
|
|
1334
|
-
const t = $r(e);
|
|
1335
|
-
if (ft(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
|
|
1336
|
-
return !1;
|
|
1337
|
-
let n = t.parse(e);
|
|
1338
|
-
return t === q && (n = Lr(n)), n;
|
|
1339
|
-
}
|
|
1340
|
-
const on = (e, t) => {
|
|
1341
|
-
const n = rn(e), s = rn(t);
|
|
1342
|
-
if (!n || !s)
|
|
1343
|
-
return Vt(e, t);
|
|
1344
|
-
const i = { ...n };
|
|
1345
|
-
return (r) => (i.red = kt(n.red, s.red, r), i.green = kt(n.green, s.green, r), i.blue = kt(n.blue, s.blue, r), i.alpha = ht(n.alpha, s.alpha, r), U.transform(i));
|
|
1346
|
-
}, ee = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1347
|
-
function Kr(e, t) {
|
|
1348
|
-
return ee.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
1349
|
-
}
|
|
1350
|
-
function _r(e, t) {
|
|
1351
|
-
return (n) => ht(e, t, n);
|
|
1352
|
-
}
|
|
1353
|
-
function Te(e) {
|
|
1354
|
-
return typeof e == "number" ? _r : typeof e == "string" ? pe(e) ? Vt : E.test(e) ? on : Gr : Array.isArray(e) ? Ts : typeof e == "object" ? E.test(e) ? on : Wr : Vt;
|
|
1355
|
-
}
|
|
1356
|
-
function Ts(e, t) {
|
|
1357
|
-
const n = [...e], s = n.length, i = e.map((r, o) => Te(r)(r, t[o]));
|
|
1358
|
-
return (r) => {
|
|
1359
|
-
for (let o = 0; o < s; o++)
|
|
1360
|
-
n[o] = i[o](r);
|
|
1361
|
-
return n;
|
|
1362
|
-
};
|
|
1363
|
-
}
|
|
1364
|
-
function Wr(e, t) {
|
|
1365
|
-
const n = { ...e, ...t }, s = {};
|
|
1366
|
-
for (const i in n)
|
|
1367
|
-
e[i] !== void 0 && t[i] !== void 0 && (s[i] = Te(e[i])(e[i], t[i]));
|
|
1368
|
-
return (i) => {
|
|
1369
|
-
for (const r in s)
|
|
1370
|
-
n[r] = s[r](i);
|
|
1371
|
-
return n;
|
|
1372
|
-
};
|
|
1373
|
-
}
|
|
1374
|
-
function kr(e, t) {
|
|
1375
|
-
var n;
|
|
1376
|
-
const s = [], i = { color: 0, var: 0, number: 0 };
|
|
1377
|
-
for (let r = 0; r < t.values.length; r++) {
|
|
1378
|
-
const o = t.types[r], a = e.indexes[o][i[o]], l = (n = e.values[a]) !== null && n !== void 0 ? n : 0;
|
|
1379
|
-
s[r] = l, i[o]++;
|
|
1380
|
-
}
|
|
1381
|
-
return s;
|
|
1382
|
-
}
|
|
1383
|
-
const Gr = (e, t) => {
|
|
1384
|
-
const n = et.createTransformer(t), s = lt(e), i = lt(t);
|
|
1385
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? ee.has(e) && !i.values.length || ee.has(t) && !s.values.length ? Kr(e, t) : we(Ts(kr(s, i), i.values), n) : (ft(!0, `Complex values '${e}' and '${t}' 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.`), Vt(e, t));
|
|
1386
|
-
};
|
|
1387
|
-
function xs(e, t, n) {
|
|
1388
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ht(e, t, n) : Te(e)(e, t);
|
|
1389
|
-
}
|
|
1390
|
-
function zr(e, t, n) {
|
|
1391
|
-
const s = [], i = n || xs, r = e.length - 1;
|
|
1392
|
-
for (let o = 0; o < r; o++) {
|
|
1393
|
-
let a = i(e[o], e[o + 1]);
|
|
1394
|
-
if (t) {
|
|
1395
|
-
const l = Array.isArray(t) ? t[o] || K : t;
|
|
1396
|
-
a = we(l, a);
|
|
1397
|
-
}
|
|
1398
|
-
s.push(a);
|
|
1399
|
-
}
|
|
1400
|
-
return s;
|
|
1401
|
-
}
|
|
1402
|
-
function xe(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
1403
|
-
const r = e.length;
|
|
1404
|
-
if (I(r === t.length, "Both input and output ranges must be the same length"), r === 1)
|
|
1405
|
-
return () => t[0];
|
|
1406
|
-
if (r === 2 && e[0] === e[1])
|
|
1407
|
-
return () => t[1];
|
|
1408
|
-
e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
1409
|
-
const o = zr(t, s, i), a = o.length, l = (u) => {
|
|
1410
|
-
let c = 0;
|
|
1411
|
-
if (a > 1)
|
|
1412
|
-
for (; c < e.length - 2 && !(u < e[c + 1]); c++)
|
|
1413
|
-
;
|
|
1414
|
-
const f = dt(e[c], e[c + 1], u);
|
|
1415
|
-
return o[c](f);
|
|
1416
|
-
};
|
|
1417
|
-
return n ? (u) => l(H(e[0], e[r - 1], u)) : l;
|
|
1418
|
-
}
|
|
1419
|
-
function Ur(e, t) {
|
|
1420
|
-
return e.map((n) => n * t);
|
|
1421
|
-
}
|
|
1422
|
-
function jr(e, t) {
|
|
1423
|
-
return e.map(() => t || ws).splice(0, e.length - 1);
|
|
1424
|
-
}
|
|
1425
|
-
function At({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
1426
|
-
const i = qn(s) ? s.map(te) : te(s), r = {
|
|
1427
|
-
done: !1,
|
|
1428
|
-
value: t[0]
|
|
1429
|
-
}, o = Ur(
|
|
1430
|
-
// Only use the provided offsets if they're the correct length
|
|
1431
|
-
// TODO Maybe we should warn here if there's a length mismatch
|
|
1432
|
-
n && n.length === t.length ? n : ue(t),
|
|
1433
|
-
e
|
|
1434
|
-
), a = xe(o, t, {
|
|
1435
|
-
ease: Array.isArray(i) ? i : jr(t, i)
|
|
1436
|
-
});
|
|
1437
|
-
return {
|
|
1438
|
-
calculatedDuration: e,
|
|
1439
|
-
next: (l) => (r.value = a(l), r.done = l >= e, r)
|
|
1440
|
-
};
|
|
1441
|
-
}
|
|
1442
|
-
const Hr = (e) => {
|
|
1443
|
-
const t = ({ timestamp: n }) => e(n);
|
|
1444
|
-
return {
|
|
1445
|
-
start: () => M.update(t, !0),
|
|
1446
|
-
stop: () => R(t),
|
|
1447
|
-
/**
|
|
1448
|
-
* If we're processing this frame we can use the
|
|
1449
|
-
* framelocked timestamp to keep things in sync.
|
|
1450
|
-
*/
|
|
1451
|
-
now: () => J.isProcessing ? J.timestamp : N.now()
|
|
1452
|
-
};
|
|
1453
|
-
}, Yr = {
|
|
1454
|
-
decay: nn,
|
|
1455
|
-
inertia: nn,
|
|
1456
|
-
tween: At,
|
|
1457
|
-
keyframes: At,
|
|
1458
|
-
spring: le
|
|
1459
|
-
}, Xr = (e) => e / 100;
|
|
1460
|
-
class Lt extends Ss {
|
|
1461
|
-
constructor(t) {
|
|
1462
|
-
super(t), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
|
|
1463
|
-
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
1464
|
-
return;
|
|
1465
|
-
this.teardown();
|
|
1466
|
-
const { onStop: l } = this.options;
|
|
1467
|
-
l && l();
|
|
1468
|
-
};
|
|
1469
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || me, a = (l, u) => this.onKeyframesResolved(l, u);
|
|
1470
|
-
this.resolver = new o(r, a, n, s, i), this.resolver.scheduleResolve();
|
|
1471
|
-
}
|
|
1472
|
-
initPlayback(t) {
|
|
1473
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = pt(n) ? n : Yr[n] || At;
|
|
1474
|
-
let l, u;
|
|
1475
|
-
a !== At && typeof t[0] != "number" && (process.env.NODE_ENV !== "production" && I(t.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`), l = we(Xr, xs(t[0], t[1])), t = [0, 100]);
|
|
1476
|
-
const c = a({ ...this.options, keyframes: t });
|
|
1477
|
-
r === "mirror" && (u = a({
|
|
1478
|
-
...this.options,
|
|
1479
|
-
keyframes: [...t].reverse(),
|
|
1480
|
-
velocity: -o
|
|
1481
|
-
})), c.calculatedDuration === null && (c.calculatedDuration = jn(c));
|
|
1482
|
-
const { calculatedDuration: f } = c, h = f + i, p = h * (s + 1) - i;
|
|
1483
|
-
return {
|
|
1484
|
-
generator: c,
|
|
1485
|
-
mirroredGenerator: u,
|
|
1486
|
-
mapPercentToKeyframes: l,
|
|
1487
|
-
calculatedDuration: f,
|
|
1488
|
-
resolvedDuration: h,
|
|
1489
|
-
totalDuration: p
|
|
1490
|
-
};
|
|
1491
|
-
}
|
|
1492
|
-
onPostResolved() {
|
|
1493
|
-
const { autoplay: t = !0 } = this.options;
|
|
1494
|
-
this.play(), this.pendingPlayState === "paused" || !t ? this.pause() : this.state = this.pendingPlayState;
|
|
1495
|
-
}
|
|
1496
|
-
tick(t, n = !1) {
|
|
1497
|
-
const { resolved: s } = this;
|
|
1498
|
-
if (!s) {
|
|
1499
|
-
const { keyframes: v } = this.options;
|
|
1500
|
-
return { done: !0, value: v[v.length - 1] };
|
|
1501
|
-
}
|
|
1502
|
-
const { finalKeyframe: i, generator: r, mirroredGenerator: o, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: u, totalDuration: c, resolvedDuration: f } = s;
|
|
1503
|
-
if (this.startTime === null)
|
|
1504
|
-
return r.next(0);
|
|
1505
|
-
const { delay: h, repeat: p, repeatType: m, repeatDelay: S, onUpdate: b } = this.options;
|
|
1506
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - c / this.speed, this.startTime)), n ? this.currentTime = t : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(t - this.startTime) * this.speed;
|
|
1507
|
-
const g = this.currentTime - h * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? g < 0 : g > c;
|
|
1508
|
-
this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
|
|
1509
|
-
let T = this.currentTime, x = r;
|
|
1510
|
-
if (p) {
|
|
1511
|
-
const v = Math.min(this.currentTime, c) / f;
|
|
1512
|
-
let V = Math.floor(v), O = v % 1;
|
|
1513
|
-
!O && v >= 1 && (O = 1), O === 1 && V--, V = Math.min(V, p + 1), !!(V % 2) && (m === "reverse" ? (O = 1 - O, S && (O -= S / f)) : m === "mirror" && (x = o)), T = H(0, 1, O) * f;
|
|
1514
|
-
}
|
|
1515
|
-
const w = y ? { done: !1, value: l[0] } : x.next(T);
|
|
1516
|
-
a && (w.value = a(w.value));
|
|
1517
|
-
let { done: A } = w;
|
|
1518
|
-
!y && u !== null && (A = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
1519
|
-
const F = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
1520
|
-
return F && i !== void 0 && (w.value = gt(l, this.options, i)), b && b(w.value), F && this.finish(), w;
|
|
1521
|
-
}
|
|
1522
|
-
get duration() {
|
|
1523
|
-
const { resolved: t } = this;
|
|
1524
|
-
return t ? B(t.calculatedDuration) : 0;
|
|
1525
|
-
}
|
|
1526
|
-
get time() {
|
|
1527
|
-
return B(this.currentTime);
|
|
1528
|
-
}
|
|
1529
|
-
set time(t) {
|
|
1530
|
-
t = C(t), this.currentTime = t, this.holdTime !== null || this.speed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.speed);
|
|
1531
|
-
}
|
|
1532
|
-
get speed() {
|
|
1533
|
-
return this.playbackSpeed;
|
|
1534
|
-
}
|
|
1535
|
-
set speed(t) {
|
|
1536
|
-
const n = this.playbackSpeed !== t;
|
|
1537
|
-
this.playbackSpeed = t, n && (this.time = B(this.currentTime));
|
|
1538
|
-
}
|
|
1539
|
-
play() {
|
|
1540
|
-
if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) {
|
|
1541
|
-
this.pendingPlayState = "running";
|
|
1542
|
-
return;
|
|
1543
|
-
}
|
|
1544
|
-
if (this.isStopped)
|
|
1545
|
-
return;
|
|
1546
|
-
const { driver: t = Hr, onPlay: n, startTime: s } = this.options;
|
|
1547
|
-
this.driver || (this.driver = t((r) => this.tick(r))), n && n();
|
|
1548
|
-
const i = this.driver.now();
|
|
1549
|
-
this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
1550
|
-
}
|
|
1551
|
-
pause() {
|
|
1552
|
-
var t;
|
|
1553
|
-
if (!this._resolved) {
|
|
1554
|
-
this.pendingPlayState = "paused";
|
|
1555
|
-
return;
|
|
1556
|
-
}
|
|
1557
|
-
this.state = "paused", this.holdTime = (t = this.currentTime) !== null && t !== void 0 ? t : 0;
|
|
1558
|
-
}
|
|
1559
|
-
complete() {
|
|
1560
|
-
this.state !== "running" && this.play(), this.pendingPlayState = this.state = "finished", this.holdTime = null;
|
|
1561
|
-
}
|
|
1562
|
-
finish() {
|
|
1563
|
-
this.teardown(), this.state = "finished";
|
|
1564
|
-
const { onComplete: t } = this.options;
|
|
1565
|
-
t && t();
|
|
1566
|
-
}
|
|
1567
|
-
cancel() {
|
|
1568
|
-
this.cancelTime !== null && this.tick(this.cancelTime), this.teardown(), this.updateFinishedPromise();
|
|
1569
|
-
}
|
|
1570
|
-
teardown() {
|
|
1571
|
-
this.state = "idle", this.stopDriver(), this.resolveFinishedPromise(), this.updateFinishedPromise(), this.startTime = this.cancelTime = null, this.resolver.cancel();
|
|
1572
|
-
}
|
|
1573
|
-
stopDriver() {
|
|
1574
|
-
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
1575
|
-
}
|
|
1576
|
-
sample(t) {
|
|
1577
|
-
return this.startTime = 0, this.tick(t, !0);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
function qr(e) {
|
|
1581
|
-
return new Lt(e);
|
|
1582
|
-
}
|
|
1583
|
-
const Zr = /* @__PURE__ */ new Set([
|
|
1584
|
-
"opacity",
|
|
1585
|
-
"clipPath",
|
|
1586
|
-
"filter",
|
|
1587
|
-
"transform"
|
|
1588
|
-
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
1589
|
-
// or until we implement support for linear() easing.
|
|
1590
|
-
// "background-color"
|
|
1591
|
-
]), Jr = 10, Qr = (e, t) => {
|
|
1592
|
-
let n = "";
|
|
1593
|
-
const s = Math.max(Math.round(t / Jr), 2);
|
|
1594
|
-
for (let i = 0; i < s; i++)
|
|
1595
|
-
n += e(dt(0, s - 1, i)) + ", ";
|
|
1596
|
-
return `linear(${n.substring(0, n.length - 2)})`;
|
|
1597
|
-
}, to = {
|
|
1598
|
-
linearEasing: void 0
|
|
1599
|
-
};
|
|
1600
|
-
function eo(e, t) {
|
|
1601
|
-
const n = Rt(e);
|
|
1602
|
-
return () => {
|
|
1603
|
-
var s;
|
|
1604
|
-
return (s = to[t]) !== null && s !== void 0 ? s : n();
|
|
1605
|
-
};
|
|
1606
|
-
}
|
|
1607
|
-
const ut = /* @__PURE__ */ eo(() => {
|
|
1608
|
-
try {
|
|
1609
|
-
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1610
|
-
} catch {
|
|
1611
|
-
return !1;
|
|
1612
|
-
}
|
|
1613
|
-
return !0;
|
|
1614
|
-
}, "linearEasing");
|
|
1615
|
-
function Vs(e) {
|
|
1616
|
-
return !!(typeof e == "function" && ut() || !e || typeof e == "string" && (e in ne || ut()) || Se(e) || Array.isArray(e) && e.every(Vs));
|
|
1617
|
-
}
|
|
1618
|
-
const it = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, ne = {
|
|
1619
|
-
linear: "linear",
|
|
1620
|
-
ease: "ease",
|
|
1621
|
-
easeIn: "ease-in",
|
|
1622
|
-
easeOut: "ease-out",
|
|
1623
|
-
easeInOut: "ease-in-out",
|
|
1624
|
-
circIn: /* @__PURE__ */ it([0, 0.65, 0.55, 1]),
|
|
1625
|
-
circOut: /* @__PURE__ */ it([0.55, 0, 1, 0.45]),
|
|
1626
|
-
backIn: /* @__PURE__ */ it([0.31, 0.01, 0.66, -0.59]),
|
|
1627
|
-
backOut: /* @__PURE__ */ it([0.33, 1.53, 0.69, 0.99])
|
|
1628
|
-
};
|
|
1629
|
-
function As(e, t) {
|
|
1630
|
-
if (e)
|
|
1631
|
-
return typeof e == "function" && ut() ? Qr(e, t) : Se(e) ? it(e) : Array.isArray(e) ? e.map((n) => As(n, t) || ne.easeOut) : ne[e];
|
|
1632
|
-
}
|
|
1633
|
-
function Ms(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
|
|
1634
|
-
const u = { [t]: n };
|
|
1635
|
-
l && (u.offset = l);
|
|
1636
|
-
const c = As(a, i);
|
|
1637
|
-
return Array.isArray(c) && (u.easing = c), e.animate(u, {
|
|
1638
|
-
delay: s,
|
|
1639
|
-
duration: i,
|
|
1640
|
-
easing: Array.isArray(c) ? "linear" : c,
|
|
1641
|
-
fill: "both",
|
|
1642
|
-
iterations: r + 1,
|
|
1643
|
-
direction: o === "reverse" ? "alternate" : "normal"
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
function Mt(e, t) {
|
|
1647
|
-
e.timeline = t, e.onfinish = null;
|
|
1648
|
-
}
|
|
1649
|
-
const Es = /* @__PURE__ */ Rt(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Et = 10, no = 2e4;
|
|
1650
|
-
function so(e) {
|
|
1651
|
-
return pt(e.type) || e.type === "spring" || !Vs(e.ease);
|
|
1652
|
-
}
|
|
1653
|
-
function io(e, t) {
|
|
1654
|
-
const n = new Lt({
|
|
1655
|
-
...t,
|
|
1656
|
-
keyframes: e,
|
|
1657
|
-
repeat: 0,
|
|
1658
|
-
delay: 0,
|
|
1659
|
-
isGenerator: !0
|
|
1660
|
-
});
|
|
1661
|
-
let s = { done: !1, value: e[0] };
|
|
1662
|
-
const i = [];
|
|
1663
|
-
let r = 0;
|
|
1664
|
-
for (; !s.done && r < no; )
|
|
1665
|
-
s = n.sample(r), i.push(s.value), r += Et;
|
|
1666
|
-
return {
|
|
1667
|
-
times: void 0,
|
|
1668
|
-
keyframes: i,
|
|
1669
|
-
duration: r - Et,
|
|
1670
|
-
ease: "linear"
|
|
1671
|
-
};
|
|
1672
|
-
}
|
|
1673
|
-
const Ps = {
|
|
1674
|
-
anticipate: ns,
|
|
1675
|
-
backInOut: es,
|
|
1676
|
-
circInOut: ss
|
|
1677
|
-
};
|
|
1678
|
-
function ro(e) {
|
|
1679
|
-
return e in Ps;
|
|
1680
|
-
}
|
|
1681
|
-
class an extends Ss {
|
|
1682
|
-
constructor(t) {
|
|
1683
|
-
super(t);
|
|
1684
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
|
|
1685
|
-
this.resolver = new bs(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
|
|
1686
|
-
}
|
|
1687
|
-
initPlayback(t, n) {
|
|
1688
|
-
var s;
|
|
1689
|
-
let { duration: i = 300, times: r, ease: o, type: a, motionValue: l, name: u, startTime: c } = this.options;
|
|
1690
|
-
if (!(!((s = l.owner) === null || s === void 0) && s.current))
|
|
1691
|
-
return !1;
|
|
1692
|
-
if (typeof o == "string" && ut() && ro(o) && (o = Ps[o]), so(this.options)) {
|
|
1693
|
-
const { onComplete: h, onUpdate: p, motionValue: m, element: S, ...b } = this.options, g = io(t, b);
|
|
1694
|
-
t = g.keyframes, t.length === 1 && (t[1] = t[0]), i = g.duration, r = g.times, o = g.ease, a = "keyframes";
|
|
1695
|
-
}
|
|
1696
|
-
const f = Ms(l.owner.current, u, t, { ...this.options, duration: i, times: r, ease: o });
|
|
1697
|
-
return f.startTime = c ?? this.calcStartTime(), this.pendingTimeline ? (Mt(f, this.pendingTimeline), this.pendingTimeline = void 0) : f.onfinish = () => {
|
|
1698
|
-
const { onComplete: h } = this.options;
|
|
1699
|
-
l.set(gt(t, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
|
|
1700
|
-
}, {
|
|
1701
|
-
animation: f,
|
|
1702
|
-
duration: i,
|
|
1703
|
-
times: r,
|
|
1704
|
-
type: a,
|
|
1705
|
-
ease: o,
|
|
1706
|
-
keyframes: t
|
|
1707
|
-
};
|
|
1708
|
-
}
|
|
1709
|
-
get duration() {
|
|
1710
|
-
const { resolved: t } = this;
|
|
1711
|
-
if (!t)
|
|
1712
|
-
return 0;
|
|
1713
|
-
const { duration: n } = t;
|
|
1714
|
-
return B(n);
|
|
1715
|
-
}
|
|
1716
|
-
get time() {
|
|
1717
|
-
const { resolved: t } = this;
|
|
1718
|
-
if (!t)
|
|
1719
|
-
return 0;
|
|
1720
|
-
const { animation: n } = t;
|
|
1721
|
-
return B(n.currentTime || 0);
|
|
1722
|
-
}
|
|
1723
|
-
set time(t) {
|
|
1724
|
-
const { resolved: n } = this;
|
|
1725
|
-
if (!n)
|
|
1726
|
-
return;
|
|
1727
|
-
const { animation: s } = n;
|
|
1728
|
-
s.currentTime = C(t);
|
|
1729
|
-
}
|
|
1730
|
-
get speed() {
|
|
1731
|
-
const { resolved: t } = this;
|
|
1732
|
-
if (!t)
|
|
1733
|
-
return 1;
|
|
1734
|
-
const { animation: n } = t;
|
|
1735
|
-
return n.playbackRate;
|
|
1736
|
-
}
|
|
1737
|
-
set speed(t) {
|
|
1738
|
-
const { resolved: n } = this;
|
|
1739
|
-
if (!n)
|
|
1740
|
-
return;
|
|
1741
|
-
const { animation: s } = n;
|
|
1742
|
-
s.playbackRate = t;
|
|
1743
|
-
}
|
|
1744
|
-
get state() {
|
|
1745
|
-
const { resolved: t } = this;
|
|
1746
|
-
if (!t)
|
|
1747
|
-
return "idle";
|
|
1748
|
-
const { animation: n } = t;
|
|
1749
|
-
return n.playState;
|
|
1750
|
-
}
|
|
1751
|
-
get startTime() {
|
|
1752
|
-
const { resolved: t } = this;
|
|
1753
|
-
if (!t)
|
|
1754
|
-
return null;
|
|
1755
|
-
const { animation: n } = t;
|
|
1756
|
-
return n.startTime;
|
|
1757
|
-
}
|
|
1758
|
-
/**
|
|
1759
|
-
* Replace the default DocumentTimeline with another AnimationTimeline.
|
|
1760
|
-
* Currently used for scroll animations.
|
|
1761
|
-
*/
|
|
1762
|
-
attachTimeline(t) {
|
|
1763
|
-
if (!this._resolved)
|
|
1764
|
-
this.pendingTimeline = t;
|
|
1765
|
-
else {
|
|
1766
|
-
const { resolved: n } = this;
|
|
1767
|
-
if (!n)
|
|
1768
|
-
return K;
|
|
1769
|
-
const { animation: s } = n;
|
|
1770
|
-
Mt(s, t);
|
|
1771
|
-
}
|
|
1772
|
-
return K;
|
|
1773
|
-
}
|
|
1774
|
-
play() {
|
|
1775
|
-
if (this.isStopped)
|
|
1776
|
-
return;
|
|
1777
|
-
const { resolved: t } = this;
|
|
1778
|
-
if (!t)
|
|
1779
|
-
return;
|
|
1780
|
-
const { animation: n } = t;
|
|
1781
|
-
n.playState === "finished" && this.updateFinishedPromise(), n.play();
|
|
1782
|
-
}
|
|
1783
|
-
pause() {
|
|
1784
|
-
const { resolved: t } = this;
|
|
1785
|
-
if (!t)
|
|
1786
|
-
return;
|
|
1787
|
-
const { animation: n } = t;
|
|
1788
|
-
n.pause();
|
|
1789
|
-
}
|
|
1790
|
-
stop() {
|
|
1791
|
-
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
1792
|
-
return;
|
|
1793
|
-
this.resolveFinishedPromise(), this.updateFinishedPromise();
|
|
1794
|
-
const { resolved: t } = this;
|
|
1795
|
-
if (!t)
|
|
1796
|
-
return;
|
|
1797
|
-
const { animation: n, keyframes: s, duration: i, type: r, ease: o, times: a } = t;
|
|
1798
|
-
if (n.playState === "idle" || n.playState === "finished")
|
|
1799
|
-
return;
|
|
1800
|
-
if (this.time) {
|
|
1801
|
-
const { motionValue: u, onUpdate: c, onComplete: f, element: h, ...p } = this.options, m = new Lt({
|
|
1802
|
-
...p,
|
|
1803
|
-
keyframes: s,
|
|
1804
|
-
duration: i,
|
|
1805
|
-
type: r,
|
|
1806
|
-
ease: o,
|
|
1807
|
-
times: a,
|
|
1808
|
-
isGenerator: !0
|
|
1809
|
-
}), S = C(this.time);
|
|
1810
|
-
u.setWithVelocity(m.sample(S - Et).value, m.sample(S).value, Et);
|
|
1811
|
-
}
|
|
1812
|
-
const { onStop: l } = this.options;
|
|
1813
|
-
l && l(), this.cancel();
|
|
1814
|
-
}
|
|
1815
|
-
complete() {
|
|
1816
|
-
const { resolved: t } = this;
|
|
1817
|
-
t && t.animation.finish();
|
|
1818
|
-
}
|
|
1819
|
-
cancel() {
|
|
1820
|
-
const { resolved: t } = this;
|
|
1821
|
-
t && t.animation.cancel();
|
|
1822
|
-
}
|
|
1823
|
-
static supports(t) {
|
|
1824
|
-
const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = t;
|
|
1825
|
-
return Es() && s && Zr.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
1826
|
-
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1827
|
-
* no way to read the value from WAAPI every frame.
|
|
1828
|
-
*/
|
|
1829
|
-
!n.owner.getProps().onUpdate && !i && r !== "mirror" && o !== 0 && a !== "inertia";
|
|
1830
|
-
}
|
|
1831
|
-
}
|
|
1832
|
-
function oo({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
1833
|
-
return !!Object.keys(c).length;
|
|
1834
|
-
}
|
|
1835
|
-
const Cs = (e, t, n, s = {}, i, r) => (o) => {
|
|
1836
|
-
const a = fe(s, e) || {}, l = a.delay || s.delay || 0;
|
|
1837
|
-
let { elapsed: u = 0 } = s;
|
|
1838
|
-
u = u - C(l);
|
|
1839
|
-
let c = {
|
|
1840
|
-
keyframes: Array.isArray(n) ? n : [null, n],
|
|
1841
|
-
ease: "easeOut",
|
|
1842
|
-
velocity: t.getVelocity(),
|
|
1843
|
-
...a,
|
|
1844
|
-
delay: -u,
|
|
1845
|
-
onUpdate: (h) => {
|
|
1846
|
-
t.set(h), a.onUpdate && a.onUpdate(h);
|
|
1847
|
-
},
|
|
1848
|
-
onComplete: () => {
|
|
1849
|
-
o(), a.onComplete && a.onComplete();
|
|
1850
|
-
},
|
|
1851
|
-
name: e,
|
|
1852
|
-
motionValue: t,
|
|
1853
|
-
element: r ? void 0 : i
|
|
1854
|
-
};
|
|
1855
|
-
oo(a) || (c = {
|
|
1856
|
-
...c,
|
|
1857
|
-
...ji(e, c)
|
|
1858
|
-
}), c.duration && (c.duration = C(c.duration)), c.repeatDelay && (c.repeatDelay = C(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
1859
|
-
let f = !1;
|
|
1860
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), f && !r && t.get() !== void 0) {
|
|
1861
|
-
const h = gt(c.keyframes, a);
|
|
1862
|
-
if (h !== void 0)
|
|
1863
|
-
return M.update(() => {
|
|
1864
|
-
c.onUpdate(h), c.onComplete();
|
|
1865
|
-
}), new ae([]);
|
|
1866
|
-
}
|
|
1867
|
-
return !r && an.supports(c) ? new an(c) : new Lt(c);
|
|
1868
|
-
}, ao = (e) => Array.isArray(e), lo = (e) => ao(e) ? e[e.length - 1] || 0 : e;
|
|
1869
|
-
function ln(e) {
|
|
1870
|
-
const t = [{}, {}];
|
|
1871
|
-
return e == null || e.values.forEach((n, s) => {
|
|
1872
|
-
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
1873
|
-
}), t;
|
|
1874
|
-
}
|
|
1875
|
-
function Fs(e, t, n, s) {
|
|
1876
|
-
if (typeof t == "function") {
|
|
1877
|
-
const [i, r] = ln(s);
|
|
1878
|
-
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1879
|
-
}
|
|
1880
|
-
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
1881
|
-
const [i, r] = ln(s);
|
|
1882
|
-
t = t(n !== void 0 ? n : e.custom, i, r);
|
|
1883
|
-
}
|
|
1884
|
-
return t;
|
|
1885
|
-
}
|
|
1886
|
-
function uo(e, t, n) {
|
|
1887
|
-
const s = e.getProps();
|
|
1888
|
-
return Fs(s, t, s.custom, e);
|
|
1889
|
-
}
|
|
1890
|
-
function co(e, t, n) {
|
|
1891
|
-
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, D(n));
|
|
1892
|
-
}
|
|
1893
|
-
function fo(e, t) {
|
|
1894
|
-
const n = uo(e, t);
|
|
1895
|
-
let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
|
|
1896
|
-
r = { ...r, ...s };
|
|
1897
|
-
for (const o in r) {
|
|
1898
|
-
const a = lo(r[o]);
|
|
1899
|
-
co(e, o, a);
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
const Ve = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ho = "framerAppearId", po = "data-" + Ve(ho);
|
|
1903
|
-
function mo(e) {
|
|
1904
|
-
return e.props[po];
|
|
1905
|
-
}
|
|
1906
|
-
function go(e) {
|
|
1907
|
-
return !!(P(e) && e.add);
|
|
1908
|
-
}
|
|
1909
|
-
function yo(e, t) {
|
|
1910
|
-
const n = e.getValue("willChange");
|
|
1911
|
-
if (go(n))
|
|
1912
|
-
return n.add(t);
|
|
1913
|
-
}
|
|
1914
|
-
function vo({ protectedKeys: e, needsAnimating: t }, n) {
|
|
1915
|
-
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
1916
|
-
return t[n] = !1, s;
|
|
1917
|
-
}
|
|
1918
|
-
function bo(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1919
|
-
var r;
|
|
1920
|
-
let { transition: o = e.getDefaultTransition(), transitionEnd: a, ...l } = t;
|
|
1921
|
-
s && (o = s);
|
|
1922
|
-
const u = [], c = i && e.animationState && e.animationState.getState()[i];
|
|
1923
|
-
for (const f in l) {
|
|
1924
|
-
const h = e.getValue(f, (r = e.latestValues[f]) !== null && r !== void 0 ? r : null), p = l[f];
|
|
1925
|
-
if (p === void 0 || c && vo(c, f))
|
|
1926
|
-
continue;
|
|
1927
|
-
const m = {
|
|
1928
|
-
delay: n,
|
|
1929
|
-
...fe(o || {}, f)
|
|
1930
|
-
};
|
|
1931
|
-
let S = !1;
|
|
1932
|
-
if (window.MotionHandoffAnimation) {
|
|
1933
|
-
const g = mo(e);
|
|
1934
|
-
if (g) {
|
|
1935
|
-
const y = window.MotionHandoffAnimation(g, f, M);
|
|
1936
|
-
y !== null && (m.startTime = y, S = !0);
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
yo(e, f), h.start(Cs(f, h, p, e.shouldReduceMotion && X.has(f) ? { type: !1 } : m, e, S));
|
|
1940
|
-
const b = h.animation;
|
|
1941
|
-
b && u.push(b);
|
|
1942
|
-
}
|
|
1943
|
-
return a && Promise.all(u).then(() => {
|
|
1944
|
-
M.update(() => {
|
|
1945
|
-
a && fo(e, a);
|
|
1946
|
-
});
|
|
1947
|
-
}), u;
|
|
1948
|
-
}
|
|
1949
|
-
function So(e) {
|
|
1950
|
-
return e instanceof SVGElement && e.tagName !== "svg";
|
|
1951
|
-
}
|
|
1952
|
-
const wo = {};
|
|
1953
|
-
function To(e, { layout: t, layoutId: n }) {
|
|
1954
|
-
return X.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!wo[e] || e === "opacity");
|
|
1955
|
-
}
|
|
1956
|
-
function Os(e, t, n) {
|
|
1957
|
-
var s;
|
|
1958
|
-
const { style: i } = e, r = {};
|
|
1959
|
-
for (const o in i)
|
|
1960
|
-
(P(i[o]) || t.style && P(t.style[o]) || To(o, e) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
|
|
1961
|
-
return r;
|
|
1962
|
-
}
|
|
1963
|
-
function xo(e, t, n) {
|
|
1964
|
-
const s = Os(e, t, n);
|
|
1965
|
-
for (const i in e)
|
|
1966
|
-
if (P(e[i]) || P(t[i])) {
|
|
1967
|
-
const r = mt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
1968
|
-
s[r] = e[i];
|
|
1969
|
-
}
|
|
1970
|
-
return s;
|
|
1971
|
-
}
|
|
1972
|
-
const Vo = typeof window < "u", se = { current: null }, Ds = { current: !1 };
|
|
1973
|
-
function Ao() {
|
|
1974
|
-
if (Ds.current = !0, !!Vo)
|
|
1975
|
-
if (window.matchMedia) {
|
|
1976
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => se.current = e.matches;
|
|
1977
|
-
e.addListener(t), t();
|
|
1978
|
-
} else
|
|
1979
|
-
se.current = !1;
|
|
1980
|
-
}
|
|
1981
|
-
function Mo(e) {
|
|
1982
|
-
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
1983
|
-
}
|
|
1984
|
-
function Eo(e) {
|
|
1985
|
-
return typeof e == "string" || Array.isArray(e);
|
|
1986
|
-
}
|
|
1987
|
-
const Po = [
|
|
1988
|
-
"animate",
|
|
1989
|
-
"whileInView",
|
|
1990
|
-
"whileFocus",
|
|
1991
|
-
"whileHover",
|
|
1992
|
-
"whileTap",
|
|
1993
|
-
"whileDrag",
|
|
1994
|
-
"exit"
|
|
1995
|
-
], Co = ["initial", ...Po];
|
|
1996
|
-
function Bs(e) {
|
|
1997
|
-
return Mo(e.animate) || Co.some((t) => Eo(e[t]));
|
|
1998
|
-
}
|
|
1999
|
-
function Fo(e) {
|
|
2000
|
-
return !!(Bs(e) || e.variants);
|
|
2001
|
-
}
|
|
2002
|
-
function Oo(e, t, n) {
|
|
2003
|
-
for (const s in t) {
|
|
2004
|
-
const i = t[s], r = n[s];
|
|
2005
|
-
if (P(i))
|
|
2006
|
-
e.addValue(s, i), process.env.NODE_ENV === "development" && Bt(i.version === "11.11.11", `Attempting to mix Framer Motion versions ${i.version} with 11.11.11 may not work as expected.`);
|
|
2007
|
-
else if (P(r))
|
|
2008
|
-
e.addValue(s, D(i, { owner: e }));
|
|
2009
|
-
else if (r !== i)
|
|
2010
|
-
if (e.hasValue(s)) {
|
|
2011
|
-
const o = e.getValue(s);
|
|
2012
|
-
o.liveStyle === !0 ? o.jump(i) : o.hasAnimated || o.set(i);
|
|
2013
|
-
} else {
|
|
2014
|
-
const o = e.getStaticValue(s);
|
|
2015
|
-
e.addValue(s, D(o !== void 0 ? o : i, { owner: e }));
|
|
2016
|
-
}
|
|
2017
|
-
}
|
|
2018
|
-
for (const s in n)
|
|
2019
|
-
t[s] === void 0 && e.removeValue(s);
|
|
2020
|
-
return t;
|
|
2021
|
-
}
|
|
2022
|
-
const un = {
|
|
2023
|
-
animation: [
|
|
2024
|
-
"animate",
|
|
2025
|
-
"variants",
|
|
2026
|
-
"whileHover",
|
|
2027
|
-
"whileTap",
|
|
2028
|
-
"exit",
|
|
2029
|
-
"whileInView",
|
|
2030
|
-
"whileFocus",
|
|
2031
|
-
"whileDrag"
|
|
2032
|
-
],
|
|
2033
|
-
exit: ["exit"],
|
|
2034
|
-
drag: ["drag", "dragControls"],
|
|
2035
|
-
focus: ["whileFocus"],
|
|
2036
|
-
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
2037
|
-
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
2038
|
-
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2039
|
-
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2040
|
-
layout: ["layout", "layoutId"]
|
|
2041
|
-
}, ie = {};
|
|
2042
|
-
for (const e in un)
|
|
2043
|
-
ie[e] = {
|
|
2044
|
-
isEnabled: (t) => un[e].some((n) => !!t[n])
|
|
2045
|
-
};
|
|
2046
|
-
const Do = [...cs, E, et], Bo = (e) => Do.find(us(e)), cn = () => ({ min: 0, max: 0 }), Ae = () => ({
|
|
2047
|
-
x: cn(),
|
|
2048
|
-
y: cn()
|
|
2049
|
-
}), fn = [
|
|
2050
|
-
"AnimationStart",
|
|
2051
|
-
"AnimationComplete",
|
|
2052
|
-
"Update",
|
|
2053
|
-
"BeforeLayoutMeasure",
|
|
2054
|
-
"LayoutMeasure",
|
|
2055
|
-
"LayoutAnimationStart",
|
|
2056
|
-
"LayoutAnimationComplete"
|
|
2057
|
-
];
|
|
2058
|
-
class Rs {
|
|
2059
|
-
/**
|
|
2060
|
-
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2061
|
-
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
2062
|
-
*
|
|
2063
|
-
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
2064
|
-
* intended to be one.
|
|
2065
|
-
*/
|
|
2066
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
2067
|
-
return {};
|
|
2068
|
-
}
|
|
2069
|
-
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
2070
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = me, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2071
|
-
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2072
|
-
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2073
|
-
const h = N.now();
|
|
2074
|
-
this.renderScheduledAt < h && (this.renderScheduledAt = h, M.render(this.render, !1, !0));
|
|
2075
|
-
};
|
|
2076
|
-
const { latestValues: l, renderState: u } = o;
|
|
2077
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Bs(n), this.isVariantNode = Fo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2078
|
-
const { willChange: c, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2079
|
-
for (const h in f) {
|
|
2080
|
-
const p = f[h];
|
|
2081
|
-
l[h] !== void 0 && P(p) && p.set(l[h], !1);
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
mount(t) {
|
|
2085
|
-
this.current = t, $.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Ds.current || Ao(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : se.current, process.env.NODE_ENV !== "production" && Bt(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
2086
|
-
}
|
|
2087
|
-
unmount() {
|
|
2088
|
-
$.delete(this.current), this.projection && this.projection.unmount(), R(this.notifyUpdate), R(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
2089
|
-
for (const t in this.events)
|
|
2090
|
-
this.events[t].clear();
|
|
2091
|
-
for (const t in this.features) {
|
|
2092
|
-
const n = this.features[t];
|
|
2093
|
-
n && (n.unmount(), n.isMounted = !1);
|
|
2094
|
-
}
|
|
2095
|
-
this.current = null;
|
|
2096
|
-
}
|
|
2097
|
-
bindToMotionValue(t, n) {
|
|
2098
|
-
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
2099
|
-
const s = X.has(t), i = n.on("change", (a) => {
|
|
2100
|
-
this.latestValues[t] = a, this.props.onUpdate && M.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
2101
|
-
}), r = n.on("renderRequest", this.scheduleRender);
|
|
2102
|
-
let o;
|
|
2103
|
-
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
2104
|
-
i(), r(), o && o(), n.owner && n.stop();
|
|
2105
|
-
});
|
|
2106
|
-
}
|
|
2107
|
-
sortNodePosition(t) {
|
|
2108
|
-
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
|
|
2109
|
-
}
|
|
2110
|
-
updateFeatures() {
|
|
2111
|
-
let t = "animation";
|
|
2112
|
-
for (t in ie) {
|
|
2113
|
-
const n = ie[t];
|
|
2114
|
-
if (!n)
|
|
2115
|
-
continue;
|
|
2116
|
-
const { isEnabled: s, Feature: i } = n;
|
|
2117
|
-
if (!this.features[t] && i && s(this.props) && (this.features[t] = new i(this)), this.features[t]) {
|
|
2118
|
-
const r = this.features[t];
|
|
2119
|
-
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
2120
|
-
}
|
|
2121
|
-
}
|
|
2122
|
-
}
|
|
2123
|
-
triggerBuild() {
|
|
2124
|
-
this.build(this.renderState, this.latestValues, this.props);
|
|
2125
|
-
}
|
|
2126
|
-
/**
|
|
2127
|
-
* Measure the current viewport box with or without transforms.
|
|
2128
|
-
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
2129
|
-
* removed with a re-render to work.
|
|
2130
|
-
*/
|
|
2131
|
-
measureViewportBox() {
|
|
2132
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ae();
|
|
2133
|
-
}
|
|
2134
|
-
getStaticValue(t) {
|
|
2135
|
-
return this.latestValues[t];
|
|
2136
|
-
}
|
|
2137
|
-
setStaticValue(t, n) {
|
|
2138
|
-
this.latestValues[t] = n;
|
|
2139
|
-
}
|
|
2140
|
-
/**
|
|
2141
|
-
* Update the provided props. Ensure any newly-added motion values are
|
|
2142
|
-
* added to our map, old ones removed, and listeners updated.
|
|
2143
|
-
*/
|
|
2144
|
-
update(t, n) {
|
|
2145
|
-
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2146
|
-
for (let s = 0; s < fn.length; s++) {
|
|
2147
|
-
const i = fn[s];
|
|
2148
|
-
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2149
|
-
const r = "on" + i, o = t[r];
|
|
2150
|
-
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
2151
|
-
}
|
|
2152
|
-
this.prevMotionValues = Oo(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2153
|
-
}
|
|
2154
|
-
getProps() {
|
|
2155
|
-
return this.props;
|
|
2156
|
-
}
|
|
2157
|
-
/**
|
|
2158
|
-
* Returns the variant definition with a given name.
|
|
2159
|
-
*/
|
|
2160
|
-
getVariant(t) {
|
|
2161
|
-
return this.props.variants ? this.props.variants[t] : void 0;
|
|
2162
|
-
}
|
|
2163
|
-
/**
|
|
2164
|
-
* Returns the defined default transition on this component.
|
|
2165
|
-
*/
|
|
2166
|
-
getDefaultTransition() {
|
|
2167
|
-
return this.props.transition;
|
|
2168
|
-
}
|
|
2169
|
-
getTransformPagePoint() {
|
|
2170
|
-
return this.props.transformPagePoint;
|
|
2171
|
-
}
|
|
2172
|
-
getClosestVariantNode() {
|
|
2173
|
-
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
2174
|
-
}
|
|
2175
|
-
/**
|
|
2176
|
-
* Add a child visual element to our set of children.
|
|
2177
|
-
*/
|
|
2178
|
-
addVariantChild(t) {
|
|
2179
|
-
const n = this.getClosestVariantNode();
|
|
2180
|
-
if (n)
|
|
2181
|
-
return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
|
|
2182
|
-
}
|
|
2183
|
-
/**
|
|
2184
|
-
* Add a motion value and bind it to this visual element.
|
|
2185
|
-
*/
|
|
2186
|
-
addValue(t, n) {
|
|
2187
|
-
const s = this.values.get(t);
|
|
2188
|
-
n !== s && (s && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
|
|
2189
|
-
}
|
|
2190
|
-
/**
|
|
2191
|
-
* Remove a motion value and unbind any active subscriptions.
|
|
2192
|
-
*/
|
|
2193
|
-
removeValue(t) {
|
|
2194
|
-
this.values.delete(t);
|
|
2195
|
-
const n = this.valueSubscriptions.get(t);
|
|
2196
|
-
n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
|
|
2197
|
-
}
|
|
2198
|
-
/**
|
|
2199
|
-
* Check whether we have a motion value for this key
|
|
2200
|
-
*/
|
|
2201
|
-
hasValue(t) {
|
|
2202
|
-
return this.values.has(t);
|
|
2203
|
-
}
|
|
2204
|
-
getValue(t, n) {
|
|
2205
|
-
if (this.props.values && this.props.values[t])
|
|
2206
|
-
return this.props.values[t];
|
|
2207
|
-
let s = this.values.get(t);
|
|
2208
|
-
return s === void 0 && n !== void 0 && (s = D(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
|
|
2209
|
-
}
|
|
2210
|
-
/**
|
|
2211
|
-
* If we're trying to animate to a previously unencountered value,
|
|
2212
|
-
* we need to check for it in our state and as a last resort read it
|
|
2213
|
-
* directly from the instance (which might have performance implications).
|
|
2214
|
-
*/
|
|
2215
|
-
readValue(t, n) {
|
|
2216
|
-
var s;
|
|
2217
|
-
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (s = this.getBaseTargetFromProps(this.props, t)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, t, this.options);
|
|
2218
|
-
return i != null && (typeof i == "string" && (rs(i) || is(i)) ? i = parseFloat(i) : !Bo(i) && et.test(n) && (i = vs(t, n)), this.setBaseTarget(t, P(i) ? i.get() : i)), P(i) ? i.get() : i;
|
|
2219
|
-
}
|
|
2220
|
-
/**
|
|
2221
|
-
* Set the base target to later animate back to. This is currently
|
|
2222
|
-
* only hydrated on creation and when we first read a value.
|
|
2223
|
-
*/
|
|
2224
|
-
setBaseTarget(t, n) {
|
|
2225
|
-
this.baseTarget[t] = n;
|
|
2226
|
-
}
|
|
2227
|
-
/**
|
|
2228
|
-
* Find the base target for a value thats been removed from all animation
|
|
2229
|
-
* props.
|
|
2230
|
-
*/
|
|
2231
|
-
getBaseTarget(t) {
|
|
2232
|
-
var n;
|
|
2233
|
-
const { initial: s } = this.props;
|
|
2234
|
-
let i;
|
|
2235
|
-
if (typeof s == "string" || typeof s == "object") {
|
|
2236
|
-
const o = Fs(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
2237
|
-
o && (i = o[t]);
|
|
2238
|
-
}
|
|
2239
|
-
if (s && i !== void 0)
|
|
2240
|
-
return i;
|
|
2241
|
-
const r = this.getBaseTargetFromProps(this.props, t);
|
|
2242
|
-
return r !== void 0 && !P(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
2243
|
-
}
|
|
2244
|
-
on(t, n) {
|
|
2245
|
-
return this.events[t] || (this.events[t] = new Gn()), this.events[t].add(n);
|
|
2246
|
-
}
|
|
2247
|
-
notify(t, ...n) {
|
|
2248
|
-
this.events[t] && this.events[t].notify(...n);
|
|
2249
|
-
}
|
|
2250
|
-
}
|
|
2251
|
-
class Is extends Rs {
|
|
2252
|
-
constructor() {
|
|
2253
|
-
super(...arguments), this.KeyframeResolver = bs;
|
|
2254
|
-
}
|
|
2255
|
-
sortInstanceNodePosition(t, n) {
|
|
2256
|
-
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
2257
|
-
}
|
|
2258
|
-
getBaseTargetFromProps(t, n) {
|
|
2259
|
-
return t.style ? t.style[n] : void 0;
|
|
2260
|
-
}
|
|
2261
|
-
removeValueFromRenderState(t, { vars: n, style: s }) {
|
|
2262
|
-
delete n[t], delete s[t];
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
const Ls = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Ro = {
|
|
2266
|
-
x: "translateX",
|
|
2267
|
-
y: "translateY",
|
|
2268
|
-
z: "translateZ",
|
|
2269
|
-
transformPerspective: "perspective"
|
|
2270
|
-
}, Io = mt.length;
|
|
2271
|
-
function Lo(e, t, n) {
|
|
2272
|
-
let s = "", i = !0;
|
|
2273
|
-
for (let r = 0; r < Io; r++) {
|
|
2274
|
-
const o = mt[r], a = e[o];
|
|
2275
|
-
if (a === void 0)
|
|
2276
|
-
continue;
|
|
2277
|
-
let l = !0;
|
|
2278
|
-
if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
2279
|
-
const u = Ls(a, ve[o]);
|
|
2280
|
-
if (!l) {
|
|
2281
|
-
i = !1;
|
|
2282
|
-
const c = Ro[o] || o;
|
|
2283
|
-
s += `${c}(${u}) `;
|
|
2284
|
-
}
|
|
2285
|
-
n && (t[o] = u);
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
|
|
2289
|
-
}
|
|
2290
|
-
function Ns(e, t, n) {
|
|
2291
|
-
const { style: s, vars: i, transformOrigin: r } = e;
|
|
2292
|
-
let o = !1, a = !1;
|
|
2293
|
-
for (const l in t) {
|
|
2294
|
-
const u = t[l];
|
|
2295
|
-
if (X.has(l)) {
|
|
2296
|
-
o = !0;
|
|
2297
|
-
continue;
|
|
2298
|
-
} else if (as(l)) {
|
|
2299
|
-
i[l] = u;
|
|
2300
|
-
continue;
|
|
2301
|
-
} else {
|
|
2302
|
-
const c = Ls(u, ve[l]);
|
|
2303
|
-
l.startsWith("origin") ? (a = !0, r[l] = c) : s[l] = c;
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
if (t.transform || (o || n ? s.transform = Lo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2307
|
-
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = r;
|
|
2308
|
-
s.transformOrigin = `${l} ${u} ${c}`;
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
function hn(e, t, n) {
|
|
2312
|
-
return typeof e == "string" ? e : d.transform(t + n * e);
|
|
2313
|
-
}
|
|
2314
|
-
function No(e, t, n) {
|
|
2315
|
-
const s = hn(t, e.x, e.width), i = hn(n, e.y, e.height);
|
|
2316
|
-
return `${s} ${i}`;
|
|
2317
|
-
}
|
|
2318
|
-
const $o = {
|
|
2319
|
-
offset: "stroke-dashoffset",
|
|
2320
|
-
array: "stroke-dasharray"
|
|
2321
|
-
}, Ko = {
|
|
2322
|
-
offset: "strokeDashoffset",
|
|
2323
|
-
array: "strokeDasharray"
|
|
2324
|
-
};
|
|
2325
|
-
function _o(e, t, n = 1, s = 0, i = !0) {
|
|
2326
|
-
e.pathLength = 1;
|
|
2327
|
-
const r = i ? $o : Ko;
|
|
2328
|
-
e[r.offset] = d.transform(-s);
|
|
2329
|
-
const o = d.transform(t), a = d.transform(n);
|
|
2330
|
-
e[r.array] = `${o} ${a}`;
|
|
2331
|
-
}
|
|
2332
|
-
function Wo(e, {
|
|
2333
|
-
attrX: t,
|
|
2334
|
-
attrY: n,
|
|
2335
|
-
attrScale: s,
|
|
2336
|
-
originX: i,
|
|
2337
|
-
originY: r,
|
|
2338
|
-
pathLength: o,
|
|
2339
|
-
pathSpacing: a = 1,
|
|
2340
|
-
pathOffset: l = 0,
|
|
2341
|
-
// This is object creation, which we try to avoid per-frame.
|
|
2342
|
-
...u
|
|
2343
|
-
}, c, f) {
|
|
2344
|
-
if (Ns(e, u, f), c) {
|
|
2345
|
-
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2346
|
-
return;
|
|
2347
|
-
}
|
|
2348
|
-
e.attrs = e.style, e.style = {};
|
|
2349
|
-
const { attrs: h, style: p, dimensions: m } = e;
|
|
2350
|
-
h.transform && (m && (p.transform = h.transform), delete h.transform), m && (i !== void 0 || r !== void 0 || p.transform) && (p.transformOrigin = No(m, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), s !== void 0 && (h.scale = s), o !== void 0 && _o(h, o, a, l, !1);
|
|
2351
|
-
}
|
|
2352
|
-
const $s = /* @__PURE__ */ new Set([
|
|
2353
|
-
"baseFrequency",
|
|
2354
|
-
"diffuseConstant",
|
|
2355
|
-
"kernelMatrix",
|
|
2356
|
-
"kernelUnitLength",
|
|
2357
|
-
"keySplines",
|
|
2358
|
-
"keyTimes",
|
|
2359
|
-
"limitingConeAngle",
|
|
2360
|
-
"markerHeight",
|
|
2361
|
-
"markerWidth",
|
|
2362
|
-
"numOctaves",
|
|
2363
|
-
"targetX",
|
|
2364
|
-
"targetY",
|
|
2365
|
-
"surfaceScale",
|
|
2366
|
-
"specularConstant",
|
|
2367
|
-
"specularExponent",
|
|
2368
|
-
"stdDeviation",
|
|
2369
|
-
"tableValues",
|
|
2370
|
-
"viewBox",
|
|
2371
|
-
"gradientTransform",
|
|
2372
|
-
"pathLength",
|
|
2373
|
-
"startOffset",
|
|
2374
|
-
"textLength",
|
|
2375
|
-
"lengthAdjust"
|
|
2376
|
-
]);
|
|
2377
|
-
function Ks(e, { style: t, vars: n }, s, i) {
|
|
2378
|
-
Object.assign(e.style, t, i && i.getProjectionStyles(s));
|
|
2379
|
-
for (const r in n)
|
|
2380
|
-
e.style.setProperty(r, n[r]);
|
|
2381
|
-
}
|
|
2382
|
-
function ko(e, t, n, s) {
|
|
2383
|
-
Ks(e, t, void 0, s);
|
|
2384
|
-
for (const i in t.attrs)
|
|
2385
|
-
e.setAttribute($s.has(i) ? i : Ve(i), t.attrs[i]);
|
|
2386
|
-
}
|
|
2387
|
-
const Go = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2388
|
-
class zo extends Is {
|
|
2389
|
-
constructor() {
|
|
2390
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ae;
|
|
2391
|
-
}
|
|
2392
|
-
getBaseTargetFromProps(t, n) {
|
|
2393
|
-
return t[n];
|
|
2394
|
-
}
|
|
2395
|
-
readValueFromInstance(t, n) {
|
|
2396
|
-
if (X.has(n)) {
|
|
2397
|
-
const s = be(n);
|
|
2398
|
-
return s && s.default || 0;
|
|
2399
|
-
}
|
|
2400
|
-
return n = $s.has(n) ? n : Ve(n), t.getAttribute(n);
|
|
2401
|
-
}
|
|
2402
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
2403
|
-
return xo(t, n, s);
|
|
2404
|
-
}
|
|
2405
|
-
build(t, n, s) {
|
|
2406
|
-
Wo(t, n, this.isSVGTag, s.transformTemplate);
|
|
2407
|
-
}
|
|
2408
|
-
renderInstance(t, n, s, i) {
|
|
2409
|
-
ko(t, n, s, i);
|
|
2410
|
-
}
|
|
2411
|
-
mount(t) {
|
|
2412
|
-
this.isSVGTag = Go(t.tagName), super.mount(t);
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
function Uo({ top: e, left: t, right: n, bottom: s }) {
|
|
2416
|
-
return {
|
|
2417
|
-
x: { min: t, max: n },
|
|
2418
|
-
y: { min: e, max: s }
|
|
2419
|
-
};
|
|
2420
|
-
}
|
|
2421
|
-
function jo(e, t) {
|
|
2422
|
-
if (!t)
|
|
2423
|
-
return e;
|
|
2424
|
-
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
2425
|
-
return {
|
|
2426
|
-
top: n.y,
|
|
2427
|
-
left: n.x,
|
|
2428
|
-
bottom: s.y,
|
|
2429
|
-
right: s.x
|
|
2430
|
-
};
|
|
2431
|
-
}
|
|
2432
|
-
function Ho(e, t) {
|
|
2433
|
-
return Uo(jo(e.getBoundingClientRect(), t));
|
|
2434
|
-
}
|
|
2435
|
-
function Yo(e) {
|
|
2436
|
-
return window.getComputedStyle(e);
|
|
2437
|
-
}
|
|
2438
|
-
class Xo extends Is {
|
|
2439
|
-
constructor() {
|
|
2440
|
-
super(...arguments), this.type = "html", this.renderInstance = Ks;
|
|
2441
|
-
}
|
|
2442
|
-
readValueFromInstance(t, n) {
|
|
2443
|
-
if (X.has(n)) {
|
|
2444
|
-
const s = be(n);
|
|
2445
|
-
return s && s.default || 0;
|
|
2446
|
-
} else {
|
|
2447
|
-
const s = Yo(t), i = (as(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
2448
|
-
return typeof i == "string" ? i.trim() : i;
|
|
2449
|
-
}
|
|
2450
|
-
}
|
|
2451
|
-
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
2452
|
-
return Ho(t, n);
|
|
2453
|
-
}
|
|
2454
|
-
build(t, n, s) {
|
|
2455
|
-
Ns(t, n, s.transformTemplate);
|
|
2456
|
-
}
|
|
2457
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
2458
|
-
return Os(t, n, s);
|
|
2459
|
-
}
|
|
2460
|
-
handleChildMotionValue() {
|
|
2461
|
-
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2462
|
-
const { children: t } = this.props;
|
|
2463
|
-
P(t) && (this.childSubscription = t.on("change", (n) => {
|
|
2464
|
-
this.current && (this.current.textContent = `${n}`);
|
|
2465
|
-
}));
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
function qo(e, t) {
|
|
2469
|
-
return e in t;
|
|
2470
|
-
}
|
|
2471
|
-
class Zo extends Rs {
|
|
2472
|
-
constructor() {
|
|
2473
|
-
super(...arguments), this.type = "object";
|
|
2474
|
-
}
|
|
2475
|
-
readValueFromInstance(t, n) {
|
|
2476
|
-
if (qo(n, t)) {
|
|
2477
|
-
const s = t[n];
|
|
2478
|
-
if (typeof s == "string" || typeof s == "number")
|
|
2479
|
-
return s;
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
getBaseTargetFromProps() {
|
|
2483
|
-
}
|
|
2484
|
-
removeValueFromRenderState(t, n) {
|
|
2485
|
-
delete n.output[t];
|
|
2486
|
-
}
|
|
2487
|
-
measureInstanceViewportBox() {
|
|
2488
|
-
return Ae();
|
|
2489
|
-
}
|
|
2490
|
-
build(t, n) {
|
|
2491
|
-
Object.assign(t.output, n);
|
|
2492
|
-
}
|
|
2493
|
-
renderInstance(t, { output: n }) {
|
|
2494
|
-
Object.assign(t, n);
|
|
2495
|
-
}
|
|
2496
|
-
sortInstanceNodePosition() {
|
|
2497
|
-
return 0;
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
function _s(e) {
|
|
2501
|
-
const t = {
|
|
2502
|
-
presenceContext: null,
|
|
2503
|
-
props: {},
|
|
2504
|
-
visualState: {
|
|
2505
|
-
renderState: {
|
|
2506
|
-
transform: {},
|
|
2507
|
-
transformOrigin: {},
|
|
2508
|
-
style: {},
|
|
2509
|
-
vars: {},
|
|
2510
|
-
attrs: {}
|
|
2511
|
-
},
|
|
2512
|
-
latestValues: {}
|
|
2513
|
-
}
|
|
2514
|
-
}, n = So(e) ? new zo(t) : new Xo(t);
|
|
2515
|
-
n.mount(e), $.set(e, n);
|
|
2516
|
-
}
|
|
2517
|
-
function Jo(e) {
|
|
2518
|
-
const t = {
|
|
2519
|
-
presenceContext: null,
|
|
2520
|
-
props: {},
|
|
2521
|
-
visualState: {
|
|
2522
|
-
renderState: {
|
|
2523
|
-
output: {}
|
|
2524
|
-
},
|
|
2525
|
-
latestValues: {}
|
|
2526
|
-
}
|
|
2527
|
-
}, n = new Zo(t);
|
|
2528
|
-
n.mount(e), $.set(e, n);
|
|
2529
|
-
}
|
|
2530
|
-
function Qo(e, t, n) {
|
|
2531
|
-
const s = P(e) ? e : D(e);
|
|
2532
|
-
return s.start(Cs("", s, t, n)), s.animation;
|
|
2533
|
-
}
|
|
2534
|
-
function ta(e, t) {
|
|
2535
|
-
return P(e) || typeof e == "number" || typeof e == "string" && !ce(t);
|
|
2536
|
-
}
|
|
2537
|
-
function Ws(e, t, n, s) {
|
|
2538
|
-
const i = [];
|
|
2539
|
-
if (ta(e, t))
|
|
2540
|
-
i.push(Qo(e, ce(t) && t.default || t, n && (n.default || n)));
|
|
2541
|
-
else {
|
|
2542
|
-
const r = Xn(e, t, s), o = r.length;
|
|
2543
|
-
I(!!o, "No valid elements provided.");
|
|
2544
|
-
for (let a = 0; a < o; a++) {
|
|
2545
|
-
const l = r[a], u = l instanceof Element ? _s : Jo;
|
|
2546
|
-
$.has(l) || u(l);
|
|
2547
|
-
const c = $.get(l), f = { ...n };
|
|
2548
|
-
"delay" in f && typeof f.delay == "function" && (f.delay = f.delay(a, o)), i.push(...bo(c, { ...t, transition: f }, {}));
|
|
2549
|
-
}
|
|
2550
|
-
}
|
|
2551
|
-
return i;
|
|
2552
|
-
}
|
|
2553
|
-
function ea(e, t, n) {
|
|
2554
|
-
const s = [];
|
|
2555
|
-
return Ni(e, t, n, { spring: le }).forEach(({ keyframes: r, transition: o }, a) => {
|
|
2556
|
-
s.push(...Ws(a, r, o));
|
|
2557
|
-
}), s;
|
|
2558
|
-
}
|
|
2559
|
-
function na(e) {
|
|
2560
|
-
return Array.isArray(e) && Array.isArray(e[0]);
|
|
2561
|
-
}
|
|
2562
|
-
function sa(e) {
|
|
2563
|
-
function t(n, s, i) {
|
|
2564
|
-
let r = [];
|
|
2565
|
-
na(n) ? r = ea(n, s, e) : r = Ws(n, s, i, e);
|
|
2566
|
-
const o = new ae(r);
|
|
2567
|
-
return e && e.animations.push(o), o;
|
|
2568
|
-
}
|
|
2569
|
-
return t;
|
|
2570
|
-
}
|
|
2571
|
-
const ia = sa();
|
|
2572
|
-
function ra(e, t, n) {
|
|
2573
|
-
e.style.setProperty(`--${t}`, n);
|
|
2574
|
-
}
|
|
2575
|
-
function oa(e, t, n) {
|
|
2576
|
-
e.style[t] = n;
|
|
2577
|
-
}
|
|
2578
|
-
const aa = /* @__PURE__ */ Rt(() => {
|
|
2579
|
-
try {
|
|
2580
|
-
document.createElement("div").animate({ opacity: [1] });
|
|
2581
|
-
} catch {
|
|
2582
|
-
return !1;
|
|
2583
|
-
}
|
|
2584
|
-
return !0;
|
|
2585
|
-
}), wt = /* @__PURE__ */ new WeakMap();
|
|
2586
|
-
function la(e, t, n) {
|
|
2587
|
-
for (let s = 0; s < t.length; s++)
|
|
2588
|
-
t[s] === null && (t[s] = s === 0 ? n() : t[s - 1]), typeof t[s] == "number" && Qt[e] && (t[s] = Qt[e].transform(t[s]));
|
|
2589
|
-
!aa() && t.length < 2 && t.unshift(n());
|
|
2590
|
-
}
|
|
2591
|
-
const dn = "easeOut";
|
|
2592
|
-
function pn(e) {
|
|
2593
|
-
const t = wt.get(e) || /* @__PURE__ */ new Map();
|
|
2594
|
-
return wt.set(e, t), wt.get(e);
|
|
2595
|
-
}
|
|
2596
|
-
class ua {
|
|
2597
|
-
constructor(t, n, s, i) {
|
|
2598
|
-
const r = n.startsWith("--");
|
|
2599
|
-
this.setValue = r ? ra : oa, this.options = i, this.updateFinishedPromise(), I(typeof i.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
2600
|
-
const o = pn(t).get(n);
|
|
2601
|
-
o && o.stop();
|
|
2602
|
-
const a = () => n.startsWith("--") ? t.style.getPropertyValue(n) : window.getComputedStyle(t)[n];
|
|
2603
|
-
if (Array.isArray(s) || (s = [s]), la(n, s, a), pt(i.type)) {
|
|
2604
|
-
const u = Hn(i, 100, i.type);
|
|
2605
|
-
i.ease = ut() ? u.ease : dn, i.duration = C(u.duration), i.type = "keyframes";
|
|
2606
|
-
} else
|
|
2607
|
-
i.ease = i.ease || dn;
|
|
2608
|
-
this.removeAnimation = () => {
|
|
2609
|
-
var u;
|
|
2610
|
-
return (u = wt.get(t)) === null || u === void 0 ? void 0 : u.delete(n);
|
|
2611
|
-
};
|
|
2612
|
-
const l = () => {
|
|
2613
|
-
this.setValue(t, n, gt(s, this.options)), this.cancel(), this.resolveFinishedPromise();
|
|
2614
|
-
};
|
|
2615
|
-
Es() ? (this.animation = Ms(t, n, s, i), i.autoplay === !1 && this.animation.pause(), this.animation.onfinish = l, this.pendingTimeline && Mt(this.animation, this.pendingTimeline), pn(t).set(n, this)) : l();
|
|
2616
|
-
}
|
|
2617
|
-
get duration() {
|
|
2618
|
-
return B(this.options.duration || 300);
|
|
2619
|
-
}
|
|
2620
|
-
get time() {
|
|
2621
|
-
var t;
|
|
2622
|
-
return this.animation ? B(((t = this.animation) === null || t === void 0 ? void 0 : t.currentTime) || 0) : 0;
|
|
2623
|
-
}
|
|
2624
|
-
set time(t) {
|
|
2625
|
-
this.animation && (this.animation.currentTime = C(t));
|
|
2626
|
-
}
|
|
2627
|
-
get speed() {
|
|
2628
|
-
return this.animation ? this.animation.playbackRate : 1;
|
|
2629
|
-
}
|
|
2630
|
-
set speed(t) {
|
|
2631
|
-
this.animation && (this.animation.playbackRate = t);
|
|
2632
|
-
}
|
|
2633
|
-
get state() {
|
|
2634
|
-
return this.animation ? this.animation.playState : "finished";
|
|
2635
|
-
}
|
|
2636
|
-
get startTime() {
|
|
2637
|
-
return this.animation ? this.animation.startTime : null;
|
|
2638
|
-
}
|
|
2639
|
-
play() {
|
|
2640
|
-
this.state === "finished" && this.updateFinishedPromise(), this.animation && this.animation.play();
|
|
2641
|
-
}
|
|
2642
|
-
pause() {
|
|
2643
|
-
this.animation && this.animation.pause();
|
|
2644
|
-
}
|
|
2645
|
-
stop() {
|
|
2646
|
-
!this.animation || this.state === "idle" || this.state === "finished" || (this.animation.commitStyles && this.animation.commitStyles(), this.cancel());
|
|
2647
|
-
}
|
|
2648
|
-
complete() {
|
|
2649
|
-
this.animation && this.animation.finish();
|
|
2650
|
-
}
|
|
2651
|
-
cancel() {
|
|
2652
|
-
this.removeAnimation();
|
|
2653
|
-
try {
|
|
2654
|
-
this.animation && this.animation.cancel();
|
|
2655
|
-
} catch {
|
|
2656
|
-
}
|
|
2657
|
-
}
|
|
2658
|
-
/**
|
|
2659
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
2660
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
2661
|
-
* reject if its cancels.
|
|
2662
|
-
*/
|
|
2663
|
-
then(t, n) {
|
|
2664
|
-
return this.currentFinishedPromise.then(t, n);
|
|
2665
|
-
}
|
|
2666
|
-
updateFinishedPromise() {
|
|
2667
|
-
this.currentFinishedPromise = new Promise((t) => {
|
|
2668
|
-
this.resolveFinishedPromise = t;
|
|
2669
|
-
});
|
|
2670
|
-
}
|
|
2671
|
-
attachTimeline(t) {
|
|
2672
|
-
return this.animation ? Mt(this.animation, t) : this.pendingTimeline = t, K;
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
function ca(e, t, n, s) {
|
|
2676
|
-
const i = It(e, s), r = i.length;
|
|
2677
|
-
I(!!r, "No valid element provided.");
|
|
2678
|
-
const o = [];
|
|
2679
|
-
for (let a = 0; a < r; a++) {
|
|
2680
|
-
const l = i[a], u = { ...n };
|
|
2681
|
-
typeof u.delay == "function" && (u.delay = u.delay(a, r));
|
|
2682
|
-
for (const c in t) {
|
|
2683
|
-
const f = t[c], h = {
|
|
2684
|
-
...fe(n, c)
|
|
2685
|
-
};
|
|
2686
|
-
h.duration = h.duration ? C(h.duration) : h.duration, h.delay = C(h.delay || 0), o.push(new ua(l, c, f, h));
|
|
2687
|
-
}
|
|
2688
|
-
}
|
|
2689
|
-
return o;
|
|
2690
|
-
}
|
|
2691
|
-
const fa = (e) => {
|
|
2692
|
-
function t(n, s, i) {
|
|
2693
|
-
return new ae(ca(n, s, i, e));
|
|
2694
|
-
}
|
|
2695
|
-
return t;
|
|
2696
|
-
}, Nl = /* @__PURE__ */ fa(), Tt = /* @__PURE__ */ new WeakMap();
|
|
2697
|
-
let W;
|
|
2698
|
-
function ha(e, t) {
|
|
2699
|
-
if (t) {
|
|
2700
|
-
const { inlineSize: n, blockSize: s } = t[0];
|
|
2701
|
-
return { width: n, height: s };
|
|
2702
|
-
} else return e instanceof SVGElement && "getBBox" in e ? e.getBBox() : {
|
|
2703
|
-
width: e.offsetWidth,
|
|
2704
|
-
height: e.offsetHeight
|
|
2705
|
-
};
|
|
2706
|
-
}
|
|
2707
|
-
function da({ target: e, contentRect: t, borderBoxSize: n }) {
|
|
2708
|
-
var s;
|
|
2709
|
-
(s = Tt.get(e)) === null || s === void 0 || s.forEach((i) => {
|
|
2710
|
-
i({
|
|
2711
|
-
target: e,
|
|
2712
|
-
contentSize: t,
|
|
2713
|
-
get size() {
|
|
2714
|
-
return ha(e, n);
|
|
2715
|
-
}
|
|
2716
|
-
});
|
|
2717
|
-
});
|
|
2718
|
-
}
|
|
2719
|
-
function pa(e) {
|
|
2720
|
-
e.forEach(da);
|
|
2721
|
-
}
|
|
2722
|
-
function ma() {
|
|
2723
|
-
typeof ResizeObserver > "u" || (W = new ResizeObserver(pa));
|
|
2724
|
-
}
|
|
2725
|
-
function ga(e, t) {
|
|
2726
|
-
W || ma();
|
|
2727
|
-
const n = It(e);
|
|
2728
|
-
return n.forEach((s) => {
|
|
2729
|
-
let i = Tt.get(s);
|
|
2730
|
-
i || (i = /* @__PURE__ */ new Set(), Tt.set(s, i)), i.add(t), W == null || W.observe(s);
|
|
2731
|
-
}), () => {
|
|
2732
|
-
n.forEach((s) => {
|
|
2733
|
-
const i = Tt.get(s);
|
|
2734
|
-
i == null || i.delete(t), i != null && i.size || W == null || W.unobserve(s);
|
|
2735
|
-
});
|
|
2736
|
-
};
|
|
2737
|
-
}
|
|
2738
|
-
const xt = /* @__PURE__ */ new Set();
|
|
2739
|
-
let ot;
|
|
2740
|
-
function ya() {
|
|
2741
|
-
ot = () => {
|
|
2742
|
-
const e = {
|
|
2743
|
-
width: window.innerWidth,
|
|
2744
|
-
height: window.innerHeight
|
|
2745
|
-
}, t = {
|
|
2746
|
-
target: window,
|
|
2747
|
-
size: e,
|
|
2748
|
-
contentSize: e
|
|
2749
|
-
};
|
|
2750
|
-
xt.forEach((n) => n(t));
|
|
2751
|
-
}, window.addEventListener("resize", ot);
|
|
2752
|
-
}
|
|
2753
|
-
function va(e) {
|
|
2754
|
-
return xt.add(e), ot || ya(), () => {
|
|
2755
|
-
xt.delete(e), !xt.size && ot && (ot = void 0);
|
|
2756
|
-
};
|
|
2757
|
-
}
|
|
2758
|
-
function ba(e, t) {
|
|
2759
|
-
return typeof e == "function" ? va(e) : ga(e, t);
|
|
2760
|
-
}
|
|
2761
|
-
const Sa = 50, mn = () => ({
|
|
2762
|
-
current: 0,
|
|
2763
|
-
offset: [],
|
|
2764
|
-
progress: 0,
|
|
2765
|
-
scrollLength: 0,
|
|
2766
|
-
targetOffset: 0,
|
|
2767
|
-
targetLength: 0,
|
|
2768
|
-
containerLength: 0,
|
|
2769
|
-
velocity: 0
|
|
2770
|
-
}), wa = () => ({
|
|
2771
|
-
time: 0,
|
|
2772
|
-
x: mn(),
|
|
2773
|
-
y: mn()
|
|
2774
|
-
}), Ta = {
|
|
2775
|
-
x: {
|
|
2776
|
-
length: "Width",
|
|
2777
|
-
position: "Left"
|
|
2778
|
-
},
|
|
2779
|
-
y: {
|
|
2780
|
-
length: "Height",
|
|
2781
|
-
position: "Top"
|
|
2782
|
-
}
|
|
2783
|
-
};
|
|
2784
|
-
function gn(e, t, n, s) {
|
|
2785
|
-
const i = n[t], { length: r, position: o } = Ta[t], a = i.current, l = n.time;
|
|
2786
|
-
i.current = e[`scroll${o}`], i.scrollLength = e[`scroll${r}`] - e[`client${r}`], i.offset.length = 0, i.offset[0] = 0, i.offset[1] = i.scrollLength, i.progress = dt(0, i.scrollLength, i.current);
|
|
2787
|
-
const u = s - l;
|
|
2788
|
-
i.velocity = u > Sa ? 0 : oe(i.current - a, u);
|
|
2789
|
-
}
|
|
2790
|
-
function xa(e, t, n) {
|
|
2791
|
-
gn(e, "x", t, n), gn(e, "y", t, n), t.time = n;
|
|
2792
|
-
}
|
|
2793
|
-
function Va(e, t) {
|
|
2794
|
-
const n = { x: 0, y: 0 };
|
|
2795
|
-
let s = e;
|
|
2796
|
-
for (; s && s !== t; )
|
|
2797
|
-
if (s instanceof HTMLElement)
|
|
2798
|
-
n.x += s.offsetLeft, n.y += s.offsetTop, s = s.offsetParent;
|
|
2799
|
-
else if (s.tagName === "svg") {
|
|
2800
|
-
const i = s.getBoundingClientRect();
|
|
2801
|
-
s = s.parentElement;
|
|
2802
|
-
const r = s.getBoundingClientRect();
|
|
2803
|
-
n.x += i.left - r.left, n.y += i.top - r.top;
|
|
2804
|
-
} else if (s instanceof SVGGraphicsElement) {
|
|
2805
|
-
const { x: i, y: r } = s.getBBox();
|
|
2806
|
-
n.x += i, n.y += r;
|
|
2807
|
-
let o = null, a = s.parentNode;
|
|
2808
|
-
for (; !o; )
|
|
2809
|
-
a.tagName === "svg" && (o = a), a = s.parentNode;
|
|
2810
|
-
s = o;
|
|
2811
|
-
} else
|
|
2812
|
-
break;
|
|
2813
|
-
return n;
|
|
2814
|
-
}
|
|
2815
|
-
const Aa = {
|
|
2816
|
-
Enter: [
|
|
2817
|
-
[0, 1],
|
|
2818
|
-
[1, 1]
|
|
2819
|
-
],
|
|
2820
|
-
Exit: [
|
|
2821
|
-
[0, 0],
|
|
2822
|
-
[1, 0]
|
|
2823
|
-
],
|
|
2824
|
-
Any: [
|
|
2825
|
-
[1, 0],
|
|
2826
|
-
[0, 1]
|
|
2827
|
-
],
|
|
2828
|
-
All: [
|
|
2829
|
-
[0, 0],
|
|
2830
|
-
[1, 1]
|
|
2831
|
-
]
|
|
2832
|
-
}, re = {
|
|
2833
|
-
start: 0,
|
|
2834
|
-
center: 0.5,
|
|
2835
|
-
end: 1
|
|
2836
|
-
};
|
|
2837
|
-
function yn(e, t, n = 0) {
|
|
2838
|
-
let s = 0;
|
|
2839
|
-
if (e in re && (e = re[e]), typeof e == "string") {
|
|
2840
|
-
const i = parseFloat(e);
|
|
2841
|
-
e.endsWith("px") ? s = i : e.endsWith("%") ? e = i / 100 : e.endsWith("vw") ? s = i / 100 * document.documentElement.clientWidth : e.endsWith("vh") ? s = i / 100 * document.documentElement.clientHeight : e = i;
|
|
2842
|
-
}
|
|
2843
|
-
return typeof e == "number" && (s = t * e), n + s;
|
|
2844
|
-
}
|
|
2845
|
-
const Ma = [0, 0];
|
|
2846
|
-
function Ea(e, t, n, s) {
|
|
2847
|
-
let i = Array.isArray(e) ? e : Ma, r = 0, o = 0;
|
|
2848
|
-
return typeof e == "number" ? i = [e, e] : typeof e == "string" && (e = e.trim(), e.includes(" ") ? i = e.split(" ") : i = [e, re[e] ? e : "0"]), r = yn(i[0], n, s), o = yn(i[1], t), r - o;
|
|
2849
|
-
}
|
|
2850
|
-
const Pa = { x: 0, y: 0 };
|
|
2851
|
-
function Ca(e) {
|
|
2852
|
-
return "getBBox" in e && e.tagName !== "svg" ? e.getBBox() : { width: e.clientWidth, height: e.clientHeight };
|
|
2853
|
-
}
|
|
2854
|
-
function Fa(e, t, n) {
|
|
2855
|
-
const { offset: s = Aa.All } = n, { target: i = e, axis: r = "y" } = n, o = r === "y" ? "height" : "width", a = i !== e ? Va(i, e) : Pa, l = i === e ? { width: e.scrollWidth, height: e.scrollHeight } : Ca(i), u = {
|
|
2856
|
-
width: e.clientWidth,
|
|
2857
|
-
height: e.clientHeight
|
|
2858
|
-
};
|
|
2859
|
-
t[r].offset.length = 0;
|
|
2860
|
-
let c = !t[r].interpolate;
|
|
2861
|
-
const f = s.length;
|
|
2862
|
-
for (let h = 0; h < f; h++) {
|
|
2863
|
-
const p = Ea(s[h], u[o], l[o], a[r]);
|
|
2864
|
-
!c && p !== t[r].interpolatorOffsets[h] && (c = !0), t[r].offset[h] = p;
|
|
2865
|
-
}
|
|
2866
|
-
c && (t[r].interpolate = xe(t[r].offset, ue(s)), t[r].interpolatorOffsets = [...t[r].offset]), t[r].progress = t[r].interpolate(t[r].current);
|
|
2867
|
-
}
|
|
2868
|
-
function Oa(e, t = e, n) {
|
|
2869
|
-
if (n.x.targetOffset = 0, n.y.targetOffset = 0, t !== e) {
|
|
2870
|
-
let s = t;
|
|
2871
|
-
for (; s && s !== e; )
|
|
2872
|
-
n.x.targetOffset += s.offsetLeft, n.y.targetOffset += s.offsetTop, s = s.offsetParent;
|
|
2873
|
-
}
|
|
2874
|
-
n.x.targetLength = t === e ? t.scrollWidth : t.clientWidth, n.y.targetLength = t === e ? t.scrollHeight : t.clientHeight, n.x.containerLength = e.clientWidth, n.y.containerLength = e.clientHeight, process.env.NODE_ENV !== "production" && e && t && t !== e && Bt(getComputedStyle(e).position !== "static", "Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.");
|
|
2875
|
-
}
|
|
2876
|
-
function Da(e, t, n, s = {}) {
|
|
2877
|
-
return {
|
|
2878
|
-
measure: () => Oa(e, s.target, n),
|
|
2879
|
-
update: (i) => {
|
|
2880
|
-
xa(e, n, i), (s.offset || s.target) && Fa(e, n, s);
|
|
2881
|
-
},
|
|
2882
|
-
notify: () => t(n)
|
|
2883
|
-
};
|
|
2884
|
-
}
|
|
2885
|
-
const nt = /* @__PURE__ */ new WeakMap(), vn = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), bn = (e) => e === document.documentElement ? window : e;
|
|
2886
|
-
function Me(e, { container: t = document.documentElement, ...n } = {}) {
|
|
2887
|
-
let s = Gt.get(t);
|
|
2888
|
-
s || (s = /* @__PURE__ */ new Set(), Gt.set(t, s));
|
|
2889
|
-
const i = wa(), r = Da(t, e, i, n);
|
|
2890
|
-
if (s.add(r), !nt.has(t)) {
|
|
2891
|
-
const a = () => {
|
|
2892
|
-
for (const h of s)
|
|
2893
|
-
h.measure();
|
|
2894
|
-
}, l = () => {
|
|
2895
|
-
for (const h of s)
|
|
2896
|
-
h.update(J.timestamp);
|
|
2897
|
-
}, u = () => {
|
|
2898
|
-
for (const h of s)
|
|
2899
|
-
h.notify();
|
|
2900
|
-
}, c = () => {
|
|
2901
|
-
M.read(a, !1, !0), M.read(l, !1, !0), M.update(u, !1, !0);
|
|
2902
|
-
};
|
|
2903
|
-
nt.set(t, c);
|
|
2904
|
-
const f = bn(t);
|
|
2905
|
-
window.addEventListener("resize", c, { passive: !0 }), t !== document.documentElement && vn.set(t, ba(t, c)), f.addEventListener("scroll", c, { passive: !0 });
|
|
2906
|
-
}
|
|
2907
|
-
const o = nt.get(t);
|
|
2908
|
-
return M.read(o, !1, !0), () => {
|
|
2909
|
-
var a;
|
|
2910
|
-
R(o);
|
|
2911
|
-
const l = Gt.get(t);
|
|
2912
|
-
if (!l || (l.delete(r), l.size))
|
|
2913
|
-
return;
|
|
2914
|
-
const u = nt.get(t);
|
|
2915
|
-
nt.delete(t), u && (bn(t).removeEventListener("scroll", u), (a = vn.get(t)) === null || a === void 0 || a(), window.removeEventListener("resize", u));
|
|
2916
|
-
};
|
|
2917
|
-
}
|
|
2918
|
-
function ks(e, t) {
|
|
2919
|
-
let n;
|
|
2920
|
-
const s = () => {
|
|
2921
|
-
const { currentTime: i } = t, o = (i === null ? 0 : i.value) / 100;
|
|
2922
|
-
n !== o && e(o), n = o;
|
|
2923
|
-
};
|
|
2924
|
-
return M.update(s, !0), () => R(s);
|
|
2925
|
-
}
|
|
2926
|
-
function Ba({ source: e, container: t, axis: n = "y" }) {
|
|
2927
|
-
e && (t = e);
|
|
2928
|
-
const s = { value: 0 }, i = Me((r) => {
|
|
2929
|
-
s.value = r[n].progress * 100;
|
|
2930
|
-
}, { container: t, axis: n });
|
|
2931
|
-
return { currentTime: s, cancel: i };
|
|
2932
|
-
}
|
|
2933
|
-
const zt = /* @__PURE__ */ new Map();
|
|
2934
|
-
function Gs({ source: e, container: t = document.documentElement, axis: n = "y" } = {}) {
|
|
2935
|
-
e && (t = e), zt.has(t) || zt.set(t, {});
|
|
2936
|
-
const s = zt.get(t);
|
|
2937
|
-
return s[n] || (s[n] = zn() ? new ScrollTimeline({ source: t, axis: n }) : Ba({ source: t, axis: n })), s[n];
|
|
2938
|
-
}
|
|
2939
|
-
function Ra(e) {
|
|
2940
|
-
return e.length === 2;
|
|
2941
|
-
}
|
|
2942
|
-
function zs(e) {
|
|
2943
|
-
return e && (e.target || e.offset);
|
|
2944
|
-
}
|
|
2945
|
-
function Ia(e, t) {
|
|
2946
|
-
return Ra(e) || zs(t) ? Me((n) => {
|
|
2947
|
-
e(n[t.axis].progress, n);
|
|
2948
|
-
}, t) : ks(e, Gs(t));
|
|
2949
|
-
}
|
|
2950
|
-
function La(e, t) {
|
|
2951
|
-
if (zs(t))
|
|
2952
|
-
return e.pause(), Me((n) => {
|
|
2953
|
-
e.time = e.duration * n[t.axis].progress;
|
|
2954
|
-
}, t);
|
|
2955
|
-
{
|
|
2956
|
-
const n = Gs(t);
|
|
2957
|
-
return e.attachTimeline(n, (s) => (s.pause(), ks((i) => {
|
|
2958
|
-
s.time = s.duration * i;
|
|
2959
|
-
}, n)));
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
function Na(e, { axis: t = "y", ...n } = {}) {
|
|
2963
|
-
const s = { axis: t, ...n };
|
|
2964
|
-
return typeof e == "function" ? Ia(e, s) : La(e, s);
|
|
2965
|
-
}
|
|
2966
|
-
const $a = {
|
|
2967
|
-
some: 0,
|
|
2968
|
-
all: 1
|
|
2969
|
-
};
|
|
2970
|
-
function Ka(e, t, { root: n, margin: s, amount: i = "some" } = {}) {
|
|
2971
|
-
const r = It(e), o = /* @__PURE__ */ new WeakMap(), a = (u) => {
|
|
2972
|
-
u.forEach((c) => {
|
|
2973
|
-
const f = o.get(c.target);
|
|
2974
|
-
if (c.isIntersecting !== !!f)
|
|
2975
|
-
if (c.isIntersecting) {
|
|
2976
|
-
const h = t(c);
|
|
2977
|
-
typeof h == "function" ? o.set(c.target, h) : l.unobserve(c.target);
|
|
2978
|
-
} else f && (f(c), o.delete(c.target));
|
|
2979
|
-
});
|
|
2980
|
-
}, l = new IntersectionObserver(a, {
|
|
2981
|
-
root: n,
|
|
2982
|
-
rootMargin: s,
|
|
2983
|
-
threshold: typeof i == "number" ? i : $a[i]
|
|
2984
|
-
});
|
|
2985
|
-
return r.forEach((u) => l.observe(u)), () => l.disconnect();
|
|
2986
|
-
}
|
|
2987
|
-
function $l(e, t = "end") {
|
|
2988
|
-
return (n) => {
|
|
2989
|
-
n = t === "end" ? Math.min(n, 0.999) : Math.max(n, 1e-3);
|
|
2990
|
-
const s = n * e, i = t === "end" ? Math.floor(s) : Math.ceil(s);
|
|
2991
|
-
return H(0, 1, i / e);
|
|
2992
|
-
};
|
|
2993
|
-
}
|
|
2994
|
-
function _a(e, t) {
|
|
2995
|
-
if (e === "first")
|
|
2996
|
-
return 0;
|
|
2997
|
-
{
|
|
2998
|
-
const n = t - 1;
|
|
2999
|
-
return e === "last" ? n : n / 2;
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
function Kl(e = 0.1, { startDelay: t = 0, from: n = 0, ease: s } = {}) {
|
|
3003
|
-
return (i, r) => {
|
|
3004
|
-
const o = typeof n == "number" ? n : _a(n, r), a = Math.abs(o - i);
|
|
3005
|
-
let l = e * a;
|
|
3006
|
-
if (s) {
|
|
3007
|
-
const u = r * e;
|
|
3008
|
-
l = te(s)(l / u) * u;
|
|
3009
|
-
}
|
|
3010
|
-
return t + l;
|
|
3011
|
-
};
|
|
3012
|
-
}
|
|
3013
|
-
const Wa = (e) => e && typeof e == "object" && e.mix, ka = (e) => Wa(e) ? e.mix : void 0;
|
|
3014
|
-
function Ga(...e) {
|
|
3015
|
-
const t = !Array.isArray(e[0]), n = t ? 0 : -1, s = e[0 + n], i = e[1 + n], r = e[2 + n], o = e[3 + n], a = xe(i, r, {
|
|
3016
|
-
mixer: ka(r[0]),
|
|
3017
|
-
...o
|
|
3018
|
-
});
|
|
3019
|
-
return t ? a(s) : a;
|
|
3020
|
-
}
|
|
3021
|
-
function za(e, t) {
|
|
3022
|
-
const n = N.now(), s = ({ timestamp: i }) => {
|
|
3023
|
-
const r = i - n;
|
|
3024
|
-
r >= t && (R(s), e(r - t));
|
|
3025
|
-
};
|
|
3026
|
-
return M.read(s, !0), () => R(s);
|
|
3027
|
-
}
|
|
3028
|
-
function _l(e, t) {
|
|
3029
|
-
return za(e, C(t));
|
|
3030
|
-
}
|
|
3031
|
-
const Sn = (e, t) => Math.abs(e - t);
|
|
3032
|
-
function Wl(e, t) {
|
|
3033
|
-
const n = Sn(e.x, t.x), s = Sn(e.y, t.y);
|
|
3034
|
-
return Math.sqrt(n ** 2 + s ** 2);
|
|
3035
|
-
}
|
|
3036
|
-
const kl = M, Gl = st.reduce((e, t) => (e[t] = (n) => R(n), e), {});
|
|
3037
|
-
function Us(e, t) {
|
|
3038
|
-
const n = typeof e == "string" && !t ? `${e}Context` : t, s = Symbol(n);
|
|
3039
|
-
return [(o) => {
|
|
3040
|
-
const a = Zs(s, o);
|
|
3041
|
-
if (a || a === null)
|
|
3042
|
-
return a;
|
|
3043
|
-
throw new Error(
|
|
3044
|
-
`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(e) ? `one of the following components: ${e.join(
|
|
3045
|
-
", "
|
|
3046
|
-
)}` : `\`${e}\``}`
|
|
3047
|
-
);
|
|
3048
|
-
}, (o) => (Js(s, o), o)];
|
|
3049
|
-
}
|
|
3050
|
-
function Y(e) {
|
|
3051
|
-
return !!(e && e.getVelocity);
|
|
3052
|
-
}
|
|
3053
|
-
const [Ua, ja] = Us("Motion");
|
|
3054
|
-
function wn(e, t) {
|
|
3055
|
-
if (typeof e == "object")
|
|
3056
|
-
return e;
|
|
3057
|
-
if (e && t)
|
|
3058
|
-
return t[e];
|
|
3059
|
-
}
|
|
3060
|
-
function Ha(e, t) {
|
|
3061
|
-
return typeof e != typeof t ? !0 : Array.isArray(e) && Array.isArray(t) ? !Ya(e, t) : e !== t;
|
|
3062
|
-
}
|
|
3063
|
-
function Ya(e, t) {
|
|
3064
|
-
const n = t.length;
|
|
3065
|
-
if (n !== e.length)
|
|
3066
|
-
return !1;
|
|
3067
|
-
for (let s = 0; s < n; s++)
|
|
3068
|
-
if (t[s] !== e[s])
|
|
3069
|
-
return !1;
|
|
3070
|
-
return !0;
|
|
3071
|
-
}
|
|
3072
|
-
function Xa(e, t) {
|
|
3073
|
-
!e.includes(t) && e.push(t);
|
|
3074
|
-
}
|
|
3075
|
-
function qa(e, t) {
|
|
3076
|
-
const n = e.indexOf(t);
|
|
3077
|
-
n !== -1 && e.splice(n, 1);
|
|
3078
|
-
}
|
|
3079
|
-
function Za(e, t) {
|
|
3080
|
-
return e[t] ? { ...e, ...e[t] } : { ...e };
|
|
3081
|
-
}
|
|
3082
|
-
function Tn(e) {
|
|
3083
|
-
return e == null ? void 0 : e.startsWith("--");
|
|
3084
|
-
}
|
|
3085
|
-
function Ja() {
|
|
3086
|
-
}
|
|
3087
|
-
const Qa = (e) => e;
|
|
3088
|
-
function tl(e) {
|
|
3089
|
-
return typeof e == "number";
|
|
3090
|
-
}
|
|
3091
|
-
const el = [
|
|
3092
|
-
"animate",
|
|
3093
|
-
"circle",
|
|
3094
|
-
"defs",
|
|
3095
|
-
"desc",
|
|
3096
|
-
"ellipse",
|
|
3097
|
-
"g",
|
|
3098
|
-
"image",
|
|
3099
|
-
"line",
|
|
3100
|
-
"filter",
|
|
3101
|
-
"marker",
|
|
3102
|
-
"mask",
|
|
3103
|
-
"metadata",
|
|
3104
|
-
"path",
|
|
3105
|
-
"pattern",
|
|
3106
|
-
"polygon",
|
|
3107
|
-
"polyline",
|
|
3108
|
-
"rect",
|
|
3109
|
-
"stop",
|
|
3110
|
-
"svg",
|
|
3111
|
-
"switch",
|
|
3112
|
-
"symbol",
|
|
3113
|
-
"text",
|
|
3114
|
-
"tspan",
|
|
3115
|
-
"use",
|
|
3116
|
-
"view",
|
|
3117
|
-
"clipPath",
|
|
3118
|
-
"feBlend",
|
|
3119
|
-
"feColorMatrix",
|
|
3120
|
-
"feComponentTransfer",
|
|
3121
|
-
"feComposite",
|
|
3122
|
-
"feConvolveMatrix",
|
|
3123
|
-
"feDiffuseLighting",
|
|
3124
|
-
"feDisplacementMap",
|
|
3125
|
-
"feDistantLight",
|
|
3126
|
-
"feDropShadow",
|
|
3127
|
-
"feFlood",
|
|
3128
|
-
"feFuncA",
|
|
3129
|
-
"feFuncB",
|
|
3130
|
-
"feFuncG",
|
|
3131
|
-
"feFuncR",
|
|
3132
|
-
"feGaussianBlur",
|
|
3133
|
-
"feImage",
|
|
3134
|
-
"feMerge",
|
|
3135
|
-
"feMergeNode",
|
|
3136
|
-
"feMorphology",
|
|
3137
|
-
"feOffset",
|
|
3138
|
-
"fePointLight",
|
|
3139
|
-
"feSpecularLighting",
|
|
3140
|
-
"feSpotLight",
|
|
3141
|
-
"feTile",
|
|
3142
|
-
"feTurbulence",
|
|
3143
|
-
"foreignObject",
|
|
3144
|
-
"linearGradient",
|
|
3145
|
-
"radialGradient",
|
|
3146
|
-
"textPath"
|
|
3147
|
-
], nl = new Set(el);
|
|
3148
|
-
function sl(e) {
|
|
3149
|
-
return nl.has(e);
|
|
3150
|
-
}
|
|
3151
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
3152
|
-
const xn = (e) => typeof e < "u", Vn = {
|
|
3153
|
-
syntax: "<angle>",
|
|
3154
|
-
initialValue: "0deg",
|
|
3155
|
-
toDefaultUnit: (e) => `${e}deg`
|
|
3156
|
-
}, il = {
|
|
3157
|
-
translate: {
|
|
3158
|
-
syntax: "<length-percentage>",
|
|
3159
|
-
initialValue: "0px",
|
|
3160
|
-
toDefaultUnit: (e) => `${e}px`
|
|
3161
|
-
},
|
|
3162
|
-
rotate: Vn,
|
|
3163
|
-
scale: {
|
|
3164
|
-
syntax: "<number>",
|
|
3165
|
-
initialValue: 1,
|
|
3166
|
-
toDefaultUnit: Qa
|
|
3167
|
-
},
|
|
3168
|
-
skew: Vn
|
|
3169
|
-
}, rl = ["translate", "scale", "rotate", "skew"], ol = ["", "X", "Y", "Z"], Ee = /* @__PURE__ */ new Map(), Pt = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"];
|
|
3170
|
-
rl.forEach((e) => {
|
|
3171
|
-
ol.forEach((t) => {
|
|
3172
|
-
Pt.push(e + t), Ee.set(
|
|
3173
|
-
e + t,
|
|
3174
|
-
il[e]
|
|
3175
|
-
);
|
|
3176
|
-
});
|
|
3177
|
-
});
|
|
3178
|
-
const al = new Set(Pt), ll = (e) => al.has(e), An = {
|
|
3179
|
-
x: "translateX",
|
|
3180
|
-
y: "translateY",
|
|
3181
|
-
z: "translateZ"
|
|
3182
|
-
};
|
|
3183
|
-
function ul([e], [t]) {
|
|
3184
|
-
return Pt.indexOf(e) - Pt.indexOf(t);
|
|
3185
|
-
}
|
|
3186
|
-
function cl(e, [t, n]) {
|
|
3187
|
-
return `${e} ${t}(${n})`;
|
|
3188
|
-
}
|
|
3189
|
-
function fl(e) {
|
|
3190
|
-
return e.sort(ul).reduce(cl, "").trim();
|
|
3191
|
-
}
|
|
3192
|
-
const hl = {
|
|
3193
|
-
translate: [0, 0],
|
|
3194
|
-
rotate: 0,
|
|
3195
|
-
scale: 1,
|
|
3196
|
-
skew: 0,
|
|
3197
|
-
x: 0,
|
|
3198
|
-
y: 0,
|
|
3199
|
-
z: 0
|
|
3200
|
-
}, dl = {
|
|
3201
|
-
get: (e, t) => {
|
|
3202
|
-
let n = Tn(t) ? e.style.getPropertyValue(t) : getComputedStyle(e)[t];
|
|
3203
|
-
if (!n && n !== "0") {
|
|
3204
|
-
const s = Ee.get(t);
|
|
3205
|
-
s && (n = s.initialValue);
|
|
3206
|
-
}
|
|
3207
|
-
return n;
|
|
3208
|
-
},
|
|
3209
|
-
set: (e, t, n) => {
|
|
3210
|
-
Tn(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
3211
|
-
}
|
|
3212
|
-
};
|
|
3213
|
-
function Ut(e) {
|
|
3214
|
-
var s;
|
|
3215
|
-
const t = {}, n = [];
|
|
3216
|
-
for (let i in e) {
|
|
3217
|
-
let r = e[i];
|
|
3218
|
-
r = Y(r) ? r.get() : r, ll(i) && i in An && (i = An[i]);
|
|
3219
|
-
let o = Array.isArray(r) ? r[0] : r;
|
|
3220
|
-
const a = Ee.get(i);
|
|
3221
|
-
a ? (o = tl(r) ? (s = a.toDefaultUnit) == null ? void 0 : s.call(a, r) : r, n.push([i, o])) : t[i] = o;
|
|
3222
|
-
}
|
|
3223
|
-
return n.length && (t.transform = fl(n)), t;
|
|
3224
|
-
}
|
|
3225
|
-
const Mn = {
|
|
3226
|
-
fill: !0,
|
|
3227
|
-
stroke: !0,
|
|
3228
|
-
strokeWidth: !0,
|
|
3229
|
-
opacity: !0,
|
|
3230
|
-
fillOpacity: !0,
|
|
3231
|
-
strokeOpacity: !0,
|
|
3232
|
-
strokeLinecap: !0,
|
|
3233
|
-
strokeLinejoin: !0,
|
|
3234
|
-
strokeDasharray: !0,
|
|
3235
|
-
strokeDashoffset: !0,
|
|
3236
|
-
cx: !0,
|
|
3237
|
-
cy: !0,
|
|
3238
|
-
r: !0,
|
|
3239
|
-
d: !0,
|
|
3240
|
-
x: !0,
|
|
3241
|
-
y: !0,
|
|
3242
|
-
x1: !0,
|
|
3243
|
-
y1: !0,
|
|
3244
|
-
x2: !0,
|
|
3245
|
-
y2: !0,
|
|
3246
|
-
points: !0,
|
|
3247
|
-
pathLength: !0,
|
|
3248
|
-
transform: !0,
|
|
3249
|
-
viewBox: !0,
|
|
3250
|
-
width: !0,
|
|
3251
|
-
height: !0,
|
|
3252
|
-
preserveAspectRatio: !0,
|
|
3253
|
-
clipPath: !0,
|
|
3254
|
-
filter: !0,
|
|
3255
|
-
mask: !0,
|
|
3256
|
-
stopColor: !0,
|
|
3257
|
-
stopOpacity: !0,
|
|
3258
|
-
gradientTransform: !0,
|
|
3259
|
-
gradientUnits: !0,
|
|
3260
|
-
spreadMethod: !0,
|
|
3261
|
-
markerEnd: !0,
|
|
3262
|
-
markerMid: !0,
|
|
3263
|
-
markerStart: !0,
|
|
3264
|
-
textAnchor: !0,
|
|
3265
|
-
dominantBaseline: !0,
|
|
3266
|
-
fontFamily: !0,
|
|
3267
|
-
fontSize: !0,
|
|
3268
|
-
fontWeight: !0,
|
|
3269
|
-
letterSpacing: !0,
|
|
3270
|
-
vectorEffect: !0
|
|
3271
|
-
};
|
|
3272
|
-
function pl(e) {
|
|
3273
|
-
const t = {}, n = {};
|
|
3274
|
-
for (const s in e)
|
|
3275
|
-
if (s in Mn) {
|
|
3276
|
-
const i = Mn[s], r = typeof i == "string" ? i : s, o = e[s];
|
|
3277
|
-
t[r] = Y(o) ? o.get() : o;
|
|
3278
|
-
} else
|
|
3279
|
-
n[s] = e[s];
|
|
3280
|
-
return {
|
|
3281
|
-
attributes: t,
|
|
3282
|
-
style: n
|
|
3283
|
-
};
|
|
3284
|
-
}
|
|
3285
|
-
function js(e) {
|
|
3286
|
-
return e ? e.flatMap((t) => t.type === Qs ? js(t.children) : [t]) : [];
|
|
3287
|
-
}
|
|
3288
|
-
const ml = Ot({
|
|
3289
|
-
name: "PrimitiveSlot",
|
|
3290
|
-
inheritAttrs: !1,
|
|
3291
|
-
setup(e, { attrs: t, slots: n }) {
|
|
3292
|
-
return () => {
|
|
3293
|
-
var l, u;
|
|
3294
|
-
if (!n.default)
|
|
3295
|
-
return null;
|
|
3296
|
-
const s = js(n.default()), i = s.findIndex((c) => c.type !== ti);
|
|
3297
|
-
if (i === -1)
|
|
3298
|
-
return s;
|
|
3299
|
-
const r = s[i];
|
|
3300
|
-
(l = r.props) == null || delete l.ref;
|
|
3301
|
-
const o = r.props ? Rn(t, r.props) : t;
|
|
3302
|
-
t.class && ((u = r.props) != null && u.class) && delete r.props.class;
|
|
3303
|
-
const a = ei(r, o);
|
|
3304
|
-
for (const c in o)
|
|
3305
|
-
c.startsWith("on") && (a.props || (a.props = {}), a.props[c] = o[c]);
|
|
3306
|
-
return s.length === 1 ? a : (s[i] = a, s);
|
|
3307
|
-
};
|
|
3308
|
-
}
|
|
3309
|
-
}), gl = Ot({
|
|
3310
|
-
name: "Primitive",
|
|
3311
|
-
inheritAttrs: !1,
|
|
3312
|
-
props: {
|
|
3313
|
-
asChild: {
|
|
3314
|
-
type: Boolean,
|
|
3315
|
-
default: !1
|
|
3316
|
-
},
|
|
3317
|
-
as: {
|
|
3318
|
-
type: [String, Object],
|
|
3319
|
-
default: "div"
|
|
3320
|
-
}
|
|
3321
|
-
},
|
|
3322
|
-
setup(e, { attrs: t, slots: n }) {
|
|
3323
|
-
const s = e.asChild ? "template" : e.as;
|
|
3324
|
-
return typeof s == "string" && ["area", "img", "input"].includes(s) ? () => $t(s, t) : s !== "template" ? () => $t(e.as, t, { default: n.default }) : () => $t(ml, t, { default: n.default });
|
|
3325
|
-
}
|
|
3326
|
-
});
|
|
3327
|
-
var Hs = function() {
|
|
3328
|
-
}, Ys = function() {
|
|
3329
|
-
};
|
|
3330
|
-
process.env.NODE_ENV !== "production" && (Hs = function(e, t) {
|
|
3331
|
-
!e && typeof console < "u" && console.warn(t);
|
|
3332
|
-
}, Ys = function(e, t) {
|
|
3333
|
-
if (!e)
|
|
3334
|
-
throw new Error(t);
|
|
3335
|
-
});
|
|
3336
|
-
class Pe {
|
|
3337
|
-
constructor(t) {
|
|
3338
|
-
this.state = t;
|
|
3339
|
-
}
|
|
3340
|
-
update() {
|
|
3341
|
-
}
|
|
3342
|
-
}
|
|
3343
|
-
class yl {
|
|
3344
|
-
constructor(t) {
|
|
3345
|
-
this.features = [], this.features = [
|
|
3346
|
-
new vl(t),
|
|
3347
|
-
new bl(t),
|
|
3348
|
-
new Sl(t),
|
|
3349
|
-
new xl(t),
|
|
3350
|
-
new wl(t)
|
|
3351
|
-
];
|
|
3352
|
-
}
|
|
3353
|
-
mount() {
|
|
3354
|
-
this.features.forEach((t) => t.mount());
|
|
3355
|
-
}
|
|
3356
|
-
unmount() {
|
|
3357
|
-
this.features.forEach((t) => t.unmount());
|
|
3358
|
-
}
|
|
3359
|
-
update() {
|
|
3360
|
-
this.features.forEach((t) => t.update());
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
|
-
function ct(e, t, n) {
|
|
3364
|
-
e.dispatchEvent(
|
|
3365
|
-
new CustomEvent(t, { detail: { originalEvent: n } })
|
|
3366
|
-
);
|
|
3367
|
-
}
|
|
3368
|
-
class Ce extends Pe {
|
|
3369
|
-
updateGestureSubscriptions() {
|
|
3370
|
-
const t = this.isActive();
|
|
3371
|
-
t && !this.removeGestureSubscriptions ? this.removeGestureSubscriptions = this.subscribeEvents() : !t && this.removeGestureSubscriptions && (this.removeGestureSubscriptions(), this.removeGestureSubscriptions = void 0);
|
|
3372
|
-
}
|
|
3373
|
-
unmount() {
|
|
3374
|
-
var t;
|
|
3375
|
-
(t = this.removeGestureSubscriptions) == null || t.call(this);
|
|
3376
|
-
}
|
|
3377
|
-
}
|
|
3378
|
-
function En(e, t, n) {
|
|
3379
|
-
return (s) => {
|
|
3380
|
-
s.pointerType && s.pointerType !== "mouse" || (n(), ct(e, t, s));
|
|
3381
|
-
};
|
|
3382
|
-
}
|
|
3383
|
-
class vl extends Ce {
|
|
3384
|
-
isActive() {
|
|
3385
|
-
return !!this.state.getOptions().hover;
|
|
3386
|
-
}
|
|
3387
|
-
constructor(t) {
|
|
3388
|
-
super(t), this.subscribeEvents = () => {
|
|
3389
|
-
const n = this.state.getElement(), s = En(n, "hoverstart", () => {
|
|
3390
|
-
this.state.setActive("hover", !0);
|
|
3391
|
-
}), i = En(n, "hoverend", () => {
|
|
3392
|
-
this.state.setActive("hover", !1);
|
|
3393
|
-
});
|
|
3394
|
-
return n.addEventListener("pointerenter", s), n.addEventListener("pointerleave", i), () => {
|
|
3395
|
-
n.removeEventListener("pointerenter", s), n.removeEventListener("pointerleave", i);
|
|
3396
|
-
};
|
|
3397
|
-
};
|
|
3398
|
-
}
|
|
3399
|
-
mount() {
|
|
3400
|
-
this.updateGestureSubscriptions();
|
|
3401
|
-
}
|
|
3402
|
-
update() {
|
|
3403
|
-
this.updateGestureSubscriptions();
|
|
3404
|
-
}
|
|
3405
|
-
}
|
|
3406
|
-
class bl extends Ce {
|
|
3407
|
-
isActive() {
|
|
3408
|
-
return !!this.state.getOptions().press;
|
|
3409
|
-
}
|
|
3410
|
-
constructor(t) {
|
|
3411
|
-
super(t), this.subscribeEvents = () => {
|
|
3412
|
-
const n = this.state.getElement(), s = (r) => {
|
|
3413
|
-
this.state.setActive("press", !1), ct(n, "pressend", r), window.removeEventListener("pointerup", s);
|
|
3414
|
-
}, i = (r) => {
|
|
3415
|
-
this.state.setActive("press", !0), ct(n, "pressstart", r), window.addEventListener("pointerup", s);
|
|
3416
|
-
};
|
|
3417
|
-
return n.addEventListener("pointerdown", i), () => {
|
|
3418
|
-
n.removeEventListener("pointerdown", i), window.removeEventListener("pointerup", s);
|
|
3419
|
-
};
|
|
3420
|
-
};
|
|
3421
|
-
}
|
|
3422
|
-
mount() {
|
|
3423
|
-
this.updateGestureSubscriptions();
|
|
3424
|
-
}
|
|
3425
|
-
update() {
|
|
3426
|
-
this.updateGestureSubscriptions();
|
|
3427
|
-
}
|
|
3428
|
-
}
|
|
3429
|
-
class Sl extends Ce {
|
|
3430
|
-
isActive() {
|
|
3431
|
-
return !!this.state.getOptions().inView;
|
|
3432
|
-
}
|
|
3433
|
-
constructor(t) {
|
|
3434
|
-
super(t), this.subscribeEvents = () => {
|
|
3435
|
-
var r;
|
|
3436
|
-
const n = this.state.getElement(), { once: s, ...i } = ((r = this.state.getOptions()) == null ? void 0 : r.inViewOptions) || {};
|
|
3437
|
-
return Ka(n, (o) => {
|
|
3438
|
-
if (this.state.setActive("inView", !0), ct(n, "viewenter", o), !s)
|
|
3439
|
-
return (a) => {
|
|
3440
|
-
this.state.setActive("inView", !1), ct(n, "viewleave", a);
|
|
3441
|
-
};
|
|
3442
|
-
}, i);
|
|
3443
|
-
};
|
|
3444
|
-
}
|
|
3445
|
-
mount() {
|
|
3446
|
-
this.updateGestureSubscriptions();
|
|
3447
|
-
}
|
|
3448
|
-
update() {
|
|
3449
|
-
this.updateGestureSubscriptions();
|
|
3450
|
-
}
|
|
3451
|
-
}
|
|
3452
|
-
class wl extends Pe {
|
|
3453
|
-
constructor() {
|
|
3454
|
-
super(...arguments), this.handlers = {};
|
|
3455
|
-
}
|
|
3456
|
-
mount() {
|
|
3457
|
-
const t = this.state.getElement();
|
|
3458
|
-
t && (this.handlers.motionstart = (n) => {
|
|
3459
|
-
var i, r;
|
|
3460
|
-
const s = n.detail.target;
|
|
3461
|
-
(r = (i = this.state.getOptions()).onMotionStart) == null || r.call(i, s);
|
|
3462
|
-
}, this.handlers.motioncomplete = (n) => {
|
|
3463
|
-
var i, r;
|
|
3464
|
-
const s = n.detail.target;
|
|
3465
|
-
(r = (i = this.state.getOptions()).onMotionComplete) == null || r.call(i, s);
|
|
3466
|
-
}, this.handlers.hoverstart = (n) => {
|
|
3467
|
-
var i, r;
|
|
3468
|
-
const s = n.detail;
|
|
3469
|
-
(r = (i = this.state.getOptions()).onHoverStart) == null || r.call(i, s);
|
|
3470
|
-
}, this.handlers.hoverend = (n) => {
|
|
3471
|
-
var i, r;
|
|
3472
|
-
const s = n.detail;
|
|
3473
|
-
(r = (i = this.state.getOptions()).onHoverEnd) == null || r.call(i, s);
|
|
3474
|
-
}, this.handlers.pressstart = (n) => {
|
|
3475
|
-
var i, r;
|
|
3476
|
-
const s = n.detail;
|
|
3477
|
-
(r = (i = this.state.getOptions()).onPressStart) == null || r.call(i, s);
|
|
3478
|
-
}, this.handlers.pressend = (n) => {
|
|
3479
|
-
var i, r;
|
|
3480
|
-
const s = n.detail;
|
|
3481
|
-
(r = (i = this.state.getOptions()).onPressEnd) == null || r.call(i, s);
|
|
3482
|
-
}, this.handlers.viewenter = (n) => {
|
|
3483
|
-
var i, r;
|
|
3484
|
-
const s = n.detail.target;
|
|
3485
|
-
(r = (i = this.state.getOptions()).onViewEnter) == null || r.call(i, s);
|
|
3486
|
-
}, this.handlers.viewleave = (n) => {
|
|
3487
|
-
var i, r;
|
|
3488
|
-
const s = n.detail.target;
|
|
3489
|
-
(r = (i = this.state.getOptions()).onViewLeave) == null || r.call(i, s);
|
|
3490
|
-
}, Object.entries(this.handlers).forEach(([n, s]) => {
|
|
3491
|
-
t.addEventListener(n, s);
|
|
3492
|
-
}));
|
|
3493
|
-
}
|
|
3494
|
-
unmount() {
|
|
3495
|
-
const t = this.state.getElement();
|
|
3496
|
-
t && Object.entries(this.handlers).forEach(([n, s]) => {
|
|
3497
|
-
s && (t.removeEventListener(n, s), delete this.handlers[n]);
|
|
3498
|
-
});
|
|
3499
|
-
}
|
|
3500
|
-
}
|
|
3501
|
-
function Tl(e) {
|
|
3502
|
-
return e instanceof SVGElement && e.tagName !== "svg";
|
|
3503
|
-
}
|
|
3504
|
-
class xl extends Pe {
|
|
3505
|
-
mount() {
|
|
3506
|
-
const t = this.state.getElement();
|
|
3507
|
-
if (!Tl(t))
|
|
3508
|
-
return;
|
|
3509
|
-
const n = this.state.visualElement;
|
|
3510
|
-
M.read(() => {
|
|
3511
|
-
try {
|
|
3512
|
-
n.renderState.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect();
|
|
3513
|
-
} catch {
|
|
3514
|
-
n.renderState.dimensions = {
|
|
3515
|
-
x: 0,
|
|
3516
|
-
y: 0,
|
|
3517
|
-
width: 0,
|
|
3518
|
-
height: 0
|
|
3519
|
-
};
|
|
3520
|
-
}
|
|
3521
|
-
});
|
|
3522
|
-
}
|
|
3523
|
-
unmount() {
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
let G;
|
|
3527
|
-
const Pn = (e) => e.next(), Vl = (e) => e.animateUpdates();
|
|
3528
|
-
function Al() {
|
|
3529
|
-
if (!G)
|
|
3530
|
-
return;
|
|
3531
|
-
const e = G.sort(El).map(Vl);
|
|
3532
|
-
e.forEach(Pn), e.forEach(Pn), G = void 0;
|
|
3533
|
-
}
|
|
3534
|
-
function Cn(e) {
|
|
3535
|
-
G ? Xa(G, e) : (G = [e], requestAnimationFrame(Al));
|
|
3536
|
-
}
|
|
3537
|
-
function Ml(e) {
|
|
3538
|
-
G && qa(G, e);
|
|
3539
|
-
}
|
|
3540
|
-
function El(e, t) {
|
|
3541
|
-
return e.getDepth() - t.getDepth();
|
|
3542
|
-
}
|
|
3543
|
-
function Fn(e, t, n) {
|
|
3544
|
-
return new CustomEvent(e, { detail: { target: t, isExit: n } });
|
|
3545
|
-
}
|
|
3546
|
-
const Pl = ["initial", "animate", "inView", "hover", "press", "exit", "drag"], Ct = /* @__PURE__ */ new WeakMap();
|
|
3547
|
-
class Cl {
|
|
3548
|
-
constructor(t, n) {
|
|
3549
|
-
this.element = null, this.activeStates = {
|
|
3550
|
-
initial: !0,
|
|
3551
|
-
animate: !0
|
|
3552
|
-
}, this._context = null, this.options = t, this.parent = n, this.depth = (n == null ? void 0 : n.depth) + 1 || 0;
|
|
3553
|
-
const s = t.initial === !1 ? "animate" : "initial";
|
|
3554
|
-
this.featureManager = new yl(this), this.initTarget(s);
|
|
3555
|
-
}
|
|
3556
|
-
get context() {
|
|
3557
|
-
if (!this._context) {
|
|
3558
|
-
const t = {
|
|
3559
|
-
get: (n, s) => {
|
|
3560
|
-
var i;
|
|
3561
|
-
return typeof this.options[s] == "string" ? this.options[s] : (i = this.parent) == null ? void 0 : i.context[s];
|
|
3562
|
-
}
|
|
3563
|
-
};
|
|
3564
|
-
this._context = new Proxy({}, t);
|
|
3565
|
-
}
|
|
3566
|
-
return this._context;
|
|
3567
|
-
}
|
|
3568
|
-
initTarget(t) {
|
|
3569
|
-
this.baseTarget = wn(this.options[t] || this.context[t], this.options.variants) || {}, this.target = { ...this.baseTarget };
|
|
3570
|
-
}
|
|
3571
|
-
get initial() {
|
|
3572
|
-
return xn(this.options.initial) ? this.options.initial : this.context.initial;
|
|
3573
|
-
}
|
|
3574
|
-
mount(t) {
|
|
3575
|
-
var s;
|
|
3576
|
-
Ys(
|
|
3577
|
-
!!t,
|
|
3578
|
-
"Animation state must be mounted with valid Element"
|
|
3579
|
-
), this.element = t, Ct.set(t, this), $.get(t) || _s(t);
|
|
3580
|
-
const n = $.get(t);
|
|
3581
|
-
if (this.visualElement = n, n.update(this.options, (s = this.parent) == null ? void 0 : s.context), typeof this.initial == "object")
|
|
3582
|
-
for (const i in this.initial)
|
|
3583
|
-
n.setStaticValue(i, this.initial[i]);
|
|
3584
|
-
else if (typeof this.initial == "string" && this.options.variants)
|
|
3585
|
-
for (const i in this.options.variants[this.initial])
|
|
3586
|
-
n.setStaticValue(i, this.options.variants[this.initial][i]);
|
|
3587
|
-
this.featureManager.mount();
|
|
3588
|
-
}
|
|
3589
|
-
unmount() {
|
|
3590
|
-
var t;
|
|
3591
|
-
Ct.delete(this.element), Ml(this), (t = $.get(this.element)) == null || t.unmount(), this.featureManager.unmount();
|
|
3592
|
-
}
|
|
3593
|
-
update(t) {
|
|
3594
|
-
var n;
|
|
3595
|
-
this.options = t, this.visualElement.update(this.options, (n = this.parent) == null ? void 0 : n.context), this.featureManager.update(), Cn(this);
|
|
3596
|
-
}
|
|
3597
|
-
setActive(t, n) {
|
|
3598
|
-
this.element && (this.activeStates[t] = n, Cn(this));
|
|
3599
|
-
}
|
|
3600
|
-
*animateUpdates() {
|
|
3601
|
-
const t = this.target;
|
|
3602
|
-
this.target = {};
|
|
3603
|
-
const n = {};
|
|
3604
|
-
for (const l of Pl) {
|
|
3605
|
-
if (!this.activeStates[l])
|
|
3606
|
-
continue;
|
|
3607
|
-
const u = wn(
|
|
3608
|
-
xn(this.options[l]) ? this.options[l] : this.context[l],
|
|
3609
|
-
this.options.variants
|
|
3610
|
-
);
|
|
3611
|
-
if (!u)
|
|
3612
|
-
continue;
|
|
3613
|
-
const c = { ...t, ...u };
|
|
3614
|
-
for (const f in c)
|
|
3615
|
-
f !== "transition" && (this.target[f] = u[f], n[f] = Za(
|
|
3616
|
-
u.transition ?? this.options.transition ?? {},
|
|
3617
|
-
f
|
|
3618
|
-
));
|
|
3619
|
-
}
|
|
3620
|
-
const s = /* @__PURE__ */ new Set([
|
|
3621
|
-
...Object.keys(this.target),
|
|
3622
|
-
...Object.keys(t)
|
|
3623
|
-
]), i = [];
|
|
3624
|
-
s.forEach((l) => {
|
|
3625
|
-
var u;
|
|
3626
|
-
this.target[l] === void 0 && (this.target[l] = this.baseTarget[l]), Ha(t[l], this.target[l]) && ((u = this.baseTarget)[l] ?? (u[l] = dl.get(this.element, l)), i.push(
|
|
3627
|
-
() => ia(
|
|
3628
|
-
this.element,
|
|
3629
|
-
{
|
|
3630
|
-
[l]: this.target[l] === "none" ? hl[l] : this.target[l]
|
|
3631
|
-
},
|
|
3632
|
-
n[l] || {}
|
|
3633
|
-
)
|
|
3634
|
-
));
|
|
3635
|
-
}), yield;
|
|
3636
|
-
const r = i.map((l) => l()).filter(Boolean);
|
|
3637
|
-
if (!r.length)
|
|
3638
|
-
return;
|
|
3639
|
-
const o = this.target;
|
|
3640
|
-
this.element.dispatchEvent(Fn("motionstart", o));
|
|
3641
|
-
const a = this.activeStates.exit;
|
|
3642
|
-
Promise.all(r).then(() => {
|
|
3643
|
-
this.element.dispatchEvent(Fn("motioncomplete", {
|
|
3644
|
-
...o
|
|
3645
|
-
}, a));
|
|
3646
|
-
}).catch(Ja);
|
|
3647
|
-
}
|
|
3648
|
-
isMounted() {
|
|
3649
|
-
return !!this.element;
|
|
3650
|
-
}
|
|
3651
|
-
getDepth() {
|
|
3652
|
-
return this.depth;
|
|
3653
|
-
}
|
|
3654
|
-
getOptions() {
|
|
3655
|
-
return this.options;
|
|
3656
|
-
}
|
|
3657
|
-
getElement() {
|
|
3658
|
-
return this.element;
|
|
3659
|
-
}
|
|
3660
|
-
getTarget() {
|
|
3661
|
-
return this.target;
|
|
3662
|
-
}
|
|
3663
|
-
}
|
|
3664
|
-
const Ft = /* @__PURE__ */ new Map();
|
|
3665
|
-
function jt(e) {
|
|
3666
|
-
const t = Ft.get(e);
|
|
3667
|
-
t && e.removeEventListener("motioncomplete", t), Ft.delete(e);
|
|
3668
|
-
}
|
|
3669
|
-
const [Fl, Ol] = Us("AnimatePresenceContext"), zl = /* @__PURE__ */ Ot({
|
|
3670
|
-
name: "Motion",
|
|
3671
|
-
inheritAttrs: !1,
|
|
3672
|
-
__name: "Motion",
|
|
3673
|
-
props: /* @__PURE__ */ ni({
|
|
3674
|
-
as: {},
|
|
3675
|
-
asChild: { type: Boolean },
|
|
3676
|
-
inViewOptions: {},
|
|
3677
|
-
inView: {},
|
|
3678
|
-
press: {},
|
|
3679
|
-
hover: {},
|
|
3680
|
-
initial: { type: [String, Object, Boolean] },
|
|
3681
|
-
animate: {},
|
|
3682
|
-
exit: {},
|
|
3683
|
-
variants: {},
|
|
3684
|
-
style: {},
|
|
3685
|
-
transformTemplate: { type: Function },
|
|
3686
|
-
transition: {},
|
|
3687
|
-
onMotionStart: { type: Function },
|
|
3688
|
-
onMotionComplete: { type: Function },
|
|
3689
|
-
onHoverStart: { type: Function },
|
|
3690
|
-
onHoverEnd: { type: Function },
|
|
3691
|
-
onPressStart: { type: Function },
|
|
3692
|
-
onPressEnd: { type: Function },
|
|
3693
|
-
onViewEnter: { type: Function },
|
|
3694
|
-
onViewLeave: { type: Function }
|
|
3695
|
-
}, {
|
|
3696
|
-
as: "div",
|
|
3697
|
-
asChild: !1,
|
|
3698
|
-
initial: void 0,
|
|
3699
|
-
animate: void 0,
|
|
3700
|
-
hover: void 0,
|
|
3701
|
-
inView: void 0
|
|
3702
|
-
}),
|
|
3703
|
-
setup(e) {
|
|
3704
|
-
const t = e, { initial: n, safeUnmount: s } = Fl({ initial: si(void 0), safeUnmount: () => !0 }), i = Ua(null), r = ii(), o = new Cl(
|
|
3705
|
-
{
|
|
3706
|
-
...r,
|
|
3707
|
-
...t
|
|
3708
|
-
},
|
|
3709
|
-
i
|
|
3710
|
-
);
|
|
3711
|
-
ja(o);
|
|
3712
|
-
const a = ri();
|
|
3713
|
-
In(() => {
|
|
3714
|
-
o.mount(a == null ? void 0 : a.vnode.el), o.update({
|
|
3715
|
-
...r,
|
|
3716
|
-
...t,
|
|
3717
|
-
style: { ...Ut(o.getTarget()), ...t.style }
|
|
3718
|
-
});
|
|
3719
|
-
}), Dt(() => {
|
|
3720
|
-
s(a == null ? void 0 : a.vnode.el) && o.unmount();
|
|
3721
|
-
}), oi(() => {
|
|
3722
|
-
o.update({
|
|
3723
|
-
...r,
|
|
3724
|
-
...t,
|
|
3725
|
-
initial: n.value === !1 ? n.value : t.initial === !0 ? void 0 : t.initial
|
|
3726
|
-
});
|
|
3727
|
-
});
|
|
3728
|
-
function l() {
|
|
3729
|
-
const u = { ...r };
|
|
3730
|
-
Object.keys(r).forEach((f) => {
|
|
3731
|
-
Y(r[f]) && (u[f] = r[f].get());
|
|
3732
|
-
});
|
|
3733
|
-
let c = {
|
|
3734
|
-
...t.style
|
|
3735
|
-
};
|
|
3736
|
-
if (!o.isMounted())
|
|
3737
|
-
if (sl(t.as)) {
|
|
3738
|
-
const { attributes: f, style: h } = pl(o.getTarget());
|
|
3739
|
-
Object.assign(u, f), Object.assign(c, h, t.style);
|
|
3740
|
-
} else
|
|
3741
|
-
Object.assign(c, t.style, o.getTarget());
|
|
3742
|
-
return c = Ut(c), u.style = Ut(c), u;
|
|
3743
|
-
}
|
|
3744
|
-
return (u, c) => (Ln(), Nn(ai(gl), Rn({
|
|
3745
|
-
as: u.as,
|
|
3746
|
-
"as-child": u.asChild
|
|
3747
|
-
}, l()), {
|
|
3748
|
-
default: $n(() => [
|
|
3749
|
-
Kn(u.$slots, "default")
|
|
3750
|
-
]),
|
|
3751
|
-
_: 3
|
|
3752
|
-
}, 16, ["as", "as-child"]));
|
|
3753
|
-
}
|
|
3754
|
-
}), Ul = /* @__PURE__ */ Ot({
|
|
3755
|
-
name: "AnimatePresence",
|
|
3756
|
-
inheritAttrs: !0,
|
|
3757
|
-
__name: "AnimatePresence",
|
|
3758
|
-
props: {
|
|
3759
|
-
mode: { default: "sync" },
|
|
3760
|
-
initial: { type: Boolean, default: !0 },
|
|
3761
|
-
multiple: { type: Boolean, default: !1 },
|
|
3762
|
-
as: {}
|
|
3763
|
-
},
|
|
3764
|
-
setup(e) {
|
|
3765
|
-
const t = e, { initial: n } = li(t);
|
|
3766
|
-
Ol({
|
|
3767
|
-
initial: n,
|
|
3768
|
-
safeUnmount(r) {
|
|
3769
|
-
return !Ft.has(r);
|
|
3770
|
-
}
|
|
3771
|
-
});
|
|
3772
|
-
function s(r) {
|
|
3773
|
-
const o = Ct.get(r);
|
|
3774
|
-
o && (jt(r), o.setActive("exit", !1));
|
|
3775
|
-
}
|
|
3776
|
-
function i(r, o) {
|
|
3777
|
-
const a = Ct.get(r);
|
|
3778
|
-
if (!a)
|
|
3779
|
-
return o();
|
|
3780
|
-
jt(r);
|
|
3781
|
-
function l(u) {
|
|
3782
|
-
var c;
|
|
3783
|
-
(c = u == null ? void 0 : u.detail) != null && c.isExit && (jt(r), o(), r.__vnode.ctx.isUnmounted && a.unmount());
|
|
3784
|
-
}
|
|
3785
|
-
Ft.set(r, l), r.addEventListener("motioncomplete", l), a.setActive("exit", !0);
|
|
3786
|
-
}
|
|
3787
|
-
return (r, o) => (Ln(), Nn(ui(r.multiple ? ci : fi), {
|
|
3788
|
-
tag: r.multiple ? r.as : void 0,
|
|
3789
|
-
css: !1,
|
|
3790
|
-
mode: r.mode === "wait" ? "out-in" : void 0,
|
|
3791
|
-
onEnter: s,
|
|
3792
|
-
onLeave: i
|
|
3793
|
-
}, {
|
|
3794
|
-
default: $n(() => [
|
|
3795
|
-
Kn(r.$slots, "default")
|
|
3796
|
-
]),
|
|
3797
|
-
_: 3
|
|
3798
|
-
}, 40, ["tag", "mode"]));
|
|
3799
|
-
}
|
|
3800
|
-
});
|
|
3801
|
-
function Fe(e) {
|
|
3802
|
-
const t = D(e()), n = () => t.set(e()), s = () => M.preRender(n, !1, !0);
|
|
3803
|
-
let i;
|
|
3804
|
-
const r = (a) => {
|
|
3805
|
-
i = a.map((l) => l.on("change", s));
|
|
3806
|
-
}, o = () => {
|
|
3807
|
-
i.forEach((a) => a()), R(n);
|
|
3808
|
-
};
|
|
3809
|
-
return Dt(() => {
|
|
3810
|
-
o();
|
|
3811
|
-
}), {
|
|
3812
|
-
subscribe: r,
|
|
3813
|
-
unsubscribe: o,
|
|
3814
|
-
value: t
|
|
3815
|
-
};
|
|
3816
|
-
}
|
|
3817
|
-
function Dl(e) {
|
|
3818
|
-
k.current = [];
|
|
3819
|
-
const { value: t, subscribe: n, unsubscribe: s } = Fe(e);
|
|
3820
|
-
return n(k.current), k.current = void 0, _n(() => {
|
|
3821
|
-
s(), k.current = [], e(), n(k.current), k.current = void 0;
|
|
3822
|
-
}), t;
|
|
3823
|
-
}
|
|
3824
|
-
function jl(e, t, n, s) {
|
|
3825
|
-
if (typeof e == "function")
|
|
3826
|
-
return Dl(e);
|
|
3827
|
-
const i = typeof t == "function" ? t : Ga(t, n, s);
|
|
3828
|
-
return Array.isArray(e) ? On(
|
|
3829
|
-
e,
|
|
3830
|
-
i
|
|
3831
|
-
) : On([e], ([r]) => i(r));
|
|
3832
|
-
}
|
|
3833
|
-
function On(e, t) {
|
|
3834
|
-
const n = [], { value: s, subscribe: i } = Fe(() => {
|
|
3835
|
-
n.length = 0;
|
|
3836
|
-
const r = e.length;
|
|
3837
|
-
for (let o = 0; o < r; o++)
|
|
3838
|
-
n[o] = e[o].get();
|
|
3839
|
-
return t(n);
|
|
3840
|
-
});
|
|
3841
|
-
return i(e), s;
|
|
3842
|
-
}
|
|
3843
|
-
function Bl(e) {
|
|
3844
|
-
let t = 0;
|
|
3845
|
-
const n = ({ timestamp: i, delta: r }) => {
|
|
3846
|
-
t || (t = i), e(i - t, r);
|
|
3847
|
-
}, s = () => R(n);
|
|
3848
|
-
_n(() => {
|
|
3849
|
-
s(), M.update(n, !0);
|
|
3850
|
-
}), Dt(() => s()), M.update(n, !0);
|
|
3851
|
-
}
|
|
3852
|
-
function Hl() {
|
|
3853
|
-
const e = D(0);
|
|
3854
|
-
return Bl((t) => e.set(t)), e;
|
|
3855
|
-
}
|
|
3856
|
-
function Yl(e, ...t) {
|
|
3857
|
-
const n = e.length;
|
|
3858
|
-
function s() {
|
|
3859
|
-
let o = "";
|
|
3860
|
-
for (let a = 0; a < n; a++) {
|
|
3861
|
-
o += e[a];
|
|
3862
|
-
const l = t[a];
|
|
3863
|
-
l && (o += Y(l) ? l.get() : l);
|
|
3864
|
-
}
|
|
3865
|
-
return o;
|
|
3866
|
-
}
|
|
3867
|
-
const { value: i, subscribe: r } = Fe(s);
|
|
3868
|
-
return r(t.filter(Y)), i;
|
|
3869
|
-
}
|
|
3870
|
-
function Dn(e) {
|
|
3871
|
-
return typeof e == "number" ? e : parseFloat(e);
|
|
3872
|
-
}
|
|
3873
|
-
function Xl(e, t = {}) {
|
|
3874
|
-
let n = null;
|
|
3875
|
-
const s = D(
|
|
3876
|
-
Y(e) ? Dn(e.get()) : e
|
|
3877
|
-
);
|
|
3878
|
-
let i = s.get(), r = () => {
|
|
3879
|
-
};
|
|
3880
|
-
const o = () => {
|
|
3881
|
-
n && (n.stop(), n = null);
|
|
3882
|
-
}, a = () => {
|
|
3883
|
-
const l = n;
|
|
3884
|
-
(l == null ? void 0 : l.time) === 0 && l.sample(J.delta), o(), n = qr({
|
|
3885
|
-
keyframes: [s.get(), i],
|
|
3886
|
-
velocity: s.getVelocity(),
|
|
3887
|
-
type: "spring",
|
|
3888
|
-
restDelta: 1e-3,
|
|
3889
|
-
restSpeed: 0.01,
|
|
3890
|
-
...t,
|
|
3891
|
-
onUpdate: r
|
|
3892
|
-
});
|
|
3893
|
-
};
|
|
3894
|
-
return Wn(() => JSON.stringify(t), () => {
|
|
3895
|
-
const l = s.attach((u, c) => (i = u, r = c, M.update(a), s.get()), o);
|
|
3896
|
-
hi(() => l());
|
|
3897
|
-
}, { immediate: !0 }), Y(e) && e.on("change", (l) => {
|
|
3898
|
-
s.set(Dn(l));
|
|
3899
|
-
}), s;
|
|
3900
|
-
}
|
|
3901
|
-
function Bn(e, t) {
|
|
3902
|
-
Hs(
|
|
3903
|
-
!!(!t || t.value),
|
|
3904
|
-
`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref.`
|
|
3905
|
-
);
|
|
3906
|
-
}
|
|
3907
|
-
function Rl() {
|
|
3908
|
-
return {
|
|
3909
|
-
scrollX: D(0),
|
|
3910
|
-
scrollY: D(0),
|
|
3911
|
-
scrollXProgress: D(0),
|
|
3912
|
-
scrollYProgress: D(0)
|
|
3913
|
-
};
|
|
3914
|
-
}
|
|
3915
|
-
function ql({
|
|
3916
|
-
container: e,
|
|
3917
|
-
target: t,
|
|
3918
|
-
...n
|
|
3919
|
-
} = {}) {
|
|
3920
|
-
const s = Rl();
|
|
3921
|
-
let i;
|
|
3922
|
-
const r = () => {
|
|
3923
|
-
i == null || i(), i = Na(
|
|
3924
|
-
(o, { x: a, y: l }) => {
|
|
3925
|
-
s.scrollX.set(a.current), s.scrollXProgress.set(a.progress), s.scrollY.set(l.current), s.scrollYProgress.set(l.progress);
|
|
3926
|
-
},
|
|
3927
|
-
{
|
|
3928
|
-
...n,
|
|
3929
|
-
container: (e == null ? void 0 : e.value) ?? void 0,
|
|
3930
|
-
target: (t == null ? void 0 : t.value) ?? void 0
|
|
3931
|
-
}
|
|
3932
|
-
);
|
|
3933
|
-
};
|
|
3934
|
-
return In(() => {
|
|
3935
|
-
Bn("target", t), Bn("container", e), r();
|
|
3936
|
-
}), Dt(() => i == null ? void 0 : i()), Wn(
|
|
3937
|
-
() => [e == null ? void 0 : e.value, t == null ? void 0 : t.value, n.offset],
|
|
3938
|
-
r
|
|
3939
|
-
), s;
|
|
3940
|
-
}
|
|
3941
|
-
const Zl = {
|
|
3942
|
-
motion: [
|
|
3943
|
-
"Motion",
|
|
3944
|
-
"MotionPresence"
|
|
3945
|
-
]
|
|
3946
|
-
}, Jl = {
|
|
3947
|
-
utilities: [
|
|
3948
|
-
"useTransform",
|
|
3949
|
-
"useTime",
|
|
3950
|
-
"useMotionTemplate",
|
|
3951
|
-
"useSpring",
|
|
3952
|
-
"useScroll",
|
|
3953
|
-
"useMotionValue"
|
|
3954
|
-
]
|
|
3955
|
-
};
|
|
3956
|
-
export {
|
|
3957
|
-
Ul as AnimatePresence,
|
|
3958
|
-
zl as Motion,
|
|
3959
|
-
Si as MotionValue,
|
|
3960
|
-
ia as animate,
|
|
3961
|
-
Nl as animateMini,
|
|
3962
|
-
ns as anticipate,
|
|
3963
|
-
he as backIn,
|
|
3964
|
-
es as backInOut,
|
|
3965
|
-
ts as backOut,
|
|
3966
|
-
R as cancelFrame,
|
|
3967
|
-
Gl as cancelSync,
|
|
3968
|
-
de as circIn,
|
|
3969
|
-
ss as circInOut,
|
|
3970
|
-
Zi as circOut,
|
|
3971
|
-
H as clamp,
|
|
3972
|
-
Zl as components,
|
|
3973
|
-
sa as createScopedAnimate,
|
|
3974
|
-
yt as cubicBezier,
|
|
3975
|
-
_l as delay,
|
|
3976
|
-
Sn as distance,
|
|
3977
|
-
Wl as distance2D,
|
|
3978
|
-
Br as easeIn,
|
|
3979
|
-
ws as easeInOut,
|
|
3980
|
-
Rr as easeOut,
|
|
3981
|
-
M as frame,
|
|
3982
|
-
J as frameData,
|
|
3983
|
-
Ll as frameSteps,
|
|
3984
|
-
Ka as inView,
|
|
3985
|
-
nn as inertia,
|
|
3986
|
-
xe as interpolate,
|
|
3987
|
-
I as invariant,
|
|
3988
|
-
At as keyframes,
|
|
3989
|
-
Jn as mirrorEasing,
|
|
3990
|
-
xs as mix,
|
|
3991
|
-
D as motionValue,
|
|
3992
|
-
we as pipe,
|
|
3993
|
-
dt as progress,
|
|
3994
|
-
Qn as reverseEasing,
|
|
3995
|
-
Na as scroll,
|
|
3996
|
-
Me as scrollInfo,
|
|
3997
|
-
le as spring,
|
|
3998
|
-
Kl as stagger,
|
|
3999
|
-
$l as steps,
|
|
4000
|
-
kl as sync,
|
|
4001
|
-
Ga as transform,
|
|
4002
|
-
Yl as useMotionTemplate,
|
|
4003
|
-
D as useMotionValue,
|
|
4004
|
-
ql as useScroll,
|
|
4005
|
-
Xl as useSpring,
|
|
4006
|
-
Hl as useTime,
|
|
4007
|
-
jl as useTransform,
|
|
4008
|
-
Jl as utilities,
|
|
4009
|
-
ft as warning,
|
|
4010
|
-
Oi as wrap
|
|
4011
|
-
};
|