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MAAM3N,EAAW7B,EAAQwP,WAAW5b,GAC/BiO,EAASkB,QAAV,EAKJuM,EAAI/F,UAAU,UAAU3V,IAAO2V,GAAU1H,GAAU,GACrD,CAEFyN,EAAIG,QAAQ5C,GAAgB7M,GAASwP,YACrCF,EAAII,UAAU,SAAUlB,IACxBc,EAAII,UAAU,cAAeb,GAC/B,E","sources":["webpack://dworaczek-vue/./node_modules/@vueuse/motion/dist/index.mjs"],"sourcesContent":["import defu from 'defu';\nimport { ref, unref, watch, computed, reactive, toRaw, inject, onUpdated, nextTick, defineComponent, useSlots, h, Fragment, isRef } from 'vue';\nimport { isObject as isObject$1, useEventListener, useIntersectionObserver, unrefElement, useMediaQuery } from '@vueuse/core';\nimport { tryOnUnmounted } from '@vueuse/shared';\nimport sync, { getFrameData } from 'framesync';\nimport { velocityPerSecond, inertia, animate, cubicBezier, linear, easeIn, easeInOut, easeOut, circIn, circInOut, circOut, backIn, backInOut, backOut, anticipate, bounceIn, bounceInOut, bounceOut } from 'popmotion';\nimport { number, color, px, degrees, scale, alpha, progressPercentage, filter, complex } from 'style-value-types';\n\nconst motionState = {};\n\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => {\n __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nclass SubscriptionManager {\n constructor() {\n __publicField$1(this, \"subscriptions\", /* @__PURE__ */ new Set());\n }\n add(handler) {\n this.subscriptions.add(handler);\n return () => this.subscriptions.delete(handler);\n }\n notify(a, b, c) {\n if (!this.subscriptions.size)\n return;\n for (const handler of this.subscriptions)\n handler(a, b, c);\n }\n clear() {\n this.subscriptions.clear();\n }\n}\n\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\nfunction isFloat(value) {\n return !Number.isNaN(Number.parseFloat(value));\n}\nclass MotionValue {\n /**\n * init - The initiating value\n * config - Optional configuration options\n */\n constructor(init) {\n /**\n * The current state of the `MotionValue`.\n */\n __publicField(this, \"current\");\n /**\n * The previous state of the `MotionValue`.\n */\n __publicField(this, \"prev\");\n /**\n * Duration, in milliseconds, since last updating frame.\n */\n __publicField(this, \"timeDelta\", 0);\n /**\n * Timestamp of the last time this `MotionValue` was updated.\n */\n __publicField(this, \"lastUpdated\", 0);\n /**\n * Functions to notify when the `MotionValue` updates.\n */\n __publicField(this, \"updateSubscribers\", new SubscriptionManager());\n /**\n * A reference to the currently-controlling Popmotion animation\n */\n __publicField(this, \"stopAnimation\");\n /**\n * Tracks whether this value can output a velocity.\n */\n __publicField(this, \"canTrackVelocity\", false);\n /**\n * Update and notify `MotionValue` subscribers.\n *\n * @param v\n * @param render\n */\n __publicField(this, \"updateAndNotify\", (v) => {\n this.prev = this.current;\n this.current = v;\n const { delta, timestamp } = getFrameData();\n if (this.lastUpdated !== timestamp) {\n this.timeDelta = delta;\n this.lastUpdated = timestamp;\n }\n sync.postRender(this.scheduleVelocityCheck);\n this.updateSubscribers.notify(this.current);\n });\n /**\n * Schedule a velocity check for the next frame.\n */\n __publicField(this, \"scheduleVelocityCheck\", () => sync.postRender(this.velocityCheck));\n /**\n * Updates `prev` with `current` if the value hasn't been updated this frame.\n * This ensures velocity calculations return `0`.\n */\n __publicField(this, \"velocityCheck\", ({ timestamp }) => {\n if (!this.canTrackVelocity)\n this.canTrackVelocity = isFloat(this.current);\n if (timestamp !== this.lastUpdated)\n this.prev = this.current;\n });\n this.prev = this.current = init;\n this.canTrackVelocity = isFloat(this.current);\n }\n /**\n * Adds a function that will be notified when the `MotionValue` is updated.\n *\n * It returns a function that, when called, will cancel the subscription.\n */\n onChange(subscription) {\n return this.updateSubscribers.add(subscription);\n }\n clearListeners() {\n this.updateSubscribers.clear();\n }\n /**\n * Sets the state of the `MotionValue`.\n *\n * @param v\n * @param render\n */\n set(v) {\n this.updateAndNotify(v);\n }\n /**\n * Returns the latest state of `MotionValue`\n *\n * @returns - The latest state of `MotionValue`\n */\n get() {\n return this.current;\n }\n /**\n * Get previous value.\n *\n * @returns - The previous latest state of `MotionValue`\n */\n getPrevious() {\n return this.prev;\n }\n /**\n * Returns the latest velocity of `MotionValue`\n *\n * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.\n */\n getVelocity() {\n return this.canTrackVelocity ? velocityPerSecond(Number.parseFloat(this.current) - Number.parseFloat(this.prev), this.timeDelta) : 0;\n }\n /**\n * Registers a new animation to control this `MotionValue`. Only one\n * animation can drive a `MotionValue` at one time.\n */\n start(animation) {\n this.stop();\n return new Promise((resolve) => {\n const { stop } = animation(resolve);\n this.stopAnimation = stop;\n }).then(() => this.clearAnimation());\n }\n /**\n * Stop the currently active animation.\n */\n stop() {\n if (this.stopAnimation)\n this.stopAnimation();\n this.clearAnimation();\n }\n /**\n * Returns `true` if this value is currently animating.\n */\n isAnimating() {\n return !!this.stopAnimation;\n }\n /**\n * Clear the current animation reference.\n */\n clearAnimation() {\n this.stopAnimation = null;\n }\n /**\n * Destroy and clean up subscribers to this `MotionValue`.\n */\n destroy() {\n this.updateSubscribers.clear();\n this.stop();\n }\n}\nfunction getMotionValue(init) {\n return new MotionValue(init);\n}\n\nconst { isArray } = Array;\nfunction useMotionValues() {\n const motionValues = ref({});\n const stop = (keys) => {\n const destroyKey = (key) => {\n if (!motionValues.value[key])\n return;\n motionValues.value[key].stop();\n motionValues.value[key].destroy();\n delete motionValues.value[key];\n };\n if (keys) {\n if (isArray(keys)) {\n keys.forEach(destroyKey);\n } else {\n destroyKey(keys);\n }\n } else {\n Object.keys(motionValues.value).forEach(destroyKey);\n }\n };\n const get = (key, from, target) => {\n if (motionValues.value[key])\n return motionValues.value[key];\n const motionValue = getMotionValue(from);\n motionValue.onChange((v) => target[key] = v);\n motionValues.value[key] = motionValue;\n return motionValue;\n };\n tryOnUnmounted(stop);\n return {\n motionValues,\n get,\n stop\n };\n}\n\nfunction isKeyframesTarget(v) {\n return Array.isArray(v);\n}\nfunction underDampedSpring() {\n return {\n type: \"spring\",\n stiffness: 500,\n damping: 25,\n restDelta: 0.5,\n restSpeed: 10\n };\n}\nfunction criticallyDampedSpring(to) {\n return {\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 2 * Math.sqrt(550) : 30,\n restDelta: 0.01,\n restSpeed: 10\n };\n}\nfunction overDampedSpring(to) {\n return {\n type: \"spring\",\n stiffness: 550,\n damping: to === 0 ? 100 : 30,\n restDelta: 0.01,\n restSpeed: 10\n };\n}\nfunction linearTween() {\n return {\n type: \"keyframes\",\n ease: \"linear\",\n duration: 300\n };\n}\nfunction keyframes(values) {\n return {\n type: \"keyframes\",\n duration: 800,\n values\n };\n}\nconst defaultTransitions = {\n default: overDampedSpring,\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: criticallyDampedSpring,\n scaleY: criticallyDampedSpring,\n scale: criticallyDampedSpring,\n backgroundColor: linearTween,\n color: linearTween,\n opacity: linearTween\n};\nfunction getDefaultTransition(valueKey, to) {\n let transitionFactory;\n if (isKeyframesTarget(to)) {\n transitionFactory = keyframes;\n } else {\n transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;\n }\n return { to, ...transitionFactory(to) };\n}\n\nconst int = {\n ...number,\n transform: Math.round\n};\nconst valueTypes = {\n // Color props\n color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n // Border props\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Transform props\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n transformPerspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n // Misc\n zIndex: int,\n filter,\n WebkitFilter: filter,\n // SVG\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int\n};\nconst getValueType = (key) => valueTypes[key];\nfunction getValueAsType(value, type) {\n return type && typeof value === \"number\" && type.transform ? type.transform(value) : value;\n}\nfunction getAnimatableNone(key, value) {\n let defaultValueType = getValueType(key);\n if (defaultValueType !== filter)\n defaultValueType = complex;\n return defaultValueType.getAnimatableNone ? defaultValueType.getAnimatableNone(value) : void 0;\n}\n\nconst easingLookup = {\n linear,\n easeIn,\n easeInOut,\n easeOut,\n circIn,\n circInOut,\n circOut,\n backIn,\n backInOut,\n backOut,\n anticipate,\n bounceIn,\n bounceInOut,\n bounceOut\n};\nfunction easingDefinitionToFunction(definition) {\n if (Array.isArray(definition)) {\n const [x1, y1, x2, y2] = definition;\n return cubicBezier(x1, y1, x2, y2);\n } else if (typeof definition === \"string\") {\n return easingLookup[definition];\n }\n return definition;\n}\nfunction isEasingArray(ease) {\n return Array.isArray(ease) && typeof ease[0] !== \"number\";\n}\nfunction isAnimatable(key, value) {\n if (key === \"zIndex\")\n return false;\n if (typeof value === \"number\" || Array.isArray(value))\n return true;\n if (typeof value === \"string\" && complex.test(value) && !value.startsWith(\"url(\")) {\n return true;\n }\n return false;\n}\nfunction hydrateKeyframes(options) {\n if (Array.isArray(options.to) && options.to[0] === null) {\n options.to = [...options.to];\n options.to[0] = options.from;\n }\n return options;\n}\nfunction convertTransitionToAnimationOptions({ ease, times, delay, ...transition }) {\n const options = { ...transition };\n if (times)\n options.offset = times;\n if (ease) {\n options.ease = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease);\n }\n if (delay)\n options.elapsed = -delay;\n return options;\n}\nfunction getPopmotionAnimationOptions(transition, options, key) {\n if (Array.isArray(options.to)) {\n if (!transition.duration)\n transition.duration = 800;\n }\n hydrateKeyframes(options);\n if (!isTransitionDefined(transition)) {\n transition = {\n ...transition,\n ...getDefaultTransition(key, options.to)\n };\n }\n return {\n ...options,\n ...convertTransitionToAnimationOptions(transition)\n };\n}\nfunction isTransitionDefined({ delay, repeat, repeatType, repeatDelay, from, ...transition }) {\n return !!Object.keys(transition).length;\n}\nfunction getValueTransition(transition, key) {\n return transition[key] || transition.default || transition;\n}\nfunction getAnimation(key, value, target, transition, onComplete) {\n const valueTransition = getValueTransition(transition, key);\n let origin = valueTransition.from === null || valueTransition.from === void 0 ? value.get() : valueTransition.from;\n const isTargetAnimatable = isAnimatable(key, target);\n if (origin === \"none\" && isTargetAnimatable && typeof target === \"string\")\n origin = getAnimatableNone(key, target);\n const isOriginAnimatable = isAnimatable(key, origin);\n function start(complete) {\n const options = {\n from: origin,\n to: target,\n velocity: transition.velocity ? transition.velocity : value.getVelocity(),\n onUpdate: (v) => value.set(v)\n };\n return valueTransition.type === \"inertia\" || valueTransition.type === \"decay\" ? inertia({ ...options, ...valueTransition }) : animate({\n ...getPopmotionAnimationOptions(valueTransition, options, key),\n onUpdate: (v) => {\n options.onUpdate(v);\n if (valueTransition.onUpdate)\n valueTransition.onUpdate(v);\n },\n onComplete: () => {\n if (onComplete)\n onComplete();\n if (complete)\n complete();\n }\n });\n }\n function set(complete) {\n value.set(target);\n if (onComplete)\n onComplete();\n if (complete)\n complete();\n return { stop: () => {\n } };\n }\n return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start;\n}\n\nfunction useMotionTransitions() {\n const { motionValues, stop, get } = useMotionValues();\n const push = (key, value, target, transition = {}, onComplete) => {\n const from = target[key];\n const motionValue = get(key, from, target);\n if (transition && transition.immediate) {\n motionValue.set(value);\n return;\n }\n const animation = getAnimation(key, motionValue, value, transition, onComplete);\n motionValue.start(animation);\n };\n return { motionValues, stop, push };\n}\n\nfunction useMotionControls(motionProperties, variants = {}, { motionValues, push, stop } = useMotionTransitions()) {\n const _variants = unref(variants);\n const isAnimating = ref(false);\n watch(\n motionValues,\n (newVal) => {\n isAnimating.value = Object.values(newVal).filter((value) => value.isAnimating()).length > 0;\n },\n {\n immediate: true,\n deep: true\n }\n );\n const getVariantFromKey = (variant) => {\n if (!_variants || !_variants[variant])\n throw new Error(`The variant ${variant} does not exist.`);\n return _variants[variant];\n };\n const apply = (variant) => {\n if (typeof variant === \"string\")\n variant = getVariantFromKey(variant);\n const animations = Object.entries(variant).map(([key, value]) => {\n if (key === \"transition\")\n return void 0;\n return new Promise(\n (resolve) => (\n // @ts-expect-error - Fix errors later for typescript 5\n push(key, value, motionProperties, variant.transition || getDefaultTransition(key, variant[key]), resolve)\n )\n );\n }).filter(Boolean);\n async function waitForComplete() {\n await Promise.all(animations);\n variant.transition?.onComplete?.();\n }\n return Promise.all([waitForComplete()]);\n };\n const set = (variant) => {\n const variantData = isObject$1(variant) ? variant : getVariantFromKey(variant);\n Object.entries(variantData).forEach(([key, value]) => {\n if (key === \"transition\")\n return;\n push(key, value, motionProperties, {\n immediate: true\n });\n });\n };\n const leave = async (done) => {\n let leaveVariant;\n if (_variants) {\n if (_variants.leave)\n leaveVariant = _variants.leave;\n if (!_variants.leave && _variants.initial)\n leaveVariant = _variants.initial;\n }\n if (!leaveVariant) {\n done();\n return;\n }\n await apply(leaveVariant);\n done();\n };\n return {\n isAnimating,\n apply,\n set,\n leave,\n stop\n };\n}\n\nconst isBrowser = typeof window !== \"undefined\";\nconst supportsPointerEvents = () => isBrowser && (window.onpointerdown === null || import.meta.env.TEST);\nconst supportsTouchEvents = () => isBrowser && (window.ontouchstart === null || import.meta.env.TEST);\nconst supportsMouseEvents = () => isBrowser && (window.onmousedown === null || import.meta.env.TEST);\n\nfunction registerEventListeners({ target, state, variants, apply }) {\n const _variants = unref(variants);\n const hovered = ref(false);\n const tapped = ref(false);\n const focused = ref(false);\n const mutableKeys = computed(() => {\n let result = [...Object.keys(state.value || {})];\n if (!_variants)\n return result;\n if (_variants.hovered)\n result = [...result, ...Object.keys(_variants.hovered)];\n if (_variants.tapped)\n result = [...result, ...Object.keys(_variants.tapped)];\n if (_variants.focused)\n result = [...result, ...Object.keys(_variants.focused)];\n return result;\n });\n const computedProperties = computed(() => {\n const result = {};\n Object.assign(result, state.value);\n if (hovered.value && _variants.hovered)\n Object.assign(result, _variants.hovered);\n if (tapped.value && _variants.tapped)\n Object.assign(result, _variants.tapped);\n if (focused.value && _variants.focused)\n Object.assign(result, _variants.focused);\n for (const key in result) {\n if (!mutableKeys.value.includes(key))\n delete result[key];\n }\n return result;\n });\n if (_variants.hovered) {\n useEventListener(target, \"mouseenter\", () => hovered.value = true);\n useEventListener(target, \"mouseleave\", () => {\n hovered.value = false;\n tapped.value = false;\n });\n }\n if (_variants.tapped) {\n if (supportsMouseEvents()) {\n useEventListener(target, \"mousedown\", () => tapped.value = true);\n useEventListener(target, \"mouseup\", () => tapped.value = false);\n }\n if (supportsPointerEvents()) {\n useEventListener(target, \"pointerdown\", () => tapped.value = true);\n useEventListener(target, \"pointerup\", () => tapped.value = false);\n }\n if (supportsTouchEvents()) {\n useEventListener(target, \"touchstart\", () => tapped.value = true);\n useEventListener(target, \"touchend\", () => tapped.value = false);\n }\n }\n if (_variants.focused) {\n useEventListener(target, \"focus\", () => focused.value = true);\n useEventListener(target, \"blur\", () => focused.value = false);\n }\n watch([hovered, tapped, focused], () => {\n apply(computedProperties.value);\n });\n}\n\nfunction registerLifeCycleHooks({ set, target, variants, variant }) {\n const _variants = unref(variants);\n watch(\n () => target,\n () => {\n if (!_variants)\n return;\n if (_variants.initial) {\n set(\"initial\");\n variant.value = \"initial\";\n }\n if (_variants.enter)\n variant.value = \"enter\";\n },\n {\n immediate: true,\n flush: \"pre\"\n }\n );\n}\n\nfunction registerVariantsSync({ state, apply }) {\n watch(\n state,\n (newVal) => {\n if (newVal)\n apply(newVal);\n },\n {\n immediate: true\n }\n );\n}\n\nfunction registerVisibilityHooks({ target, variants, variant }) {\n const _variants = unref(variants);\n if (_variants && (_variants.visible || _variants.visibleOnce)) {\n useIntersectionObserver(target, ([{ isIntersecting }]) => {\n if (_variants.visible) {\n if (isIntersecting)\n variant.value = \"visible\";\n else\n variant.value = \"initial\";\n } else if (_variants.visibleOnce) {\n if (isIntersecting && variant.value !== \"visibleOnce\")\n variant.value = \"visibleOnce\";\n else if (!variant.value)\n variant.value = \"initial\";\n }\n });\n }\n}\n\nfunction useMotionFeatures(instance, options = {\n syncVariants: true,\n lifeCycleHooks: true,\n visibilityHooks: true,\n eventListeners: true\n}) {\n if (options.lifeCycleHooks)\n registerLifeCycleHooks(instance);\n if (options.syncVariants)\n registerVariantsSync(instance);\n if (options.visibilityHooks)\n registerVisibilityHooks(instance);\n if (options.eventListeners)\n registerEventListeners(instance);\n}\n\nfunction reactiveStyle(props = {}) {\n const state = reactive({\n ...props\n });\n const style = ref({});\n watch(\n state,\n () => {\n const result = {};\n for (const [key, value] of Object.entries(state)) {\n const valueType = getValueType(key);\n const valueAsType = getValueAsType(value, valueType);\n result[key] = valueAsType;\n }\n style.value = result;\n },\n {\n immediate: true,\n deep: true\n }\n );\n return {\n state,\n style\n };\n}\n\nfunction usePermissiveTarget(target, onTarget) {\n watch(\n () => unrefElement(target),\n (el) => {\n if (!el)\n return;\n onTarget(el);\n },\n {\n immediate: true\n }\n );\n}\n\nconst translateAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\"\n};\nfunction reactiveTransform(props = {}, enableHardwareAcceleration = true) {\n const state = reactive({ ...props });\n const transform = ref(\"\");\n watch(\n state,\n (newVal) => {\n let result = \"\";\n let hasHardwareAcceleration = false;\n if (enableHardwareAcceleration && (newVal.x || newVal.y || newVal.z)) {\n const str = [newVal.x || 0, newVal.y || 0, newVal.z || 0].map((val) => getValueAsType(val, px)).join(\",\");\n result += `translate3d(${str}) `;\n hasHardwareAcceleration = true;\n }\n for (const [key, value] of Object.entries(newVal)) {\n if (enableHardwareAcceleration && (key === \"x\" || key === \"y\" || key === \"z\"))\n continue;\n const valueType = getValueType(key);\n const valueAsType = getValueAsType(value, valueType);\n result += `${translateAlias[key] || key}(${valueAsType}) `;\n }\n if (enableHardwareAcceleration && !hasHardwareAcceleration)\n result += \"translateZ(0px) \";\n transform.value = result.trim();\n },\n {\n immediate: true,\n deep: true\n }\n );\n return {\n state,\n transform\n };\n}\n\nconst transformAxes = [\"\", \"X\", \"Y\", \"Z\"];\nconst order = [\"perspective\", \"translate\", \"scale\", \"rotate\", \"skew\"];\nconst transformProps = [\"transformPerspective\", \"x\", \"y\", \"z\"];\norder.forEach((operationKey) => {\n transformAxes.forEach((axesKey) => {\n const key = operationKey + axesKey;\n transformProps.push(key);\n });\n});\nconst transformPropSet = new Set(transformProps);\nfunction isTransformProp(key) {\n return transformPropSet.has(key);\n}\nconst transformOriginProps = /* @__PURE__ */ new Set([\"originX\", \"originY\", \"originZ\"]);\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\nfunction splitValues(variant) {\n const transform = {};\n const style = {};\n Object.entries(variant).forEach(([key, value]) => {\n if (isTransformProp(key) || isTransformOriginProp(key))\n transform[key] = value;\n else\n style[key] = value;\n });\n return { transform, style };\n}\nfunction variantToStyle(variant) {\n const { transform: _transform, style: _style } = splitValues(variant);\n const { transform } = reactiveTransform(_transform);\n const { style } = reactiveStyle(_style);\n if (transform.value)\n style.value.transform = transform.value;\n return style.value;\n}\n\nfunction useElementStyle(target, onInit) {\n let _cache;\n let _target;\n const { state, style } = reactiveStyle();\n usePermissiveTarget(target, (el) => {\n _target = el;\n for (const key of Object.keys(valueTypes)) {\n if (el.style[key] === null || el.style[key] === \"\" || isTransformProp(key) || isTransformOriginProp(key))\n continue;\n state[key] = el.style[key];\n }\n if (_cache) {\n Object.entries(_cache).forEach(([key, value]) => el.style[key] = value);\n }\n if (onInit)\n onInit(state);\n });\n watch(\n style,\n (newVal) => {\n if (!_target) {\n _cache = newVal;\n return;\n }\n for (const key in newVal)\n _target.style[key] = newVal[key];\n },\n {\n immediate: true\n }\n );\n return {\n style: state\n };\n}\n\nfunction parseTransform(transform) {\n const transforms = transform.trim().split(/\\) |\\)/);\n if (transforms.length === 1)\n return {};\n const parseValues = (value) => {\n if (value.endsWith(\"px\") || value.endsWith(\"deg\"))\n return Number.parseFloat(value);\n if (Number.isNaN(Number(value)))\n return Number(value);\n return value;\n };\n return transforms.reduce((acc, transform2) => {\n if (!transform2)\n return acc;\n const [name, transformValue] = transform2.split(\"(\");\n const valueArray = transformValue.split(\",\");\n const values = valueArray.map((val) => {\n return parseValues(val.endsWith(\")\") ? val.replace(\")\", \"\") : val.trim());\n });\n const value = values.length === 1 ? values[0] : values;\n return {\n ...acc,\n [name]: value\n };\n }, {});\n}\nfunction stateFromTransform(state, transform) {\n Object.entries(parseTransform(transform)).forEach(([key, value]) => {\n const axes = [\"x\", \"y\", \"z\"];\n if (key === \"translate3d\") {\n if (value === 0) {\n axes.forEach((axis) => state[axis] = 0);\n return;\n }\n value.forEach((axisValue, index) => state[axes[index]] = axisValue);\n return;\n }\n value = Number.parseFloat(`${value}`);\n if (key === \"translateX\") {\n state.x = value;\n return;\n }\n if (key === \"translateY\") {\n state.y = value;\n return;\n }\n if (key === \"translateZ\") {\n state.z = value;\n return;\n }\n state[key] = value;\n });\n}\n\nfunction useElementTransform(target, onInit) {\n let _cache;\n let _target;\n const { state, transform } = reactiveTransform();\n usePermissiveTarget(target, (el) => {\n _target = el;\n if (el.style.transform)\n stateFromTransform(state, el.style.transform);\n if (_cache)\n el.style.transform = _cache;\n if (onInit)\n onInit(state);\n });\n watch(\n transform,\n (newValue) => {\n if (!_target) {\n _cache = newValue;\n return;\n }\n _target.style.transform = newValue;\n },\n {\n immediate: true\n }\n );\n return {\n transform: state\n };\n}\n\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction useMotionProperties(target, defaultValues) {\n const motionProperties = reactive({});\n const apply = (values) => Object.entries(values).forEach(([key, value]) => motionProperties[key] = value);\n const { style } = useElementStyle(target, apply);\n const { transform } = useElementTransform(target, apply);\n watch(\n motionProperties,\n (newVal) => {\n objectEntries(newVal).forEach(([key, value]) => {\n const target2 = isTransformProp(key) ? transform : style;\n if (target2[key] && target2[key] === value)\n return;\n target2[key] = value;\n });\n },\n {\n immediate: true,\n deep: true\n }\n );\n usePermissiveTarget(target, () => defaultValues && apply(defaultValues));\n return {\n motionProperties,\n style,\n transform\n };\n}\n\nfunction useMotionVariants(variants = {}) {\n const _variants = unref(variants);\n const variant = ref();\n const state = computed(() => {\n if (!variant.value)\n return;\n return _variants[variant.value];\n });\n return {\n state,\n variant\n };\n}\n\nfunction useMotion(target, variants = {}, options) {\n const { motionProperties } = useMotionProperties(target);\n const { variant, state } = useMotionVariants(variants);\n const controls = useMotionControls(motionProperties, variants);\n const instance = {\n target,\n variant,\n variants,\n state,\n motionProperties,\n ...controls\n };\n useMotionFeatures(instance, options);\n return instance;\n}\n\nconst transitionKeys = [\"delay\", \"duration\"];\nconst directivePropsKeys = [\"initial\", \"enter\", \"leave\", \"visible\", \"visible-once\", \"visibleOnce\", \"hovered\", \"tapped\", \"focused\", ...transitionKeys];\nfunction isTransitionKey(val) {\n return transitionKeys.includes(val);\n}\nfunction resolveVariants(node, variantsRef) {\n const target = node.props ? node.props : node.data && node.data.attrs ? node.data.attrs : {};\n if (target) {\n if (target.variants && isObject$1(target.variants)) {\n variantsRef.value = {\n ...variantsRef.value,\n ...target.variants\n };\n }\n for (let key of directivePropsKeys) {\n if (!target || !target[key])\n continue;\n if (isTransitionKey(key) && typeof target[key] === \"number\") {\n for (const variantKey of [\"enter\", \"visible\", \"visibleOnce\"]) {\n const variantConfig = variantsRef.value[variantKey];\n if (variantConfig == null)\n continue;\n variantConfig.transition ?? (variantConfig.transition = {});\n variantConfig.transition[key] = target[key];\n }\n continue;\n }\n if (isObject$1(target[key])) {\n const prop = target[key];\n if (key === \"visible-once\")\n key = \"visibleOnce\";\n variantsRef.value[key] = prop;\n }\n }\n }\n}\n\nfunction directive(variants, isPreset = false) {\n const register = (el, binding, node) => {\n const key = binding.value && typeof binding.value === \"string\" ? binding.value : node.key;\n if (key && motionState[key])\n motionState[key].stop();\n const variantsObject = isPreset ? structuredClone(toRaw(variants) || {}) : variants || {};\n const variantsRef = ref(variantsObject);\n if (typeof binding.value === \"object\")\n variantsRef.value = binding.value;\n resolveVariants(node, variantsRef);\n const motionOptions = { eventListeners: true, lifeCycleHooks: true, syncVariants: true, visibilityHooks: false };\n const motionInstance = useMotion(el, variantsRef, motionOptions);\n el.motionInstance = motionInstance;\n if (key)\n motionState[key] = motionInstance;\n };\n const mounted = (el, _binding, _node) => {\n el.motionInstance && registerVisibilityHooks(el.motionInstance);\n };\n return {\n created: register,\n mounted,\n getSSRProps(binding, node) {\n let { initial: bindingInitial } = binding.value || node && node?.props || {};\n bindingInitial = unref(bindingInitial);\n const initial = defu({}, variants?.initial || {}, bindingInitial || {});\n if (!initial || Object.keys(initial).length === 0)\n return;\n const style = variantToStyle(initial);\n return {\n style\n };\n }\n };\n}\n\nconst fade = {\n initial: {\n opacity: 0\n },\n enter: {\n opacity: 1\n }\n};\nconst fadeVisible = {\n initial: {\n opacity: 0\n },\n visible: {\n opacity: 1\n }\n};\nconst fadeVisibleOnce = {\n initial: {\n opacity: 0\n },\n visibleOnce: {\n opacity: 1\n }\n};\n\nconst pop = {\n initial: {\n scale: 0,\n opacity: 0\n },\n enter: {\n scale: 1,\n opacity: 1\n }\n};\nconst popVisible = {\n initial: {\n scale: 0,\n opacity: 0\n },\n visible: {\n scale: 1,\n opacity: 1\n }\n};\nconst popVisibleOnce = {\n initial: {\n scale: 0,\n opacity: 0\n },\n visibleOnce: {\n scale: 1,\n opacity: 1\n }\n};\n\nconst rollLeft = {\n initial: {\n x: -100,\n rotate: 90,\n opacity: 0\n },\n enter: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleLeft = {\n initial: {\n x: -100,\n rotate: 90,\n opacity: 0\n },\n visible: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleOnceLeft = {\n initial: {\n x: -100,\n rotate: 90,\n opacity: 0\n },\n visibleOnce: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollRight = {\n initial: {\n x: 100,\n rotate: -90,\n opacity: 0\n },\n enter: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleRight = {\n initial: {\n x: 100,\n rotate: -90,\n opacity: 0\n },\n visible: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleOnceRight = {\n initial: {\n x: 100,\n rotate: -90,\n opacity: 0\n },\n visibleOnce: {\n x: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollTop = {\n initial: {\n y: -100,\n rotate: -90,\n opacity: 0\n },\n enter: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleTop = {\n initial: {\n y: -100,\n rotate: -90,\n opacity: 0\n },\n visible: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleOnceTop = {\n initial: {\n y: -100,\n rotate: -90,\n opacity: 0\n },\n visibleOnce: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollBottom = {\n initial: {\n y: 100,\n rotate: 90,\n opacity: 0\n },\n enter: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleBottom = {\n initial: {\n y: 100,\n rotate: 90,\n opacity: 0\n },\n visible: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\nconst rollVisibleOnceBottom = {\n initial: {\n y: 100,\n rotate: 90,\n opacity: 0\n },\n visibleOnce: {\n y: 0,\n rotate: 0,\n opacity: 1\n }\n};\n\nconst slideLeft = {\n initial: {\n x: -100,\n opacity: 0\n },\n enter: {\n x: 0,\n opacity: 1\n }\n};\nconst slideVisibleLeft = {\n initial: {\n x: -100,\n opacity: 0\n },\n visible: {\n x: 0,\n opacity: 1\n }\n};\nconst slideVisibleOnceLeft = {\n initial: {\n x: -100,\n opacity: 0\n },\n visibleOnce: {\n x: 0,\n opacity: 1\n }\n};\nconst slideRight = {\n initial: {\n x: 100,\n opacity: 0\n },\n enter: {\n x: 0,\n opacity: 1\n }\n};\nconst slideVisibleRight = {\n initial: {\n x: 100,\n opacity: 0\n },\n visible: {\n x: 0,\n opacity: 1\n }\n};\nconst slideVisibleOnceRight = {\n initial: {\n x: 100,\n opacity: 0\n },\n visibleOnce: {\n x: 0,\n opacity: 1\n }\n};\nconst slideTop = {\n initial: {\n y: -100,\n opacity: 0\n },\n enter: {\n y: 0,\n opacity: 1\n }\n};\nconst slideVisibleTop = {\n initial: {\n y: -100,\n opacity: 0\n },\n visible: {\n y: 0,\n opacity: 1\n }\n};\nconst slideVisibleOnceTop = {\n initial: {\n y: -100,\n opacity: 0\n },\n visibleOnce: {\n y: 0,\n opacity: 1\n }\n};\nconst slideBottom = {\n initial: {\n y: 100,\n opacity: 0\n },\n enter: {\n y: 0,\n opacity: 1\n }\n};\nconst slideVisibleBottom = {\n initial: {\n y: 100,\n opacity: 0\n },\n visible: {\n y: 0,\n opacity: 1\n }\n};\nconst slideVisibleOnceBottom = {\n initial: {\n y: 100,\n opacity: 0\n },\n visibleOnce: {\n y: 0,\n opacity: 1\n }\n};\n\nconst presets = {\n __proto__: null,\n fade: fade,\n fadeVisible: fadeVisible,\n fadeVisibleOnce: fadeVisibleOnce,\n pop: pop,\n popVisible: popVisible,\n popVisibleOnce: popVisibleOnce,\n rollBottom: rollBottom,\n rollLeft: rollLeft,\n rollRight: rollRight,\n rollTop: rollTop,\n rollVisibleBottom: rollVisibleBottom,\n rollVisibleLeft: rollVisibleLeft,\n rollVisibleOnceBottom: rollVisibleOnceBottom,\n rollVisibleOnceLeft: rollVisibleOnceLeft,\n rollVisibleOnceRight: rollVisibleOnceRight,\n rollVisibleOnceTop: rollVisibleOnceTop,\n rollVisibleRight: rollVisibleRight,\n rollVisibleTop: rollVisibleTop,\n slideBottom: slideBottom,\n slideLeft: slideLeft,\n slideRight: slideRight,\n slideTop: slideTop,\n slideVisibleBottom: slideVisibleBottom,\n slideVisibleLeft: slideVisibleLeft,\n slideVisibleOnceBottom: slideVisibleOnceBottom,\n slideVisibleOnceLeft: slideVisibleOnceLeft,\n slideVisibleOnceRight: slideVisibleOnceRight,\n slideVisibleOnceTop: slideVisibleOnceTop,\n slideVisibleRight: slideVisibleRight,\n slideVisibleTop: slideVisibleTop\n};\n\nfunction slugify(str) {\n const a = \"\\xE0\\xE1\\xE2\\xE4\\xE6\\xE3\\xE5\\u0101\\u0103\\u0105\\xE7\\u0107\\u010D\\u0111\\u010F\\xE8\\xE9\\xEA\\xEB\\u0113\\u0117\\u0119\\u011B\\u011F\\u01F5\\u1E27\\xEE\\xEF\\xED\\u012B\\u012F\\xEC\\u0142\\u1E3F\\xF1\\u0144\\u01F9\\u0148\\xF4\\xF6\\xF2\\xF3\\u0153\\xF8\\u014D\\xF5\\u0151\\u1E55\\u0155\\u0159\\xDF\\u015B\\u0161\\u015F\\u0219\\u0165\\u021B\\xFB\\xFC\\xF9\\xFA\\u016B\\u01D8\\u016F\\u0171\\u0173\\u1E83\\u1E8D\\xFF\\xFD\\u017E\\u017A\\u017C\\xB7/_,:;\";\n const b = \"aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------\";\n const p = new RegExp(a.split(\"\").join(\"|\"), \"g\");\n return str.toString().replace(/[A-Z]/g, (s) => `-${s}`).toLowerCase().replace(/\\s+/g, \"-\").replace(p, (c) => b.charAt(a.indexOf(c))).replace(/&/g, \"-and-\").replace(/[^\\w\\-]+/g, \"\").replace(/-{2,}/g, \"-\").replace(/^-+/, \"\").replace(/-+$/, \"\");\n}\n\nconst CUSTOM_PRESETS = Symbol(\n import.meta.dev ? \"motionCustomPresets\" : \"\"\n);\n\nconst MotionComponentProps = {\n // Preset to be loaded\n preset: {\n type: String,\n required: false\n },\n // Instance\n instance: {\n type: Object,\n required: false\n },\n // Variants\n variants: {\n type: Object,\n required: false\n },\n // Initial variant\n initial: {\n type: Object,\n required: false\n },\n // Lifecycle hooks variants\n enter: {\n type: Object,\n required: false\n },\n leave: {\n type: Object,\n required: false\n },\n // Intersection observer variants\n visible: {\n type: Object,\n required: false\n },\n visibleOnce: {\n type: Object,\n required: false\n },\n // Event listeners variants\n hovered: {\n type: Object,\n required: false\n },\n tapped: {\n type: Object,\n required: false\n },\n focused: {\n type: Object,\n required: false\n },\n // Helpers\n delay: {\n type: [Number, String],\n required: false\n },\n duration: {\n type: [Number, String],\n required: false\n }\n};\nfunction isObject(val) {\n return Object.prototype.toString.call(val) === \"[object Object]\";\n}\nfunction clone(v) {\n if (Array.isArray(v)) {\n return v.map(clone);\n }\n if (isObject(v)) {\n const res = {};\n for (const key in v) {\n res[key] = clone(v[key]);\n }\n return res;\n }\n return v;\n}\nfunction setupMotionComponent(props) {\n const instances = reactive({});\n const customPresets = inject(CUSTOM_PRESETS, {});\n const preset = computed(() => {\n if (props.preset == null) {\n return {};\n }\n if (customPresets != null && props.preset in customPresets) {\n return structuredClone(toRaw(customPresets)[props.preset]);\n }\n if (props.preset in presets) {\n return structuredClone(presets[props.preset]);\n }\n return {};\n });\n const propsConfig = computed(() => ({\n initial: props.initial,\n enter: props.enter,\n leave: props.leave,\n visible: props.visible,\n visibleOnce: props.visibleOnce,\n hovered: props.hovered,\n tapped: props.tapped,\n focused: props.focused\n }));\n function applyTransitionHelpers(config, values) {\n for (const transitionKey of [\"delay\", \"duration\"]) {\n if (values[transitionKey] == null)\n continue;\n const transitionValueParsed = Number.parseInt(\n values[transitionKey]\n );\n for (const variantKey of [\"enter\", \"visible\", \"visibleOnce\"]) {\n const variantConfig = config[variantKey];\n if (variantConfig == null)\n continue;\n variantConfig.transition ?? (variantConfig.transition = {});\n variantConfig.transition[transitionKey] = transitionValueParsed;\n }\n }\n return config;\n }\n const motionConfig = computed(() => {\n const config = defu(\n {},\n propsConfig.value,\n preset.value,\n props.variants || {}\n );\n return applyTransitionHelpers({ ...config }, props);\n });\n if (import.meta.dev) {\n if (props.preset != null && presets?.[props.preset] == null && customPresets?.[props.preset] == null) {\n console.warn(`[@vueuse/motion]: Preset \\`${props.preset}\\` not found.`);\n }\n const replayAnimation = (instance) => {\n if (instance.variants?.initial) {\n instance.set(\"initial\");\n }\n nextTick(() => {\n if (instance.variants?.enter)\n instance.apply(\"enter\");\n if (instance.variants?.visible)\n instance.apply(\"visible\");\n if (instance.variants?.visibleOnce)\n instance.apply(\"visibleOnce\");\n });\n };\n onUpdated(() => {\n for (const key in instances) {\n replayAnimation(instances[key]);\n }\n });\n }\n function setNodeInstance(node, index, style) {\n var _a;\n node.props ?? (node.props = {});\n (_a = node.props).style ?? (_a.style = {});\n node.props.style = { ...node.props.style, ...style };\n const elementMotionConfig = applyTransitionHelpers(\n clone(motionConfig.value),\n node.props\n );\n node.props.onVnodeMounted = ({ el }) => {\n instances[index] = useMotion(\n el,\n elementMotionConfig\n );\n };\n node.props.onVnodeUpdated = ({ el }) => {\n const styles = variantToStyle(instances[index].state);\n for (const [key, val] of Object.entries(styles)) {\n el.style[key] = val;\n }\n };\n return node;\n }\n return {\n motionConfig,\n setNodeInstance\n };\n}\n\nconst MotionComponent = defineComponent({\n name: \"Motion\",\n props: {\n ...MotionComponentProps,\n is: {\n type: [String, Object],\n default: \"div\"\n }\n },\n setup(props) {\n const slots = useSlots();\n const { motionConfig, setNodeInstance } = setupMotionComponent(props);\n return () => {\n const style = variantToStyle(motionConfig.value.initial || {});\n const node = h(props.is, void 0, slots);\n setNodeInstance(node, 0, style);\n return node;\n };\n }\n});\n\nconst MotionGroupComponent = defineComponent({\n name: \"MotionGroup\",\n props: {\n ...MotionComponentProps,\n is: {\n type: [String, Object],\n required: false\n }\n },\n setup(props) {\n const slots = useSlots();\n const { motionConfig, setNodeInstance } = setupMotionComponent(props);\n return () => {\n const style = variantToStyle(motionConfig.value.initial || {});\n const nodes = slots.default?.() || [];\n for (let i = 0; i < nodes.length; i++) {\n const n = nodes[i];\n if (n.type === Fragment && Array.isArray(n.children)) {\n n.children.forEach(function setChildInstance(child, index) {\n if (child == null)\n return;\n if (Array.isArray(child)) {\n setChildInstance(child, index);\n return;\n }\n if (typeof child === \"object\") {\n setNodeInstance(child, index, style);\n }\n });\n } else {\n setNodeInstance(n, i, style);\n }\n }\n if (props.is) {\n return h(props.is, void 0, nodes);\n }\n return nodes;\n };\n }\n});\n\nconst MotionPlugin = {\n install(app, options) {\n app.directive(\"motion\", directive());\n if (!options || options && !options.excludePresets) {\n for (const key in presets) {\n const preset = presets[key];\n app.directive(`motion-${slugify(key)}`, directive(preset, true));\n }\n }\n if (options && options.directives) {\n for (const key in options.directives) {\n const variants = options.directives[key];\n if (!variants.initial && import.meta.dev) {\n console.warn(\n `Your directive v-motion-${key} is missing initial variant!`\n );\n }\n app.directive(`motion-${key}`, directive(variants, true));\n }\n }\n app.provide(CUSTOM_PRESETS, options?.directives);\n app.component(\"Motion\", MotionComponent);\n app.component(\"MotionGroup\", MotionGroupComponent);\n }\n};\n\nfunction isMotionInstance(obj) {\n const _obj = obj;\n return _obj.apply !== void 0 && typeof _obj.apply === \"function\" && _obj.set !== void 0 && typeof _obj.set === \"function\" && _obj.target !== void 0 && isRef(_obj.target);\n}\n\nfunction useMotions() {\n return motionState;\n}\n\nfunction useSpring(values, spring) {\n const { stop, get } = useMotionValues();\n return {\n values,\n stop,\n set: (properties) => Promise.all(\n Object.entries(properties).map(([key, value]) => {\n const motionValue = get(key, values[key], values);\n return motionValue.start((onComplete) => {\n const options = {\n type: \"spring\",\n ...spring || getDefaultTransition(key, value)\n };\n return animate({\n from: motionValue.get(),\n to: value,\n velocity: motionValue.getVelocity(),\n onUpdate: (v) => motionValue.set(v),\n onComplete,\n ...options\n });\n });\n })\n )\n };\n}\n\nfunction useReducedMotion(options = {}) {\n return useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n}\n\nexport { MotionComponent, directive as MotionDirective, MotionGroupComponent, MotionPlugin, fade, fadeVisible, fadeVisibleOnce, isMotionInstance, pop, popVisible, popVisibleOnce, reactiveStyle, reactiveTransform, rollBottom, rollLeft, rollRight, rollTop, rollVisibleBottom, rollVisibleLeft, rollVisibleOnceBottom, rollVisibleOnceLeft, rollVisibleOnceRight, rollVisibleOnceTop, rollVisibleRight, rollVisibleTop, slideBottom, slideLeft, slideRight, slideTop, slideVisibleBottom, slideVisibleLeft, slideVisibleOnceBottom, slideVisibleOnceLeft, slideVisibleOnceRight, slideVisibleOnceTop, slideVisibleRight, slideVisibleTop, slugify, useElementStyle, useElementTransform, useMotion, useMotionControls, useMotionFeatures, useMotionProperties, useMotionTransitions, useMotionVariants, useMotions, useReducedMotion, useSpring };\n"],"names":["motionState","__defProp$1","Object","defineProperty","__defNormalProp$1","obj","key","value","enumerable","configurable","writable","__publicField$1","SubscriptionManager","constructor","this","Set","add","handler","subscriptions","delete","notify","a","b","c","size","clear","__defProp","__defNormalProp","__publicField","isFloat","Number","isNaN","parseFloat","MotionValue","init","v","prev","current","delta","timestamp","lastUpdated","timeDelta","postRender","scheduleVelocityCheck","updateSubscribers","velocityCheck","canTrackVelocity","onChange","subscription","clearListeners","set","updateAndNotify","get","getPrevious","getVelocity","start","animation","stop","Promise","resolve","stopAnimation","then","clearAnimation","isAnimating","destroy","getMotionValue","isArray","Array","useMotionValues","motionValues","keys","destroyKey","forEach","from","target","motionValue","isKeyframesTarget","underDampedSpring","type","stiffness","damping","restDelta","restSpeed","criticallyDampedSpring","to","Math","sqrt","overDampedSpring","linearTween","ease","duration","keyframes","values","defaultTransitions","default","x","y","z","rotate","rotateX","rotateY","rotateZ","scaleX","scaleY","scale","backgroundColor","color","opacity","getDefaultTransition","valueKey","transitionFactory","int","transform","round","valueTypes","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderWidth","px","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","scaleZ","skew","skewX","skewY","distance","translateX","translateY","translateZ","perspective","transformPerspective","originX","originY","originZ","zIndex","filter","WebkitFilter","fillOpacity","strokeOpacity","numOctaves","getValueType","getValueAsType","getAnimatableNone","defaultValueType","easingLookup","linear","easeIn","easeInOut","easeOut","circIn","circInOut","circOut","backIn","backInOut","backOut","anticipate","bounceIn","bounceInOut","bounceOut","easingDefinitionToFunction","definition","x1","y1","x2","y2","isEasingArray","isAnimatable","test","startsWith","hydrateKeyframes","options","convertTransitionToAnimationOptions","times","delay","transition","offset","map","elapsed","getPopmotionAnimationOptions","isTransitionDefined","repeat","repeatType","repeatDelay","length","getValueTransition","getAnimation","onComplete","valueTransition","origin","isTargetAnimatable","isOriginAnimatable","complete","velocity","onUpdate","useMotionTransitions","push","immediate","useMotionControls","motionProperties","variants","_variants","newVal","deep","getVariantFromKey","variant","Error","apply","animations","entries","Boolean","async","waitForComplete","all","variantData","leave","done","leaveVariant","initial","isBrowser","window","supportsPointerEvents","onpointerdown","supportsTouchEvents","ontouchstart","supportsMouseEvents","onmousedown","registerEventListeners","state","hovered","tapped","focused","mutableKeys","result","computedProperties","assign","includes","registerLifeCycleHooks","enter","flush","registerVariantsSync","registerVisibilityHooks","visible","visibleOnce","isIntersecting","useMotionFeatures","instance","syncVariants","lifeCycleHooks","visibilityHooks","eventListeners","reactiveStyle","props","style","valueType","valueAsType","usePermissiveTarget","onTarget","el","translateAlias","reactiveTransform","enableHardwareAcceleration","hasHardwareAcceleration","str","val","join","trim","transformAxes","order","transformProps","operationKey","axesKey","transformPropSet","isTransformProp","has","transformOriginProps","isTransformOriginProp","splitValues","variantToStyle","_transform","_style","useElementStyle","onInit","_cache","_target","parseTransform","transforms","split","parseValues","endsWith","reduce","acc","transform2","name","transformValue","valueArray","replace","stateFromTransform","axes","axis","axisValue","index","useElementTransform","newValue","objectEntries","useMotionProperties","defaultValues","target2","useMotionVariants","useMotion","controls","transitionKeys","directivePropsKeys","isTransitionKey","resolveVariants","node","variantsRef","data","attrs","variantKey","variantConfig","prop","directive","isPreset","register","binding","variantsObject","structuredClone","motionOptions","motionInstance","mounted","_binding","_node","created","getSSRProps","bindingInitial","fade","fadeVisible","fadeVisibleOnce","pop","popVisible","popVisibleOnce","rollLeft","rollVisibleLeft","rollVisibleOnceLeft","rollRight","rollVisibleRight","rollVisibleOnceRight","rollTop","rollVisibleTop","rollVisibleOnceTop","rollBottom","rollVisibleBottom","rollVisibleOnceBottom","slideLeft","slideVisibleLeft","slideVisibleOnceLeft","slideRight","slideVisibleRight","slideVisibleOnceRight","slideTop","slideVisibleTop","slideVisibleOnceTop","slideBottom","slideVisibleBottom","slideVisibleOnceBottom","presets","__proto__","slugify","p","RegExp","toString","s","toLowerCase","charAt","indexOf","CUSTOM_PRESETS","Symbol","MotionComponentProps","preset","String","required","isObject","prototype","call","clone","res","setupMotionComponent","instances","customPresets","propsConfig","applyTransitionHelpers","config","transitionKey","transitionValueParsed","parseInt","motionConfig","setNodeInstance","_a","elementMotionConfig","onVnodeMounted","onVnodeUpdated","styles","MotionComponent","is","setup","slots","h","MotionGroupComponent","nodes","i","n","children","setChildInstance","child","MotionPlugin","install","app","excludePresets","directives","provide","component"],"sourceRoot":""}