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WAC3C,IACC,OAAOrT,MAAQ,IAAIsT,SAAS,cAAb,EAChB,CAAE,MAAOC,GACR,GAAsB,iBAAXhG,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCGE0F,EAAoB,KXO9C","sources":["webpack://shifty/webpack/universalModuleDefinition","webpack://shifty/./src/bezier.ts","webpack://shifty/./src/index.ts","webpack://shifty/./src/interpolate.ts","webpack://shifty/./src/scene.ts","webpack://shifty/./src/standard-easing-functions.ts","webpack://shifty/./src/token.ts","webpack://shifty/./src/tweenable.ts","webpack://shifty/./src/types.ts","webpack://shifty/webpack/bootstrap","webpack://shifty/webpack/runtime/global","webpack://shifty/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"shifty\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"shifty\"] = factory();\n\telse\n\t\troot[\"shifty\"] = factory();\n})(self, function() {\nreturn ","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setBezierFunction = exports.getCubicBezierTransition = void 0;\nconst tweenable_1 = require(\"./tweenable\");\n/**\n * The Bezier magic in this file is adapted/copied almost wholesale from\n * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/cubic-bezier.js),\n * which was adapted from Apple code (which probably came from\n * [here](http://opensource.apple.com/source/WebCore/WebCore-955.66/platform/graphics/UnitBezier.h)).\n * Special thanks to Apple and Thomas Fuchs for much of this code.\n */\n/**\n * Copyright (c) 2006 Apple Computer, Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder(s) nor the names of any\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n// port of webkit cubic bezier handling by http://www.netzgesta.de/dev/\n/* istanbul ignore next */\nfunction cubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {\n let ax = 0, bx = 0, cx = 0, ay = 0, by = 0, cy = 0;\n const sampleCurveX = (t) => ((ax * t + bx) * t + cx) * t;\n const sampleCurveY = (t) => ((ay * t + by) * t + cy) * t;\n const sampleCurveDerivativeX = (t) => (3 * ax * t + 2 * bx) * t + cx;\n const solveEpsilon = (duration) => 1 / (200 * duration);\n const fabs = (n) => (n >= 0 ? n : 0 - n);\n const solveCurveX = (x, epsilon) => {\n let t0, t1, t2, x2, d2, i;\n for (t2 = x, i = 0; i < 8; i++) {\n x2 = sampleCurveX(t2) - x;\n if (fabs(x2) < epsilon) {\n return t2;\n }\n d2 = sampleCurveDerivativeX(t2);\n if (fabs(d2) < 1e-6) {\n break;\n }\n t2 = t2 - x2 / d2;\n }\n t0 = 0;\n t1 = 1;\n t2 = x;\n if (t2 < t0) {\n return t0;\n }\n if (t2 > t1) {\n return t1;\n }\n while (t0 < t1) {\n x2 = sampleCurveX(t2);\n if (fabs(x2 - x) < epsilon) {\n return t2;\n }\n if (x > x2) {\n t0 = t2;\n }\n else {\n t1 = t2;\n }\n t2 = (t1 - t0) * 0.5 + t0;\n }\n return t2; // Failure.\n };\n const solve = (x, epsilon) => sampleCurveY(solveCurveX(x, epsilon));\n cx = 3 * p1x;\n bx = 3 * (p2x - p1x) - cx;\n ax = 1 - cx - bx;\n cy = 3 * p1y;\n by = 3 * (p2y - p1y) - cy;\n ay = 1 - cy - by;\n return solve(t, solveEpsilon(duration));\n}\n// End ported code\n/**\n * Generates a transition easing function that is compatible with WebKit's CSS\n * transitions `-webkit-transition-timing-function` CSS property.\n *\n * The W3C has more information about CSS3 transition timing functions:\n * http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag\n */\nconst getCubicBezierTransition = (x1 = 0.25, y1 = 0.25, x2 = 0.75, y2 = 0.75) => pos => cubicBezierAtTime(pos, x1, y1, x2, y2, 1);\nexports.getCubicBezierTransition = getCubicBezierTransition;\n/**\n * Create a Bezier easing function and attach it to {@link\n * Tweenable.easing}. This function gives you total control over the\n * easing curve. Matthew Lein's [Ceaser](http://matthewlein.com/ceaser/) is a\n * useful tool for visualizing the curves you can make with this function.\n *\n * To remove any easing functions that are created by this method, `delete`\n * them from {@link Tweenable.easing}:\n *\n * ```\n * setBezierFunction('customCurve', 0, 0, 1, 1)\n *\n * delete Tweenable.easing.customCurve\n * ```\n * @return {EasingFunction} The {@link EasingFunction} that was\n * attached to {@link Tweenable.easing}.\n */\nconst setBezierFunction = (\n/**\n * The name of the easing curve. Overwrites the matching, preexisting easing\n * function on {@link Tweenable.easing} if it exists.\n */\nname, x1, y1, x2, y2) => {\n const cubicBezierTransition = (0, exports.getCubicBezierTransition)(x1, y1, x2, y2);\n cubicBezierTransition.displayName = name;\n cubicBezierTransition.x1 = x1;\n cubicBezierTransition.y1 = y1;\n cubicBezierTransition.x2 = x2;\n cubicBezierTransition.y2 = y2;\n return (tweenable_1.Tweenable.easing[name] = cubicBezierTransition);\n};\nexports.setBezierFunction = setBezierFunction;\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = exports.standardEasingFunctions = exports.setBezierFunction = exports.Scene = exports.interpolate = exports.tween = exports.Tweenable = exports.shouldScheduleUpdate = exports.processTweens = void 0;\nconst tweenable_1 = require(\"./tweenable\");\nObject.defineProperty(exports, \"processTweens\", { enumerable: true, get: function () { return tweenable_1.processTweens; } });\nObject.defineProperty(exports, \"shouldScheduleUpdate\", { enumerable: true, get: function () { return tweenable_1.shouldScheduleUpdate; } });\nObject.defineProperty(exports, \"Tweenable\", { enumerable: true, get: function () { return tweenable_1.Tweenable; } });\nObject.defineProperty(exports, \"tween\", { enumerable: true, get: function () { return tweenable_1.tween; } });\nvar interpolate_1 = require(\"./interpolate\");\nObject.defineProperty(exports, \"interpolate\", { enumerable: true, get: function () { return interpolate_1.interpolate; } });\nvar scene_1 = require(\"./scene\");\nObject.defineProperty(exports, \"Scene\", { enumerable: true, get: function () { return scene_1.Scene; } });\nvar bezier_1 = require(\"./bezier\");\nObject.defineProperty(exports, \"setBezierFunction\", { enumerable: true, get: function () { return bezier_1.setBezierFunction; } });\nvar standard_easing_functions_1 = require(\"./standard-easing-functions\");\nObject.defineProperty(exports, \"standardEasingFunctions\", { enumerable: true, get: function () { return standard_easing_functions_1.standardEasingFunctions; } });\n__exportStar(require(\"./types\"), exports);\n/**\n * The NPM package version of Shifty.\n */\nexports.VERSION = String(process.env.PACKAGE_VERSION);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolate = void 0;\nconst tweenable_1 = require(\"./tweenable\");\n// Fake a Tweenable and patch some internals. This approach enables skipping\n// uneccessary processing and object recreation, cutting down on garbage\n// collection pauses.\nconst tweenable = new tweenable_1.Tweenable();\nconst { filters } = tweenable_1.Tweenable;\n/**\n * Compute the midpoint of two Objects. This method effectively calculates a\n * specific frame of animation that {@link Tweenable#tween} does many times\n * over the course of a full tween.\n *\n * ```\n * import { interpolate } from 'shifty';\n *\n * const interpolatedValues = interpolate({\n * width: '100px',\n * opacity: 0,\n * color: '#fff'\n * }, {\n * width: '200px',\n * opacity: 1,\n * color: '#000'\n * },\n * 0.5\n * );\n *\n * console.log(interpolatedValues); // Logs: {opacity: 0.5, width: \"150px\", color: \"rgb(127,127,127)\"}\n * ```\n */\nconst interpolate = (\n/**\n * The starting values to tween from.\n */\nfrom, \n/**\n * The ending values to tween to.\n */\nto, \n/**\n * The normalized position value (between `0.0` and `1.0`) to interpolate the\n * values between `from` and `to` for. `from` represents `0` and `to`\n * represents `1`.\n */\nposition, \n/**\n * The easing curve(s) to calculate the midpoint against. You can reference\n * any easing function attached to {@link Tweenable.easing}, or provide the\n * {@link EasingFunction}(s) directly.\n */\neasing = tweenable_1.Tweenable.easing.linear, \n/**\n * Optional delay to pad the beginning of the interpolated tween with. This\n * increases the range of `position` from (`0` through `1`) to (`0` through\n * `1 + delay`). So, a delay of `0.5` would increase all valid values of\n * `position` to numbers between `0` and `1.5`.\n */\ndelay = 0) => {\n const current = Object.assign({}, from);\n const easingObject = (0, tweenable_1.composeEasingObject)(from, easing);\n tweenable._filters.length = 0;\n tweenable.setState({});\n tweenable._currentState = current;\n tweenable._originalState = from;\n tweenable._targetState = to;\n tweenable._easing = easingObject;\n for (const name in filters) {\n if (filters[name].doesApply(tweenable)) {\n tweenable._filters.push(filters[name]);\n }\n }\n // Any defined value transformation must be applied\n tweenable._applyFilter('tweenCreated');\n tweenable._applyFilter('beforeTween');\n const interpolatedValues = (0, tweenable_1.tweenProps)(position, current, from, to, 1, delay, easingObject);\n // Transform data in interpolatedValues back into its original format\n tweenable._applyFilter('afterTween');\n return interpolatedValues;\n};\nexports.interpolate = interpolate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Scene = void 0;\nclass Scene {\n /**\n * The {@link Scene} class provides a way to control groups of {@link\n * Tweenable}s. It is lightweight, minimalistic, and meant to provide\n * performant {@link Tweenable} batch control that users of Shifty\n * might otherwise have to implement themselves. It is **not** a robust\n * timeline solution, and it does **not** provide utilities for sophisticated\n * animation sequencing or orchestration. If that is what you need for your\n * project, consider using a more robust tool such as\n * [Rekapi](http://jeremyckahn.github.io/rekapi/doc/) (a timeline layer built\n * on top of Shifty).\n *\n * Please be aware that {@link Scene} does **not** perform any\n * automatic tween cleanup. If you want to remove a {@link Tweenable} from a\n * {@link Scene}, you must do so explicitly with either {@link Scene#remove}\n * or {@link Scene#empty}.\n *\n *
\n * See the Pen \n * Shifty Scene Demo by Jeremy Kahn (@jeremyckahn)\n * on CodePen.\n *
\n * \n * @see https://codepen.io/jeremyckahn/pen/qvZKbe\n */\n constructor(...tweenables) {\n this._tweenables = [];\n tweenables.forEach(this.add.bind(this));\n }\n /**\n * A copy of the internal {@link Tweenable}s array.\n */\n get tweenables() {\n return [...this._tweenables];\n }\n /**\n * The {@link !Promise}s for all {@link Tweenable}s in this {@link Scene} .\n * Note that each call of {@link Scene#tween} or {@link Scene#pause} creates\n * new {@link !Promise}s:\n *\n * const scene = new Scene(new Tweenable());\n * scene.play();\n *\n * Promise.all(scene.promises).then(() =>\n * // Plays the scene again upon completion, but a new promise is\n * // created so this line only runs once.\n * scene.play()\n * );\n */\n get promises() {\n return this._tweenables.map(tweenable => tweenable.then());\n }\n /**\n * Add a {@link Tweenable} to be controlled by this {@link Scene}.\n * @return The {@link Tweenable} that was added.\n */\n add(tweenable) {\n this._tweenables.push(tweenable);\n return tweenable;\n }\n /**\n * Remove a {@link Tweenable} that is controlled by this {@link Scene}.\n * @return The {@link Tweenable} that was removed.\n */\n remove(tweenable) {\n const index = this._tweenables.indexOf(tweenable);\n if (index > -1) {\n this._tweenables.splice(index, 1);\n }\n return tweenable;\n }\n /**\n * {@link Scene#remove | Remove} all {@link Tweenable}s in this {@link\n * Scene}.\n * @return The {@link Tweenable}s that were removed.\n */\n empty() {\n // NOTE: This is a deliberate use of the tweenables getter here to create a\n // temporary array\n return this.tweenables.map(this.remove.bind(this));\n }\n /**\n * Whether or not any {@link Tweenable} in this {@link Scene} is playing.\n */\n get isPlaying() {\n return this._tweenables.some(({ isPlaying }) => isPlaying);\n }\n /**\n * Call {@link Tweenable#tween} on all {@link Tweenable}s in this {@link\n * Scene}.\n */\n tween() {\n this._tweenables.forEach(tweenable => tweenable.tween());\n return this;\n }\n /**\n * Call {@link Tweenable#pause} all {@link Tweenable}s in this {@link Scene}.\n */\n pause() {\n this._tweenables.forEach(tweenable => tweenable.pause());\n return this;\n }\n /**\n * Call {@link Tweenable#resume} on all paused {@link Tweenable}s in this\n * scene.\n */\n resume() {\n this._tweenables\n .filter(({ hasEnded }) => !hasEnded)\n .forEach(tweenable => tweenable.resume());\n return this;\n }\n /**\n * Call {@link Tweenable#stop} on all {@link Tweenable}s in this {@link\n * Scene}.\n */\n stop(gotoEnd) {\n this._tweenables.forEach(tweenable => tweenable.stop(gotoEnd));\n return this;\n }\n}\nexports.Scene = Scene;\n","\"use strict\";\n/* istanbul ignore file */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.standardEasingFunctions = void 0;\n/*!\n * All equations are adapted from Thomas Fuchs'\n * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js).\n *\n * Based on Easing Equations (c) 2003 [Robert\n * Penner](http://www.robertpenner.com/), all rights reserved. This work is\n * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html).\n */\n/*!\n * TERMS OF USE - EASING EQUATIONS\n * Open source under the BSD License.\n * Easing Equations (c) 2003 Robert Penner, all rights reserved.\n */\n/**\n * The standard set of easing functions availble for use with Shifty tweens.\n *\n * This is distinct from `Tweenable`'s {@link Tweenable.easing}. {@link\n * Tweenable.easing} contains everything within `easingFunctions` but also any\n * custom easing functions that you have defined.\n */\nexports.standardEasingFunctions = Object.freeze({\n linear: (pos) => pos,\n easeInQuad: (pos) => Math.pow(pos, 2),\n easeOutQuad: (pos) => -(Math.pow(pos - 1, 2) - 1),\n easeInOutQuad: (pos) => (pos /= 0.5) < 1 ? 0.5 * Math.pow(pos, 2) : -0.5 * ((pos -= 2) * pos - 2),\n easeInCubic: (pos) => Math.pow(pos, 3),\n easeOutCubic: (pos) => Math.pow(pos - 1, 3) + 1,\n easeInOutCubic: (pos) => (pos /= 0.5) < 1\n ? 0.5 * Math.pow(pos, 3)\n : 0.5 * (Math.pow(pos - 2, 3) + 2),\n easeInQuart: (pos) => Math.pow(pos, 4),\n easeOutQuart: (pos) => -(Math.pow(pos - 1, 4) - 1),\n easeInOutQuart: (pos) => (pos /= 0.5) < 1\n ? 0.5 * Math.pow(pos, 4)\n : -0.5 * ((pos -= 2) * Math.pow(pos, 3) - 2),\n easeInQuint: (pos) => Math.pow(pos, 5),\n easeOutQuint: (pos) => Math.pow(pos - 1, 5) + 1,\n easeInOutQuint: (pos) => (pos /= 0.5) < 1\n ? 0.5 * Math.pow(pos, 5)\n : 0.5 * (Math.pow(pos - 2, 5) + 2),\n easeInSine: (pos) => -Math.cos(pos * (Math.PI / 2)) + 1,\n easeOutSine: (pos) => Math.sin(pos * (Math.PI / 2)),\n easeInOutSine: (pos) => -0.5 * (Math.cos(Math.PI * pos) - 1),\n easeInExpo: (pos) => (pos === 0 ? 0 : Math.pow(2, 10 * (pos - 1))),\n easeOutExpo: (pos) => (pos === 1 ? 1 : -Math.pow(2, -10 * pos) + 1),\n easeInOutExpo: (pos) => {\n if (pos === 0) {\n return 0;\n }\n if (pos === 1) {\n return 1;\n }\n if ((pos /= 0.5) < 1) {\n return 0.5 * Math.pow(2, 10 * (pos - 1));\n }\n return 0.5 * (-Math.pow(2, -10 * --pos) + 2);\n },\n easeInCirc: (pos) => -(Math.sqrt(1 - pos * pos) - 1),\n easeOutCirc: (pos) => Math.sqrt(1 - Math.pow(pos - 1, 2)),\n easeInOutCirc: (pos) => (pos /= 0.5) < 1\n ? -0.5 * (Math.sqrt(1 - pos * pos) - 1)\n : 0.5 * (Math.sqrt(1 - (pos -= 2) * pos) + 1),\n easeOutBounce: (pos) => {\n if (pos < 1 / 2.75) {\n return 7.5625 * pos * pos;\n }\n else if (pos < 2 / 2.75) {\n return 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75;\n }\n else if (pos < 2.5 / 2.75) {\n return 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375;\n }\n else {\n return 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375;\n }\n },\n easeInBack: (pos) => {\n const s = 1.70158;\n return pos * pos * ((s + 1) * pos - s);\n },\n easeOutBack: (pos) => {\n const s = 1.70158;\n return (pos = pos - 1) * pos * ((s + 1) * pos + s) + 1;\n },\n easeInOutBack: (pos) => {\n let s = 1.70158;\n if ((pos /= 0.5) < 1) {\n return 0.5 * (pos * pos * (((s *= 1.525) + 1) * pos - s));\n }\n return 0.5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);\n },\n elastic: (pos) => -1 * Math.pow(4, -8 * pos) * Math.sin(((pos * 6 - 1) * (2 * Math.PI)) / 2) +\n 1,\n swingFromTo: (pos) => {\n let s = 1.70158;\n return (pos /= 0.5) < 1\n ? 0.5 * (pos * pos * (((s *= 1.525) + 1) * pos - s))\n : 0.5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);\n },\n swingFrom: (pos) => {\n const s = 1.70158;\n return pos * pos * ((s + 1) * pos - s);\n },\n swingTo: (pos) => {\n const s = 1.70158;\n return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;\n },\n bounce: (pos) => {\n if (pos < 1 / 2.75) {\n return 7.5625 * pos * pos;\n }\n else if (pos < 2 / 2.75) {\n return 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75;\n }\n else if (pos < 2.5 / 2.75) {\n return 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375;\n }\n else {\n return 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375;\n }\n },\n bouncePast: (pos) => {\n if (pos < 1 / 2.75) {\n return 7.5625 * pos * pos;\n }\n else if (pos < 2 / 2.75) {\n return 2 - (7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75);\n }\n else if (pos < 2.5 / 2.75) {\n return 2 - (7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375);\n }\n else {\n return 2 - (7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375);\n }\n },\n easeFromTo: (pos) => (pos /= 0.5) < 1\n ? 0.5 * Math.pow(pos, 4)\n : -0.5 * ((pos -= 2) * Math.pow(pos, 3) - 2),\n easeFrom: (pos) => Math.pow(pos, 4),\n easeTo: (pos) => Math.pow(pos, 0.25),\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.afterTween = exports.beforeTween = exports.tweenCreated = exports.doesApply = void 0;\nconst types_1 = require(\"./types\");\nconst R_NUMBER_COMPONENT = /(\\d|-|\\.)/;\nconst R_FORMAT_CHUNKS = /([^\\-0-9.]+)/g;\nconst R_UNFORMATTED_VALUES = /[0-9.-]+/g;\nconst R_RGBA = (() => {\n const number = R_UNFORMATTED_VALUES.source;\n const comma = /,\\s*/.source;\n return new RegExp(`rgba?\\\\(${number}${comma}${number}${comma}${number}(${comma}${number})?\\\\)`, 'g');\n})();\nconst R_RGBA_PREFIX = /^.*\\(/;\nconst R_HEX = /#([0-9]|[a-f]){3,6}/gi;\nconst VALUE_PLACEHOLDER = 'VAL';\nconst getFormatChunksFrom = (rawValues, prefix) => rawValues.map((_val, i) => `_${prefix}_${i}`);\nconst getFormatStringFrom = (formattedString) => {\n let chunks = formattedString.match(R_FORMAT_CHUNKS);\n if (!chunks) {\n // chunks will be null if there were no tokens to parse in\n // formattedString (for example, if formattedString is '2'). Coerce\n // chunks to be useful here.\n chunks = ['', ''];\n // If there is only one chunk, assume that the string is a number\n // followed by a token...\n // NOTE: This may be an unwise assumption.\n }\n else if (chunks.length === 1 ||\n // ...or if the string starts with a number component (\".\", \"-\", or a\n // digit)...\n formattedString.charAt(0).match(R_NUMBER_COMPONENT)) {\n // ...prepend an empty string here to make sure that the formatted number\n // is properly replaced by VALUE_PLACEHOLDER\n chunks.unshift('');\n }\n return chunks.join(VALUE_PLACEHOLDER);\n};\n/**\n * Convert a base-16 number to base-10.\n */\nfunction hexToDec(hex) {\n return parseInt(hex, 16);\n}\n/**\n * Convert a hexadecimal string to an array with three items, one each for\n * the red, blue, and green decimal values.\n */\nconst hexToRGBArray = (\n/**\n * A hexadecimal string.\n */\nhex) => {\n hex = hex.replace(/#/, '');\n // If the string is a shorthand three digit hex notation, normalize it to\n // the standard six digit notation\n if (hex.length === 3) {\n const [r, g, b] = hex.split('');\n hex = r + r + g + g + b + b;\n }\n return [\n hexToDec(hex.substring(0, 2)),\n hexToDec(hex.substring(2, 4)),\n hexToDec(hex.substring(4, 6)),\n ];\n};\nconst convertHexToRGB = (hexString) => `rgb(${hexToRGBArray(hexString).join(',')})`;\n/**\n * TODO: Can this be rewritten to leverage String#replace more efficiently?\n * Runs a filter operation on all chunks of a string that match a RegExp.\n */\nconst filterStringChunks = (pattern, unfilteredString, filter) => {\n const patternMatches = unfilteredString.match(pattern);\n let filteredString = unfilteredString.replace(pattern, VALUE_PLACEHOLDER);\n if (patternMatches) {\n patternMatches.forEach(match => (filteredString = filteredString.replace(VALUE_PLACEHOLDER, filter(match))));\n }\n return filteredString;\n};\nconst sanitizeHexChunksToRGB = (str) => filterStringChunks(R_HEX, str, convertHexToRGB);\n/**\n * Convert all hex color values within a string to an rgb string.\n */\nconst sanitizeObjectForHexProps = (stateObject) => {\n for (const prop in stateObject) {\n const currentProp = stateObject[prop];\n if (typeof currentProp === 'string' && currentProp.match(R_HEX)) {\n stateObject[prop] = sanitizeHexChunksToRGB(currentProp);\n }\n }\n};\nconst sanitizeRGBAChunk = (rgbChunk) => {\n var _a, _b;\n const rgbaRawValues = (_a = rgbChunk.match(R_UNFORMATTED_VALUES)) !== null && _a !== void 0 ? _a : [];\n const rgbNumbers = rgbaRawValues\n .slice(0, 3)\n .map(rgbChunk => Math.floor(Number(rgbChunk)));\n const prefix = (_b = rgbChunk.match(R_RGBA_PREFIX)) === null || _b === void 0 ? void 0 : _b[0];\n if (rgbaRawValues.length === 3) {\n return `${prefix}${rgbNumbers.join(',')})`;\n }\n else if (rgbaRawValues.length === 4) {\n return `${prefix}${rgbNumbers.join(',')},${rgbaRawValues[3]})`;\n }\n throw new Error(`Invalid rgbChunk: ${rgbChunk}`);\n};\n/**\n * Check for floating point values within rgb strings and round them.\n */\nconst sanitizeRGBChunks = (formattedString) => filterStringChunks(R_RGBA, formattedString, sanitizeRGBAChunk);\n/**\n * NOTE: It's the duty of the caller to convert the Array elements of the\n * return value into numbers. This is a performance optimization.\n */\nconst getValuesFrom = (formattedString) => { var _a; return (_a = formattedString.match(R_UNFORMATTED_VALUES)) !== null && _a !== void 0 ? _a : []; };\nconst getFormatSignatures = (stateObject) => {\n var _a;\n const signatures = {};\n for (const propertyName in stateObject) {\n const property = stateObject[propertyName];\n if (typeof property === 'string') {\n signatures[propertyName] = {\n formatString: getFormatStringFrom(property),\n chunkNames: getFormatChunksFrom((_a = getValuesFrom(property)) === null || _a === void 0 ? void 0 : _a.map(Number), propertyName),\n };\n }\n }\n return signatures;\n};\nconst expandFormattedProperties = (stateObject, formatSignatures) => {\n for (const propertyName in formatSignatures) {\n getValuesFrom(String(stateObject[propertyName])).forEach((number, i) => (stateObject[formatSignatures[propertyName].chunkNames[i]] = +number));\n delete stateObject[propertyName];\n }\n};\nconst extractPropertyChunks = (stateObject, chunkNames) => {\n const extractedValues = {};\n chunkNames.forEach(chunkName => {\n extractedValues[chunkName] = stateObject[chunkName];\n delete stateObject[chunkName];\n });\n return extractedValues;\n};\nconst getValuesList = (stateObject, chunkNames) => chunkNames.map(chunkName => Number(stateObject[chunkName]));\nconst getFormattedValues = (formatString, rawValues) => {\n rawValues.forEach(rawValue => (formatString = formatString.replace(VALUE_PLACEHOLDER, String(+rawValue.toFixed(4)))));\n return formatString;\n};\nconst collapseFormattedProperties = (stateObject, formatSignature) => {\n for (const prop in formatSignature) {\n const { chunkNames, formatString } = formatSignature[prop];\n const currentProp = getFormattedValues(formatString, getValuesList(extractPropertyChunks(stateObject, chunkNames), chunkNames));\n stateObject[prop] = sanitizeRGBChunks(currentProp);\n }\n};\nconst expandEasingObject = (easingObject, formatSignature) => {\n var _a;\n for (const prop in formatSignature) {\n const { chunkNames } = formatSignature[prop];\n const easing = easingObject[prop];\n if (typeof easing === 'string') {\n const easingNames = easing.split(' ');\n const defaultEasing = easingNames[easingNames.length - 1];\n for (let i = 0; i < chunkNames.length; i++) {\n const chunkName = chunkNames[i];\n const easingName = (_a = easingNames[i]) !== null && _a !== void 0 ? _a : defaultEasing;\n if ((0, types_1.isEasingKey)(easingName)) {\n easingObject[chunkName] = easingName;\n }\n }\n }\n else {\n // easing is a function\n chunkNames.forEach(chunkName => (easingObject[chunkName] = easing));\n }\n delete easingObject[prop];\n }\n};\nconst collapseEasingObject = (easingObject, formatSignature) => {\n for (const prop in formatSignature) {\n const { chunkNames } = formatSignature[prop];\n const firstEasing = easingObject[chunkNames[0]];\n if (typeof firstEasing === 'string') {\n easingObject[prop] = chunkNames\n .map(chunkName => {\n const easingName = easingObject[chunkName];\n delete easingObject[chunkName];\n return easingName;\n })\n // This typecast isn't accurate, but the logic works and it's performant.\n //\n // TODO: In a future major version, drop support for a single string\n // containing a space-separated list of EasingKeys and add support for an\n // Array of EasingKeys.\n .join(' ');\n }\n else {\n // firstEasing is a function\n easingObject[prop] = firstEasing;\n }\n }\n};\nconst doesApply = (tweenable) => {\n for (const key in tweenable._currentState) {\n if (typeof tweenable._currentState[key] === 'string') {\n return true;\n }\n }\n return false;\n};\nexports.doesApply = doesApply;\nfunction tweenCreated(tweenable) {\n const { _currentState, _originalState, _targetState } = tweenable;\n [_currentState, _originalState, _targetState].forEach(sanitizeObjectForHexProps);\n tweenable._tokenData = getFormatSignatures(_currentState);\n}\nexports.tweenCreated = tweenCreated;\nfunction beforeTween(tweenable) {\n const { _currentState, _originalState, _targetState, _easing, _tokenData, } = tweenable;\n if (typeof _easing !== 'function' && _tokenData) {\n expandEasingObject(_easing, _tokenData);\n }\n // eslint-disable-next-line @typescript-eslint/no-extra-semi\n ;\n [_currentState, _originalState, _targetState].forEach(state => expandFormattedProperties(state, _tokenData !== null && _tokenData !== void 0 ? _tokenData : {}));\n}\nexports.beforeTween = beforeTween;\nfunction afterTween(tweenable) {\n const { _currentState, _originalState, _targetState, _easing, _tokenData, } = tweenable;\n [_currentState, _originalState, _targetState].forEach(state => collapseFormattedProperties(state, _tokenData !== null && _tokenData !== void 0 ? _tokenData : {}));\n if (typeof _easing !== 'function' && _tokenData) {\n collapseEasingObject(_easing, _tokenData);\n }\n}\nexports.afterTween = afterTween;\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (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};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shouldScheduleUpdate = exports.tween = exports.Tweenable = exports.composeEasingObject = exports.scheduleUpdate = exports.processTweens = exports.tweenProps = exports.getListTail = exports.getListHead = exports.resetList = void 0;\nconst standard_easing_functions_1 = require(\"./standard-easing-functions\");\nconst bezier_1 = require(\"./bezier\");\nconst types_1 = require(\"./types\");\nconst token = __importStar(require(\"./token\"));\n// CONSTANTS\nconst DEFAULT_EASING = 'linear';\nconst DEFAULT_DURATION = 500;\nconst UPDATE_TIME = 1000 / 60;\nconst root = typeof window !== 'undefined' ? window : global;\nconst AFTER_TWEEN = 'afterTween';\nconst AFTER_TWEEN_END = 'afterTweenEnd';\nconst BEFORE_TWEEN = 'beforeTween';\nconst TWEEN_CREATED = 'tweenCreated';\nconst TYPE_STRING = 'string';\nconst TYPE_FUNCTION = 'function';\nconst TYPE_OBJECT = 'object';\n// requestAnimationFrame() shim by Paul Irish (modified for Shifty)\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\nlet scheduleFunction = root.requestAnimationFrame;\nif (!scheduleFunction) {\n if (typeof window === 'undefined') {\n scheduleFunction = setTimeout;\n }\n else {\n scheduleFunction =\n window.webkitRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n (window.mozCancelRequestAnimationFrame &&\n window.mozRequestAnimationFrame) ||\n setTimeout;\n }\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = () => { };\nlet listHead = null;\nlet listTail = null;\n/**\n * Strictly for testing.\n */\nconst resetList = () => {\n listHead = listTail = null;\n};\nexports.resetList = resetList;\n/**\n * Strictly for testing.\n */\nconst getListHead = () => listHead;\nexports.getListHead = getListHead;\n/**\n * Strictly for testing.\n */\nconst getListTail = () => listTail;\nexports.getListTail = getListTail;\n/**\n * Calculates the interpolated tween values of an object for a given timestamp.\n * @ignore\n */\nconst tweenProps = (\n/**\n * The position to compute the state for.\n */\nforPosition, \n/**\n * Current state properties.\n */\ncurrentState, \n/**\n * The original state properties the Object is tweening from.\n */\noriginalState, \n/**\n * The destination state properties the Object is tweening to.\n */\ntargetState, \n/**\n * The length of the tween in milliseconds.\n */\nduration, \n/**\n * The UNIX epoch time at which the tween began.\n */\ntimestamp, \n/**\n * This Object's keys must correspond to the keys in targetState.\n */\neasing) => {\n var _b;\n let easedPosition = 0;\n let start;\n const normalizedPosition = forPosition < timestamp ? 0 : (forPosition - timestamp) / duration;\n let easingFn;\n for (const key in currentState) {\n if (typeof easing === TYPE_FUNCTION) {\n easing = easing;\n easingFn = easing;\n }\n else {\n easing = easing;\n const easingObjectProp = easing[key];\n if (typeof easingObjectProp === TYPE_FUNCTION) {\n easingFn = easingObjectProp;\n }\n else {\n // easingObjectProp is a string\n easingFn =\n (_b = Tweenable.easing[easingObjectProp]) !== null && _b !== void 0 ? _b : standard_easing_functions_1.standardEasingFunctions.linear;\n }\n }\n easedPosition = easingFn(normalizedPosition);\n start = originalState[key];\n currentState[key] = (start +\n (targetState[key] - start) * easedPosition);\n }\n return currentState;\n};\nexports.tweenProps = tweenProps;\nconst processTween = (tween, currentTime) => {\n var _b;\n let timestamp = (_b = tween._timestamp) !== null && _b !== void 0 ? _b : 0;\n const currentState = tween._currentState;\n const delay = tween._delay;\n if (currentTime < timestamp + delay) {\n return;\n }\n let duration = tween._duration;\n const targetState = tween._targetState;\n const endTime = timestamp + delay + duration;\n let timeToCompute = currentTime > endTime ? endTime : currentTime;\n tween._hasEnded = timeToCompute >= endTime;\n const offset = duration - (endTime - timeToCompute);\n if (tween._hasEnded) {\n tween._render(targetState, offset, tween._data);\n return tween.stop(true);\n }\n // Converts internal state objects to TweenRawState\n tween._applyFilter(BEFORE_TWEEN);\n // If the animation has not yet reached the start point (e.g., there was\n // delay that has not yet completed), just interpolate the starting\n // position of the tween.\n if (timeToCompute < timestamp + delay) {\n timestamp = duration = timeToCompute = 1;\n }\n else {\n timestamp += delay;\n }\n (0, exports.tweenProps)(timeToCompute, currentState, tween._originalState, targetState, duration, timestamp, tween._easing);\n tween._applyFilter(AFTER_TWEEN);\n tween._render(currentState, offset, tween._data);\n};\n/**\n * Process all tweens currently managed by Shifty for the current tick. This\n * does not perform any timing or update scheduling; it is the logic that is\n * run *by* the scheduling functionality. Specifically, it computes the state\n * and calls all of the relevant {@link TweenableConfig} functions supplied to\n * each of the tweens for the current point in time (as determined by {@link\n * Tweenable.now}).\n *\n * This is a low-level API that won't be needed in the majority of situations.\n * It is primarily useful as a hook for higher-level animation systems that are\n * built on top of Shifty. If you need this function, it is likely you need to\n * pass something like `() => {}` to {@link Tweenable.setScheduleFunction},\n * override {@link Tweenable.now} and manage the scheduling logic yourself.\n *\n * @see https://github.com/jeremyckahn/shifty/issues/109\n */\nconst processTweens = () => {\n let nextTweenToProcess;\n const currentTime = Tweenable.now();\n let currentTween = listHead;\n while (currentTween) {\n nextTweenToProcess = currentTween._next;\n processTween(currentTween, currentTime);\n currentTween = nextTweenToProcess;\n }\n};\nexports.processTweens = processTweens;\nconst { now } = Date;\nlet currentTime;\nlet isHeartbeatRunning = false;\n/**\n * Handles the update logic for one tick of a tween.\n */\nconst scheduleUpdate = () => {\n currentTime = now();\n if (isHeartbeatRunning) {\n scheduleFunction.call(root, exports.scheduleUpdate, UPDATE_TIME);\n }\n (0, exports.processTweens)();\n};\nexports.scheduleUpdate = scheduleUpdate;\n/**\n * Creates an EasingObject or EasingFunction from a string, a function or\n * another easing Object. If `easing` is an Object, then this function clones\n * it and fills in the missing properties with `\"linear\"`.\n *\n * If the tween has only one easing across all properties, that function is\n * returned directly.\n */\nconst composeEasingObject = (fromTweenParams, easing = DEFAULT_EASING, \n/**\n * Reused composedEasing object (mutated internally)\n */\ncomposedEasing = {}) => {\n if (typeof easing === TYPE_STRING) {\n if ((0, types_1.isEasingKey)(easing)) {\n return Tweenable.easing[easing];\n }\n }\n if (Array.isArray(easing)) {\n const cubicBezierTransition = (0, bezier_1.getCubicBezierTransition)(...easing);\n return cubicBezierTransition;\n }\n if (typeof composedEasing === TYPE_OBJECT) {\n composedEasing = composedEasing;\n if (typeof easing === TYPE_STRING || typeof easing === TYPE_FUNCTION) {\n for (const prop in fromTweenParams) {\n composedEasing[prop] = easing;\n }\n }\n else {\n for (const prop in fromTweenParams) {\n easing = easing;\n composedEasing[prop] = easing[prop] || DEFAULT_EASING;\n }\n }\n }\n return composedEasing;\n};\nexports.composeEasingObject = composeEasingObject;\n// Private declarations used below\nconst remove = (() => {\n let previousTween;\n let nextTween;\n return (tween) => {\n previousTween = null;\n nextTween = null;\n // Adapted from:\n // https://github.com/trekhleb/javascript-algorithms/blob/7c9601df3e8ca4206d419ce50b88bd13ff39deb6/src/data-structures/doubly-linked-list/DoublyLinkedList.js#L73-L121\n if (tween === listHead) {\n listHead = tween._next;\n if (listHead) {\n listHead._previous = null;\n }\n else {\n listTail = null;\n }\n }\n else if (tween === listTail) {\n listTail = tween._previous;\n if (listTail) {\n listTail._next = null;\n }\n else {\n listHead = null;\n }\n }\n else {\n previousTween = tween._previous;\n nextTween = tween._next;\n if (previousTween) {\n previousTween._next = nextTween;\n }\n if (nextTween) {\n nextTween._previous = previousTween;\n }\n }\n // Clean up any references in case the tween is restarted later.\n tween._previous = tween._next = null;\n };\n})();\nconst defaultPromiseCtor = typeof Promise === TYPE_FUNCTION ? Promise : null;\nclass Tweenable {\n constructor(\n /**\n * The values that the initial tween should start at if a {@link\n * TweenableConfig#from} value is not provided to {@link Tweenable#tween}\n * or {@link Tweenable#setConfig}.\n */\n initialState = {}, \n /**\n * Configuration object to be passed to {@link Tweenable#setConfig}.\n */\n config) {\n /**\n * Required for Promise implementation\n * @ignore\n */\n this[_a] = 'Promise';\n /**\n * @ignore\n */\n this._next = null;\n /**\n * @ignore\n */\n this._previous = null;\n /**\n * @ignore\n */\n this._config = {};\n /**\n * @ignore\n */\n this._data = {};\n /**\n * @ignore\n */\n this._delay = 0;\n /**\n * @ignore\n */\n this._duration = DEFAULT_DURATION;\n /**\n * @ignore\n */\n this._filters = [];\n /**\n * @ignore\n */\n this._timestamp = null;\n /**\n * @ignore\n */\n this._hasEnded = false;\n /**\n * @ignore\n */\n this._resolve = null;\n /**\n * @ignore\n */\n this._reject = null;\n /**\n * @ignore\n */\n this._originalState = {};\n /**\n * @ignore\n */\n this._targetState = {};\n /**\n * @ignore\n */\n this._start = noop;\n /**\n * @ignore\n */\n this._render = noop;\n /**\n * @ignore\n */\n this._promiseCtor = defaultPromiseCtor;\n /**\n * @ignore\n */\n this._promise = null;\n /**\n * @ignore\n */\n this._isPlaying = false;\n /**\n * @ignore\n */\n this._pausedAtTime = null;\n /**\n * @ignore\n */\n this._easing = {};\n this._currentState = initialState || {};\n // To prevent unnecessary calls to setConfig do not set default\n // configuration here. Only set default configuration immediately before\n // tweening if none has been set.\n if (config) {\n this.setConfig(config);\n }\n }\n /**\n * Applies a filter to Tweenable instance.\n * @ignore\n */\n _applyFilter(filterType) {\n var _b;\n for (let i = this._filters.length; i > 0; i--) {\n const filter = this._filters[i - i];\n (_b = filter[filterType]) === null || _b === void 0 ? void 0 : _b.call(filter, this);\n }\n }\n /**\n * {@link Tweenable#setConfig Configure} and start a tween. If this {@link\n * Tweenable}'s instance is already running, then it will stop playing the\n * old tween and immediately play the new one.\n */\n tween(config) {\n if (this._isPlaying) {\n this.stop();\n }\n if (config || !this._config) {\n this.setConfig(config);\n }\n this._pausedAtTime = null;\n this._timestamp = Tweenable.now();\n this._start(this.state, this._data);\n if (this._delay) {\n this._render(this._currentState, 0, this._data);\n }\n return this._resume(this._timestamp);\n }\n /**\n * Configures a tween without starting it. Aside from {@link\n * TweenableConfig.delay}, {@link TweenableConfig.from}, and {@link\n * TweenableConfig.to}, each configuration option will automatically default\n * to the same option used in the preceding tween of the {@link Tweenable}\n * instance.\n */\n setConfig(config = {}) {\n var _b;\n const { _config } = this;\n let key;\n for (key in config) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _config[key] = config[key];\n }\n // Configuration options to reuse from previous tweens\n const { promise = this._promiseCtor, start = noop, finish, render = noop, } = _config;\n // Attach something to this Tweenable instance (e.g.: a DOM element, an\n // object, a string, etc.);\n this._data = _config.data || this._data;\n // Init the internal state\n this._isPlaying = false;\n this._pausedAtTime = null;\n this._delay = config.delay || 0;\n this._start = start;\n this._render = render;\n this._duration = _config.duration || DEFAULT_DURATION;\n this._promiseCtor = promise;\n if (finish) {\n this._resolve = finish;\n }\n const { from, to = {} } = config;\n const { _currentState, _originalState, _targetState } = this;\n for (const key in from) {\n _currentState[key] = from[key];\n }\n let anyPropsAreStrings = false;\n for (const key in _currentState) {\n const currentProp = _currentState[key];\n if (!anyPropsAreStrings && typeof currentProp === TYPE_STRING) {\n anyPropsAreStrings = true;\n }\n _originalState[key] = currentProp;\n // Ensure that there is always something to tween to.\n _targetState[key] = (_b = to[key]) !== null && _b !== void 0 ? _b : currentProp;\n }\n this._easing = (0, exports.composeEasingObject)(this._currentState, _config.easing, this._easing);\n this._filters.length = 0;\n if (anyPropsAreStrings) {\n for (const key in Tweenable.filters) {\n if (Tweenable.filters[key].doesApply(this)) {\n this._filters.push(Tweenable.filters[key]);\n }\n }\n this._applyFilter(TWEEN_CREATED);\n }\n return this;\n }\n /**\n * Overrides any `finish` function passed via a {@link TweenableConfig}.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then\n */\n then(onFulfilled, onRejected) {\n if (!this._promiseCtor) {\n throw new Error('Promise implementation is unavailable');\n }\n this._promise = new this._promiseCtor((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n return this._promise.then(onFulfilled, onRejected);\n }\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch\n */\n catch(onRejected) {\n return this.then().catch(onRejected);\n }\n /**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/finally\n */\n finally(onFinally) {\n return this.then().finally(onFinally);\n }\n /**\n * Returns the current state of the tween.\n */\n get state() {\n return Object.assign({}, this._currentState);\n }\n /**\n * Set the current tween state.\n */\n setState(\n /**\n * The state to set.\n */\n state) {\n this._currentState = state;\n }\n /**\n * Pauses a tween. Paused tweens can be {@link resume}d from the point at\n * which they were paused. If a tween is not running, this is a no-op.\n */\n pause() {\n if (!this._isPlaying) {\n return this;\n }\n this._pausedAtTime = Tweenable.now();\n this._isPlaying = false;\n remove(this);\n return this;\n }\n /**\n * Resumes a {@link pause}d tween.\n */\n resume() {\n return this._resume();\n }\n /**\n * @ignore\n */\n _resume(currentTime = Tweenable.now()) {\n if (this._timestamp === null) {\n return this.tween();\n }\n if (this._isPlaying && this._promise) {\n return this;\n }\n if (this._pausedAtTime) {\n this._timestamp += currentTime - this._pausedAtTime;\n this._pausedAtTime = null;\n }\n this._isPlaying = true;\n const wasRunning = Boolean(listHead);\n if (listHead === null) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n listHead = this;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n listTail = this;\n }\n else {\n this._previous = listTail;\n if (listTail) {\n listTail._next = this;\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n listTail = this;\n }\n if (!wasRunning) {\n (0, exports.shouldScheduleUpdate)(true);\n }\n return this;\n }\n /**\n * Move the state of the animation to a specific point in the tween's\n * timeline. If the animation is not running, this will cause the tween's\n * {@link TweenableConfig.render | render} handler to be called.\n */\n seek(\n /**\n * The millisecond of the animation to seek to. This must not be less than\n * `0`.\n */\n millisecond) {\n var _b;\n millisecond = Math.max(millisecond, 0);\n const currentTime = Tweenable.now();\n if (((_b = this._timestamp) !== null && _b !== void 0 ? _b : 0) + millisecond === 0) {\n return this;\n }\n this._timestamp = currentTime - millisecond;\n // Make sure that any render handlers are run.\n processTween(this, currentTime);\n return this;\n }\n /**\n * Stops a tween. If a tween is not running, this is a no-op. This method\n * does **not** reject the tween {@link !Promise}. For that, use {@link\n * Tweenable#cancel}.\n */\n stop(\n /**\n * If `false` or not provided, the tween just stops at its current state.\n * If `true`, the tweened object's values are instantly set {@link\n * TweenableConfig.to | to the target values}.\n */\n gotoEnd = false) {\n var _b;\n if (!this._isPlaying) {\n return this;\n }\n this._isPlaying = false;\n remove(this);\n if (gotoEnd) {\n // Converts internal state objects to TweenRawState\n this._applyFilter(BEFORE_TWEEN);\n (0, exports.tweenProps)(1, this._currentState, this._originalState, this._targetState, 1, 0, this._easing);\n this._applyFilter(AFTER_TWEEN);\n this._applyFilter(AFTER_TWEEN_END);\n }\n (_b = this._resolve) === null || _b === void 0 ? void 0 : _b.call(this, {\n data: this._data,\n state: this._currentState,\n tweenable: this,\n });\n this._resolve = null;\n this._reject = null;\n return this;\n }\n /**\n * {@link Tweenable#stop}s a tween and also rejects its {@link !Promise}. If\n * a tween is not running, this is a no-op. Prevents calling any provided\n * {@link TweenableConfig.finish} function.\n * @see https://github.com/jeremyckahn/shifty/issues/122\n */\n cancel(\n /**\n * This gets propagated to {@link Tweenable#stop}.\n */\n gotoEnd = false) {\n var _b;\n const { _currentState, _data, _isPlaying } = this;\n if (!_isPlaying) {\n return this;\n }\n (_b = this._reject) === null || _b === void 0 ? void 0 : _b.call(this, {\n data: _data,\n state: _currentState,\n tweenable: this,\n });\n this._resolve = null;\n this._reject = null;\n return this.stop(gotoEnd);\n }\n /**\n * Whether or not a tween is running (not paused or completed).\n */\n get isPlaying() {\n return this._isPlaying;\n }\n /**\n * Whether or not a tween has completed.\n */\n get hasEnded() {\n return this._hasEnded;\n }\n /**\n * Get and optionally set the data that gets passed as `data` to {@link\n * StartFunction}, {@link FinishFunction} and {@link RenderFunction}.\n */\n data(data = null) {\n if (data) {\n this._data = Object.assign({}, data);\n }\n return this._data;\n }\n /**\n * `delete` all {@link\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn\n * | own} properties. Call this when the {@link Tweenable} instance is no\n * longer needed to free memory.\n */\n dispose() {\n for (const prop in this) {\n delete this[prop];\n }\n }\n}\nexports.Tweenable = Tweenable;\n_a = Symbol.toStringTag;\n/**\n * Returns the current timestamp.\n */\nTweenable.now = () => {\n if (!isHeartbeatRunning) {\n currentTime = now();\n }\n return currentTime;\n};\n/**\n * Sets a custom schedule function.\n *\n * By default, Shifty uses\n * [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame)\n * is used if available, otherwise {@link !setTimeout} is used.\n */\nTweenable.setScheduleFunction = (\n/**\n * The function to be used to schedule the next frame to be rendered.\n */\nfn) => (scheduleFunction = fn);\n/**\n * The {@link Filter}s available for use. These filters are automatically\n * applied. You can define your own {@link Filter}s and attach them to this\n * object.\n *\n * ```ts\n * Tweenable.filters['customFilter'] = {\n * doesApply: () => true\n * tweenCreated: () => console.log('tween created!')\n * }\n * ```\n */\nTweenable.filters = { token };\n/**\n * You can define custom easing curves by attaching {@link EasingFunction}s\n * to this static object.\n *\n * ```ts\n * Tweenable.easing['customEasing'] = (pos: number) => Math.pow(pos, 2)\n * ```\n */\nTweenable.easing = Object.create(standard_easing_functions_1.standardEasingFunctions);\n/**\n * Standalone convenience method that functions identically to {@link\n * Tweenable#tween}. You can use this to create tweens without needing to\n * explicitly set up a {@link Tweenable} instance.\n *\n * ```\n * import { tween } from 'shifty';\n *\n * tween({ from: { x: 0 }, to: { x: 10 } }).then(\n * () => console.log('All done!')\n * );\n * ```\n */\nfunction tween(config = {}) {\n const tweenable = new Tweenable({}, {});\n return tweenable.tween(config);\n}\nexports.tween = tween;\n/**\n * Determines whether or not a heartbeat tick should be scheduled. This is\n * generally only useful for testing environments where Shifty's continuous\n * heartbeat mechanism causes test runner issues.\n *\n * If you are using Jest, it is recommended to put this in a global `afterAll`\n * hook. If you don't already have a Jest setup file, follow the setup in [this\n * StackOverflow post](https://stackoverflow.com/a/57647146), and then add this\n * to it:\n *\n * ```\n * import { shouldScheduleUpdate } from 'shifty'\n *\n * afterAll(() => {\n * shouldScheduleUpdate(false)\n * })\n * ```\n * @see https://github.com/jeremyckahn/shifty/issues/156\n */\nconst shouldScheduleUpdate = (doScheduleUpdate) => {\n if (doScheduleUpdate && isHeartbeatRunning) {\n return;\n }\n isHeartbeatRunning = doScheduleUpdate;\n if (doScheduleUpdate) {\n (0, exports.scheduleUpdate)();\n }\n};\nexports.shouldScheduleUpdate = shouldScheduleUpdate;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEasingKey = void 0;\nconst tweenable_1 = require(\"./tweenable\");\n/**\n * Determines whether or not a given string represents a defined easing curve\n * on {@link Tweenable.easing}. This also supports custom easing functions.\n */\nconst isEasingKey = (key) => {\n return key in tweenable_1.Tweenable.easing;\n};\nexports.isEasingKey = isEasingKey;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(156);\n"],"names":["root","factory","exports","module","define","amd","self","Object","defineProperty","value","setBezierFunction","getCubicBezierTransition","tweenable_1","x1","y1","x2","y2","pos","t","p1x","p1y","p2x","p2y","duration","ax","bx","cx","ay","by","cy","sampleCurveX","sampleCurveDerivativeX","fabs","n","x","epsilon","solveEpsilon","sampleCurveY","t0","t1","t2","d2","i","solveCurveX","cubicBezierAtTime","name","cubicBezierTransition","displayName","Tweenable","easing","__createBinding","this","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","__exportStar","p","prototype","hasOwnProperty","call","VERSION","standardEasingFunctions","Scene","interpolate","tween","shouldScheduleUpdate","processTweens","interpolate_1","scene_1","bezier_1","standard_easing_functions_1","String","tweenable","filters","from","to","position","linear","delay","current","assign","easingObject","composeEasingObject","_filters","length","setState","_currentState","_originalState","_targetState","_easing","doesApply","push","_applyFilter","interpolatedValues","tweenProps","constructor","tweenables","_tweenables","forEach","add","bind","promises","map","then","remove","index","indexOf","splice","empty","isPlaying","some","pause","resume","filter","hasEnded","stop","gotoEnd","freeze","easeInQuad","Math","pow","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","PI","easeOutSine","sin","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","sqrt","easeOutCirc","easeInOutCirc","easeOutBounce","easeInBack","s","easeOutBack","easeInOutBack","elastic","swingFromTo","swingFrom","swingTo","bounce","bouncePast","easeFromTo","easeFrom","easeTo","afterTween","beforeTween","tweenCreated","types_1","R_NUMBER_COMPONENT","R_FORMAT_CHUNKS","R_UNFORMATTED_VALUES","R_RGBA","number","source","comma","RegExp","R_RGBA_PREFIX","R_HEX","VALUE_PLACEHOLDER","getFormatChunksFrom","rawValues","prefix","_val","getFormatStringFrom","formattedString","chunks","match","charAt","unshift","join","hexToDec","hex","parseInt","convertHexToRGB","hexString","replace","r","g","b","split","substring","hexToRGBArray","filterStringChunks","pattern","unfilteredString","patternMatches","filteredString","sanitizeObjectForHexProps","stateObject","prop","currentProp","sanitizeRGBAChunk","rgbChunk","_a","_b","rgbaRawValues","rgbNumbers","slice","floor","Number","Error","getValuesFrom","extractPropertyChunks","chunkNames","extractedValues","chunkName","getValuesList","getFormattedValues","formatString","rawValue","toFixed","key","_tokenData","signatures","propertyName","property","getFormatSignatures","formatSignature","easingNames","defaultEasing","easingName","isEasingKey","expandEasingObject","state","formatSignatures","expandFormattedProperties","collapseFormattedProperties","firstEasing","collapseEasingObject","__setModuleDefault","v","__importStar","mod","result","scheduleUpdate","getListTail","getListHead","resetList","token","DEFAULT_EASING","UPDATE_TIME","window","AFTER_TWEEN","BEFORE_TWEEN","TYPE_STRING","TYPE_FUNCTION","scheduleFunction","requestAnimationFrame","setTimeout","webkitRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","mozCancelRequestAnimationFrame","mozRequestAnimationFrame","noop","listHead","listTail","forPosition","currentState","originalState","targetState","timestamp","start","easedPosition","normalizedPosition","easingFn","easingObjectProp","processTween","currentTime","_timestamp","_delay","_duration","endTime","timeToCompute","_hasEnded","offset","_render","_data","nextTweenToProcess","now","currentTween","_next","Date","isHeartbeatRunning","fromTweenParams","composedEasing","Array","isArray","previousTween","nextTween","_previous","defaultPromiseCtor","Promise","initialState","config","_config","_resolve","_reject","_start","_promiseCtor","_promise","_isPlaying","_pausedAtTime","setConfig","filterType","_resume","promise","finish","render","data","anyPropsAreStrings","onFulfilled","onRejected","resolve","reject","catch","onFinally","finally","wasRunning","Boolean","seek","millisecond","max","cancel","dispose","Symbol","toStringTag","setScheduleFunction","fn","doScheduleUpdate","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","globalThis","Function","e"],"sourceRoot":""}