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rQ,EAAO,CAAC,EAAGpN,KAAK0d,UAAWA,GAAY1d,KAAK4d,WAC1D,GAEF,CACEA,WAAY,CAAE/S,MAAOvB,OAAOyV,OAAOpB,IACnCD,UAAW,CAAE7S,MAAOvB,OAAOyV,OAAOrB,KAGxC,CAEUD,CApHa,CACrBmB,KAAM,SAAU/T,GAId,MAHiB,MAAbA,EAAM,KACRA,EAAQA,EAAM4L,MAAM,GAAI,IAEnB5L,EAAMoT,QAAQ,mBAAoBC,mBAC3C,EACAK,MAAO,SAAU1T,GACf,OAAOmT,mBAAmBnT,GAAOoT,QAC/B,2CACAC,mBAEJ,GAwG+B,CAAEc,KAAM","sources":["webpack://silverstripe-base/./node_modules/@motionone/animation/dist/Animation.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/interpolate.es.js","webpack://silverstripe-base/./node_modules/@motionone/easing/dist/cubic-bezier.es.js","webpack://silverstripe-base/./node_modules/@motionone/easing/dist/steps.es.js","webpack://silverstripe-base/./node_modules/@motionone/animation/dist/utils/easing.es.js","webpack://silverstripe-base/./node_modules/@motionone/types/dist/MotionValue.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/data.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/transforms.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/css-var.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/easing.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/style.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/animate-style.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/controls.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/options.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/gestures/in-view.es.js","webpack://silverstripe-base/./node_modules/tslib/tslib.es6.mjs","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/timeline/utils/calc-time.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/timeline/utils/edit.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/timeline/utils/sort.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/timeline/index.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/utils/resolve-elements.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/utils/stagger.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/array.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/clamp.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/defaults.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/wrap.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/easing.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-cubic-bezier.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-easing-generator.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-easing-list.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-function.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-number.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/is-string.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/mix.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/noop.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/offset.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/progress.es.js","webpack://silverstripe-base/./node_modules/@motionone/utils/dist/time.es.js","webpack://silverstripe-base/./node_modules/selector-set/selector-set.next.js","webpack://silverstripe-base/./node_modules/delegated-events/dist/index.js","webpack://silverstripe-base/./node_modules/hey-listen/dist/hey-listen.es.js","webpack://silverstripe-base/./node_modules/jump.js/dist/jump.module.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/index.es.js","webpack://silverstripe-base/./node_modules/@motionone/dom/dist/animate/create-animate.es.js","webpack://silverstripe-base/./node_modules/motion/dist/animate.es.js","webpack://silverstripe-base/./node_modules/js-cookie/dist/js.cookie.mjs"],"sourcesContent":["import { noopReturn, defaults, isEasingGenerator, isEasingList, interpolate } from '@motionone/utils';\nimport { getEasingFunction } from './utils/easing.es.js';\n\nclass Animation {\n constructor(output, keyframes = [0, 1], { easing, duration: initialDuration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, offset, direction = \"normal\", autoplay = true, } = {}) {\n this.startTime = null;\n this.rate = 1;\n this.t = 0;\n this.cancelTimestamp = null;\n this.easing = noopReturn;\n this.duration = 0;\n this.totalDuration = 0;\n this.repeat = 0;\n this.playState = \"idle\";\n this.finished = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n easing = easing || defaults.easing;\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\n }\n this.repeat = repeat;\n this.easing = isEasingList(easing) ? noopReturn : getEasingFunction(easing);\n this.updateDuration(initialDuration);\n const interpolate$1 = interpolate(keyframes, offset, isEasingList(easing) ? easing.map(getEasingFunction) : noopReturn);\n this.tick = (timestamp) => {\n var _a;\n // TODO: Temporary fix for OptionsResolver typing\n delay = delay;\n let t = 0;\n if (this.pauseTime !== undefined) {\n t = this.pauseTime;\n }\n else {\n t = (timestamp - this.startTime) * this.rate;\n }\n this.t = t;\n // Convert to seconds\n t /= 1000;\n // Rebase on delay\n t = Math.max(t - delay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (this.playState === \"finished\" && this.pauseTime === undefined) {\n t = this.totalDuration;\n }\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = t / this.duration;\n // TODO progress += iterationStart\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n iterationProgress === 1 && currentIteration--;\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = currentIteration % 2;\n if (direction === \"reverse\" ||\n (direction === \"alternate\" && iterationIsOdd) ||\n (direction === \"alternate-reverse\" && !iterationIsOdd)) {\n iterationProgress = 1 - iterationProgress;\n }\n const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);\n const latest = interpolate$1(this.easing(p));\n output(latest);\n const isAnimationFinished = this.pauseTime === undefined &&\n (this.playState === \"finished\" || t >= this.totalDuration + endDelay);\n if (isAnimationFinished) {\n this.playState = \"finished\";\n (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);\n }\n else if (this.playState !== \"idle\") {\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n };\n if (autoplay)\n this.play();\n }\n play() {\n const now = performance.now();\n this.playState = \"running\";\n if (this.pauseTime !== undefined) {\n this.startTime = now - this.pauseTime;\n }\n else if (!this.startTime) {\n this.startTime = now;\n }\n this.cancelTimestamp = this.startTime;\n this.pauseTime = undefined;\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n pause() {\n this.playState = \"paused\";\n this.pauseTime = this.t;\n }\n finish() {\n this.playState = \"finished\";\n this.tick(0);\n }\n stop() {\n var _a;\n this.playState = \"idle\";\n if (this.frameRequestId !== undefined) {\n cancelAnimationFrame(this.frameRequestId);\n }\n (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);\n }\n cancel() {\n this.stop();\n this.tick(this.cancelTimestamp);\n }\n reverse() {\n this.rate *= -1;\n }\n commitStyles() { }\n updateDuration(duration) {\n this.duration = duration;\n this.totalDuration = duration * (this.repeat + 1);\n }\n get currentTime() {\n return this.t;\n }\n set currentTime(t) {\n if (this.pauseTime !== undefined || this.rate === 0) {\n this.pauseTime = t;\n }\n else {\n this.startTime = performance.now() - t / this.rate;\n }\n }\n get playbackRate() {\n return this.rate;\n }\n set playbackRate(rate) {\n this.rate = rate;\n }\n}\n\nexport { Animation };\n","import { mix } from './mix.es.js';\nimport { noopReturn } from './noop.es.js';\nimport { fillOffset, defaultOffset } from './offset.es.js';\nimport { progress } from './progress.es.js';\nimport { getEasingForSegment } from './easing.es.js';\nimport { clamp } from './clamp.es.js';\n\nfunction interpolate(output, input = defaultOffset(output.length), easing = noopReturn) {\n const length = output.length;\n /**\n * If the input length is lower than the output we\n * fill the input to match. This currently assumes the input\n * is an animation progress value so is a good candidate for\n * moving outside the function.\n */\n const remainder = length - input.length;\n remainder > 0 && fillOffset(input, remainder);\n return (t) => {\n let i = 0;\n for (; i < length - 2; i++) {\n if (t < input[i + 1])\n break;\n }\n let progressInRange = clamp(0, 1, progress(input[i], input[i + 1], t));\n const segmentEasing = getEasingForSegment(easing, i);\n progressInRange = segmentEasing(progressInRange);\n return mix(output[i], output[i + 1], progressInRange);\n };\n}\n\nexport { interpolate };\n","import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\n This has been modified from Gaƫtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) * t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noopReturn;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n","import { clamp } from '@motionone/utils';\n\nconst steps = (steps, direction = \"end\") => (progress) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001);\n const expanded = progress * steps;\n const rounded = direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded);\n return clamp(0, 1, rounded / steps);\n};\n\nexport { steps };\n","import { cubicBezier, steps } from '@motionone/easing';\nimport { isFunction, isCubicBezier, noopReturn } from '@motionone/utils';\n\nconst namedEasings = {\n ease: cubicBezier(0.25, 0.1, 0.25, 1.0),\n \"ease-in\": cubicBezier(0.42, 0.0, 1.0, 1.0),\n \"ease-in-out\": cubicBezier(0.42, 0.0, 0.58, 1.0),\n \"ease-out\": cubicBezier(0.0, 0.0, 0.58, 1.0),\n};\nconst functionArgsRegex = /\\((.*?)\\)/;\nfunction getEasingFunction(definition) {\n // If already an easing function, return\n if (isFunction(definition))\n return definition;\n // If an easing curve definition, return bezier function\n if (isCubicBezier(definition))\n return cubicBezier(...definition);\n // If we have a predefined easing function, return\n const namedEasing = namedEasings[definition];\n if (namedEasing)\n return namedEasing;\n // If this is a steps function, attempt to create easing curve\n if (definition.startsWith(\"steps\")) {\n const args = functionArgsRegex.exec(definition);\n if (args) {\n const argsArray = args[1].split(\",\");\n return steps(parseFloat(argsArray[0]), argsArray[1].trim());\n }\n }\n return noopReturn;\n}\n\nexport { getEasingFunction };\n","/**\n * The MotionValue tracks the state of a single animatable\n * value. Currently, updatedAt and current are unused. The\n * long term idea is to use this to minimise the number\n * of DOM reads, and to abstract the DOM interactions here.\n */\nclass MotionValue {\n setAnimation(animation) {\n this.animation = animation;\n animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => { });\n }\n clearAnimation() {\n this.animation = this.generator = undefined;\n }\n}\n\nexport { MotionValue };\n","import { MotionValue } from '@motionone/types';\n\nconst data = new WeakMap();\nfunction getAnimationData(element) {\n if (!data.has(element)) {\n data.set(element, {\n transforms: [],\n values: new Map(),\n });\n }\n return data.get(element);\n}\nfunction getMotionValue(motionValues, name) {\n if (!motionValues.has(name)) {\n motionValues.set(name, new MotionValue());\n }\n return motionValues.get(name);\n}\n\nexport { getAnimationData, getMotionValue };\n","import { noopReturn, addUniqueItem } from '@motionone/utils';\nimport { getAnimationData } from '../data.es.js';\n\n/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nconst axes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nconst order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\nconst transformAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n};\nconst rotation = {\n syntax: \"\",\n initialValue: \"0deg\",\n toDefaultUnit: (v) => v + \"deg\",\n};\nconst baseTransformProperties = {\n translate: {\n syntax: \"\",\n initialValue: \"0px\",\n toDefaultUnit: (v) => v + \"px\",\n },\n rotate: rotation,\n scale: {\n syntax: \"\",\n initialValue: 1,\n toDefaultUnit: noopReturn,\n },\n skew: rotation,\n};\nconst transformDefinitions = new Map();\nconst asTransformCssVar = (name) => `--motion-${name}`;\n/**\n * Generate a list of every possible transform key\n */\nconst transforms = [\"x\", \"y\", \"z\"];\norder.forEach((name) => {\n axes.forEach((axis) => {\n transforms.push(name + axis);\n transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nconst compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);\n/**\n * Provide a quick way to check if a string is the name of a transform\n */\nconst transformLookup = new Set(transforms);\nconst isTransform = (name) => transformLookup.has(name);\nconst addTransformToElement = (element, name) => {\n // Map x to translateX etc\n if (transformAlias[name])\n name = transformAlias[name];\n const { transforms } = getAnimationData(element);\n addUniqueItem(transforms, name);\n /**\n * TODO: An optimisation here could be to cache the transform in element data\n * and only update if this has changed.\n */\n element.style.transform = buildTransformTemplate(transforms);\n};\nconst buildTransformTemplate = (transforms) => transforms\n .sort(compareTransformOrder)\n .reduce(transformListToString, \"\")\n .trim();\nconst transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;\n\nexport { addTransformToElement, asTransformCssVar, axes, buildTransformTemplate, compareTransformOrder, isTransform, transformAlias, transformDefinitions };\n","import { transformDefinitions } from './transforms.es.js';\n\nconst isCssVar = (name) => name.startsWith(\"--\");\nconst registeredProperties = new Set();\nfunction registerCssVariable(name) {\n if (registeredProperties.has(name))\n return;\n registeredProperties.add(name);\n try {\n const { syntax, initialValue } = transformDefinitions.has(name)\n ? transformDefinitions.get(name)\n : {};\n CSS.registerProperty({\n name,\n inherits: false,\n syntax,\n initialValue,\n });\n }\n catch (e) { }\n}\n\nexport { isCssVar, registerCssVariable, registeredProperties };\n","const testAnimation = (keyframes, options) => document.createElement(\"div\").animate(keyframes, options);\nconst featureTests = {\n cssRegisterProperty: () => typeof CSS !== \"undefined\" &&\n Object.hasOwnProperty.call(CSS, \"registerProperty\"),\n waapi: () => Object.hasOwnProperty.call(Element.prototype, \"animate\"),\n partialKeyframes: () => {\n try {\n testAnimation({ opacity: [1] });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n finished: () => Boolean(testAnimation({ opacity: [0, 1] }, { duration: 0.001 }).finished),\n linearEasing: () => {\n try {\n testAnimation({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n};\nconst results = {};\nconst supports = {};\nfor (const key in featureTests) {\n supports[key] = () => {\n if (results[key] === undefined)\n results[key] =\n featureTests[key]();\n return results[key];\n };\n}\n\nexport { supports };\n","import { isFunction, defaults, isCubicBezier, progress } from '@motionone/utils';\nimport { supports } from './feature-detection.es.js';\n\n// Create a linear easing point for every x second\nconst resolution = 0.015;\nconst generateLinearEasingPoints = (easing, duration) => {\n let points = \"\";\n const numPoints = Math.round(duration / resolution);\n for (let i = 0; i < numPoints; i++) {\n points += easing(progress(0, numPoints - 1, i)) + \", \";\n }\n return points.substring(0, points.length - 2);\n};\nconst convertEasing = (easing, duration) => {\n if (isFunction(easing)) {\n return supports.linearEasing()\n ? `linear(${generateLinearEasingPoints(easing, duration)})`\n : defaults.easing;\n }\n else {\n return isCubicBezier(easing) ? cubicBezierAsString(easing) : easing;\n }\n};\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { convertEasing, cubicBezierAsString, generateLinearEasingPoints };\n","import { isTransform, asTransformCssVar, transformAlias } from './transforms.es.js';\n\nfunction getStyleName(key) {\n if (transformAlias[key])\n key = transformAlias[key];\n return isTransform(key) ? asTransformCssVar(key) : key;\n}\n\nexport { getStyleName };\n","import { isCssVar } from './utils/css-var.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { transformDefinitions } from './utils/transforms.es.js';\n\nconst style = {\n get: (element, name) => {\n name = getStyleName(name);\n let value = isCssVar(name)\n ? element.style.getPropertyValue(name)\n : getComputedStyle(element)[name];\n // TODO Decide if value can be 0\n if (!value && value !== 0) {\n const definition = transformDefinitions.get(name);\n if (definition)\n value = definition.initialValue;\n }\n return value;\n },\n set: (element, name, value) => {\n name = getStyleName(name);\n if (isCssVar(name)) {\n element.style.setProperty(name, value);\n }\n else {\n element.style[name] = value;\n }\n },\n};\n\nexport { style };\n","import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\nimport { defaults, isEasingGenerator, isFunction, isEasingList, isNumber, time, noop } from '@motionone/utils';\nimport { isTransform, addTransformToElement, transformDefinitions } from './utils/transforms.es.js';\nimport { convertEasing } from './utils/easing.es.js';\nimport { supports } from './utils/feature-detection.es.js';\nimport { hydrateKeyframes, keyframesList } from './utils/keyframes.es.js';\nimport { style } from './style.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { stopAnimation } from './utils/stop-animation.es.js';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\n const record = getDevToolsRecord();\n const isRecording = options.record !== false && record;\n let animation;\n let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = options;\n const data = getAnimationData(element);\n const valueIsTransform = isTransform(key);\n let canAnimateNatively = supports.waapi();\n /**\n * If this is an individual transform, we need to map its\n * key to a CSS variable and update the element's transform style\n */\n valueIsTransform && addTransformToElement(element, key);\n const name = getStyleName(key);\n const motionValue = getMotionValue(data.values, name);\n /**\n * Get definition of value, this will be used to convert numerical\n * keyframes into the default value type.\n */\n const definition = transformDefinitions.get(name);\n /**\n * Stop the current animation, if any. Because this will trigger\n * commitStyles (DOM writes) and we might later trigger DOM reads,\n * this is fired now and we return a factory function to create\n * the actual animation that can get called in batch,\n */\n stopAnimation(motionValue.animation, !(isEasingGenerator(easing) && motionValue.generator) &&\n options.record !== false);\n /**\n * Batchable factory function containing all DOM reads.\n */\n return () => {\n const readInitialValue = () => { var _a, _b; return (_b = (_a = style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0; };\n /**\n * Replace null values with the previous keyframe value, or read\n * it from the DOM if it's the first keyframe.\n */\n let keyframes = hydrateKeyframes(keyframesList(keyframesDefinition), readInitialValue);\n /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || duration;\n }\n /**\n * If this is a CSS variable we need to register it with the browser\n * before it can be animated natively. We also set it with setProperty\n * rather than directly onto the element.style object.\n */\n if (isCssVar(name)) {\n if (supports.cssRegisterProperty()) {\n registerCssVariable(name);\n }\n else {\n canAnimateNatively = false;\n }\n }\n /**\n * If we've been passed a custom easing function, and this browser\n * does **not** support linear() easing, and the value is a transform\n * (and thus a pure number) we can still support the custom easing\n * by falling back to the animation polyfill.\n */\n if (valueIsTransform &&\n !supports.linearEasing() &&\n (isFunction(easing) || (isEasingList(easing) && easing.some(isFunction)))) {\n canAnimateNatively = false;\n }\n /**\n * If we can animate this value with WAAPI, do so.\n */\n if (canAnimateNatively) {\n /**\n * Convert numbers to default value types. Currently this only supports\n * transforms but it could also support other value types.\n */\n if (definition) {\n keyframes = keyframes.map((value) => isNumber(value) ? definition.toDefaultUnit(value) : value);\n }\n /**\n * If this browser doesn't support partial/implicit keyframes we need to\n * explicitly provide one.\n */\n if (keyframes.length === 1 &&\n (!supports.partialKeyframes() || isRecording)) {\n keyframes.unshift(readInitialValue());\n }\n const animationOptions = {\n delay: time.ms(delay),\n duration: time.ms(duration),\n endDelay: time.ms(endDelay),\n easing: !isEasingList(easing)\n ? convertEasing(easing, duration)\n : undefined,\n direction,\n iterations: repeat + 1,\n fill: \"both\",\n };\n animation = element.animate({\n [name]: keyframes,\n offset,\n easing: isEasingList(easing)\n ? easing.map((thisEasing) => convertEasing(thisEasing, duration))\n : undefined,\n }, animationOptions);\n /**\n * Polyfill finished Promise in browsers that don't support it\n */\n if (!animation.finished) {\n animation.finished = new Promise((resolve, reject) => {\n animation.onfinish = resolve;\n animation.oncancel = reject;\n });\n }\n const target = keyframes[keyframes.length - 1];\n animation.finished\n .then(() => {\n if (persist)\n return;\n // Apply styles to target\n style.set(element, name, target);\n // Ensure fill modes don't persist\n animation.cancel();\n })\n .catch(noop);\n /**\n * This forces Webkit to run animations on the main thread by exploiting\n * this condition:\n * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099\n *\n * This fixes Webkit's timing bugs, like accelerated animations falling\n * out of sync with main thread animations and massive delays in starting\n * accelerated animations in WKWebView.\n */\n if (!allowWebkitAcceleration)\n animation.playbackRate = 1.000001;\n /**\n * If we can't animate the value natively then we can fallback to the numbers-only\n * polyfill for transforms.\n */\n }\n else if (AnimationPolyfill && valueIsTransform) {\n /**\n * If any keyframe is a string (because we measured it from the DOM), we need to convert\n * it into a number before passing to the Animation polyfill.\n */\n keyframes = keyframes.map((value) => typeof value === \"string\" ? parseFloat(value) : value);\n /**\n * If we only have a single keyframe, we need to create an initial keyframe by reading\n * the current value from the DOM.\n */\n if (keyframes.length === 1) {\n keyframes.unshift(parseFloat(readInitialValue()));\n }\n animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, keyframes, Object.assign(Object.assign({}, options), { duration,\n easing }));\n }\n else {\n const target = keyframes[keyframes.length - 1];\n style.set(element, name, definition && isNumber(target)\n ? definition.toDefaultUnit(target)\n : target);\n }\n if (isRecording) {\n record(element, key, keyframes, {\n duration,\n delay: delay,\n easing,\n repeat,\n offset,\n }, \"motion-one\");\n }\n motionValue.setAnimation(animation);\n if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\n","import { noopReturn, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n","import { defaults, noop, time } from '@motionone/utils';\nimport { stopAnimation } from './stop-animation.es.js';\n\nconst createAnimation = (factory) => factory();\nconst withControls = (animationFactory, options, duration = defaults.duration) => {\n return new Proxy({\n animations: animationFactory.map(createAnimation).filter(Boolean),\n duration,\n options,\n }, controls);\n};\n/**\n * TODO:\n * Currently this returns the first animation, ideally it would return\n * the first active animation.\n */\nconst getActiveAnimation = (state) => state.animations[0];\nconst controls = {\n get: (target, key) => {\n const activeAnimation = getActiveAnimation(target);\n switch (key) {\n case \"duration\":\n return target.duration;\n case \"currentTime\":\n return time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);\n case \"playbackRate\":\n case \"playState\":\n return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];\n case \"finished\":\n if (!target.finished) {\n target.finished = Promise.all(target.animations.map(selectFinished)).catch(noop);\n }\n return target.finished;\n case \"stop\":\n return () => {\n target.animations.forEach((animation) => stopAnimation(animation));\n };\n case \"forEachNative\":\n /**\n * This is for internal use only, fire a callback for each\n * underlying animation.\n */\n return (callback) => {\n target.animations.forEach((animation) => callback(animation, target));\n };\n default:\n return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) ===\n \"undefined\"\n ? undefined\n : () => target.animations.forEach((animation) => animation[key]());\n }\n },\n set: (target, key, value) => {\n switch (key) {\n case \"currentTime\":\n value = time.ms(value);\n // Fall-through\n case \"playbackRate\":\n for (let i = 0; i < target.animations.length; i++) {\n target.animations[i][key] = value;\n }\n return true;\n }\n return false;\n },\n};\nconst selectFinished = (animation) => animation.finished;\n\nexport { controls, withControls };\n","function hydrateKeyframes(keyframes, readInitialValue) {\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] === null) {\n keyframes[i] = i ? keyframes[i - 1] : readInitialValue();\n }\n }\n return keyframes;\n}\nconst keyframesList = (keyframes) => Array.isArray(keyframes) ? keyframes : [keyframes];\n\nexport { hydrateKeyframes, keyframesList };\n","const getOptions = (options, key) => \n/**\n * TODO: Make test for this\n * Always return a new object otherwise delay is overwritten by results of stagger\n * and this results in no stagger\n */\noptions[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);\n\nexport { getOptions };\n","function stopAnimation(animation, needsCommit = true) {\n if (!animation || animation.playState === \"finished\")\n return;\n // Suppress error thrown by WAAPI\n try {\n if (animation.stop) {\n animation.stop();\n }\n else {\n needsCommit && animation.commitStyles();\n animation.cancel();\n }\n }\n catch (e) { }\n}\n\nexport { stopAnimation };\n","import { resolveElements } from '../utils/resolve-elements.es.js';\nimport { isFunction } from '@motionone/utils';\n\nconst thresholds = {\n any: 0,\n all: 1,\n};\nfunction inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = \"any\" } = {}) {\n /**\n * If this browser doesn't support IntersectionObserver, return a dummy stop function.\n * Default triggering of onStart is tricky - it could be used for starting/stopping\n * videos, lazy loading content etc. We could provide an option to enable a fallback, or\n * provide a fallback callback option.\n */\n if (typeof IntersectionObserver === \"undefined\") {\n return () => { };\n }\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = new WeakMap();\n const onIntersectionChange = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target);\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd))\n return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry);\n if (isFunction(newOnEnd)) {\n activeIntersections.set(entry.target, newOnEnd);\n }\n else {\n observer.unobserve(entry.target);\n }\n }\n else if (onEnd) {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n });\n elements.forEach((element) => observer.observe(element));\n return () => observer.disconnect();\n}\n\nexport { inView };\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { isNumber } from '@motionone/utils';\n\nfunction calcNextTime(current, next, prev, labels) {\n var _a;\n if (isNumber(next)) {\n return next;\n }\n else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next));\n }\n else if (next === \"<\") {\n return prev;\n }\n else {\n return (_a = labels.get(next)) !== null && _a !== void 0 ? _a : current;\n }\n}\n\nexport { calcNextTime };\n","import { mix, getEasingForSegment, removeItem } from '@motionone/utils';\n\nfunction eraseKeyframes(sequence, startTime, endTime) {\n for (let i = 0; i < sequence.length; i++) {\n const keyframe = sequence[i];\n if (keyframe.at > startTime && keyframe.at < endTime) {\n removeItem(sequence, keyframe);\n // If we remove this item we have to push the pointer back one\n i--;\n }\n }\n}\nfunction addKeyframes(sequence, keyframes, easing, offset, startTime, endTime) {\n /**\n * Erase every existing value between currentTime and targetTime,\n * this will essentially splice this timeline into any currently\n * defined ones.\n */\n eraseKeyframes(sequence, startTime, endTime);\n for (let i = 0; i < keyframes.length; i++) {\n sequence.push({\n value: keyframes[i],\n at: mix(startTime, endTime, offset[i]),\n easing: getEasingForSegment(easing, i),\n });\n }\n}\n\nexport { addKeyframes, eraseKeyframes };\n","function compareByTime(a, b) {\n if (a.at === b.at) {\n return a.value === null ? 1 : -1;\n }\n else {\n return a.at - b.at;\n }\n}\n\nexport { compareByTime };\n","import { __rest } from 'tslib';\nimport { invariant } from 'hey-listen';\nimport { isString, defaults, isEasingGenerator, defaultOffset, fillOffset, progress } from '@motionone/utils';\nimport { resolveOption } from '../utils/stagger.es.js';\nimport { animateStyle } from '../animate/animate-style.es.js';\nimport { withControls } from '../animate/utils/controls.es.js';\nimport { keyframesList } from '../animate/utils/keyframes.es.js';\nimport { getOptions } from '../animate/utils/options.es.js';\nimport { resolveElements } from '../utils/resolve-elements.es.js';\nimport { calcNextTime } from './utils/calc-time.es.js';\nimport { addKeyframes } from './utils/edit.es.js';\nimport { compareByTime } from './utils/sort.es.js';\nimport { Animation } from '@motionone/animation';\n\nfunction timeline(definition, options = {}) {\n var _a;\n const animationDefinitions = createAnimationsFromTimeline(definition, options);\n /**\n * Create and start animations\n */\n const animationFactories = animationDefinitions\n .map((definition) => animateStyle(...definition, Animation))\n .filter(Boolean);\n return withControls(animationFactories, options, \n // Get the duration from the first animation definition\n (_a = animationDefinitions[0]) === null || _a === void 0 ? void 0 : _a[3].duration);\n}\nfunction createAnimationsFromTimeline(definition, _a = {}) {\n var { defaultOptions = {} } = _a, timelineOptions = __rest(_a, [\"defaultOptions\"]);\n const animationDefinitions = [];\n const elementSequences = new Map();\n const elementCache = {};\n const timeLabels = new Map();\n let prevTime = 0;\n let currentTime = 0;\n let totalDuration = 0;\n /**\n * Build the timeline by mapping over the definition array and converting\n * the definitions into keyframes and offsets with absolute time values.\n * These will later get converted into relative offsets in a second pass.\n */\n for (let i = 0; i < definition.length; i++) {\n const segment = definition[i];\n /**\n * If this is a timeline label, mark it and skip the rest of this iteration.\n */\n if (isString(segment)) {\n timeLabels.set(segment, currentTime);\n continue;\n }\n else if (!Array.isArray(segment)) {\n timeLabels.set(segment.name, calcNextTime(currentTime, segment.at, prevTime, timeLabels));\n continue;\n }\n const [elementDefinition, keyframes, options = {}] = segment;\n /**\n * If a relative or absolute time value has been specified we need to resolve\n * it in relation to the currentTime.\n */\n if (options.at !== undefined) {\n currentTime = calcNextTime(currentTime, options.at, prevTime, timeLabels);\n }\n /**\n * Keep track of the maximum duration in this definition. This will be\n * applied to currentTime once the definition has been parsed.\n */\n let maxDuration = 0;\n /**\n * Find all the elements specified in the definition and parse value\n * keyframes from their timeline definitions.\n */\n const elements = resolveElements(elementDefinition, elementCache);\n const numElements = elements.length;\n for (let elementIndex = 0; elementIndex < numElements; elementIndex++) {\n const element = elements[elementIndex];\n const elementSequence = getElementSequence(element, elementSequences);\n for (const key in keyframes) {\n const valueSequence = getValueSequence(key, elementSequence);\n let valueKeyframes = keyframesList(keyframes[key]);\n const valueOptions = getOptions(options, key);\n let { duration = defaultOptions.duration || defaults.duration, easing = defaultOptions.easing || defaults.easing, } = valueOptions;\n if (isEasingGenerator(easing)) {\n invariant(key === \"opacity\" || valueKeyframes.length > 1, \"spring must be provided 2 keyframes within timeline()\");\n const custom = easing.createAnimation(valueKeyframes, key !== \"opacity\", () => 0, key);\n easing = custom.easing;\n valueKeyframes = custom.keyframes || valueKeyframes;\n duration = custom.duration || duration;\n }\n const delay = resolveOption(options.delay, elementIndex, numElements) || 0;\n const startTime = currentTime + delay;\n const targetTime = startTime + duration;\n /**\n *\n */\n let { offset = defaultOffset(valueKeyframes.length) } = valueOptions;\n /**\n * If there's only one offset of 0, fill in a second with length 1\n *\n * TODO: Ensure there's a test that covers this removal\n */\n if (offset.length === 1 && offset[0] === 0) {\n offset[1] = 1;\n }\n /**\n * Fill out if offset if fewer offsets than keyframes\n */\n const remainder = offset.length - valueKeyframes.length;\n remainder > 0 && fillOffset(offset, remainder);\n /**\n * If only one value has been set, ie [1], push a null to the start of\n * the keyframe array. This will let us mark a keyframe at this point\n * that will later be hydrated with the previous value.\n */\n valueKeyframes.length === 1 && valueKeyframes.unshift(null);\n /**\n * Add keyframes, mapping offsets to absolute time.\n */\n addKeyframes(valueSequence, valueKeyframes, easing, offset, startTime, targetTime);\n maxDuration = Math.max(delay + duration, maxDuration);\n totalDuration = Math.max(targetTime, totalDuration);\n }\n }\n prevTime = currentTime;\n currentTime += maxDuration;\n }\n /**\n * For every element and value combination create a new animation.\n */\n elementSequences.forEach((valueSequences, element) => {\n for (const key in valueSequences) {\n const valueSequence = valueSequences[key];\n /**\n * Arrange all the keyframes in ascending time order.\n */\n valueSequence.sort(compareByTime);\n const keyframes = [];\n const valueOffset = [];\n const valueEasing = [];\n /**\n * For each keyframe, translate absolute times into\n * relative offsets based on the total duration of the timeline.\n */\n for (let i = 0; i < valueSequence.length; i++) {\n const { at, value, easing } = valueSequence[i];\n keyframes.push(value);\n valueOffset.push(progress(0, totalDuration, at));\n valueEasing.push(easing || defaults.easing);\n }\n /**\n * If the first keyframe doesn't land on offset: 0\n * provide one by duplicating the initial keyframe. This ensures\n * it snaps to the first keyframe when the animation starts.\n */\n if (valueOffset[0] !== 0) {\n valueOffset.unshift(0);\n keyframes.unshift(keyframes[0]);\n valueEasing.unshift(\"linear\");\n }\n /**\n * If the last keyframe doesn't land on offset: 1\n * provide one with a null wildcard value. This will ensure it\n * stays static until the end of the animation.\n */\n if (valueOffset[valueOffset.length - 1] !== 1) {\n valueOffset.push(1);\n keyframes.push(null);\n }\n animationDefinitions.push([\n element,\n key,\n keyframes,\n Object.assign(Object.assign(Object.assign({}, defaultOptions), { duration: totalDuration, easing: valueEasing, offset: valueOffset }), timelineOptions),\n ]);\n }\n });\n return animationDefinitions;\n}\nfunction getElementSequence(element, sequences) {\n !sequences.has(element) && sequences.set(element, {});\n return sequences.get(element);\n}\nfunction getValueSequence(name, sequences) {\n if (!sequences[name])\n sequences[name] = [];\n return sequences[name];\n}\n\nexport { createAnimationsFromTimeline, timeline };\n","function resolveElements(elements, selectorCache) {\n var _a;\n if (typeof elements === \"string\") {\n if (selectorCache) {\n (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : (selectorCache[elements] = document.querySelectorAll(elements));\n elements = selectorCache[elements];\n }\n else {\n elements = document.querySelectorAll(elements);\n }\n }\n else if (elements instanceof Element) {\n elements = [elements];\n }\n /**\n * Return an empty array\n */\n return Array.from(elements || []);\n}\n\nexport { resolveElements };\n","import { isNumber, isFunction } from '@motionone/utils';\nimport { getEasingFunction } from '@motionone/animation';\n\nfunction stagger(duration = 0.1, { start = 0, from = 0, easing } = {}) {\n return (i, total) => {\n const fromIndex = isNumber(from) ? from : getFromIndex(from, total);\n const distance = Math.abs(fromIndex - i);\n let delay = duration * distance;\n if (easing) {\n const maxDelay = total * duration;\n const easingFunction = getEasingFunction(easing);\n delay = easingFunction(delay / maxDelay) * maxDelay;\n }\n return start + delay;\n };\n}\nfunction getFromIndex(from, total) {\n if (from === \"first\") {\n return 0;\n }\n else {\n const lastIndex = total - 1;\n return from === \"last\" ? lastIndex : lastIndex / 2;\n }\n}\nfunction resolveOption(option, i, total) {\n return isFunction(option) ? option(i, total) : option;\n}\n\nexport { getFromIndex, resolveOption, stagger };\n","function addUniqueItem(array, item) {\n array.indexOf(item) === -1 && array.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n\nexport { addUniqueItem, removeItem };\n","const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","const defaults = {\n duration: 0.3,\n delay: 0,\n endDelay: 0,\n repeat: 0,\n easing: \"ease\",\n};\n\nexport { defaults };\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n","import { isEasingList } from './is-easing-list.es.js';\nimport { wrap } from './wrap.es.js';\n\nfunction getEasingForSegment(easing, i) {\n return isEasingList(easing) ? easing[wrap(0, easing.length, i)] : easing;\n}\n\nexport { getEasingForSegment };\n","import { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n","const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n","import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\n","const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n","const isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n","const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n","const mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n","const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n","import { mix } from './mix.es.js';\nimport { progress } from './progress.es.js';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mix(min, 1, offsetProgress));\n }\n}\nfunction defaultOffset(length) {\n const offset = [0];\n fillOffset(offset, length - 1);\n return offset;\n}\n\nexport { defaultOffset, fillOffset };\n","const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\n","const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n","// Public: Create a new SelectorSet.\nexport default function SelectorSet() {\n // Construct new SelectorSet if called as a function.\n if (!(this instanceof SelectorSet)) {\n return new SelectorSet();\n }\n\n // Public: Number of selectors added to the set\n this.size = 0;\n\n // Internal: Incrementing ID counter\n this.uid = 0;\n\n // Internal: Array of String selectors in the set\n this.selectors = [];\n\n // Internal: Map of selector ids to objects\n this.selectorObjects = {};\n\n // Internal: All Object index String names mapping to Index objects.\n this.indexes = Object.create(this.indexes);\n\n // Internal: Used Object index String names mapping to Index objects.\n this.activeIndexes = [];\n}\n\n// Detect prefixed Element#matches function.\nvar docElem = window.document.documentElement;\nvar matches =\n docElem.matches ||\n docElem.webkitMatchesSelector ||\n docElem.mozMatchesSelector ||\n docElem.oMatchesSelector ||\n docElem.msMatchesSelector;\n\n// Public: Check if element matches selector.\n//\n// Maybe overridden with custom Element.matches function.\n//\n// el - An Element\n// selector - String CSS selector\n//\n// Returns true or false.\nSelectorSet.prototype.matchesSelector = function(el, selector) {\n return matches.call(el, selector);\n};\n\n// Public: Find all elements in the context that match the selector.\n//\n// Maybe overridden with custom querySelectorAll function.\n//\n// selectors - String CSS selectors.\n// context - Element context\n//\n// Returns non-live list of Elements.\nSelectorSet.prototype.querySelectorAll = function(selectors, context) {\n return context.querySelectorAll(selectors);\n};\n\n// Public: Array of indexes.\n//\n// name - Unique String name\n// selector - Function that takes a String selector and returns a String key\n// or undefined if it can't be used by the index.\n// element - Function that takes an Element and returns an Array of String\n// keys that point to indexed values.\n//\nSelectorSet.prototype.indexes = [];\n\n// Index by element id\nvar idRe = /^#((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'ID',\n selector: function matchIdSelector(sel) {\n var m;\n if ((m = sel.match(idRe))) {\n return m[0].slice(1);\n }\n },\n element: function getElementId(el) {\n if (el.id) {\n return [el.id];\n }\n }\n});\n\n// Index by all of its class names\nvar classRe = /^\\.((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'CLASS',\n selector: function matchClassSelector(sel) {\n var m;\n if ((m = sel.match(classRe))) {\n return m[0].slice(1);\n }\n },\n element: function getElementClassNames(el) {\n var className = el.className;\n if (className) {\n if (typeof className === 'string') {\n return className.split(/\\s/);\n } else if (typeof className === 'object' && 'baseVal' in className) {\n // className is a SVGAnimatedString\n // global SVGAnimatedString is not an exposed global in Opera 12\n return className.baseVal.split(/\\s/);\n }\n }\n }\n});\n\n// Index by tag/node name: `DIV`, `FORM`, `A`\nvar tagRe = /^((?:[\\w\\u00c0-\\uFFFF\\-]|\\\\.)+)/g;\nSelectorSet.prototype.indexes.push({\n name: 'TAG',\n selector: function matchTagSelector(sel) {\n var m;\n if ((m = sel.match(tagRe))) {\n return m[0].toUpperCase();\n }\n },\n element: function getElementTagName(el) {\n return [el.nodeName.toUpperCase()];\n }\n});\n\n// Default index just contains a single array of elements.\nSelectorSet.prototype.indexes['default'] = {\n name: 'UNIVERSAL',\n selector: function() {\n return true;\n },\n element: function() {\n return [true];\n }\n};\n\n// Use ES Maps when supported\nvar Map;\nif (typeof window.Map === 'function') {\n Map = window.Map;\n} else {\n Map = (function() {\n function Map() {\n this.map = {};\n }\n Map.prototype.get = function(key) {\n return this.map[key + ' '];\n };\n Map.prototype.set = function(key, value) {\n this.map[key + ' '] = value;\n };\n return Map;\n })();\n}\n\n// Regexps adopted from Sizzle\n// https://github.com/jquery/sizzle/blob/1.7/sizzle.js\n//\nvar chunker = /((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^\\[\\]]*\\]|['\"][^'\"]*['\"]|[^\\[\\]'\"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?((?:.|\\r|\\n)*)/g;\n\n// Internal: Get indexes for selector.\n//\n// selector - String CSS selector\n//\n// Returns Array of {index, key}.\nfunction parseSelectorIndexes(allIndexes, selector) {\n allIndexes = allIndexes.slice(0).concat(allIndexes['default']);\n\n var allIndexesLen = allIndexes.length,\n i,\n j,\n m,\n dup,\n rest = selector,\n key,\n index,\n indexes = [];\n\n do {\n chunker.exec('');\n if ((m = chunker.exec(rest))) {\n rest = m[3];\n if (m[2] || !rest) {\n for (i = 0; i < allIndexesLen; i++) {\n index = allIndexes[i];\n if ((key = index.selector(m[1]))) {\n j = indexes.length;\n dup = false;\n while (j--) {\n if (indexes[j].index === index && indexes[j].key === key) {\n dup = true;\n break;\n }\n }\n if (!dup) {\n indexes.push({ index: index, key: key });\n }\n break;\n }\n }\n }\n }\n } while (m);\n\n return indexes;\n}\n\n// Internal: Find first item in Array that is a prototype of `proto`.\n//\n// ary - Array of objects\n// proto - Prototype of expected item in `ary`\n//\n// Returns object from `ary` if found. Otherwise returns undefined.\nfunction findByPrototype(ary, proto) {\n var i, len, item;\n for (i = 0, len = ary.length; i < len; i++) {\n item = ary[i];\n if (proto.isPrototypeOf(item)) {\n return item;\n }\n }\n}\n\n// Public: Log when added selector falls under the default index.\n//\n// This API should not be considered stable. May change between\n// minor versions.\n//\n// obj - {selector, data} Object\n//\n// SelectorSet.prototype.logDefaultIndexUsed = function(obj) {\n// console.warn(obj.selector, \"could not be indexed\");\n// };\n//\n// Returns nothing.\nSelectorSet.prototype.logDefaultIndexUsed = function() {};\n\n// Public: Add selector to set.\n//\n// selector - String CSS selector\n// data - Optional data Object (default: undefined)\n//\n// Returns nothing.\nSelectorSet.prototype.add = function(selector, data) {\n var obj,\n i,\n indexProto,\n key,\n index,\n objs,\n selectorIndexes,\n selectorIndex,\n indexes = this.activeIndexes,\n selectors = this.selectors,\n selectorObjects = this.selectorObjects;\n\n if (typeof selector !== 'string') {\n return;\n }\n\n obj = {\n id: this.uid++,\n selector: selector,\n data: data\n };\n selectorObjects[obj.id] = obj;\n\n selectorIndexes = parseSelectorIndexes(this.indexes, selector);\n for (i = 0; i < selectorIndexes.length; i++) {\n selectorIndex = selectorIndexes[i];\n key = selectorIndex.key;\n indexProto = selectorIndex.index;\n\n index = findByPrototype(indexes, indexProto);\n if (!index) {\n index = Object.create(indexProto);\n index.map = new Map();\n indexes.push(index);\n }\n\n if (indexProto === this.indexes['default']) {\n this.logDefaultIndexUsed(obj);\n }\n objs = index.map.get(key);\n if (!objs) {\n objs = [];\n index.map.set(key, objs);\n }\n objs.push(obj);\n }\n\n this.size++;\n selectors.push(selector);\n};\n\n// Public: Remove selector from set.\n//\n// selector - String CSS selector\n// data - Optional data Object (default: undefined)\n//\n// Returns nothing.\nSelectorSet.prototype.remove = function(selector, data) {\n if (typeof selector !== 'string') {\n return;\n }\n\n var selectorIndexes,\n selectorIndex,\n i,\n j,\n k,\n selIndex,\n objs,\n obj,\n indexes = this.activeIndexes,\n selectors = (this.selectors = []),\n selectorObjects = this.selectorObjects,\n removedIds = {},\n removeAll = arguments.length === 1;\n\n selectorIndexes = parseSelectorIndexes(this.indexes, selector);\n for (i = 0; i < selectorIndexes.length; i++) {\n selectorIndex = selectorIndexes[i];\n\n j = indexes.length;\n while (j--) {\n selIndex = indexes[j];\n if (selectorIndex.index.isPrototypeOf(selIndex)) {\n objs = selIndex.map.get(selectorIndex.key);\n if (objs) {\n k = objs.length;\n while (k--) {\n obj = objs[k];\n if (obj.selector === selector && (removeAll || obj.data === data)) {\n objs.splice(k, 1);\n removedIds[obj.id] = true;\n }\n }\n }\n break;\n }\n }\n }\n\n for (i in removedIds) {\n delete selectorObjects[i];\n this.size--;\n }\n\n for (i in selectorObjects) {\n selectors.push(selectorObjects[i].selector);\n }\n};\n\n// Sort by id property handler.\n//\n// a - Selector obj.\n// b - Selector obj.\n//\n// Returns Number.\nfunction sortById(a, b) {\n return a.id - b.id;\n}\n\n// Public: Find all matching decendants of the context element.\n//\n// context - An Element\n//\n// Returns Array of {selector, data, elements} matches.\nSelectorSet.prototype.queryAll = function(context) {\n if (!this.selectors.length) {\n return [];\n }\n\n var matches = {},\n results = [];\n var els = this.querySelectorAll(this.selectors.join(', '), context);\n\n var i, j, len, len2, el, m, match, obj;\n for (i = 0, len = els.length; i < len; i++) {\n el = els[i];\n m = this.matches(el);\n for (j = 0, len2 = m.length; j < len2; j++) {\n obj = m[j];\n if (!matches[obj.id]) {\n match = {\n id: obj.id,\n selector: obj.selector,\n data: obj.data,\n elements: []\n };\n matches[obj.id] = match;\n results.push(match);\n } else {\n match = matches[obj.id];\n }\n match.elements.push(el);\n }\n }\n\n return results.sort(sortById);\n};\n\n// Public: Match element against all selectors in set.\n//\n// el - An Element\n//\n// Returns Array of {selector, data} matches.\nSelectorSet.prototype.matches = function(el) {\n if (!el) {\n return [];\n }\n\n var i, j, k, len, len2, len3, index, keys, objs, obj, id;\n var indexes = this.activeIndexes,\n matchedIds = {},\n matches = [];\n\n for (i = 0, len = indexes.length; i < len; i++) {\n index = indexes[i];\n keys = index.element(el);\n if (keys) {\n for (j = 0, len2 = keys.length; j < len2; j++) {\n if ((objs = index.map.get(keys[j]))) {\n for (k = 0, len3 = objs.length; k < len3; k++) {\n obj = objs[k];\n id = obj.id;\n if (!matchedIds[id] && this.matchesSelector(el, obj.selector)) {\n matchedIds[id] = true;\n matches.push(obj);\n }\n }\n }\n }\n }\n }\n\n return matches.sort(sortById);\n};\n","import SelectorSet from 'selector-set';\n\nvar bubbleEvents = {};\nvar captureEvents = {};\nvar propagationStopped = new WeakMap();\nvar immediatePropagationStopped = new WeakMap();\nvar currentTargets = new WeakMap();\nvar currentTargetDesc = Object.getOwnPropertyDescriptor(Event.prototype, 'currentTarget');\n\nfunction before(subject, verb, fn) {\n var source = subject[verb];\n\n subject[verb] = function () {\n fn.apply(subject, arguments);\n return source.apply(subject, arguments);\n };\n\n return subject;\n}\n\nfunction matches(selectors, target, reverse) {\n var queue = [];\n var node = target;\n\n do {\n if (node.nodeType !== 1) break;\n\n var _matches = selectors.matches(node);\n\n if (_matches.length) {\n var matched = {\n node: node,\n observers: _matches\n };\n\n if (reverse) {\n queue.unshift(matched);\n } else {\n queue.push(matched);\n }\n }\n } while (node = node.parentElement);\n\n return queue;\n}\n\nfunction trackPropagation() {\n propagationStopped.set(this, true);\n}\n\nfunction trackImmediate() {\n propagationStopped.set(this, true);\n immediatePropagationStopped.set(this, true);\n}\n\nfunction getCurrentTarget() {\n return currentTargets.get(this) || null;\n}\n\nfunction defineCurrentTarget(event, getter) {\n if (!currentTargetDesc) return;\n Object.defineProperty(event, 'currentTarget', {\n configurable: true,\n enumerable: true,\n get: getter || currentTargetDesc.get\n });\n}\n\nfunction canDispatch(event) {\n try {\n event.eventPhase;\n return true;\n } catch (_) {\n return false;\n }\n}\n\nfunction dispatch(event) {\n if (!canDispatch(event)) return;\n var events = event.eventPhase === 1 ? captureEvents : bubbleEvents;\n var selectors = events[event.type];\n if (!selectors) return;\n var queue = matches(selectors, event.target, event.eventPhase === 1);\n if (!queue.length) return;\n before(event, 'stopPropagation', trackPropagation);\n before(event, 'stopImmediatePropagation', trackImmediate);\n defineCurrentTarget(event, getCurrentTarget);\n\n for (var i = 0, len1 = queue.length; i < len1; i++) {\n if (propagationStopped.get(event)) break;\n var matched = queue[i];\n currentTargets.set(event, matched.node);\n\n for (var j = 0, len2 = matched.observers.length; j < len2; j++) {\n if (immediatePropagationStopped.get(event)) break;\n matched.observers[j].data.call(matched.node, event);\n }\n }\n\n currentTargets[\"delete\"](event);\n defineCurrentTarget(event);\n}\n\nfunction on(name, selector, fn) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var capture = options.capture ? true : false;\n var events = capture ? captureEvents : bubbleEvents;\n var selectors = events[name];\n\n if (!selectors) {\n selectors = new SelectorSet();\n events[name] = selectors;\n document.addEventListener(name, dispatch, capture);\n }\n\n selectors.add(selector, fn);\n}\nfunction off(name, selector, fn) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var capture = options.capture ? true : false;\n var events = capture ? captureEvents : bubbleEvents;\n var selectors = events[name];\n if (!selectors) return;\n selectors.remove(selector, fn);\n if (selectors.size) return;\n delete events[name];\n document.removeEventListener(name, dispatch, capture);\n}\nfunction fire(target, name, detail) {\n return target.dispatchEvent(new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: detail\n }));\n}\n\nexport { fire, off, on };\n","var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\n","// Robert Penner's easeInOutQuad\n\n// find the rest of his easing functions here: http://robertpenner.com/easing/\n// find them exported for ES6 consumption here: https://github.com/jaxgeller/ez.js\n\nvar easeInOutQuad = function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n};\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar jumper = function jumper() {\n // private variable cache\n // no variables are created during a jump, preventing memory leaks\n\n var element = void 0; // element to scroll to (node)\n\n var start = void 0; // where scroll starts (px)\n var stop = void 0; // where scroll stops (px)\n\n var offset = void 0; // adjustment from the stop position (px)\n var easing = void 0; // easing function (function)\n var a11y = void 0; // accessibility support flag (boolean)\n\n var distance = void 0; // distance of scroll (px)\n var duration = void 0; // scroll duration (ms)\n\n var timeStart = void 0; // time scroll started (ms)\n var timeElapsed = void 0; // time spent scrolling thus far (ms)\n\n var next = void 0; // next scroll position (px)\n\n var callback = void 0; // to call when done scrolling (function)\n\n // scroll position helper\n\n function location() {\n return window.scrollY || window.pageYOffset;\n }\n\n // element offset helper\n\n function top(element) {\n return element.getBoundingClientRect().top + start;\n }\n\n // rAF loop helper\n\n function loop(timeCurrent) {\n // store time scroll started, if not started already\n if (!timeStart) {\n timeStart = timeCurrent;\n }\n\n // determine time spent scrolling so far\n timeElapsed = timeCurrent - timeStart;\n\n // calculate next scroll position\n next = easing(timeElapsed, start, distance, duration);\n\n // scroll to it\n window.scrollTo(0, next);\n\n // check progress\n timeElapsed < duration ? window.requestAnimationFrame(loop) // continue scroll loop\n : done(); // scrolling is done\n }\n\n // scroll finished helper\n\n function done() {\n // account for rAF time rounding inaccuracies\n window.scrollTo(0, start + distance);\n\n // if scrolling to an element, and accessibility is enabled\n if (element && a11y) {\n // add tabindex indicating programmatic focus\n element.setAttribute('tabindex', '-1');\n\n // focus the element\n element.focus();\n }\n\n // if it exists, fire the callback\n if (typeof callback === 'function') {\n callback();\n }\n\n // reset time for next jump\n timeStart = false;\n }\n\n // API\n\n function jump(target) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // resolve options, or use defaults\n duration = options.duration || 1000;\n offset = options.offset || 0;\n callback = options.callback; // \"undefined\" is a suitable default, and won't be called\n easing = options.easing || easeInOutQuad;\n a11y = options.a11y || false;\n\n // cache starting position\n start = location();\n\n // resolve target\n switch (typeof target === 'undefined' ? 'undefined' : _typeof(target)) {\n // scroll from current position\n case 'number':\n element = undefined; // no element to scroll to\n a11y = false; // make sure accessibility is off\n stop = start + target;\n break;\n\n // scroll to element (node)\n // bounding rect is relative to the viewport\n case 'object':\n element = target;\n stop = top(element);\n break;\n\n // scroll to element (selector)\n // bounding rect is relative to the viewport\n case 'string':\n element = document.querySelector(target);\n stop = top(element);\n break;\n }\n\n // resolve scroll distance, accounting for offset\n distance = stop - start + offset;\n\n // resolve duration\n switch (_typeof(options.duration)) {\n // number in ms\n case 'number':\n duration = options.duration;\n break;\n\n // function passed the distance of the scroll\n case 'function':\n duration = options.duration(distance);\n break;\n }\n\n // start the loop\n window.requestAnimationFrame(loop);\n }\n\n // expose only the jump method\n return jump;\n};\n\n// export singleton\n\nvar singleton = jumper();\n\nexport default singleton;\n","import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\n\nexport { animate };\n","import { invariant } from 'hey-listen';\nimport { animateStyle } from './animate-style.es.js';\nimport { getOptions } from './utils/options.es.js';\nimport { resolveElements } from '../utils/resolve-elements.es.js';\nimport { withControls } from './utils/controls.es.js';\nimport { resolveOption } from '../utils/stagger.es.js';\n\nfunction createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\n /**\n * Create and start new animations\n */\n const animationFactories = [];\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n for (const key in keyframes) {\n const valueOptions = getOptions(options, key);\n valueOptions.delay = resolveOption(valueOptions.delay, i, numElements);\n const animation = animateStyle(element, key, keyframes[key], valueOptions, AnimatePolyfill);\n animationFactories.push(animation);\n }\n }\n return withControls(animationFactories, options, \n /**\n * TODO:\n * If easing is set to spring or glide, duration will be dynamically\n * generated. Ideally we would dynamically generate this from\n * animation.effect.getComputedTiming().duration but this isn't\n * supported in iOS13 or our number polyfill. Perhaps it's possible\n * to Proxy animations returned from animateStyle that has duration\n * as a getter.\n */\n options.duration);\n };\n}\n\nexport { createAnimate };\n","import { animate as animate$1, withControls } from '@motionone/dom';\nimport { isFunction } from '@motionone/utils';\nimport { Animation } from '@motionone/animation';\n\nfunction animateProgress(target, options = {}) {\n return withControls([\n () => {\n const animation = new Animation(target, [0, 1], options);\n animation.finished.catch(() => { });\n return animation;\n },\n ], options, options.duration);\n}\nfunction animate(target, keyframesOrOptions, options) {\n const factory = isFunction(target) ? animateProgress : animate$1;\n return factory(target, keyframesOrOptions, options);\n}\n\nexport { animate, animateProgress };\n","/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n"],"names":["Animation","constructor","output","keyframes","easing","duration","initialDuration","delay","endDelay","repeat","offset","direction","autoplay","this","startTime","rate","t","cancelTimestamp","totalDuration","playState","finished","Promise","resolve","reject","custom","createAnimation","updateDuration","interpolate$1","input","length","remainder","f","i","progressInRange","segmentEasing","interpolate","map","tick","timestamp","_a","undefined","pauseTime","Math","max","progress","currentIteration","floor","iterationProgress","iterationIsOdd","p","min","latest","call","frameRequestId","requestAnimationFrame","play","now","performance","pause","finish","stop","cancelAnimationFrame","cancel","reverse","commitStyles","currentTime","playbackRate","calcBezier","a1","a2","subdivisionPrecision","subdivisionMaxIterations","cubicBezier","mX1","mY1","mX2","mY2","x","lowerBound","upperBound","currentX","currentT","abs","binarySubdivide","steps","expanded","rounded","ceil","namedEasings","ease","functionArgsRegex","getEasingFunction","definition","namedEasing","startsWith","args","exec","argsArray","split","parseFloat","trim","MotionValue","setAnimation","animation","then","clearAnimation","catch","generator","data","WeakMap","getAnimationData","element","has","set","transforms","values","Map","get","axes","transformAlias","y","z","rotation","syntax","initialValue","toDefaultUnit","v","baseTransformProperties","translate","rotate","scale","skew","transformDefinitions","asTransformCssVar","name","forEach","axis","push","compareTransformOrder","a","b","indexOf","transformLookup","Set","isTransform","addTransformToElement","style","transform","buildTransformTemplate","sort","reduce","transformListToString","template","isCssVar","registeredProperties","testAnimation","options","document","createElement","animate","featureTests","cssRegisterProperty","CSS","Object","hasOwnProperty","waapi","Element","prototype","partialKeyframes","opacity","e","Boolean","linearEasing","results","supports","key","convertEasing","points","numPoints","round","substring","generateLinearEasingPoints","cubicBezierAsString","c","d","getStyleName","value","getPropertyValue","getComputedStyle","setProperty","animateStyle","keyframesDefinition","AnimationPolyfill","record","window","__MOTION_DEV_TOOLS_RECORD","isRecording","persist","allowWebkitAcceleration","valueIsTransform","canAnimateNatively","motionValue","motionValues","getMotionValue","readInitialValue","_b","toUnit","finalKeyframe","unit","match","getUnitConverter","add","registerProperty","inherits","registerCssVariable","some","unshift","animationOptions","ms","iterations","fill","thisEasing","onfinish","oncancel","target","assign","factory","withControls","animationFactory","Proxy","animations","filter","controls","activeAnimation","s","all","selectFinished","callback","hydrateKeyframes","keyframesList","Array","isArray","getOptions","stopAnimation","needsCommit","thresholds","any","inView","elementOrSelector","onStart","root","margin","rootMargin","amount","IntersectionObserver","elements","activeIntersections","observer","entries","entry","onEnd","isIntersecting","newOnEnd","unobserve","delete","threshold","observe","disconnect","create","SuppressedError","calcNextTime","current","next","prev","labels","addKeyframes","sequence","endTime","keyframe","at","eraseKeyframes","compareByTime","timeline","animationDefinitions","defaultOptions","timelineOptions","getOwnPropertySymbols","propertyIsEnumerable","__rest","elementSequences","elementCache","timeLabels","prevTime","segment","elementDefinition","maxDuration","numElements","elementIndex","elementSequence","sequences","valueSequence","getValueSequence","valueKeyframes","valueOptions","targetTime","valueSequences","valueOffset","valueEasing","createAnimationsFromTimeline","animationFactories","resolveElements","selectorCache","querySelectorAll","from","stagger","start","total","fromIndex","lastIndex","getFromIndex","distance","maxDelay","easingFunction","resolveOption","option","addUniqueItem","array","item","removeItem","arr","index","splice","clamp","defaults","wrap","rangeSize","getEasingForSegment","isCubicBezier","isEasingGenerator","isEasingList","isFunction","isNumber","isString","mix","noop","noopReturn","fillOffset","remaining","offsetProgress","defaultOffset","time","seconds","milliseconds","SelectorSet","size","uid","selectors","selectorObjects","indexes","activeIndexes","docElem","documentElement","matches","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","matchesSelector","el","selector","context","idRe","sel","m","slice","id","classRe","className","baseVal","tagRe","toUpperCase","nodeName","chunker","parseSelectorIndexes","allIndexes","j","dup","allIndexesLen","concat","rest","findByPrototype","ary","proto","len","isPrototypeOf","sortById","logDefaultIndexUsed","obj","indexProto","objs","selectorIndexes","selectorIndex","remove","k","selIndex","removedIds","removeAll","arguments","queryAll","len2","els","join","len3","keys","matchedIds","bubbleEvents","captureEvents","propagationStopped","immediatePropagationStopped","currentTargets","currentTargetDesc","getOwnPropertyDescriptor","Event","before","subject","verb","fn","source","apply","trackPropagation","trackImmediate","getCurrentTarget","defineCurrentTarget","event","getter","defineProperty","configurable","enumerable","dispatch","eventPhase","_","canDispatch","type","queue","node","nodeType","_matches","matched","observers","parentElement","len1","on","capture","events","addEventListener","off","removeEventListener","fire","detail","dispatchEvent","CustomEvent","bubbles","cancelable","invariant","easeInOutQuad","_typeof","Symbol","iterator","a11y","timeStart","timeElapsed","top","getBoundingClientRect","loop","timeCurrent","scrollTo","setAttribute","focus","scrollY","pageYOffset","querySelector","jumper","AnimatePolyfill","animateProgress","keyframesOrOptions","api","init","converter","defaultAttributes","attributes","expires","Date","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","write","cookies","jar","parts","found","read","withAttributes","withConverter","freeze","path"],"sourceRoot":""}