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,kBACA,iBACA,YACA,QACA,aACA,WACA,oBACA,QACA,aACA,cACA,eACA,aACA,aACA,WACA,aACA,cACA,kBACA,kBACA,WACA,iBAUJ,SAASC,EAAkB5F,GACvB,OAAO0F,EAAiBH,IAAIvF,EAChC,CCxEA,IAAI6F,EAAgB,SAAU7F,GAAO,OAAQ4F,EAAkB5F,EAAM,EACrE,SAAS8F,EAAwBC,GACxBA,IAGLF,EAAgB,SAAU7F,GACtB,OAAOA,EAAIgG,WAAW,OAASJ,EAAkB5F,GAAO+F,EAAY/F,EACxE,EACJ,CAcA,IAMI8F,EAAwBG,QAAQ,0BAA0BC,QAC9D,CACA,MAAO1K,GAEP,CACA,SAAS2K,EAAY1K,EAAO2K,EAAO3D,GAC/B,IAAIG,EAAgB,CAAC,EACrB,IAAK,IAAI5C,KAAOvE,GACRoK,EAAc7F,KACU,IAAvByC,GAA+BmD,EAAkB5F,KAChDoG,IAAUR,EAAkB5F,IAE7BvE,EAAiB,WAAKuE,EAAIgG,WAAW,aACtCpD,EAAc5C,GAAOvE,EAAMuE,IAGnC,OAAO4C,CACX,C,2FCzCIyD,EAAuB,CAAEjI,QAAS,MAClCkI,GAAc,EA2ClB,SAASC,IASL,OALCD,GA9CL,WAEI,GADAA,GAAc,EACT,IAEL,GAAIE,OAAOC,WAAY,CACnB,IAAIC,EAAqBF,OAAOC,WAAW,4BACvCE,EAA8B,WAC9B,OAAQN,EAAqBjI,QAAUsI,EAAmBE,OAC9D,EACAF,EAAmBG,YAAYF,GAC/BA,GACJ,MAEIN,EAAqBjI,SAAU,CAEvC,CA+BoB0I,IACP,SAAO,IAAAC,UAASV,EAAqBjI,SAAU,GAA4B,EAKxF,CACA,SAAS4I,IACL,IAAIC,EAA0BV,IAC1BW,GAAgB,IAAAxK,YAAW,KAAqBwK,cACpD,MAAsB,UAAlBA,IAGuB,WAAlBA,GAIED,EAEf,C","sources":["webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/features/use-features.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/projection/node/id.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/index.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/svg/use-props.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/dom/motion-minimal.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://ess-mep/./node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs"],"sourcesContent":["import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement)\n return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (env !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n }\n }\n return features;\n}\n\nexport { useFeatures };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.mjs';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.mjs';\nimport { getCurrentTreeVariants } from './utils.mjs';\n\nfunction useCreateMotionContext(props) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n return useMemo(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { useConstant } from '../../utils/use-constant.mjs';\nimport { globalProjectionState } from './state.mjs';\n\nvar id = 1;\nfunction useProjectionId() {\n return useConstant(function () {\n if (globalProjectionState.hasEverUpdated) {\n return id++;\n }\n });\n}\n\nexport { useProjectionId };\n","import { __extends } from 'tslib';\nimport React__default from 'react';\n\nvar VisualElementHandler = /** @class */ (function (_super) {\n __extends(VisualElementHandler, _super);\n function VisualElementHandler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Update visual element props as soon as we know this update is going to be commited.\n */\n VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () {\n this.updateProps();\n return null;\n };\n VisualElementHandler.prototype.componentDidUpdate = function () { };\n VisualElementHandler.prototype.updateProps = function () {\n var _a = this.props, visualElement = _a.visualElement, props = _a.props;\n if (visualElement)\n visualElement.setProps(props);\n };\n VisualElementHandler.prototype.render = function () {\n return this.props.children;\n };\n return VisualElementHandler;\n}(React__default.Component));\n\nexport { VisualElementHandler };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.mjs';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { MotionContext } from '../context/MotionContext/index.mjs';\nimport { useVisualElement } from './utils/use-visual-element.mjs';\nimport { useMotionRef } from './utils/use-motion-ref.mjs';\nimport { useCreateMotionContext } from '../context/MotionContext/create.mjs';\nimport { loadFeatures, featureDefinitions } from './features/definitions.mjs';\nimport { isBrowser } from '../utils/is-browser.mjs';\nimport { useProjectionId } from '../projection/node/id.mjs';\nimport { LayoutGroupContext } from '../context/LayoutGroupContext.mjs';\nimport { useProjection } from './features/use-projection.mjs';\nimport { VisualElementHandler } from './utils/VisualElementHandler.mjs';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n */\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n var layoutId = useLayoutId(props);\n props = __assign(__assign({}, props), { layoutId: layoutId });\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var config = useContext(MotionConfigContext);\n var features = null;\n var context = useCreateMotionContext(props);\n /**\n * Create a unique projection ID for this component. If a new component is added\n * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing\n * us to measure it as soon as any layout effect flushes pending layout animations.\n *\n * Performance note: It'd be better not to have to search the DOM for these elements.\n * For newly-entering components it could be enough to only correct treeScale, in which\n * case we could mount in a scale-correction mode. This wouldn't be enough for\n * shared element transitions however. Perhaps for those we could revert to a root node\n * that gets forceRendered and layout animations are triggered on its layout effect.\n */\n var projectionId = config.isStatic ? undefined : useProjectionId();\n /**\n *\n */\n var visualState = useVisualState(props, config.isStatic);\n if (!config.isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement);\n useProjection(projectionId, props, context.visualElement, projectionNodeConstructor ||\n featureDefinitions.projectionNodeConstructor);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n */\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) },\n features,\n React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement))));\n }\n return forwardRef(MotionComponent);\n}\nfunction useLayoutId(_a) {\n var _b;\n var layoutId = _a.layoutId;\n var layoutGroupId = (_b = useContext(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id;\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\n\nexport { createMotionComponent };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.mjs';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial, animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useVisualElementContext } from '../../context/MotionContext/index.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { LazyContext } from '../../context/LazyContext.mjs';\nimport { useReducedMotionConfig } from '../../utils/use-reduced-motion.mjs';\n\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var shouldReduceMotion = useReducedMotionConfig();\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n if (!createVisualElement)\n createVisualElement = lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: props,\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n shouldReduceMotion: shouldReduceMotion,\n });\n }\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { isRefObject } from '../../utils/is-ref-object.mjs';\nimport { useContext } from 'react';\nimport { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';\n\nfunction useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) {\n var _b;\n var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll;\n var initialPromotionConfig = useContext(SwitchLayoutGroupContext);\n if (!ProjectionNodeConstructor ||\n !visualElement ||\n (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) {\n return;\n }\n visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection);\n visualElement.projection.setOptions({\n layoutId: layoutId,\n layout: layout,\n alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),\n visualElement: visualElement,\n scheduleRender: function () { return visualElement.scheduleRender(); },\n /**\n * TODO: Update options in an effect. This could be tricky as it'll be too late\n * to update by the time layout animations run.\n * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,\n * ensuring it gets called if there's no potential layout animations.\n *\n */\n animationType: typeof layout === \"string\" ? layout : \"both\",\n initialPromotionConfig: initialPromotionConfig,\n layoutScroll: layoutScroll,\n });\n}\n\nexport { useProjection };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.mjs';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","var createHtmlRenderState = function () { return ({\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\nimport { buildHTMLStyles } from './utils/build-styles.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n var vars = state.vars, style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n if (Boolean(props.drag) && props.dragListener !== false) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect =\n style.WebkitUserSelect =\n style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : \"pan-\".concat(props.drag === \"x\" ? \"y\" : \"x\");\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.mjs';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n }, [visualState]);\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.mjs';\nimport { filterProps } from './utils/filter-props.mjs';\nimport { isSVGComponent } from './utils/is-svg-component.mjs';\nimport { useSVGProps } from '../svg/use-props.mjs';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n var useRender = function (Component, props, projectionId, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n if (projectionId) {\n elementProps[\"data-projection-id\"] = projectionId;\n }\n return createElement(Component, elementProps);\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';\nimport { MotionContext } from '../../context/MotionContext/index.mjs';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = function (instance) { return onMount(props, instance, state); };\n }\n return state;\n}\nvar makeUseVisualState = function (config) {\n return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic\n ? makeState(config, props, context, presenceContext)\n : useConstant(function () {\n return makeState(config, props, context, presenceContext);\n });\n };\n};\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n var initial = props.initial, animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n }\n var initialAnimationIsBlocked = blockInitialAnimation || initial === false;\n var variantToSet = initialAnimationIsBlocked ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n for (var key in target) {\n var valueTarget = target[key];\n if (Array.isArray(valueTarget)) {\n /**\n * Take final keyframe if the initial animation is blocked because\n * we want to initialise at the end of that blocked animation.\n */\n var index = initialAnimationIsBlocked\n ? valueTarget.length - 1\n : 0;\n valueTarget = valueTarget[index];\n }\n if (valueTarget !== null) {\n values[key] = valueTarget;\n }\n }\n for (var key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { renderSVG } from './utils/render.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { createSvgRenderState } from './utils/create-render-state.mjs';\nimport { buildSVGAttrs } from './utils/build-attrs.mjs';\n\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function (props, instance, _a) {\n var renderState = _a.renderState, latestValues = _a.latestValues;\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate);\n renderSVG(instance, renderState);\n },\n }),\n};\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';\nimport { createHtmlRenderState } from './utils/create-render-state.mjs';\n\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { createMotionProxy } from './motion-proxy.mjs';\nimport { createDomMotionConfig } from './utils/create-config.mjs';\n\n/**\n * @public\n */\nvar m = createMotionProxy(createDomMotionConfig);\n\nexport { m };\n","import { createMotionComponent } from '../../motion/index.mjs';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return
\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n if (typeof Proxy === \"undefined\") {\n return custom;\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function (_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.mjs';\nimport { createUseRender } from '../use-render.mjs';\nimport { svgMotionConfig } from '../../svg/config-motion.mjs';\nimport { htmlMotionConfig } from '../../html/config-motion.mjs';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) {\n var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component });\n}\n\nexport { createDomMotionConfig };\n","/**\n * A list of all valid MotionProps.\n *\n * @privateRemarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n \"initial\",\n \"animate\",\n \"exit\",\n \"style\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"layout\",\n \"layoutId\",\n \"layoutDependency\",\n \"onLayoutAnimationStart\",\n \"onLayoutAnimationComplete\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"drag\",\n \"dragControls\",\n \"dragListener\",\n \"dragConstraints\",\n \"dragDirectionLock\",\n \"dragSnapToOrigin\",\n \"_dragX\",\n \"_dragY\",\n \"dragElastic\",\n \"dragMomentum\",\n \"dragPropagation\",\n \"dragTransition\",\n \"whileDrag\",\n \"onPan\",\n \"onPanStart\",\n \"onPanEnd\",\n \"onPanSessionStart\",\n \"onTap\",\n \"onTapStart\",\n \"onTapCancel\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"whileFocus\",\n \"whileTap\",\n \"whileHover\",\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n \"viewport\",\n \"layoutScroll\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = function (key) {\n return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n for (var key in props) {\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { isBrowser } from './is-browser.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n hasDetected = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n var setReducedMotionPreferences = function () {\n return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n };\n motionMediaQuery_1.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * \n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nfunction useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasDetected && initPrefersReducedMotion();\n var _a = __read(useState(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0];\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n return shouldReduceMotion;\n}\nfunction useReducedMotionConfig() {\n var reducedMotionPreference = useReducedMotion();\n var reducedMotion = useContext(MotionConfigContext).reducedMotion;\n if (reducedMotion === \"never\") {\n return false;\n }\n else if (reducedMotion === \"always\") {\n return true;\n }\n else {\n return reducedMotionPreference;\n }\n}\n\nexport { useReducedMotion, useReducedMotionConfig };\n"],"names":["featureNames","Object","keys","numFeatures","length","MotionContext","createContext","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","variantLabelsAsDependency","prop","Array","isArray","join","id","VisualElementHandler","_super","apply","this","arguments","prototype","getSnapshotBeforeUpdate","updateProps","componentDidUpdate","_a","props","visualElement","setProps","render","children","createMotionComponent","preloadedFeatures","createVisualElement","projectionNodeConstructor","useRender","useVisualState","Component","forwardRef","externalRef","layoutId","_b","layoutGroupId","useContext","LayoutGroupContext","undefined","useLayoutId","config","MotionConfigContext","features","context","initial","animate","inherit","getCurrentTreeVariants","useMemo","useCreateMotionContext","projectionId","isStatic","visualState","lazyContext","LazyContext","parent","presenceContext","PresenceContext","shouldReduceMotion","visualElementRef","useRef","renderer","current","presenceId","blockInitialAnimation","syncRender","animationState","animateChanges","notifyUnmount","useVisualElement","ProjectionNodeConstructor","layout","drag","dragConstraints","layoutScroll","initialPromotionConfig","SwitchLayoutGroupContext","projection","getLatestValues","setOptions","alwaysMeasureLayout","Boolean","scheduleRender","animationType","useProjection","strict","i","name_1","isEnabled","push","key","useFeatures","Provider","value","useCallback","instance","mount","call","unmount","useMotionRef","createHtmlRenderState","style","transform","transformKeys","transformOrigin","vars","copyRawValuesOnly","target","source","useHTMLProps","htmlProps","assign","transformTemplate","state","enableHardwareAcceleration","useInitialMotionValues","transformValues","useStyle","dragListener","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","concat","createSvgRenderState","attrs","useSVGProps","visualProps","rawStyles","createUseRender","forwardMotionProps","ref","latestValues","filteredProps","elementProps","createElement","makeState","scrapeMotionValuesFromProps","createRenderState","onMount","makeLatestValues","renderState","makeUseVisualState","scrapeMotionValues","values","motionValues","isControllingVariants","isVariantNode","initialAnimationIsBlocked","variantToSet","forEach","definition","resolved","transitionEnd","transition","valueTarget","svgMotionConfig","dimensions","getBBox","getBoundingClientRect","e","x","y","width","height","htmlMotionConfig","m","createConfig","custom","customMotionComponentConfig","baseConfig","Proxy","componentCache","Map","get","_target","has","set","createMotionProxy","validMotionProps","Set","isValidMotionProp","shouldForward","loadExternalIsValidProp","isValidProp","startsWith","require","default","filterProps","isDom","prefersReducedMotion","hasDetected","useReducedMotion","window","matchMedia","motionMediaQuery_1","setReducedMotionPreferences","matches","addListener","initPrefersReducedMotion","useState","useReducedMotionConfig","reducedMotionPreference","reducedMotion"],"sourceRoot":""}