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A,MACA,MACA,SACA,QACA,SACA,KACA,OACA,OACA,MACA,OACA,OACA,WACA,OACA,QACA,MACA,WACA,SACA,KACA,WACA,SACA,SACA,IACA,QACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,SACA,UACA,SACA,QACA,SACA,OACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,QACA,KACA,QACA,OACA,QACA,KACA,QACA,IACA,KACA,MACA,QACA,MAEA,SACA,WACA,OACA,UACA,gBACA,IACA,QACA,OACA,iBACA,OACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,MACA,OACA,SFxHkC,CAClC3iB,oBFOK,SAA6BvgB,EAAoBC,GACtD,IAAKD,EAASitB,WAAajtB,EAASmjC,aAClC,OAAO,EAGT,MAAMC,EACkB,WAAtBpjC,EAASqjC,UACRrjC,EAASgf,YAA+C,WAAjChf,EAASgf,WAAWqkB,UAExC,UACJC,EAAA,MACApjB,EAAA,SACAyC,EAAA,UACA4gB,EAAA,WACAC,EAAA,QACAC,GAEExjC,EADCyjC,GAAAzS,EAAAA,EAAAA,GACDhxB,EAAAixB,IAEE9rB,EAASxG,OAAOwG,OAAOs+B,GACvBC,EAAQ/kC,OAAOsJ,KAAKw7B,GAAY3jC,KAAI6B,GACxCwhC,GAAmBpjC,EAAS4jC,aAAahiC,GACrCA,EACA4zB,GAAe5zB,KACd4zB,GAAe5zB,GAAQA,EAAKgZ,QAC3B,YAEAmQ,GAAK,IAAMA,EAAE8Y,wBAIJ,IAAblhB,IACF3iB,EAAS8jC,YAAcnhB,GAIzB,IAAK,MAAM/gB,KAAQse,EACjB,GAAIA,EAAMhe,eAAeN,GAAO,CAC9B,MAAMjD,EAAQ22B,GAAoB1zB,EAAMse,EAAMte,IAC1CyzB,GAAe5lB,KAAK7N,GACtB5B,EAASkgB,MAAM6jB,YAAYniC,EAAMjD,GAEjCqB,EAASkgB,MAAMte,GAAQjD,CAE3B,CAIFglC,EAAMp+B,SAAQ,CAAC3D,EAAM4F,KACnBxH,EAASmjC,aAAavhC,EAAMwD,EAAOoC,GAAG,SAGtB,IAAd87B,IACFtjC,EAASsjC,UAAYA,QAEL,IAAdC,IACFvjC,EAASujC,UAAYA,QAEJ,IAAfC,IACFxjC,EAASwjC,WAAaA,QAER,IAAZC,GACFzjC,EAASmjC,aAAa,UAAWM,EAErC,EEtEEtjB,oBAAqBD,GAAS,IAAI2Y,GAAc3Y,GAEhDY,kBAAmBgP,IAAA,IAAC,UAAEyT,EAAA,WAAWC,GAAqB1T,EAAN,OAAAmB,EAAAA,EAAAA,GAAAnB,EAAAkU,GAAY,IAGjDvlB,GAAWY,GAAKZ,Q","sources":["../node_modules/react-side-effect/lib/index.js","../node_modules/react-sketch-canvas/node_modules/regenerator-runtime/runtime.js","../node_modules/@react-spring/rafz/src/index.ts","../node_modules/@react-spring/shared/src/globals.ts","../node_modules/@react-spring/shared/src/helpers.ts","../node_modules/@react-spring/shared/src/FrameLoop.ts","../node_modules/@react-spring/shared/src/clamp.ts","../node_modules/@react-spring/shared/src/colorMatchers.ts","../node_modules/@react-spring/shared/src/normalizeColor.ts","../node_modules/@react-spring/shared/src/colorToRgba.ts","../node_modules/@react-spring/shared/src/createInterpolator.ts","../node_modules/@react-spring/shared/src/easings.ts","../node_modules/@react-spring/shared/src/fluids.ts","../node_modules/@react-spring/shared/src/stringInterpolation.ts","../node_modules/@react-spring/shared/src/regexs.ts","../node_modules/@react-spring/shared/src/variableToRgba.ts","../node_modules/@react-spring/shared/src/deprecations.ts","../node_modules/@react-spring/shared/src/isAnimatedString.ts","../node_modules/@react-spring/shared/src/hooks/useIsomorphicLayoutEffect.ts","../node_modules/@react-spring/shared/src/hooks/useIsMounted.ts","../node_modules/@react-spring/shared/src/hooks/useForceUpdate.ts","../node_modules/@react-spring/shared/src/hooks/useOnce.ts","../node_modules/@react-spring/shared/src/hooks/usePrev.ts","../node_modules/@react-spring/shared/src/hooks/useReducedMotion.ts","../node_modules/@react-spring/animated/src/Animated.ts","../node_modules/@react-spring/animated/src/AnimatedValue.ts","../node_modules/@react-spring/animated/src/AnimatedString.ts","../node_modules/@react-spring/animated/src/context.ts","../node_modules/@react-spring/animated/src/AnimatedObject.ts","../node_modules/@react-spring/animated/src/AnimatedArray.ts","../node_modules/@react-spring/animated/src/getAnimatedType.ts","../node_modules/@react-spring/animated/src/withAnimated.tsx","../node_modules/@react-spring/animated/src/createHost.ts","../node_modules/@react-spring/core/src/helpers.ts","../node_modules/@react-spring/core/src/constants.ts","../node_modules/@react-spring/core/src/AnimationConfig.ts","../node_modules/@react-spring/core/src/Animation.ts","../node_modules/@react-spring/core/src/scheduleProps.ts","../node_modules/@react-spring/core/src/AnimationResult.ts","../node_modules/@react-spring/core/src/runAsync.ts","../node_modules/@react-spring/core/src/FrameValue.ts","../node_modules/@react-spring/core/src/SpringPhase.ts","../node_modules/@react-spring/core/src/SpringValue.ts","../node_modules/@react-spring/core/src/Controller.ts","../node_modules/@react-spring/core/src/SpringContext.tsx","../node_modules/@react-spring/shared/src/hooks/useMemoOne.ts","../node_modules/@react-spring/core/src/SpringRef.ts","../node_modules/@react-spring/core/src/hooks/useSprings.ts","../node_modules/@react-spring/core/src/Interpolation.ts","../node_modules/@react-spring/core/src/globals.ts","../node_modules/@react-spring/web/src/applyAnimatedValues.ts","../node_modules/@react-spring/web/src/AnimatedStyle.ts","../node_modules/@react-spring/web/src/index.ts","../node_modules/@react-spring/shared/src/colors.ts","../node_modules/@react-spring/web/src/primitives.ts"],"sourcesContent":["'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar React = require('react');\nvar React__default = _interopDefault(React);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n\n if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {\n throw new Error('Expected mapStateOnServer to either be undefined or a function.');\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n\n if (SideEffect.canUseDOM) {\n handleStateChangeOnClient(state);\n } else if (mapStateOnServer) {\n state = mapStateOnServer(state);\n }\n }\n\n var SideEffect =\n /*#__PURE__*/\n function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n // Expose canUseDOM so tests can monkeypatch it\n SideEffect.peek = function peek() {\n return state;\n };\n\n SideEffect.rewind = function rewind() {\n if (SideEffect.canUseDOM) {\n throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');\n }\n\n var recordedState = state;\n state = undefined;\n mountedInstances = [];\n return recordedState;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return React__default.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(React.PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n _defineProperty(SideEffect, \"canUseDOM\", canUseDOM);\n\n return SideEffect;\n };\n}\n\nmodule.exports = withSideEffect;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import type {\n FrameFn,\n FrameUpdateFn,\n NativeRaf,\n Rafz,\n Timeout,\n Throttled,\n} from './types'\n\nexport type { FrameFn, FrameUpdateFn, Timeout, Throttled, Rafz }\n\nlet updateQueue = makeQueue()\n\n/**\n * Schedule an update for next frame.\n * Your function can return `true` to repeat next frame.\n */\nexport const raf: Rafz = fn => schedule(fn, updateQueue)\n\nlet writeQueue = makeQueue()\nraf.write = fn => schedule(fn, writeQueue)\n\nlet onStartQueue = makeQueue()\nraf.onStart = fn => schedule(fn, onStartQueue)\n\nlet onFrameQueue = makeQueue()\nraf.onFrame = fn => schedule(fn, onFrameQueue)\n\nlet onFinishQueue = makeQueue()\nraf.onFinish = fn => schedule(fn, onFinishQueue)\n\nlet timeouts: Timeout[] = []\nraf.setTimeout = (handler, ms) => {\n const time = raf.now() + ms\n const cancel = () => {\n const i = timeouts.findIndex(t => t.cancel == cancel)\n if (~i) timeouts.splice(i, 1)\n pendingCount -= ~i ? 1 : 0\n }\n\n const timeout: Timeout = { time, handler, cancel }\n timeouts.splice(findTimeout(time), 0, timeout)\n pendingCount += 1\n\n start()\n return timeout\n}\n\n/** Find the index where the given time is not greater. */\nconst findTimeout = (time: number) =>\n ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length)\n\nraf.cancel = fn => {\n onStartQueue.delete(fn)\n onFrameQueue.delete(fn)\n onFinishQueue.delete(fn)\n updateQueue.delete(fn)\n writeQueue.delete(fn)\n}\n\nraf.sync = fn => {\n sync = true\n raf.batchedUpdates(fn)\n sync = false\n}\n\nraf.throttle = fn => {\n let lastArgs: any\n function queuedFn() {\n try {\n fn(...lastArgs)\n } finally {\n lastArgs = null\n }\n }\n function throttled(...args: any) {\n lastArgs = args\n raf.onStart(queuedFn)\n }\n throttled.handler = fn\n throttled.cancel = () => {\n onStartQueue.delete(queuedFn)\n lastArgs = null\n }\n return throttled as any\n}\n\nlet nativeRaf =\n typeof window != 'undefined'\n ? (window.requestAnimationFrame as NativeRaf)\n : // eslint-disable-next-line @typescript-eslint/no-empty-function\n () => {}\n\nraf.use = impl => (nativeRaf = impl)\nraf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now\nraf.batchedUpdates = fn => fn()\nraf.catch = console.error\n\nraf.frameLoop = 'always'\n\nraf.advance = () => {\n if (raf.frameLoop !== 'demand') {\n console.warn(\n 'Cannot call the manual advancement of rafz whilst frameLoop is not set as demand'\n )\n } else {\n update()\n }\n}\n\n/** The most recent timestamp. */\nlet ts = -1\n\n/** The number of pending tasks */\nlet pendingCount = 0\n\n/** When true, scheduling is disabled. */\nlet sync = false\n\nfunction schedule(fn: T, queue: Queue) {\n if (sync) {\n queue.delete(fn)\n fn(0)\n } else {\n queue.add(fn)\n start()\n }\n}\n\nfunction start() {\n if (ts < 0) {\n ts = 0\n if (raf.frameLoop !== 'demand') {\n nativeRaf(loop)\n }\n }\n}\n\nfunction stop() {\n ts = -1\n}\n\nfunction loop() {\n if (~ts) {\n nativeRaf(loop)\n raf.batchedUpdates(update)\n }\n}\n\nfunction update() {\n const prevTs = ts\n ts = raf.now()\n\n // Flush timeouts whose time is up.\n const count = findTimeout(ts)\n if (count) {\n eachSafely(timeouts.splice(0, count), t => t.handler())\n pendingCount -= count\n }\n\n if (!pendingCount) {\n stop()\n\n return\n }\n\n onStartQueue.flush()\n updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667)\n onFrameQueue.flush()\n writeQueue.flush()\n onFinishQueue.flush()\n}\n\ninterface Queue {\n add: (fn: T) => void\n delete: (fn: T) => boolean\n flush: (arg?: any) => void\n}\n\nfunction makeQueue(): Queue {\n let next = new Set()\n let current = next\n return {\n add(fn) {\n pendingCount += current == next && !next.has(fn) ? 1 : 0\n next.add(fn)\n },\n delete(fn) {\n pendingCount -= current == next && next.has(fn) ? 1 : 0\n return next.delete(fn)\n },\n flush(arg) {\n if (current.size) {\n next = new Set()\n pendingCount -= current.size\n eachSafely(current, fn => fn(arg) && next.add(fn))\n pendingCount += next.size\n current = next\n }\n },\n }\n}\n\ninterface Eachable {\n forEach(cb: (value: T) => void): void\n}\n\nfunction eachSafely(values: Eachable, each: (value: T) => void) {\n values.forEach(value => {\n try {\n each(value)\n } catch (e) {\n raf.catch(e as Error)\n }\n })\n}\n\n/** Tree-shakable state for testing purposes */\nexport const __raf = {\n /** The number of pending tasks */\n count(): number {\n return pendingCount\n },\n /** Whether there's a raf update loop running */\n isRunning(): boolean {\n return ts >= 0\n },\n /** Clear internal state. Never call from update loop! */\n clear() {\n ts = -1\n timeouts = []\n onStartQueue = makeQueue()\n updateQueue = makeQueue()\n onFrameQueue = makeQueue()\n writeQueue = makeQueue()\n onFinishQueue = makeQueue()\n pendingCount = 0\n },\n}\n","import { raf, Rafz } from '@react-spring/rafz'\nimport {\n OneOrMore,\n InterpolatorConfig,\n InterpolatorArgs,\n} from '@react-spring/types'\n\nimport { FluidValue } from './fluids'\nimport type { OpaqueAnimation } from './FrameLoop'\nimport { noop } from './helpers'\n\n//\n// Required\n//\n\nexport let createStringInterpolator: (\n config: InterpolatorConfig\n) => (input: number) => string\n\n//\n// Optional\n//\n\nexport let to: (\n source: OneOrMore,\n args: InterpolatorArgs\n) => FluidValue\n\nexport let colors = null as { [key: string]: number } | null\n\nexport let skipAnimation = false as boolean\n\nexport let willAdvance: (animation: OpaqueAnimation) => void = noop\n\n//\n// Configuration\n//\n\nexport interface AnimatedGlobals {\n /** Returns a new `Interpolation` object */\n to?: typeof to\n /** Used to measure frame length. Read more [here](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) */\n now?: typeof raf.now\n /** Provide custom color names for interpolation */\n colors?: typeof colors\n /** Make all animations instant and skip the frameloop entirely */\n skipAnimation?: typeof skipAnimation\n /** Provide custom logic for string interpolation */\n createStringInterpolator?: typeof createStringInterpolator\n /** Schedule a function to run on the next frame */\n requestAnimationFrame?: (cb: () => void) => void\n /** Event props are called with `batchedUpdates` to reduce extraneous renders */\n batchedUpdates?: typeof raf.batchedUpdates\n /** @internal Exposed for testing purposes */\n willAdvance?: typeof willAdvance\n /** sets the global frameLoop setting for the global raf instance */\n frameLoop?: Rafz['frameLoop']\n}\n\nexport const assign = (globals: AnimatedGlobals) => {\n if (globals.to) to = globals.to\n if (globals.now) raf.now = globals.now\n if (globals.colors !== undefined) colors = globals.colors\n if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation\n if (globals.createStringInterpolator)\n createStringInterpolator = globals.createStringInterpolator\n if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame)\n if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates\n if (globals.willAdvance) willAdvance = globals.willAdvance\n if (globals.frameLoop) raf.frameLoop = globals.frameLoop\n}\n","import { Lookup, Arrify, AnyFn, Any } from '@react-spring/types'\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() {}\n\nexport const defineHidden = (obj: any, key: any, value: any) =>\n Object.defineProperty(obj, key, { value, writable: true, configurable: true })\n\ntype IsType = (arg: T & any) => arg is Narrow\ntype Narrow = [T] extends [Any] ? U : [T] extends [U] ? Extract : U\n\ntype PlainObject = Exclude\n\nexport const is = {\n arr: Array.isArray as IsType,\n obj: (a: T & any): a is PlainObject =>\n !!a && a.constructor.name === 'Object',\n fun: ((a: unknown) => typeof a === 'function') as IsType,\n str: (a: unknown): a is string => typeof a === 'string',\n num: (a: unknown): a is number => typeof a === 'number',\n und: (a: unknown): a is undefined => a === undefined,\n}\n\n/** Compare animatable values */\nexport function isEqual(a: any, b: any) {\n if (is.arr(a)) {\n if (!is.arr(b) || a.length !== b.length) return false\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false\n }\n return true\n }\n return a === b\n}\n\ntype EachFn = (this: This, value: Value, key: Key) => void\ntype Eachable = {\n forEach(cb: EachFn, ctx?: This): void\n}\n\n/** Minifiable `.forEach` call */\nexport const each = (\n obj: Eachable,\n fn: EachFn\n) => obj.forEach(fn)\n\n/** Iterate the properties of an object */\nexport function eachProp(\n obj: T,\n fn: (\n this: This,\n value: T extends any[] ? T[number] : T[keyof T],\n key: string\n ) => void,\n ctx?: This\n) {\n if (is.arr(obj)) {\n for (let i = 0; i < obj.length; i++) {\n fn.call(ctx as any, obj[i] as any, `${i}`)\n }\n return\n }\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n fn.call(ctx as any, obj[key] as any, key)\n }\n }\n}\n\nexport const toArray = (a: T): Arrify> =>\n is.und(a) ? [] : is.arr(a) ? (a as any) : [a]\n\n/** Copy the `queue`, then iterate it after the `queue` is cleared */\nexport function flush(\n queue: Map,\n iterator: (entry: [P, T]) => void\n): void\nexport function flush(queue: Set, iterator: (value: T) => void): void\nexport function flush(queue: any, iterator: any) {\n if (queue.size) {\n const items = Array.from(queue)\n queue.clear()\n each(items, iterator)\n }\n}\n\n/** Call every function in the queue with the same arguments. */\nexport const flushCalls = (\n queue: Set,\n ...args: Parameters\n) => flush(queue, fn => fn(...args))\n\n// For server-side rendering: https://github.com/react-spring/zustand/pull/34\n// Deno support: https://github.com/pmndrs/zustand/issues/347\n\nexport const isSSR = () =>\n typeof window === 'undefined' ||\n !window.navigator ||\n /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent)\n","import { raf } from '@react-spring/rafz'\nimport * as G from './globals'\n\nexport interface OpaqueAnimation {\n idle: boolean\n priority: number\n advance(dt: number): void\n}\n\n// Animations starting on the next frame\nconst startQueue = new Set()\n\n// The animations being updated in the current frame, sorted by lowest\n// priority first. These two arrays are swapped at the end of each frame.\nlet currentFrame: OpaqueAnimation[] = []\nlet prevFrame: OpaqueAnimation[] = []\n\n// The priority of the currently advancing animation.\n// To protect against a race condition whenever a frame is being processed,\n// where the filtering of `animations` is corrupted with a shifting index,\n// causing animations to potentially advance 2x faster than intended.\nlet priority = 0\n\n/**\n * The frameloop executes its animations in order of lowest priority first.\n * Animations are retained until idle.\n */\nexport const frameLoop = {\n get idle() {\n return !startQueue.size && !currentFrame.length\n },\n\n /** Advance the given animation on every frame until idle. */\n start(animation: OpaqueAnimation) {\n // An animation can be added while a frame is being processed,\n // unless its priority is lower than the animation last updated.\n if (priority > animation.priority) {\n startQueue.add(animation)\n raf.onStart(flushStartQueue)\n } else {\n startSafely(animation)\n raf(advance)\n }\n },\n\n /** Advance all animations by the given time. */\n advance,\n\n /** Call this when an animation's priority changes. */\n sort(animation: OpaqueAnimation) {\n if (priority) {\n raf.onFrame(() => frameLoop.sort(animation))\n } else {\n const prevIndex = currentFrame.indexOf(animation)\n if (~prevIndex) {\n currentFrame.splice(prevIndex, 1)\n startUnsafely(animation)\n }\n }\n },\n\n /**\n * Clear all animations. For testing purposes.\n *\n * ☠️ Never call this from within the frameloop.\n */\n clear() {\n currentFrame = []\n startQueue.clear()\n },\n}\n\nfunction flushStartQueue() {\n startQueue.forEach(startSafely)\n startQueue.clear()\n raf(advance)\n}\n\nfunction startSafely(animation: OpaqueAnimation) {\n if (!currentFrame.includes(animation)) startUnsafely(animation)\n}\n\nfunction startUnsafely(animation: OpaqueAnimation) {\n currentFrame.splice(\n findIndex(currentFrame, other => other.priority > animation.priority),\n 0,\n animation\n )\n}\n\nfunction advance(dt: number) {\n const nextFrame = prevFrame\n\n for (let i = 0; i < currentFrame.length; i++) {\n const animation = currentFrame[i]\n priority = animation.priority\n\n // Animations may go idle before advancing.\n if (!animation.idle) {\n G.willAdvance(animation)\n animation.advance(dt)\n if (!animation.idle) {\n nextFrame.push(animation)\n }\n }\n }\n priority = 0\n\n // Reuse the `currentFrame` array to avoid garbage collection.\n prevFrame = currentFrame\n prevFrame.length = 0\n\n // Set `currentFrame` for next frame, so the `start` function\n // adds new animations to the proper array.\n currentFrame = nextFrame\n\n return currentFrame.length > 0\n}\n\n/** Like `Array.prototype.findIndex` but returns `arr.length` instead of `-1` */\nfunction findIndex(arr: T[], test: (value: T) => boolean) {\n const index = arr.findIndex(test)\n return index < 0 ? arr.length : index\n}\n","export const clamp = (min: number, max: number, v: number) =>\n Math.min(Math.max(v, min), max)\n","// const INTEGER = '[-+]?\\\\d+';\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+'\nconst PERCENTAGE = NUMBER + '%'\n\nfunction call(...parts: string[]) {\n return '\\\\(\\\\s*(' + parts.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)'\n}\n\nexport const rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER))\nexport const rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER))\nexport const hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE))\nexport const hsla = new RegExp(\n 'hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)\n)\nexport const hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/\nexport const hex4 =\n /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/\nexport const hex6 = /^#([0-9a-fA-F]{6})$/\nexport const hex8 = /^#([0-9a-fA-F]{8})$/\n","/*\nhttps://github.com/react-community/normalize-css-color\n\nBSD 3-Clause License\n\nCopyright (c) 2016, React Community\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* 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* Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nimport * as matchers from './colorMatchers'\nimport * as G from './globals'\n\nexport function normalizeColor(color: number | string) {\n let match\n\n if (typeof color === 'number') {\n return color >>> 0 === color && color >= 0 && color <= 0xffffffff\n ? color\n : null\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color)))\n return parseInt(match[1] + 'ff', 16) >>> 0\n\n if (G.colors && G.colors[color] !== undefined) {\n return G.colors[color]\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) | // b\n 0x000000ff) >>> // a\n 0\n )\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n ((parse255(match[1]) << 24) | // r\n (parse255(match[2]) << 16) | // g\n (parse255(match[3]) << 8) | // b\n parse1(match[4])) >>> // a\n 0\n )\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n 'ff', // a\n 16\n ) >>> 0\n )\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) return parseInt(match[1], 16) >>> 0\n\n if ((match = matchers.hex4.exec(color))) {\n return (\n parseInt(\n match[1] +\n match[1] + // r\n match[2] +\n match[2] + // g\n match[3] +\n match[3] + // b\n match[4] +\n match[4], // a\n 16\n ) >>> 0\n )\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff) >>> // a\n 0\n )\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n (hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4])) >>> // a\n 0\n )\n }\n return null\n}\n\nfunction hue2rgb(p: number, q: number, t: number) {\n if (t < 0) t += 1\n if (t > 1) t -= 1\n if (t < 1 / 6) return p + (q - p) * 6 * t\n if (t < 1 / 2) return q\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\n return p\n}\n\nfunction hslToRgb(h: number, s: number, l: number) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s\n const p = 2 * l - q\n const r = hue2rgb(p, q, h + 1 / 3)\n const g = hue2rgb(p, q, h)\n const b = hue2rgb(p, q, h - 1 / 3)\n return (\n (Math.round(r * 255) << 24) |\n (Math.round(g * 255) << 16) |\n (Math.round(b * 255) << 8)\n )\n}\n\nfunction parse255(str: string) {\n const int = parseInt(str, 10)\n if (int < 0) return 0\n if (int > 255) return 255\n return int\n}\n\nfunction parse360(str: string) {\n const int = parseFloat(str)\n return (((int % 360) + 360) % 360) / 360\n}\n\nfunction parse1(str: string) {\n const num = parseFloat(str)\n if (num < 0) return 0\n if (num > 1) return 255\n return Math.round(num * 255)\n}\n\nfunction parsePercentage(str: string) {\n // parseFloat conveniently ignores the final %\n const int = parseFloat(str)\n if (int < 0) return 0\n if (int > 100) return 1\n return int / 100\n}\n","import { normalizeColor } from './normalizeColor'\n\nexport function colorToRgba(input: string) {\n let int32Color = normalizeColor(input)\n if (int32Color === null) return input\n int32Color = int32Color || 0\n const r = (int32Color & 0xff000000) >>> 24\n const g = (int32Color & 0x00ff0000) >>> 16\n const b = (int32Color & 0x0000ff00) >>> 8\n const a = (int32Color & 0x000000ff) / 255\n return `rgba(${r}, ${g}, ${b}, ${a})`\n}\n","import * as G from './globals'\nimport { is } from './helpers'\nimport {\n Animatable,\n InterpolatorFn,\n EasingFunction,\n ExtrapolateType,\n InterpolatorConfig,\n InterpolatorFactory,\n} from '@react-spring/types'\n\nexport const createInterpolator: InterpolatorFactory = (\n range: readonly number[] | InterpolatorFn | InterpolatorConfig,\n output?: readonly Animatable[],\n extrapolate?: ExtrapolateType\n) => {\n if (is.fun(range)) {\n return range\n }\n\n if (is.arr(range)) {\n return createInterpolator({\n range,\n output: output!,\n extrapolate,\n })\n }\n\n if (is.str(range.output[0])) {\n return G.createStringInterpolator(range as any) as any\n }\n\n const config = range as InterpolatorConfig\n const outputRange = config.output\n const inputRange = config.range || [0, 1]\n\n const extrapolateLeft =\n config.extrapolateLeft || config.extrapolate || 'extend'\n const extrapolateRight =\n config.extrapolateRight || config.extrapolate || 'extend'\n const easing = config.easing || (t => t)\n\n return (input: number) => {\n const range = findRange(input, inputRange)\n return interpolate(\n input,\n inputRange[range],\n inputRange[range + 1],\n outputRange[range],\n outputRange[range + 1],\n easing,\n extrapolateLeft,\n extrapolateRight,\n config.map\n )\n }\n}\n\nfunction interpolate(\n input: number,\n inputMin: number,\n inputMax: number,\n outputMin: number,\n outputMax: number,\n easing: EasingFunction,\n extrapolateLeft: ExtrapolateType,\n extrapolateRight: ExtrapolateType,\n map?: (x: number) => number\n) {\n let result = map ? map(input) : input\n // Extrapolate\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') return result\n else if (extrapolateLeft === 'clamp') result = inputMin\n }\n if (result > inputMax) {\n if (extrapolateRight === 'identity') return result\n else if (extrapolateRight === 'clamp') result = inputMax\n }\n if (outputMin === outputMax) return outputMin\n if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax\n // Input Range\n if (inputMin === -Infinity) result = -result\n else if (inputMax === Infinity) result = result - inputMin\n else result = (result - inputMin) / (inputMax - inputMin)\n // Easing\n result = easing(result)\n // Output Range\n if (outputMin === -Infinity) result = -result\n else if (outputMax === Infinity) result = result + outputMin\n else result = result * (outputMax - outputMin) + outputMin\n return result\n}\n\nfunction findRange(input: number, inputRange: readonly number[]) {\n // eslint-disable-next-line no-var\n for (var i = 1; i < inputRange.length - 1; ++i)\n if (inputRange[i] >= input) break\n return i - 1\n}\n","import { EasingFunction } from '@react-spring/types'\n\nimport { clamp } from './clamp'\n\nexport type Direction = 'start' | 'end'\n\ntype StepsEasing = (steps: number, direction?: Direction) => EasingFunction\n\nconst steps: StepsEasing =\n (steps: number, direction: Direction = 'end') =>\n (progress: number) => {\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 =\n direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded)\n\n return clamp(0, 1, rounded / steps)\n }\n\n/**\n * With thanks to ai easings.net\n * https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts\n */\ninterface EasingDictionary {\n linear: (t: number) => number\n easeInQuad: (t: number) => number\n easeOutQuad: (t: number) => number\n easeInOutQuad: (t: number) => number\n easeInCubic: (t: number) => number\n easeOutCubic: (t: number) => number\n easeInOutCubic: (t: number) => number\n easeInQuart: (t: number) => number\n easeOutQuart: (t: number) => number\n easeInOutQuart: (t: number) => number\n easeInQuint: (t: number) => number\n easeOutQuint: (t: number) => number\n easeInOutQuint: (t: number) => number\n easeInSine: (t: number) => number\n easeOutSine: (t: number) => number\n easeInOutSine: (t: number) => number\n easeInExpo: (t: number) => number\n easeOutExpo: (t: number) => number\n easeInOutExpo: (t: number) => number\n easeInCirc: (t: number) => number\n easeOutCirc: (t: number) => number\n easeInOutCirc: (t: number) => number\n easeInBack: (t: number) => number\n easeOutBack: (t: number) => number\n easeInOutBack: (t: number) => number\n easeInElastic: (t: number) => number\n easeOutElastic: (t: number) => number\n easeInOutElastic: (t: number) => number\n easeInBounce: (t: number) => number\n easeOutBounce: (t: number) => number\n easeInOutBounce: (t: number) => number\n steps: StepsEasing\n}\n\nconst c1 = 1.70158\nconst c2 = c1 * 1.525\nconst c3 = c1 + 1\nconst c4 = (2 * Math.PI) / 3\nconst c5 = (2 * Math.PI) / 4.5\n\nconst bounceOut: EasingFunction = x => {\n const n1 = 7.5625\n const d1 = 2.75\n\n if (x < 1 / d1) {\n return n1 * x * x\n } else if (x < 2 / d1) {\n return n1 * (x -= 1.5 / d1) * x + 0.75\n } else if (x < 2.5 / d1) {\n return n1 * (x -= 2.25 / d1) * x + 0.9375\n } else {\n return n1 * (x -= 2.625 / d1) * x + 0.984375\n }\n}\n\nexport const easings: EasingDictionary = {\n linear: x => x,\n easeInQuad: x => x * x,\n easeOutQuad: x => 1 - (1 - x) * (1 - x),\n easeInOutQuad: x => (x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2),\n easeInCubic: x => x * x * x,\n easeOutCubic: x => 1 - Math.pow(1 - x, 3),\n easeInOutCubic: x =>\n x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,\n easeInQuart: x => x * x * x * x,\n easeOutQuart: x => 1 - Math.pow(1 - x, 4),\n easeInOutQuart: x =>\n x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,\n easeInQuint: x => x * x * x * x * x,\n easeOutQuint: x => 1 - Math.pow(1 - x, 5),\n easeInOutQuint: x =>\n x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,\n easeInSine: x => 1 - Math.cos((x * Math.PI) / 2),\n easeOutSine: x => Math.sin((x * Math.PI) / 2),\n easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2,\n easeInExpo: x => (x === 0 ? 0 : Math.pow(2, 10 * x - 10)),\n easeOutExpo: x => (x === 1 ? 1 : 1 - Math.pow(2, -10 * x)),\n easeInOutExpo: x =>\n x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? Math.pow(2, 20 * x - 10) / 2\n : (2 - Math.pow(2, -20 * x + 10)) / 2,\n easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)),\n easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)),\n easeInOutCirc: x =>\n x < 0.5\n ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2\n : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,\n easeInBack: x => c3 * x * x * x - c1 * x * x,\n easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),\n easeInOutBack: x =>\n x < 0.5\n ? (Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2)) / 2\n : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,\n easeInElastic: x =>\n x === 0\n ? 0\n : x === 1\n ? 1\n : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),\n easeOutElastic: x =>\n x === 0\n ? 0\n : x === 1\n ? 1\n : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,\n easeInOutElastic: x =>\n x === 0\n ? 0\n : x === 1\n ? 1\n : x < 0.5\n ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2\n : (Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5)) / 2 +\n 1,\n easeInBounce: x => 1 - bounceOut(1 - x),\n easeOutBounce: bounceOut,\n easeInOutBounce: x =>\n x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,\n steps,\n} as const\n","/**\n * MIT License\n * Copyright (c) Alec Larson\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nconst $get = Symbol.for('FluidValue.get')\nconst $observers = Symbol.for('FluidValue.observers')\n\nexport {\n FluidValue,\n hasFluidValue,\n getFluidValue,\n getFluidObservers,\n callFluidObserver,\n callFluidObservers,\n // Mutations\n setFluidGetter,\n addFluidObserver,\n removeFluidObserver,\n}\n\n/** Returns true if `arg` can be observed. */\nconst hasFluidValue = (arg: any): arg is FluidValue => Boolean(arg && arg[$get])\n\n/**\n * Get the current value.\n * If `arg` is not observable, `arg` is returned.\n */\nconst getFluidValue: GetFluidValue = (arg: any) =>\n arg && arg[$get] ? arg[$get]() : arg\n\n/** Get the current observer set. Never mutate it directly! */\nconst getFluidObservers: GetFluidObservers = (target: any) =>\n target[$observers] || null\n\n/** Send an event to an observer. */\nfunction callFluidObserver(\n observer: FluidObserver,\n event: E\n): void\n\nfunction callFluidObserver(observer: any, event: FluidEvent) {\n if (observer.eventObserved) {\n observer.eventObserved(event)\n } else {\n observer(event)\n }\n}\n\n/** Send an event to all observers. */\nfunction callFluidObservers(\n target: FluidValue,\n event: E\n): void\n\nfunction callFluidObservers(target: object, event: FluidEvent): void\n\nfunction callFluidObservers(target: any, event: FluidEvent) {\n const observers: Set = target[$observers]\n if (observers) {\n observers.forEach(observer => {\n callFluidObserver(observer, event)\n })\n }\n}\n\ntype GetFluidValue = {\n (target: T | FluidValue): Exclude | U\n}\n\ntype GetFluidObservers = {\n (\n target: FluidValue\n ): ReadonlySet> | null\n (target: object): ReadonlySet | null\n}\n\n/** An event sent to `FluidObserver` objects. */\nexport interface FluidEvent {\n type: string\n parent: FluidValue\n}\n\n/**\n * Extend this class for automatic TypeScript support when passing this\n * value to `fluids`-compatible libraries.\n */\nabstract class FluidValue = any> {\n // @ts-expect-error (TS 4.4)\n private [$get]: () => T\n // @ts-expect-error (TS 4.4)\n private [$observers]?: Set>\n\n constructor(get?: () => T) {\n if (!get && !(get = this.get)) {\n throw Error('Unknown getter')\n }\n setFluidGetter(this, get)\n }\n\n /** Get the current value. */\n protected get?(): T\n /** Called after an observer is added. */\n protected observerAdded?(count: number, observer: FluidObserver): void\n /** Called after an observer is removed. */\n protected observerRemoved?(count: number, observer: FluidObserver): void\n}\n\n/** An observer of `FluidValue` objects. */\nexport type FluidObserver =\n | { eventObserved(event: E): void }\n | { (event: E): void }\n\n/** Add the `FluidValue` type to every property. */\nexport type FluidProps = T extends object\n ? { [P in keyof T]: T[P] | FluidValue> }\n : unknown\n\n/** Remove the `FluidValue` type from every property. */\nexport type StaticProps = {\n [P in keyof T]: T[P] extends FluidValue ? U : T[P]\n}\n\n/** Define the getter called by `getFluidValue`. */\nconst setFluidGetter = (target: object, get: () => any) =>\n setHidden(target, $get, get)\n\n/** Observe a `fluids`-compatible object. */\nfunction addFluidObserver(\n target: FluidValue,\n observer: FluidObserver\n): typeof observer\n\nfunction addFluidObserver(\n target: object,\n observer: FluidObserver\n): typeof observer\n\nfunction addFluidObserver(target: any, observer: FluidObserver) {\n if (target[$get]) {\n let observers: Set = target[$observers]\n if (!observers) {\n setHidden(target, $observers, (observers = new Set()))\n }\n if (!observers.has(observer)) {\n observers.add(observer)\n if (target.observerAdded) {\n target.observerAdded(observers.size, observer)\n }\n }\n }\n return observer\n}\n\n/** Stop observing a `fluids`-compatible object. */\nfunction removeFluidObserver(\n target: FluidValue,\n observer: FluidObserver\n): void\n\nfunction removeFluidObserver(\n target: object,\n observer: FluidObserver\n): void\n\nfunction removeFluidObserver(target: any, observer: FluidObserver) {\n const observers: Set = target[$observers]\n if (observers && observers.has(observer)) {\n const count = observers.size - 1\n if (count) {\n observers.delete(observer)\n } else {\n target[$observers] = null\n }\n if (target.observerRemoved) {\n target.observerRemoved(count, observer)\n }\n }\n}\n\nconst setHidden = (target: any, key: any, value: any) =>\n Object.defineProperty(target, key, {\n value,\n writable: true,\n configurable: true,\n })\n","import { InterpolatorConfig } from '@react-spring/types'\n\nimport { getFluidValue } from './fluids'\nimport { createInterpolator } from './createInterpolator'\nimport { colorToRgba } from './colorToRgba'\nimport * as G from './globals'\nimport {\n cssVariableRegex,\n colorRegex,\n unitRegex,\n numberRegex,\n rgbaRegex,\n} from './regexs'\nimport { variableToRgba } from './variableToRgba'\n\n// Covers color names (transparent, blue, etc.)\nlet namedColorRegex: RegExp\n\n// rgba requires that the r,g,b are integers.... so we want to round them,\n// but we *dont* want to round the opacity (4th column).\nconst rgbaRound = (_: any, p1: number, p2: number, p3: number, p4: number) =>\n `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`\n\n/**\n * Supports string shapes by extracting numbers so new values can be computed,\n * and recombines those values into new strings of the same shape. Supports\n * things like:\n *\n * \"rgba(123, 42, 99, 0.36)\" // colors\n * \"-45deg\" // values with units\n * \"0 2px 2px 0px rgba(0, 0, 0, 0.12)\" // CSS box-shadows\n * \"rotate(0deg) translate(2px, 3px)\" // CSS transforms\n */\nexport const createStringInterpolator = (\n config: InterpolatorConfig\n) => {\n if (!namedColorRegex)\n namedColorRegex = G.colors\n ? // match color names, ignore partial matches\n new RegExp(`(${Object.keys(G.colors).join('|')})(?!\\\\w)`, 'g')\n : // never match\n /^\\b$/\n\n // Convert colors to rgba(...)\n const output = config.output.map(value => {\n return getFluidValue(value)\n .replace(cssVariableRegex, variableToRgba)\n .replace(colorRegex, colorToRgba)\n .replace(namedColorRegex, colorToRgba)\n })\n\n // Convert [\"1px 2px\", \"0px 0px\"] into [[1, 2], [0, 0]]\n const keyframes = output.map(value => value.match(numberRegex)!.map(Number))\n\n // Convert [\"1px 2px\", \"0px 0px\"] into [[1, 0], [2, 0]]\n const outputRanges = keyframes[0].map((_, i) =>\n keyframes.map(values => {\n if (!(i in values)) {\n throw Error('The arity of each \"output\" value must be equal')\n }\n return values[i]\n })\n )\n\n // Create an interpolator for each animated number\n const interpolators = outputRanges.map(output =>\n createInterpolator({ ...config, output })\n )\n\n // Use the first `output` as a template for each call\n return (input: number) => {\n // Convert numbers to units if available (allows for [\"0\", \"100%\"])\n const missingUnit =\n !unitRegex.test(output[0]) &&\n output.find(value => unitRegex.test(value))?.replace(numberRegex, '')\n\n let i = 0\n return output[0]\n .replace(\n numberRegex,\n () => `${interpolators[i++](input)}${missingUnit || ''}`\n )\n .replace(rgbaRegex, rgbaRound)\n }\n}\n","// Problem: https://github.com/animatedjs/animated/pull/102\n// Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662\nexport const numberRegex = /[+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g\n\n// Covers rgb, rgba, hsl, hsla\n// Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e\nexport const colorRegex =\n /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d\\.]+%?\\))/gi\n\n// Gets numbers with units when specified\nexport const unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i')\n\n// get values of rgba string\nexport const rgbaRegex =\n /rgba\\(([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+)\\)/gi\n\n/**\n * Parse special CSS variable format into a CSS token and a fallback.\n *\n * ```\n * `var(--foo, #fff)` => [`--foo`, '#fff']\n * ```\n *\n */\nexport const cssVariableRegex =\n /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/\n","import { isSSR } from './helpers'\nimport { cssVariableRegex } from './regexs'\n\n/**\n * takes a CSS variable and attempts\n * to turn it into a RGBA value\n *\n * ```\n * 'var(--white)' => 'rgba(255,255,255,1)'\n * ```\n *\n * @param input string\n * @returns string\n */\nexport const variableToRgba = (input: string): string => {\n const [token, fallback] = parseCSSVariable(input)\n\n if (!token || isSSR()) {\n return input\n }\n\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(token)\n\n if (value) {\n /**\n * We have a valid variable returned\n * trim and return\n */\n return value.trim()\n } else if (fallback && fallback.startsWith('--')) {\n /**\n * fallback is something like --my-variable\n * so we try get property value\n */\n const value = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(fallback)\n\n /**\n * if it exists, return else nothing was found so just return the input\n */\n if (value) {\n return value\n } else {\n return input\n }\n } else if (fallback && cssVariableRegex.test(fallback)) {\n /**\n * We have a fallback and it's another CSS variable\n */\n return variableToRgba(fallback)\n } else if (fallback) {\n /**\n * We have a fallback and it's not a CSS variable\n */\n return fallback\n }\n\n /**\n * Nothing worked so just return the input\n * like our other FluidValue replace functions do\n */\n return input\n}\n\nconst parseCSSVariable = (current: string) => {\n const match = cssVariableRegex.exec(current)\n if (!match) return [,]\n\n const [, token, fallback] = match\n return [token, fallback]\n}\n","declare const console: any\n\nexport const prefix = 'react-spring: '\n\nexport const once = any>(fn: TFunc) => {\n const func = fn\n let called = false\n\n if (typeof func != 'function') {\n throw new TypeError(`${prefix}once requires a function parameter`)\n }\n\n return (...args: any) => {\n if (!called) {\n func(...args)\n called = true\n }\n }\n}\n\nconst warnInterpolate = once(console.warn)\nexport function deprecateInterpolate() {\n warnInterpolate(\n `${prefix}The \"interpolate\" function is deprecated in v9 (use \"to\" instead)`\n )\n}\n\nconst warnDirectCall = once(console.warn)\nexport function deprecateDirectCall() {\n warnDirectCall(\n `${prefix}Directly calling start instead of using the api object is deprecated in v9 (use \".start\" instead), this will be removed in later 0.X.0 versions`\n )\n}\n","import * as G from './globals'\nimport { is, isSSR } from './helpers'\nimport { cssVariableRegex } from './regexs'\n\n// Not all strings can be animated (eg: {display: \"none\"})\nexport function isAnimatedString(value: unknown): value is string {\n return (\n is.str(value) &&\n (value[0] == '#' ||\n /\\d/.test(value) ||\n // Do not identify a CSS variable as an AnimatedString if its SSR\n (!isSSR() && cssVariableRegex.test(value)) ||\n value in (G.colors || {}))\n )\n}\n","import { useEffect, useLayoutEffect } from 'react'\n\nimport { isSSR } from '../helpers'\n\n/**\n * Use this to read layout from the DOM and synchronously\n * re-render if the isSSR returns true. Updates scheduled\n * inside `useIsomorphicLayoutEffect` will be flushed\n * synchronously in the browser, before the browser has\n * a chance to paint.\n */\nexport const useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect\n","import { useRef } from 'react'\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'\n\nexport const useIsMounted = () => {\n const isMounted = useRef(false)\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n","import { useState } from 'react'\nimport { useIsMounted } from './useIsMounted'\n\n/** Return a function that re-renders this component, if still mounted */\nexport function useForceUpdate() {\n const update = useState()[1]\n const isMounted = useIsMounted()\n return () => {\n if (isMounted.current) {\n update(Math.random())\n }\n }\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport { useEffect, EffectCallback } from 'react'\n\nexport const useOnce = (effect: EffectCallback) => useEffect(effect, emptyDeps)\n\nconst emptyDeps: any[] = []\n","import { useEffect, useRef } from 'react'\n\n/** Use a value from the previous render */\nexport function usePrev(value: T): T | undefined {\n const prevRef = useRef()\n useEffect(() => {\n prevRef.current = value\n })\n return prevRef.current\n}\n","import { useState } from 'react'\n\nimport { assign } from '../globals'\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'\n\n/**\n * Returns `boolean` or `null`, used to automatically\n * set skipAnimations to the value of the user's\n * `prefers-reduced-motion` query.\n *\n * The return value, post-effect, is the value of their prefered setting\n */\nexport const useReducedMotion = () => {\n const [reducedMotion, setReducedMotion] = useState(null)\n\n useIsomorphicLayoutEffect(() => {\n const mql = window.matchMedia('(prefers-reduced-motion)')\n\n const handleMediaChange = (e: MediaQueryListEvent | MediaQueryList) => {\n setReducedMotion(e.matches)\n\n assign({\n skipAnimation: e.matches,\n })\n }\n\n handleMediaChange(mql)\n\n if (mql.addEventListener) {\n mql.addEventListener('change', handleMediaChange)\n } else {\n mql.addListener(handleMediaChange)\n }\n\n return () => {\n if (mql.removeEventListener) {\n mql.removeEventListener('change', handleMediaChange)\n } else {\n mql.removeListener(handleMediaChange)\n }\n }\n }, [])\n\n return reducedMotion\n}\n","import { defineHidden } from '@react-spring/shared'\nimport { AnimatedValue } from './AnimatedValue'\n\nconst $node: any = Symbol.for('Animated:node')\n\nexport const isAnimated = (value: any): value is Animated =>\n !!value && value[$node] === value\n\n/** Get the owner's `Animated` node. */\nexport const getAnimated = (owner: any): Animated | undefined =>\n owner && owner[$node]\n\n/** Set the owner's `Animated` node. */\nexport const setAnimated = (owner: any, node: Animated) =>\n defineHidden(owner, $node, node)\n\n/** Get every `AnimatedValue` in the owner's `Animated` node. */\nexport const getPayload = (owner: any): AnimatedValue[] | undefined =>\n owner && owner[$node] && owner[$node].getPayload()\n\nexport abstract class Animated {\n /** The cache of animated values */\n protected payload?: Payload\n\n constructor() {\n // This makes \"isAnimated\" return true.\n setAnimated(this, this)\n }\n\n /** Get the current value. Pass `true` for only animated values. */\n abstract getValue(animated?: boolean): T\n\n /** Set the current value. Returns `true` if the value changed. */\n abstract setValue(value: T): boolean | void\n\n /** Reset any animation state. */\n abstract reset(goal?: T): void\n\n /** Get every `AnimatedValue` used by this node. */\n getPayload(): Payload {\n return this.payload || []\n }\n}\n\nexport type Payload = readonly AnimatedValue[]\n","import { is } from '@react-spring/shared'\nimport { Animated, Payload } from './Animated'\n\n/** An animated number or a native attribute value */\nexport class AnimatedValue extends Animated {\n done = true\n elapsedTime!: number\n lastPosition!: number\n lastVelocity?: number | null\n v0?: number | null\n durationProgress = 0\n\n constructor(protected _value: T) {\n super()\n if (is.num(this._value)) {\n this.lastPosition = this._value\n }\n }\n\n /** @internal */\n static create(value: any) {\n return new AnimatedValue(value)\n }\n\n getPayload(): Payload {\n return [this]\n }\n\n getValue() {\n return this._value\n }\n\n setValue(value: T, step?: number) {\n if (is.num(value)) {\n this.lastPosition = value\n if (step) {\n value = (Math.round(value / step) * step) as any\n if (this.done) {\n this.lastPosition = value as any\n }\n }\n }\n if (this._value === value) {\n return false\n }\n this._value = value\n return true\n }\n\n reset() {\n const { done } = this\n this.done = false\n if (is.num(this._value)) {\n this.elapsedTime = 0\n this.durationProgress = 0\n this.lastPosition = this._value\n if (done) this.lastVelocity = null\n this.v0 = null\n }\n }\n}\n","import { AnimatedValue } from './AnimatedValue'\nimport { is, createInterpolator } from '@react-spring/shared'\n\ntype Value = string | number\n\nexport class AnimatedString extends AnimatedValue {\n protected declare _value: number\n protected _string: string | null = null\n protected _toString: (input: number) => string\n\n constructor(value: string) {\n super(0)\n this._toString = createInterpolator({\n output: [value, value],\n })\n }\n\n /** @internal */\n static create(value: string) {\n return new AnimatedString(value)\n }\n\n getValue() {\n const value = this._string\n return value == null ? (this._string = this._toString(this._value)) : value\n }\n\n setValue(value: Value) {\n if (is.str(value)) {\n if (value == this._string) {\n return false\n }\n this._string = value\n this._value = 1\n } else if (super.setValue(value)) {\n this._string = null\n } else {\n return false\n }\n return true\n }\n\n reset(goal?: string) {\n if (goal) {\n this._toString = createInterpolator({\n output: [this.getValue(), goal],\n })\n }\n this._value = 0\n super.reset()\n }\n}\n","import { FluidValue } from '@react-spring/shared'\n\nexport type TreeContext = {\n /**\n * Any animated values found when updating the payload of an `AnimatedObject`\n * are also added to this `Set` to be observed by an animated component.\n */\n dependencies: Set | null\n}\n\nexport const TreeContext: TreeContext = { dependencies: null }\n","import { Lookup } from '@react-spring/types'\nimport {\n each,\n eachProp,\n getFluidValue,\n hasFluidValue,\n} from '@react-spring/shared'\nimport { Animated, isAnimated, getPayload } from './Animated'\nimport { AnimatedValue } from './AnimatedValue'\nimport { TreeContext } from './context'\n\n/** An object containing `Animated` nodes */\nexport class AnimatedObject extends Animated {\n constructor(protected source: Lookup) {\n super()\n this.setValue(source)\n }\n\n getValue(animated?: boolean) {\n const values: Lookup = {}\n eachProp(this.source, (source, key) => {\n if (isAnimated(source)) {\n values[key] = source.getValue(animated)\n } else if (hasFluidValue(source)) {\n values[key] = getFluidValue(source)\n } else if (!animated) {\n values[key] = source\n }\n })\n return values\n }\n\n /** Replace the raw object data */\n setValue(source: Lookup) {\n this.source = source\n this.payload = this._makePayload(source)\n }\n\n reset() {\n if (this.payload) {\n each(this.payload, node => node.reset())\n }\n }\n\n /** Create a payload set. */\n protected _makePayload(source: Lookup) {\n if (source) {\n const payload = new Set()\n eachProp(source, this._addToPayload, payload)\n return Array.from(payload)\n }\n }\n\n /** Add to a payload set. */\n protected _addToPayload(this: Set, source: any) {\n if (TreeContext.dependencies && hasFluidValue(source)) {\n TreeContext.dependencies.add(source)\n }\n const payload = getPayload(source)\n if (payload) {\n each(payload, node => this.add(node))\n }\n }\n}\n","import { isAnimatedString } from '@react-spring/shared'\nimport { AnimatedObject } from './AnimatedObject'\nimport { AnimatedString } from './AnimatedString'\nimport { AnimatedValue } from './AnimatedValue'\n\ntype Value = number | string\ntype Source = AnimatedValue[]\n\n/** An array of animated nodes */\nexport class AnimatedArray<\n T extends ReadonlyArray = Value[],\n> extends AnimatedObject {\n protected declare source: Source\n constructor(source: T) {\n super(source)\n }\n\n /** @internal */\n static create>(source: T) {\n return new AnimatedArray(source)\n }\n\n getValue(): T {\n return this.source.map(node => node.getValue()) as any\n }\n\n setValue(source: T) {\n const payload = this.getPayload()\n // Reuse the payload when lengths are equal.\n if (source.length == payload.length) {\n return payload.map((node, i) => node.setValue(source[i])).some(Boolean)\n }\n // Remake the payload when length changes.\n super.setValue(source.map(makeAnimated))\n return true\n }\n}\n\nfunction makeAnimated(value: any) {\n const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue\n return nodeType.create(value)\n}\n","import { is, isAnimatedString } from '@react-spring/shared'\nimport { AnimatedType } from './types'\nimport { AnimatedArray } from './AnimatedArray'\nimport { AnimatedString } from './AnimatedString'\nimport { AnimatedValue } from './AnimatedValue'\nimport { getAnimated } from './Animated'\n\n/** Return the `Animated` node constructor for a given value */\nexport function getAnimatedType(value: any): AnimatedType {\n const parentNode = getAnimated(value)\n return parentNode\n ? (parentNode.constructor as any)\n : is.arr(value)\n ? AnimatedArray\n : isAnimatedString(value)\n ? AnimatedString\n : AnimatedValue\n}\n","import * as React from 'react'\nimport { forwardRef, useRef, Ref, useCallback, useEffect } from 'react'\nimport {\n is,\n each,\n raf,\n useForceUpdate,\n useOnce,\n FluidEvent,\n FluidValue,\n addFluidObserver,\n removeFluidObserver,\n useIsomorphicLayoutEffect,\n} from '@react-spring/shared'\nimport { ElementType } from '@react-spring/types'\n\nimport { AnimatedObject } from './AnimatedObject'\nimport { TreeContext } from './context'\nimport { HostConfig } from './createHost'\n\nexport type AnimatableComponent = string | Exclude\n\nexport const withAnimated = (Component: any, host: HostConfig) => {\n const hasInstance: boolean =\n // Function components must use \"forwardRef\" to avoid being\n // re-rendered on every animation frame.\n !is.fun(Component) ||\n (Component.prototype && Component.prototype.isReactComponent)\n\n return forwardRef((givenProps: any, givenRef: Ref) => {\n const instanceRef = useRef(null)\n\n // The `hasInstance` value is constant, so we can safely avoid\n // the `useCallback` invocation when `hasInstance` is false.\n const ref =\n hasInstance &&\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCallback(\n (value: any) => {\n instanceRef.current = updateRef(givenRef, value)\n },\n [givenRef]\n )\n\n const [props, deps] = getAnimatedState(givenProps, host)\n\n const forceUpdate = useForceUpdate()\n\n const callback = () => {\n const instance = instanceRef.current\n if (hasInstance && !instance) {\n // Either this component was unmounted before changes could be\n // applied, or the wrapped component forgot to forward its ref.\n return\n }\n\n const didUpdate = instance\n ? host.applyAnimatedValues(instance, props.getValue(true))\n : false\n\n // Re-render the component when native updates fail.\n if (didUpdate === false) {\n forceUpdate()\n }\n }\n\n const observer = new PropsObserver(callback, deps)\n\n const observerRef = useRef()\n useIsomorphicLayoutEffect(() => {\n observerRef.current = observer\n\n // Observe the latest dependencies.\n each(deps, dep => addFluidObserver(dep, observer))\n\n return () => {\n // Stop observing previous dependencies.\n if (observerRef.current) {\n each(observerRef.current.deps, dep =>\n removeFluidObserver(dep, observerRef.current!)\n )\n raf.cancel(observerRef.current.update)\n }\n }\n })\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(callback, [])\n // Stop observing on unmount.\n useOnce(() => () => {\n const observer = observerRef.current!\n each(observer.deps, dep => removeFluidObserver(dep, observer))\n })\n\n const usedProps = host.getComponentProps(props.getValue())\n return \n })\n}\n\nclass PropsObserver {\n constructor(\n readonly update: () => void,\n readonly deps: Set\n ) {}\n eventObserved(event: FluidEvent) {\n if (event.type == 'change') {\n raf.write(this.update)\n }\n }\n}\n\ntype AnimatedState = [props: AnimatedObject, dependencies: Set]\n\nfunction getAnimatedState(props: any, host: HostConfig): AnimatedState {\n const dependencies = new Set()\n TreeContext.dependencies = dependencies\n\n // Search the style for dependencies.\n if (props.style)\n props = {\n ...props,\n style: host.createAnimatedStyle(props.style),\n }\n\n // Search the props for dependencies.\n props = new AnimatedObject(props)\n\n TreeContext.dependencies = null\n return [props, dependencies]\n}\n\nfunction updateRef(ref: Ref, value: T) {\n if (ref) {\n if (is.fun(ref)) ref(value)\n else (ref as any).current = value\n }\n return value\n}\n","import { Lookup } from '@react-spring/types'\nimport { is, eachProp } from '@react-spring/shared'\nimport { AnimatableComponent, withAnimated } from './withAnimated'\nimport { Animated } from './Animated'\nimport { AnimatedObject } from './AnimatedObject'\n\nexport interface HostConfig {\n /** Provide custom logic for native updates */\n applyAnimatedValues: (node: any, props: Lookup) => boolean | void\n /** Wrap the `style` prop with an animated node */\n createAnimatedStyle: (style: Lookup) => Animated\n /** Intercept props before they're passed to an animated component */\n getComponentProps: (props: Lookup) => typeof props\n}\n\n// A stub type that gets replaced by @react-spring/web and others.\ntype WithAnimated = {\n (Component: AnimatableComponent): any\n [key: string]: any\n}\n\n// For storing the animated version on the original component\nconst cacheKey = Symbol.for('AnimatedComponent')\n\nexport const createHost = (\n components: AnimatableComponent[] | { [key: string]: AnimatableComponent },\n {\n applyAnimatedValues = () => false,\n createAnimatedStyle = style => new AnimatedObject(style),\n getComponentProps = props => props,\n }: Partial = {}\n) => {\n const hostConfig: HostConfig = {\n applyAnimatedValues,\n createAnimatedStyle,\n getComponentProps,\n }\n\n const animated: WithAnimated = (Component: any) => {\n const displayName = getDisplayName(Component) || 'Anonymous'\n\n if (is.str(Component)) {\n Component =\n animated[Component] ||\n (animated[Component] = withAnimated(Component, hostConfig))\n } else {\n Component =\n Component[cacheKey] ||\n (Component[cacheKey] = withAnimated(Component, hostConfig))\n }\n\n Component.displayName = `Animated(${displayName})`\n return Component\n }\n\n eachProp(components, (Component, key) => {\n if (is.arr(components)) {\n key = getDisplayName(Component)!\n }\n animated[key] = animated(Component)\n })\n\n return {\n animated,\n }\n}\n\nconst getDisplayName = (arg: AnimatableComponent) =>\n is.str(arg)\n ? arg\n : arg && is.str(arg.displayName)\n ? arg.displayName\n : (is.fun(arg) && arg.name) || null\n","import {\n is,\n toArray,\n eachProp,\n getFluidValue,\n isAnimatedString,\n FluidValue,\n Globals as G,\n} from '@react-spring/shared'\nimport { AnyFn, OneOrMore, Lookup } from '@react-spring/types'\nimport { ReservedProps, ForwardProps, InferTo } from './types'\nimport type { Controller } from './Controller'\nimport type { SpringRef } from './SpringRef'\n\nexport function callProp(\n value: T,\n ...args: T extends AnyFn ? Parameters : unknown[]\n): T extends AnyFn ? U : T {\n return is.fun(value) ? value(...args) : value\n}\n\n/** Try to coerce the given value into a boolean using the given key */\nexport const matchProp = (\n value: boolean | OneOrMore | ((key: any) => boolean) | undefined,\n key: string | undefined\n) =>\n value === true ||\n !!(\n key &&\n value &&\n (is.fun(value) ? value(key) : toArray(value).includes(key))\n )\n\nexport const resolveProp = (\n prop: T | Lookup | undefined,\n key: string | undefined\n) => (is.obj(prop) ? key && (prop as any)[key] : prop)\n\nexport const concatFn = (first: T | undefined, last: T) =>\n first ? (...args: Parameters) => (first(...args), last(...args)) : last\n\n/** Returns `true` if the given prop is having its default value set. */\nexport const hasDefaultProp = (props: T, key: keyof T) =>\n !is.und(getDefaultProp(props, key))\n\n/** Get the default value being set for the given `key` */\nexport const getDefaultProp = (\n props: T,\n key: P\n): T[P] =>\n props.default === true\n ? props[key]\n : props.default\n ? props.default[key]\n : undefined\n\nconst noopTransform = (value: any) => value\n\n/**\n * Extract the default props from an update.\n *\n * When the `default` prop is falsy, this function still behaves as if\n * `default: true` was used. The `default` prop is always respected when\n * truthy.\n */\nexport const getDefaultProps = (\n props: Lookup,\n transform: (value: any, key: string) => any = noopTransform\n): T => {\n let keys: readonly string[] = DEFAULT_PROPS\n if (props.default && props.default !== true) {\n props = props.default\n keys = Object.keys(props)\n }\n const defaults: any = {}\n for (const key of keys) {\n const value = transform(props[key], key)\n if (!is.und(value)) {\n defaults[key] = value\n }\n }\n return defaults\n}\n\n/**\n * These props are implicitly used as defaults when defined in a\n * declarative update (eg: render-based) or any update with `default: true`.\n *\n * Use `default: {}` or `default: false` to opt-out of these implicit defaults\n * for any given update.\n *\n * Note: These are not the only props with default values. For example, the\n * `pause`, `cancel`, and `immediate` props. But those must be updated with\n * the object syntax (eg: `default: { immediate: true }`).\n */\nexport const DEFAULT_PROPS = [\n 'config',\n 'onProps',\n 'onStart',\n 'onChange',\n 'onPause',\n 'onResume',\n 'onRest',\n] as const\n\nconst RESERVED_PROPS: {\n [key: string]: 1 | undefined\n} = {\n config: 1,\n from: 1,\n to: 1,\n ref: 1,\n loop: 1,\n reset: 1,\n pause: 1,\n cancel: 1,\n reverse: 1,\n immediate: 1,\n default: 1,\n delay: 1,\n onProps: 1,\n onStart: 1,\n onChange: 1,\n onPause: 1,\n onResume: 1,\n onRest: 1,\n onResolve: 1,\n\n // Transition props\n items: 1,\n trail: 1,\n sort: 1,\n expires: 1,\n initial: 1,\n enter: 1,\n update: 1,\n leave: 1,\n children: 1,\n onDestroyed: 1,\n\n // Internal props\n keys: 1,\n callId: 1,\n parentId: 1,\n}\n\n/**\n * Extract any properties whose keys are *not* reserved for customizing your\n * animations. All hooks use this function, which means `useTransition` props\n * are reserved for `useSpring` calls, etc.\n */\nfunction getForwardProps(\n props: Props\n): ForwardProps | undefined {\n const forward: any = {}\n\n let count = 0\n eachProp(props, (value, prop) => {\n if (!RESERVED_PROPS[prop]) {\n forward[prop] = value\n count++\n }\n })\n\n if (count) {\n return forward\n }\n}\n\n/**\n * Clone the given `props` and move all non-reserved props\n * into the `to` prop.\n */\nexport function inferTo(props: T): InferTo {\n const to = getForwardProps(props)\n if (to) {\n const out: any = { to }\n eachProp(props, (val, key) => key in to || (out[key] = val))\n return out\n }\n return { ...props } as any\n}\n\n// Compute the goal value, converting \"red\" to \"rgba(255, 0, 0, 1)\" in the process\nexport function computeGoal(value: T | FluidValue): T {\n value = getFluidValue(value)\n return is.arr(value)\n ? value.map(computeGoal)\n : isAnimatedString(value)\n ? (G.createStringInterpolator({\n range: [0, 1],\n output: [value, value] as any,\n })(1) as any)\n : value\n}\n\nexport function hasProps(props: object) {\n for (const _ in props) return true\n return false\n}\n\nexport function isAsyncTo(to: any) {\n return is.fun(to) || (is.arr(to) && is.obj(to[0]))\n}\n\n/** Detach `ctrl` from `ctrl.ref` and (optionally) the given `ref` */\nexport function detachRefs(ctrl: Controller, ref?: SpringRef) {\n ctrl.ref?.delete(ctrl)\n ref?.delete(ctrl)\n}\n\n/** Replace `ctrl.ref` with the given `ref` (if defined) */\nexport function replaceRef(ctrl: Controller, ref?: SpringRef) {\n if (ref && ctrl.ref !== ref) {\n ctrl.ref?.delete(ctrl)\n ref.add(ctrl)\n ctrl.ref = ref\n }\n}\n","// The `mass` prop defaults to 1\nexport const config = {\n default: { tension: 170, friction: 26 },\n gentle: { tension: 120, friction: 14 },\n wobbly: { tension: 180, friction: 12 },\n stiff: { tension: 210, friction: 20 },\n slow: { tension: 280, friction: 60 },\n molasses: { tension: 280, friction: 120 },\n} as const\n","import { is, easings } from '@react-spring/shared'\nimport { EasingFunction } from '@react-spring/types'\nimport { config as configs } from './constants'\n\nconst defaults: any = {\n ...configs.default,\n mass: 1,\n damping: 1,\n easing: easings.linear,\n clamp: false,\n}\n\nexport class AnimationConfig {\n /**\n * With higher tension, the spring will resist bouncing and try harder to stop at its end value.\n *\n * When tension is zero, no animation occurs.\n *\n * @default 170\n */\n tension!: number\n\n /**\n * The damping ratio coefficient, or just the damping ratio when `speed` is defined.\n *\n * When `speed` is defined, this value should be between 0 and 1.\n *\n * Higher friction means the spring will slow down faster.\n *\n * @default 26\n */\n friction!: number\n\n /**\n * The natural frequency (in seconds), which dictates the number of bounces\n * per second when no damping exists.\n *\n * When defined, `tension` is derived from this, and `friction` is derived\n * from `tension` and `damping`.\n */\n frequency?: number\n\n /**\n * The damping ratio, which dictates how the spring slows down.\n *\n * Set to `0` to never slow down. Set to `1` to slow down without bouncing.\n * Between `0` and `1` is for you to explore.\n *\n * Only works when `frequency` is defined.\n *\n * @default 1\n */\n damping!: number\n\n /**\n * Higher mass means more friction is required to slow down.\n *\n * Defaults to 1, which works fine most of the time.\n *\n * @default 1\n */\n mass!: number\n\n /**\n * The initial velocity of one or more values.\n *\n * @default 0\n */\n velocity: number | number[] = 0\n\n /**\n * The smallest velocity before the animation is considered \"not moving\".\n *\n * When undefined, `precision` is used instead.\n */\n restVelocity?: number\n\n /**\n * The smallest distance from a value before that distance is essentially zero.\n *\n * This helps in deciding when a spring is \"at rest\". The spring must be within\n * this distance from its final value, and its velocity must be lower than this\n * value too (unless `restVelocity` is defined).\n *\n * @default 0.01\n */\n precision?: number\n\n /**\n * For `duration` animations only. Note: The `duration` is not affected\n * by this property.\n *\n * Defaults to `0`, which means \"start from the beginning\".\n *\n * Setting to `1+` makes an immediate animation.\n *\n * Setting to `0.5` means \"start from the middle of the easing function\".\n *\n * Any number `>= 0` and `<= 1` makes sense here.\n */\n progress?: number\n\n /**\n * Animation length in number of milliseconds.\n */\n duration?: number\n\n /**\n * The animation curve. Only used when `duration` is defined.\n *\n * Defaults to quadratic ease-in-out.\n */\n easing!: EasingFunction\n\n /**\n * Avoid overshooting by ending abruptly at the goal value.\n *\n * @default false\n */\n clamp!: boolean\n\n /**\n * When above zero, the spring will bounce instead of overshooting when\n * exceeding its goal value. Its velocity is multiplied by `-1 + bounce`\n * whenever its current value equals or exceeds its goal. For example,\n * setting `bounce` to `0.5` chops the velocity in half on each bounce,\n * in addition to any friction.\n */\n bounce?: number\n\n /**\n * \"Decay animations\" decelerate without an explicit goal value.\n * Useful for scrolling animations.\n *\n * Use `true` for the default exponential decay factor (`0.998`).\n *\n * When a `number` between `0` and `1` is given, a lower number makes the\n * animation slow down faster. And setting to `1` would make an unending\n * animation.\n *\n * @default false\n */\n decay?: boolean | number\n\n /**\n * While animating, round to the nearest multiple of this number.\n * The `from` and `to` values are never rounded, as well as any value\n * passed to the `set` method of an animated value.\n */\n round?: number\n\n constructor() {\n Object.assign(this, defaults)\n }\n}\n\nexport function mergeConfig(\n config: AnimationConfig,\n newConfig: Partial,\n defaultConfig?: Partial\n): typeof config\n\nexport function mergeConfig(\n config: any,\n newConfig: object,\n defaultConfig?: object\n) {\n if (defaultConfig) {\n defaultConfig = { ...defaultConfig }\n sanitizeConfig(defaultConfig, newConfig)\n newConfig = { ...defaultConfig, ...newConfig }\n }\n\n sanitizeConfig(config, newConfig)\n Object.assign(config, newConfig)\n\n for (const key in defaults) {\n if (config[key] == null) {\n config[key] = defaults[key]\n }\n }\n\n let { frequency, damping } = config\n const { mass } = config\n if (!is.und(frequency)) {\n if (frequency < 0.01) frequency = 0.01\n if (damping < 0) damping = 0\n config.tension = Math.pow((2 * Math.PI) / frequency, 2) * mass\n config.friction = (4 * Math.PI * damping * mass) / frequency\n }\n\n return config\n}\n\n// Prevent a config from accidentally overriding new props.\n// This depends on which \"config\" props take precedence when defined.\nfunction sanitizeConfig(\n config: Partial,\n props: Partial\n) {\n if (!is.und(props.decay)) {\n config.duration = undefined\n } else {\n const isTensionConfig = !is.und(props.tension) || !is.und(props.friction)\n if (\n isTensionConfig ||\n !is.und(props.frequency) ||\n !is.und(props.damping) ||\n !is.und(props.mass)\n ) {\n config.duration = undefined\n config.decay = undefined\n }\n if (isTensionConfig) {\n config.frequency = undefined\n }\n }\n}\n","import { AnimatedValue } from '@react-spring/animated'\nimport { FluidValue } from '@react-spring/shared'\nimport { AnimationConfig } from './AnimationConfig'\nimport { PickEventFns } from './types/internal'\nimport { SpringProps } from './types'\n\nconst emptyArray: readonly any[] = []\n\n/** An animation being executed by the frameloop */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nexport class Animation {\n changed = false\n values: readonly AnimatedValue[] = emptyArray\n toValues: readonly number[] | null = null\n fromValues: readonly number[] = emptyArray\n\n to!: T | FluidValue\n from!: T | FluidValue\n config = new AnimationConfig()\n immediate = false\n}\n\nexport interface Animation extends PickEventFns> {}\n","import { Timeout, is, raf, Globals as G } from '@react-spring/shared'\nimport { matchProp, callProp } from './helpers'\nimport { AsyncResult, MatchProp } from './types'\nimport { RunAsyncState, RunAsyncProps } from './runAsync'\nimport {\n AnimationResolver,\n AnimationTarget,\n InferProps,\n InferState,\n} from './types/internal'\n\n// The `scheduleProps` function only handles these defaults.\ntype DefaultProps = { cancel?: MatchProp; pause?: MatchProp }\n\ninterface ScheduledProps {\n key?: string\n props: InferProps\n defaultProps?: DefaultProps>\n state: RunAsyncState\n actions: {\n pause: () => void\n resume: () => void\n start: (props: RunAsyncProps, resolve: AnimationResolver) => void\n }\n}\n\n/**\n * This function sets a timeout if both the `delay` prop exists and\n * the `cancel` prop is not `true`.\n *\n * The `actions.start` function must handle the `cancel` prop itself,\n * but the `pause` prop is taken care of.\n */\nexport function scheduleProps(\n callId: number,\n { key, props, defaultProps, state, actions }: ScheduledProps\n): AsyncResult {\n return new Promise((resolve, reject) => {\n let delay: number\n let timeout: Timeout\n\n let cancel = matchProp(props.cancel ?? defaultProps?.cancel, key)\n if (cancel) {\n onStart()\n } else {\n // The `pause` prop updates the paused flag.\n if (!is.und(props.pause)) {\n state.paused = matchProp(props.pause, key)\n }\n // The default `pause` takes precedence when true,\n // which allows `SpringContext` to work as expected.\n let pause = defaultProps?.pause\n if (pause !== true) {\n pause = state.paused || matchProp(pause, key)\n }\n\n delay = callProp(props.delay || 0, key)\n if (pause) {\n state.resumeQueue.add(onResume)\n actions.pause()\n } else {\n actions.resume()\n onResume()\n }\n }\n\n function onPause() {\n state.resumeQueue.add(onResume)\n state.timeouts.delete(timeout)\n timeout.cancel()\n // Cache the remaining delay.\n delay = timeout.time - raf.now()\n }\n\n function onResume() {\n if (delay > 0 && !G.skipAnimation) {\n state.delayed = true\n timeout = raf.setTimeout(onStart, delay)\n state.pauseQueue.add(onPause)\n state.timeouts.add(timeout)\n } else {\n onStart()\n }\n }\n\n function onStart() {\n if (state.delayed) {\n state.delayed = false\n }\n\n state.pauseQueue.delete(onPause)\n state.timeouts.delete(timeout)\n\n // Maybe cancelled during its delay.\n if (callId <= (state.cancelId || 0)) {\n cancel = true\n }\n\n try {\n actions.start({ ...props, callId, cancel }, resolve)\n } catch (err) {\n reject(err)\n }\n }\n })\n}\n","import { AnimationResult } from './types'\nimport { Readable } from './types/internal'\n\n/** @internal */\nexport const getCombinedResult = (\n target: T,\n results: AnimationResult[]\n): AnimationResult =>\n results.length == 1\n ? results[0]\n : results.some(result => result.cancelled)\n ? getCancelledResult(target.get())\n : results.every(result => result.noop)\n ? getNoopResult(target.get())\n : getFinishedResult(\n target.get(),\n results.every(result => result.finished)\n )\n\n/** No-op results are for updates that never start an animation. */\nexport const getNoopResult = (value: any) => ({\n value,\n noop: true,\n finished: true,\n cancelled: false,\n})\n\nexport const getFinishedResult = (\n value: any,\n finished: boolean,\n cancelled = false\n) => ({\n value,\n finished,\n cancelled,\n})\n\nexport const getCancelledResult = (value: any) => ({\n value,\n cancelled: true,\n finished: false,\n})\n","import {\n is,\n raf,\n flush,\n eachProp,\n Timeout,\n Globals as G,\n} from '@react-spring/shared'\nimport { Falsy } from '@react-spring/types'\n\nimport { getDefaultProps } from './helpers'\nimport { AnimationTarget, InferState, InferProps } from './types/internal'\nimport { AnimationResult, AsyncResult, SpringChain, SpringToFn } from './types'\nimport { getCancelledResult, getFinishedResult } from './AnimationResult'\n\ntype AsyncTo = SpringChain | SpringToFn\n\n/** @internal */\nexport type RunAsyncProps = InferProps & {\n callId: number\n parentId?: number\n cancel: boolean\n to?: any\n}\n\n/** @internal */\nexport interface RunAsyncState {\n paused: boolean\n pauseQueue: Set<() => void>\n resumeQueue: Set<() => void>\n timeouts: Set\n delayed?: boolean\n asyncId?: number\n asyncTo?: AsyncTo>\n promise?: AsyncResult\n cancelId?: number\n}\n\n/**\n * Start an async chain or an async script.\n *\n * Always call `runAsync` in the action callback of a `scheduleProps` call.\n *\n * The `T` parameter can be a set of animated values (as an object type)\n * or a primitive type for a single animated value.\n */\nexport function runAsync(\n to: AsyncTo>,\n props: RunAsyncProps,\n state: RunAsyncState,\n target: T\n): AsyncResult {\n const { callId, parentId, onRest } = props\n const { asyncTo: prevTo, promise: prevPromise } = state\n\n if (!parentId && to === prevTo && !props.reset) {\n return prevPromise!\n }\n\n return (state.promise = (async () => {\n state.asyncId = callId\n state.asyncTo = to\n\n // The default props of any `animate` calls.\n const defaultProps = getDefaultProps>(props, (value, key) =>\n // The `onRest` prop is only called when the `runAsync` promise is resolved.\n key === 'onRest' ? undefined : value\n )\n\n let preventBail!: () => void\n let bail: (error: any) => void\n\n // This promise is rejected when the animation is interrupted.\n const bailPromise = new Promise(\n (resolve, reject) => ((preventBail = resolve), (bail = reject))\n )\n\n const bailIfEnded = (bailSignal: BailSignal) => {\n const bailResult =\n // The `cancel` prop or `stop` method was used.\n (callId <= (state.cancelId || 0) && getCancelledResult(target)) ||\n // The async `to` prop was replaced.\n (callId !== state.asyncId && getFinishedResult(target, false))\n\n if (bailResult) {\n bailSignal.result = bailResult\n\n // Reject the `bailPromise` to ensure the `runAsync` promise\n // is not relying on the caller to rethrow the error for us.\n bail(bailSignal)\n throw bailSignal\n }\n }\n\n const animate: any = (arg1: any, arg2?: any) => {\n // Create the bail signal outside the returned promise,\n // so the generated stack trace is relevant.\n const bailSignal = new BailSignal()\n const skipAnimationSignal = new SkipAnimationSignal()\n\n return (async () => {\n if (G.skipAnimation) {\n /**\n * We need to stop animations if `skipAnimation`\n * is set in the Globals\n *\n */\n stopAsync(state)\n\n // create the rejection error that's handled gracefully\n skipAnimationSignal.result = getFinishedResult(target, false)\n bail(skipAnimationSignal)\n throw skipAnimationSignal\n }\n\n bailIfEnded(bailSignal)\n\n const props: any = is.obj(arg1) ? { ...arg1 } : { ...arg2, to: arg1 }\n props.parentId = callId\n\n eachProp(defaultProps, (value, key) => {\n if (is.und(props[key])) {\n props[key] = value\n }\n })\n\n const result = await target.start(props)\n bailIfEnded(bailSignal)\n\n if (state.paused) {\n await new Promise(resume => {\n state.resumeQueue.add(resume)\n })\n }\n\n return result\n })()\n }\n\n let result!: AnimationResult\n\n if (G.skipAnimation) {\n /**\n * We need to stop animations if `skipAnimation`\n * is set in the Globals\n */\n stopAsync(state)\n return getFinishedResult(target, false)\n }\n\n try {\n let animating!: Promise\n\n // Async sequence\n if (is.arr(to)) {\n animating = (async (queue: any[]) => {\n for (const props of queue) {\n await animate(props)\n }\n })(to)\n }\n\n // Async script\n else {\n animating = Promise.resolve(to(animate, target.stop.bind(target)))\n }\n\n await Promise.all([animating.then(preventBail), bailPromise])\n result = getFinishedResult(target.get(), true, false)\n\n // Bail handling\n } catch (err) {\n if (err instanceof BailSignal) {\n result = err.result\n } else if (err instanceof SkipAnimationSignal) {\n result = err.result\n } else {\n throw err\n }\n\n // Reset the async state.\n } finally {\n if (callId == state.asyncId) {\n state.asyncId = parentId\n state.asyncTo = parentId ? prevTo : undefined\n state.promise = parentId ? prevPromise : undefined\n }\n }\n\n if (is.fun(onRest)) {\n raf.batchedUpdates(() => {\n onRest(result, target, target.item)\n })\n }\n\n return result\n })())\n}\n\n/** Stop the current `runAsync` call with `finished: false` (or with `cancelled: true` when `cancelId` is defined) */\nexport function stopAsync(state: RunAsyncState, cancelId?: number | Falsy) {\n flush(state.timeouts, t => t.cancel())\n state.pauseQueue.clear()\n state.resumeQueue.clear()\n state.asyncId = state.asyncTo = state.promise = undefined\n if (cancelId) state.cancelId = cancelId\n}\n\n/** This error is thrown to signal an interrupted async animation. */\nexport class BailSignal extends Error {\n result!: AnimationResult\n constructor() {\n super(\n 'An async animation has been interrupted. You see this error because you ' +\n 'forgot to use `await` or `.catch(...)` on its returned promise.'\n )\n }\n}\n\nexport class SkipAnimationSignal extends Error {\n result!: AnimationResult\n\n constructor() {\n super('SkipAnimationSignal')\n }\n}\n","import {\n deprecateInterpolate,\n frameLoop,\n FluidValue,\n Globals as G,\n callFluidObservers,\n} from '@react-spring/shared'\nimport { InterpolatorArgs } from '@react-spring/types'\nimport { getAnimated } from '@react-spring/animated'\n\nimport { Interpolation } from './Interpolation'\n\nexport const isFrameValue = (value: any): value is FrameValue =>\n value instanceof FrameValue\n\nlet nextId = 1\n\n/**\n * A kind of `FluidValue` that manages an `AnimatedValue` node.\n *\n * Its underlying value can be accessed and even observed.\n */\nexport abstract class FrameValue extends FluidValue<\n T,\n FrameValue.Event\n> {\n readonly id = nextId++\n\n abstract key?: string\n abstract get idle(): boolean\n\n protected _priority = 0\n\n get priority() {\n return this._priority\n }\n set priority(priority: number) {\n if (this._priority != priority) {\n this._priority = priority\n this._onPriorityChange(priority)\n }\n }\n\n /** Get the current value */\n get(): T {\n const node = getAnimated(this)\n return node && node.getValue()\n }\n\n /** Create a spring that maps our value to another value */\n to(...args: InterpolatorArgs) {\n return G.to(this, args) as Interpolation\n }\n\n /** @deprecated Use the `to` method instead. */\n interpolate(...args: InterpolatorArgs) {\n deprecateInterpolate()\n return G.to(this, args) as Interpolation\n }\n\n toJSON() {\n return this.get()\n }\n\n protected observerAdded(count: number) {\n if (count == 1) this._attach()\n }\n\n protected observerRemoved(count: number) {\n if (count == 0) this._detach()\n }\n\n /** @internal */\n abstract advance(dt: number): void\n\n /** @internal */\n abstract eventObserved(_event: FrameValue.Event): void\n\n /** Called when the first child is added. */\n protected _attach() {}\n\n /** Called when the last child is removed. */\n protected _detach() {}\n\n /** Tell our children about our new value */\n protected _onChange(value: T, idle = false) {\n callFluidObservers(this, {\n type: 'change',\n parent: this,\n value,\n idle,\n })\n }\n\n /** Tell our children about our new priority */\n protected _onPriorityChange(priority: number) {\n if (!this.idle) {\n frameLoop.sort(this)\n }\n callFluidObservers(this, {\n type: 'priority',\n parent: this,\n priority,\n })\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport declare namespace FrameValue {\n /** A parent changed its value */\n interface ChangeEvent {\n parent: FrameValue\n type: 'change'\n value: T\n idle: boolean\n }\n\n /** A parent changed its priority */\n interface PriorityEvent {\n parent: FrameValue\n type: 'priority'\n priority: number\n }\n\n /** A parent is done animating */\n interface IdleEvent {\n parent: FrameValue\n type: 'idle'\n }\n\n /** Events sent to children of `FrameValue` objects */\n export type Event = ChangeEvent | PriorityEvent | IdleEvent\n}\n","/** The property symbol of the current animation phase. */\nconst $P = Symbol.for('SpringPhase')\n\nconst HAS_ANIMATED = 1\nconst IS_ANIMATING = 2\nconst IS_PAUSED = 4\n\n/** Returns true if the `target` has ever animated. */\nexport const hasAnimated = (target: any) => (target[$P] & HAS_ANIMATED) > 0\n\n/** Returns true if the `target` is animating (even if paused). */\nexport const isAnimating = (target: any) => (target[$P] & IS_ANIMATING) > 0\n\n/** Returns true if the `target` is paused (even if idle). */\nexport const isPaused = (target: any) => (target[$P] & IS_PAUSED) > 0\n\n/** Set the active bit of the `target` phase. */\nexport const setActiveBit = (target: any, active: boolean) =>\n active\n ? (target[$P] |= IS_ANIMATING | HAS_ANIMATED)\n : (target[$P] &= ~IS_ANIMATING)\n\nexport const setPausedBit = (target: any, paused: boolean) =>\n paused ? (target[$P] |= IS_PAUSED) : (target[$P] &= ~IS_PAUSED)\n","import {\n is,\n raf,\n each,\n isEqual,\n toArray,\n eachProp,\n frameLoop,\n flushCalls,\n getFluidValue,\n isAnimatedString,\n FluidValue,\n Globals as G,\n callFluidObservers,\n hasFluidValue,\n addFluidObserver,\n removeFluidObserver,\n getFluidObservers,\n} from '@react-spring/shared'\nimport {\n Animated,\n AnimatedValue,\n AnimatedString,\n getPayload,\n getAnimated,\n setAnimated,\n getAnimatedType,\n} from '@react-spring/animated'\nimport { Lookup } from '@react-spring/types'\n\nimport { Animation } from './Animation'\nimport { mergeConfig } from './AnimationConfig'\nimport { scheduleProps } from './scheduleProps'\nimport { runAsync, RunAsyncState, RunAsyncProps, stopAsync } from './runAsync'\nimport {\n callProp,\n computeGoal,\n matchProp,\n inferTo,\n getDefaultProps,\n getDefaultProp,\n isAsyncTo,\n resolveProp,\n} from './helpers'\nimport { FrameValue, isFrameValue } from './FrameValue'\nimport {\n isAnimating,\n isPaused,\n setPausedBit,\n hasAnimated,\n setActiveBit,\n} from './SpringPhase'\nimport {\n AnimationRange,\n AnimationResolver,\n EventKey,\n PickEventFns,\n} from './types/internal'\nimport { AsyncResult, SpringUpdate, VelocityProp, SpringProps } from './types'\nimport {\n getCombinedResult,\n getCancelledResult,\n getFinishedResult,\n getNoopResult,\n} from './AnimationResult'\n\ndeclare const console: any\n\ninterface DefaultSpringProps\n extends Pick, 'pause' | 'cancel' | 'immediate' | 'config'>,\n PickEventFns> {}\n\n/**\n * Only numbers, strings, and arrays of numbers/strings are supported.\n * Non-animatable strings are also supported.\n */\nexport class SpringValue extends FrameValue {\n /** The property name used when `to` or `from` is an object. Useful when debugging too. */\n key?: string\n\n /** The animation state */\n animation = new Animation()\n\n /** The queue of pending props */\n queue?: SpringUpdate[]\n\n /** Some props have customizable default values */\n defaultProps: DefaultSpringProps = {}\n\n /** The state for `runAsync` calls */\n protected _state: RunAsyncState> = {\n paused: false,\n delayed: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set(),\n }\n\n /** The promise resolvers of pending `start` calls */\n protected _pendingCalls = new Set>()\n\n /** The counter for tracking `scheduleProps` calls */\n protected _lastCallId = 0\n\n /** The last `scheduleProps` call that changed the `to` prop */\n protected _lastToId = 0\n\n protected _memoizedDuration = 0\n\n constructor(from: Exclude, props?: SpringUpdate)\n constructor(props?: SpringUpdate)\n constructor(arg1?: any, arg2?: any) {\n super()\n if (!is.und(arg1) || !is.und(arg2)) {\n const props = is.obj(arg1) ? { ...arg1 } : { ...arg2, from: arg1 }\n if (is.und(props.default)) {\n props.default = true\n }\n this.start(props)\n }\n }\n\n /** Equals true when not advancing on each frame. */\n get idle() {\n return !(isAnimating(this) || this._state.asyncTo) || isPaused(this)\n }\n\n get goal() {\n return getFluidValue(this.animation.to) as T\n }\n\n get velocity(): VelocityProp {\n const node = getAnimated(this)!\n return (\n node instanceof AnimatedValue\n ? node.lastVelocity || 0\n : node.getPayload().map(node => node.lastVelocity || 0)\n ) as any\n }\n\n /**\n * When true, this value has been animated at least once.\n */\n get hasAnimated() {\n return hasAnimated(this)\n }\n\n /**\n * When true, this value has an unfinished animation,\n * which is either active or paused.\n */\n get isAnimating() {\n return isAnimating(this)\n }\n\n /**\n * When true, all current and future animations are paused.\n */\n get isPaused() {\n return isPaused(this)\n }\n\n /**\n *\n *\n */\n get isDelayed() {\n return this._state.delayed\n }\n\n /** Advance the current animation by a number of milliseconds */\n advance(dt: number) {\n let idle = true\n let changed = false\n\n const anim = this.animation\n let { toValues } = anim\n const { config } = anim\n\n const payload = getPayload(anim.to)\n if (!payload && hasFluidValue(anim.to)) {\n toValues = toArray(getFluidValue(anim.to)) as any\n }\n\n anim.values.forEach((node, i) => {\n if (node.done) return\n\n const to =\n // Animated strings always go from 0 to 1.\n node.constructor == AnimatedString\n ? 1\n : payload\n ? payload[i].lastPosition\n : toValues![i]\n\n let finished = anim.immediate\n let position = to\n\n if (!finished) {\n position = node.lastPosition\n\n // Loose springs never move.\n if (config.tension <= 0) {\n node.done = true\n return\n }\n\n let elapsed = (node.elapsedTime += dt)\n const from = anim.fromValues[i]\n\n const v0 =\n node.v0 != null\n ? node.v0\n : (node.v0 = is.arr(config.velocity)\n ? config.velocity[i]\n : config.velocity)\n\n let velocity: number\n\n /** The smallest distance from a value before being treated like said value. */\n /**\n * TODO: make this value ~0.0001 by default in next breaking change\n * for more info see – https://github.com/pmndrs/react-spring/issues/1389\n */\n const precision =\n config.precision ||\n (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001))\n\n // Duration easing\n if (!is.und(config.duration)) {\n let p = 1\n if (config.duration > 0) {\n /**\n * Here we check if the duration has changed in the config\n * and if so update the elapsed time to the percentage\n * of completition so there is no jank in the animation\n * https://github.com/pmndrs/react-spring/issues/1163\n */\n if (this._memoizedDuration !== config.duration) {\n // update the memoized version to the new duration\n this._memoizedDuration = config.duration\n\n // if the value has started animating we need to update it\n if (node.durationProgress > 0) {\n // set elapsed time to be the same percentage of progress as the previous duration\n node.elapsedTime = config.duration * node.durationProgress\n // add the delta so the below updates work as expected\n elapsed = node.elapsedTime += dt\n }\n }\n\n // calculate the new progress\n p = (config.progress || 0) + elapsed / this._memoizedDuration\n // p is clamped between 0-1\n p = p > 1 ? 1 : p < 0 ? 0 : p\n // store our new progress\n node.durationProgress = p\n }\n\n position = from + config.easing(p) * (to - from)\n velocity = (position - node.lastPosition) / dt\n\n finished = p == 1\n }\n\n // Decay easing\n else if (config.decay) {\n const decay = config.decay === true ? 0.998 : config.decay\n const e = Math.exp(-(1 - decay) * elapsed)\n\n position = from + (v0 / (1 - decay)) * (1 - e)\n finished = Math.abs(node.lastPosition - position) <= precision\n\n // derivative of position\n velocity = v0 * e\n }\n\n // Spring easing\n else {\n velocity = node.lastVelocity == null ? v0 : node.lastVelocity\n\n /** The velocity at which movement is essentially none */\n const restVelocity = config.restVelocity || precision / 10\n\n // Bouncing is opt-in (not to be confused with overshooting)\n const bounceFactor = config.clamp ? 0 : config.bounce!\n const canBounce = !is.und(bounceFactor)\n\n /** When `true`, the value is increasing over time */\n const isGrowing = from == to ? node.v0 > 0 : from < to\n\n /** When `true`, the velocity is considered moving */\n let isMoving!: boolean\n\n /** When `true`, the velocity is being deflected or clamped */\n let isBouncing = false\n\n const step = 1 // 1ms\n const numSteps = Math.ceil(dt / step)\n for (let n = 0; n < numSteps; ++n) {\n isMoving = Math.abs(velocity) > restVelocity\n\n if (!isMoving) {\n finished = Math.abs(to - position) <= precision\n if (finished) {\n break\n }\n }\n\n if (canBounce) {\n isBouncing = position == to || position > to == isGrowing\n\n // Invert the velocity with a magnitude, or clamp it.\n if (isBouncing) {\n velocity = -velocity * bounceFactor\n position = to\n }\n }\n\n const springForce = -config.tension * 0.000001 * (position - to)\n const dampingForce = -config.friction * 0.001 * velocity\n const acceleration = (springForce + dampingForce) / config.mass // pt/ms^2\n\n velocity = velocity + acceleration * step // pt/ms\n position = position + velocity * step\n }\n }\n\n node.lastVelocity = velocity\n\n if (Number.isNaN(position)) {\n console.warn(`Got NaN while animating:`, this)\n finished = true\n }\n }\n\n // Parent springs must finish before their children can.\n if (payload && !payload[i].done) {\n finished = false\n }\n\n if (finished) {\n node.done = true\n } else {\n idle = false\n }\n\n if (node.setValue(position, config.round)) {\n changed = true\n }\n })\n\n const node = getAnimated(this)!\n /**\n * Get the node's current value, this will be different\n * to anim.to when config.decay is true\n */\n const currVal = node.getValue()\n if (idle) {\n // get our final fluid val from the anim.to\n const finalVal = getFluidValue(anim.to)\n /**\n * check if they're not equal, or if they're\n * change and if there's no config.decay set\n */\n if ((currVal !== finalVal || changed) && !config.decay) {\n // set the value to anim.to\n node.setValue(finalVal)\n this._onChange(finalVal)\n } else if (changed && config.decay) {\n /**\n * if it's changed but there is a config.decay,\n * just call _onChange with currrent value\n */\n this._onChange(currVal)\n }\n // call stop because the spring has stopped.\n this._stop()\n } else if (changed) {\n /**\n * if the spring has changed, but is not idle,\n * just call the _onChange handler\n */\n this._onChange(currVal)\n }\n }\n\n /** Set the current value, while stopping the current animation */\n set(value: T | FluidValue) {\n raf.batchedUpdates(() => {\n this._stop()\n\n // These override the current value and goal value that may have\n // been updated by `onRest` handlers in the `_stop` call above.\n this._focus(value)\n this._set(value)\n })\n return this\n }\n\n /**\n * Freeze the active animation in time, as well as any updates merged\n * before `resume` is called.\n */\n pause() {\n this._update({ pause: true })\n }\n\n /** Resume the animation if paused. */\n resume() {\n this._update({ pause: false })\n }\n\n /** Skip to the end of the current animation. */\n finish() {\n if (isAnimating(this)) {\n const { to, config } = this.animation\n raf.batchedUpdates(() => {\n // Ensure the \"onStart\" and \"onRest\" props are called.\n this._onStart()\n\n // Jump to the goal value, except for decay animations\n // which have an undefined goal value.\n if (!config.decay) {\n this._set(to, false)\n }\n\n this._stop()\n })\n }\n return this\n }\n\n /** Push props into the pending queue. */\n update(props: SpringUpdate) {\n const queue = this.queue || (this.queue = [])\n queue.push(props)\n return this\n }\n\n /**\n * Update this value's animation using the queue of pending props,\n * and unpause the current animation (if one is frozen).\n *\n * When arguments are passed, a new animation is created, and the\n * queued animations are left alone.\n */\n start(): AsyncResult\n\n start(props: SpringUpdate): AsyncResult\n\n start(to: T, props?: SpringProps): AsyncResult\n\n start(to?: any, arg2?: any) {\n let queue: SpringUpdate[]\n if (!is.und(to)) {\n queue = [is.obj(to) ? to : { ...arg2, to }]\n } else {\n queue = this.queue || []\n this.queue = []\n }\n\n return Promise.all(\n queue.map(props => {\n const up = this._update(props)\n return up\n })\n ).then(results => getCombinedResult(this, results))\n }\n\n /**\n * Stop the current animation, and cancel any delayed updates.\n *\n * Pass `true` to call `onRest` with `cancelled: true`.\n */\n stop(cancel?: boolean) {\n const { to } = this.animation\n\n // The current value becomes the goal value.\n this._focus(this.get())\n\n stopAsync(this._state, cancel && this._lastCallId)\n raf.batchedUpdates(() => this._stop(to, cancel))\n\n return this\n }\n\n /** Restart the animation. */\n reset() {\n this._update({ reset: true })\n }\n\n /** @internal */\n eventObserved(event: FrameValue.Event) {\n if (event.type == 'change') {\n this._start()\n } else if (event.type == 'priority') {\n this.priority = event.priority + 1\n }\n }\n\n /**\n * Parse the `to` and `from` range from the given `props` object.\n *\n * This also ensures the initial value is available to animated components\n * during the render phase.\n */\n protected _prepareNode(props: {\n to?: any\n from?: any\n reverse?: boolean\n default?: any\n }) {\n const key = this.key || ''\n\n let { to, from } = props\n\n to = is.obj(to) ? to[key] : to\n if (to == null || isAsyncTo(to)) {\n to = undefined\n }\n\n from = is.obj(from) ? from[key] : from\n if (from == null) {\n from = undefined\n }\n\n // Create the range now to avoid \"reverse\" logic.\n const range = { to, from }\n\n // Before ever animating, this method ensures an `Animated` node\n // exists and keeps its value in sync with the \"from\" prop.\n if (!hasAnimated(this)) {\n if (props.reverse) [to, from] = [from, to]\n\n from = getFluidValue(from)\n if (!is.und(from)) {\n this._set(from)\n }\n // Use the \"to\" value if our node is undefined.\n else if (!getAnimated(this)) {\n this._set(to)\n }\n }\n\n return range\n }\n\n /** Every update is processed by this method before merging. */\n protected _update(\n { ...props }: SpringProps,\n isLoop?: boolean\n ): AsyncResult> {\n const { key, defaultProps } = this\n\n // Update the default props immediately.\n if (props.default)\n Object.assign(\n defaultProps,\n getDefaultProps(props, (value, prop) =>\n /^on/.test(prop) ? resolveProp(value, key) : value\n )\n )\n\n mergeActiveFn(this, props, 'onProps')\n sendEvent(this, 'onProps', props, this)\n\n // Ensure the initial value can be accessed by animated components.\n const range = this._prepareNode(props)\n\n if (Object.isFrozen(this)) {\n throw Error(\n 'Cannot animate a `SpringValue` object that is frozen. ' +\n 'Did you forget to pass your component to `animated(...)` before animating its props?'\n )\n }\n\n const state = this._state\n\n return scheduleProps(++this._lastCallId, {\n key,\n props,\n defaultProps,\n state,\n actions: {\n pause: () => {\n if (!isPaused(this)) {\n setPausedBit(this, true)\n flushCalls(state.pauseQueue)\n sendEvent(\n this,\n 'onPause',\n getFinishedResult(this, checkFinished(this, this.animation.to)),\n this\n )\n }\n },\n resume: () => {\n if (isPaused(this)) {\n setPausedBit(this, false)\n if (isAnimating(this)) {\n this._resume()\n }\n flushCalls(state.resumeQueue)\n sendEvent(\n this,\n 'onResume',\n getFinishedResult(this, checkFinished(this, this.animation.to)),\n this\n )\n }\n },\n start: this._merge.bind(this, range),\n },\n }).then(result => {\n if (props.loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props)\n if (nextProps) {\n return this._update(nextProps, true)\n }\n }\n return result\n })\n }\n\n /** Merge props into the current animation */\n protected _merge(\n range: AnimationRange,\n props: RunAsyncProps>,\n resolve: AnimationResolver>\n ): void {\n // The \"cancel\" prop cancels all pending delays and it forces the\n // active animation to stop where it is.\n if (props.cancel) {\n this.stop(true)\n return resolve(getCancelledResult(this))\n }\n\n /** The \"to\" prop is defined. */\n const hasToProp = !is.und(range.to)\n\n /** The \"from\" prop is defined. */\n const hasFromProp = !is.und(range.from)\n\n // Avoid merging other props if implicitly prevented, except\n // when both the \"to\" and \"from\" props are undefined.\n if (hasToProp || hasFromProp) {\n if (props.callId > this._lastToId) {\n this._lastToId = props.callId\n } else {\n return resolve(getCancelledResult(this))\n }\n }\n\n const { key, defaultProps, animation: anim } = this\n const { to: prevTo, from: prevFrom } = anim\n let { to = prevTo, from = prevFrom } = range\n\n // Focus the \"from\" value if changing without a \"to\" value.\n // For default updates, do this only if no \"to\" value exists.\n if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {\n to = from\n }\n\n // Flip the current range if \"reverse\" is true.\n if (props.reverse) [to, from] = [from, to]\n\n /** The \"from\" value is changing. */\n const hasFromChanged = !isEqual(from, prevFrom)\n\n if (hasFromChanged) {\n anim.from = from\n }\n\n // Coerce \"from\" into a static value.\n from = getFluidValue(from)\n\n /** The \"to\" value is changing. */\n const hasToChanged = !isEqual(to, prevTo)\n\n if (hasToChanged) {\n this._focus(to)\n }\n\n /** The \"to\" prop is async. */\n const hasAsyncTo = isAsyncTo(props.to)\n\n const { config } = anim\n const { decay, velocity } = config\n\n // Reset to default velocity when goal values are defined.\n if (hasToProp || hasFromProp) {\n config.velocity = 0\n }\n\n // The \"runAsync\" function treats the \"config\" prop as a default,\n // so we must avoid merging it when the \"to\" prop is async.\n if (props.config && !hasAsyncTo) {\n mergeConfig(\n config,\n callProp(props.config, key!),\n // Avoid calling the same \"config\" prop twice.\n props.config !== defaultProps.config\n ? callProp(defaultProps.config, key!)\n : void 0\n )\n }\n\n // This instance might not have its Animated node yet. For example,\n // the constructor can be given props without a \"to\" or \"from\" value.\n let node = getAnimated(this)\n if (!node || is.und(to)) {\n return resolve(getFinishedResult(this, true))\n }\n\n /** When true, start at the \"from\" value. */\n const reset =\n // When `reset` is undefined, the `from` prop implies `reset: true`,\n // except for declarative updates. When `reset` is defined, there\n // must exist a value to animate from.\n is.und(props.reset)\n ? hasFromProp && !props.default\n : !is.und(from) && matchProp(props.reset, key)\n\n // The current value, where the animation starts from.\n const value = reset ? (from as T) : this.get()\n\n // The animation ends at this value, unless \"to\" is fluid.\n const goal = computeGoal(to)\n\n // Only specific types can be animated to/from.\n const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal)\n\n // When true, the value changes instantly on the next frame.\n const immediate =\n !hasAsyncTo &&\n (!isAnimatable ||\n matchProp(defaultProps.immediate || props.immediate, key))\n\n if (hasToChanged) {\n const nodeType = getAnimatedType(to)\n if (nodeType !== node.constructor) {\n if (immediate) {\n node = this._set(goal)!\n } else\n throw Error(\n `Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the \"to\" prop suggests`\n )\n }\n }\n\n // The type of Animated node for the goal value.\n const goalType = node.constructor\n\n // When the goal value is fluid, we don't know if its value\n // will change before the next animation frame, so it always\n // starts the animation to be safe.\n let started = hasFluidValue(to)\n let finished = false\n\n if (!started) {\n // When true, the current value has probably changed.\n const hasValueChanged = reset || (!hasAnimated(this) && hasFromChanged)\n\n // When the \"to\" value or current value are changed,\n // start animating if not already finished.\n if (hasToChanged || hasValueChanged) {\n finished = isEqual(computeGoal(value), goal)\n started = !finished\n }\n\n // Changing \"decay\" or \"velocity\" starts the animation.\n if (\n (!isEqual(anim.immediate, immediate) && !immediate) ||\n !isEqual(config.decay, decay) ||\n !isEqual(config.velocity, velocity)\n ) {\n started = true\n }\n }\n\n // Was the goal value set to the current value while animating?\n if (finished && isAnimating(this)) {\n // If the first frame has passed, allow the animation to\n // overshoot instead of stopping abruptly.\n if (anim.changed && !reset) {\n started = true\n }\n // Stop the animation before its first frame.\n else if (!started) {\n this._stop(prevTo)\n }\n }\n\n if (!hasAsyncTo) {\n // Make sure our \"toValues\" are updated even if our previous\n // \"to\" prop is a fluid value whose current value is also ours.\n if (started || hasFluidValue(prevTo)) {\n anim.values = node.getPayload()\n anim.toValues = hasFluidValue(to)\n ? null\n : goalType == AnimatedString\n ? [1]\n : toArray(goal)\n }\n\n if (anim.immediate != immediate) {\n anim.immediate = immediate\n\n // Ensure the immediate goal is used as from value.\n if (!immediate && !reset) {\n this._set(prevTo)\n }\n }\n\n if (started) {\n const { onRest } = anim\n\n // Set the active handlers when an animation starts.\n each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type))\n\n const result = getFinishedResult(this, checkFinished(this, prevTo))\n flushCalls(this._pendingCalls, result)\n this._pendingCalls.add(resolve)\n\n if (anim.changed)\n raf.batchedUpdates(() => {\n // Ensure `onStart` can be called after a reset.\n anim.changed = !reset\n\n // Call the active `onRest` handler from the interrupted animation.\n onRest?.(result, this)\n\n // Notify the default `onRest` of the reset, but wait for the\n // first frame to pass before sending an `onStart` event.\n if (reset) {\n callProp(defaultProps.onRest, result)\n }\n // Call the active `onStart` handler here since the first frame\n // has already passed, which means this is a goal update and not\n // an entirely new animation.\n else {\n anim.onStart?.(result, this)\n }\n })\n }\n }\n\n if (reset) {\n this._set(value)\n }\n\n if (hasAsyncTo) {\n resolve(runAsync(props.to, props, this._state, this))\n }\n\n // Start an animation\n else if (started) {\n this._start()\n }\n\n // Postpone promise resolution until the animation is finished,\n // so that no-op updates still resolve at the expected time.\n else if (isAnimating(this) && !hasToChanged) {\n this._pendingCalls.add(resolve)\n }\n\n // Resolve our promise immediately.\n else {\n resolve(getNoopResult(value))\n }\n }\n\n /** Update the `animation.to` value, which might be a `FluidValue` */\n protected _focus(value: T | FluidValue) {\n const anim = this.animation\n if (value !== anim.to) {\n if (getFluidObservers(this)) {\n this._detach()\n }\n anim.to = value\n if (getFluidObservers(this)) {\n this._attach()\n }\n }\n }\n\n protected _attach() {\n let priority = 0\n\n const { to } = this.animation\n if (hasFluidValue(to)) {\n addFluidObserver(to, this)\n if (isFrameValue(to)) {\n priority = to.priority + 1\n }\n }\n\n this.priority = priority\n }\n\n protected _detach() {\n const { to } = this.animation\n if (hasFluidValue(to)) {\n removeFluidObserver(to, this)\n }\n }\n\n /**\n * Update the current value from outside the frameloop,\n * and return the `Animated` node.\n */\n protected _set(arg: T | FluidValue, idle = true): Animated | undefined {\n const value = getFluidValue(arg)\n if (!is.und(value)) {\n const oldNode = getAnimated(this)\n if (!oldNode || !isEqual(value, oldNode.getValue())) {\n // Create a new node or update the existing node.\n const nodeType = getAnimatedType(value)\n if (!oldNode || oldNode.constructor != nodeType) {\n setAnimated(this, nodeType.create(value))\n } else {\n oldNode.setValue(value)\n }\n // Never emit a \"change\" event for the initial value.\n if (oldNode) {\n raf.batchedUpdates(() => {\n this._onChange(value, idle)\n })\n }\n }\n }\n return getAnimated(this)\n }\n\n protected _onStart() {\n const anim = this.animation\n if (!anim.changed) {\n anim.changed = true\n sendEvent(\n this,\n 'onStart',\n getFinishedResult(this, checkFinished(this, anim.to)),\n this\n )\n }\n }\n\n protected _onChange(value: T, idle?: boolean) {\n if (!idle) {\n this._onStart()\n callProp(this.animation.onChange, value, this)\n }\n callProp(this.defaultProps.onChange, value, this)\n super._onChange(value, idle)\n }\n\n // This method resets the animation state (even if already animating) to\n // ensure the latest from/to range is used, and it also ensures this spring\n // is added to the frameloop.\n protected _start() {\n const anim = this.animation\n\n // Reset the state of each Animated node.\n getAnimated(this)!.reset(getFluidValue(anim.to))\n\n // Use the current values as the from values.\n if (!anim.immediate) {\n anim.fromValues = anim.values.map(node => node.lastPosition)\n }\n\n if (!isAnimating(this)) {\n setActiveBit(this, true)\n if (!isPaused(this)) {\n this._resume()\n }\n }\n }\n\n protected _resume() {\n // The \"skipAnimation\" global avoids the frameloop.\n if (G.skipAnimation) {\n this.finish()\n } else {\n frameLoop.start(this)\n }\n }\n\n /**\n * Exit the frameloop and notify `onRest` listeners.\n *\n * Always wrap `_stop` calls with `batchedUpdates`.\n */\n protected _stop(goal?: any, cancel?: boolean) {\n if (isAnimating(this)) {\n setActiveBit(this, false)\n\n const anim = this.animation\n each(anim.values, node => {\n node.done = true\n })\n\n // These active handlers must be reset to undefined or else\n // they could be called while idle. But keep them defined\n // when the goal value is dynamic.\n if (anim.toValues) {\n anim.onChange = anim.onPause = anim.onResume = undefined\n }\n\n callFluidObservers(this, {\n type: 'idle',\n parent: this,\n })\n\n const result = cancel\n ? getCancelledResult(this.get())\n : getFinishedResult(this.get(), checkFinished(this, goal ?? anim.to))\n\n flushCalls(this._pendingCalls, result)\n if (anim.changed) {\n anim.changed = false\n sendEvent(this, 'onRest', result, this)\n }\n }\n }\n}\n\n/** Returns true when the current value and goal value are equal. */\nfunction checkFinished(target: SpringValue, to: T | FluidValue) {\n const goal = computeGoal(to)\n const value = computeGoal(target.get())\n return isEqual(value, goal)\n}\n\nexport function createLoopUpdate(\n props: T & { loop?: any; to?: any; from?: any; reverse?: any },\n loop = props.loop,\n to = props.to\n): T | undefined {\n const loopRet = callProp(loop)\n if (loopRet) {\n const overrides = loopRet !== true && inferTo(loopRet)\n const reverse = (overrides || props).reverse\n const reset = !overrides || overrides.reset\n return createUpdate({\n ...props,\n loop,\n\n // Avoid updating default props when looping.\n default: false,\n\n // Never loop the `pause` prop.\n pause: undefined,\n\n // For the \"reverse\" prop to loop as expected, the \"to\" prop\n // must be undefined. The \"reverse\" prop is ignored when the\n // \"to\" prop is an array or function.\n to: !reverse || isAsyncTo(to) ? to : undefined,\n\n // Ignore the \"from\" prop except on reset.\n from: reset ? props.from : undefined,\n reset,\n\n // The \"loop\" prop can return a \"useSpring\" props object to\n // override any of the original props.\n ...overrides,\n })\n }\n}\n\n/**\n * Return a new object based on the given `props`.\n *\n * - All non-reserved props are moved into the `to` prop object.\n * - The `keys` prop is set to an array of affected keys,\n * or `null` if all keys are affected.\n */\nexport function createUpdate(props: any) {\n const { to, from } = (props = inferTo(props))\n\n // Collect the keys affected by this update.\n const keys = new Set()\n\n if (is.obj(to)) findDefined(to, keys)\n if (is.obj(from)) findDefined(from, keys)\n\n // The \"keys\" prop helps in applying updates to affected keys only.\n props.keys = keys.size ? Array.from(keys) : null\n\n return props\n}\n\n/**\n * A modified version of `createUpdate` meant for declarative APIs.\n */\nexport function declareUpdate(props: any) {\n const update = createUpdate(props)\n if (is.und(update.default)) {\n update.default = getDefaultProps(update)\n }\n return update\n}\n\n/** Find keys with defined values */\nfunction findDefined(values: Lookup, keys: Set) {\n eachProp(values, (value, key) => value != null && keys.add(key as any))\n}\n\n/** Event props with \"active handler\" support */\nconst ACTIVE_EVENTS = [\n 'onStart',\n 'onRest',\n 'onChange',\n 'onPause',\n 'onResume',\n] as const\n\nfunction mergeActiveFn(\n target: SpringValue,\n props: SpringProps,\n type: P\n) {\n target.animation[type] =\n props[type] !== getDefaultProp(props, type)\n ? resolveProp(props[type], target.key)\n : undefined\n}\n\ntype EventArgs = Parameters<\n Extract[P], Function>\n>\n\n/** Call the active handler first, then the default handler. */\nfunction sendEvent(\n target: SpringValue,\n type: P,\n ...args: EventArgs\n) {\n target.animation[type]?.(...(args as [any, any]))\n target.defaultProps[type]?.(...(args as [any, any]))\n}\n","import { OneOrMore, UnknownProps, Lookup, Falsy } from '@react-spring/types'\nimport {\n is,\n raf,\n each,\n noop,\n flush,\n toArray,\n eachProp,\n flushCalls,\n addFluidObserver,\n FluidObserver,\n} from '@react-spring/shared'\n\nimport { getDefaultProp } from './helpers'\nimport { FrameValue } from './FrameValue'\nimport type { SpringRef } from './SpringRef'\nimport { SpringValue, createLoopUpdate, createUpdate } from './SpringValue'\nimport { getCancelledResult, getCombinedResult } from './AnimationResult'\nimport { runAsync, RunAsyncState, stopAsync } from './runAsync'\nimport { scheduleProps } from './scheduleProps'\nimport {\n AnimationResult,\n AsyncResult,\n ControllerFlushFn,\n ControllerUpdate,\n OnChange,\n OnRest,\n OnStart,\n SpringChain,\n SpringToFn,\n SpringValues,\n} from './types'\n\n/** Events batched by the `Controller` class */\nconst BATCHED_EVENTS = ['onStart', 'onChange', 'onRest'] as const\n\nlet nextId = 1\n\n/** Queue of pending updates for a `Controller` instance. */\nexport interface ControllerQueue\n extends Array<\n ControllerUpdate & {\n /** The keys affected by this update. When null, all keys are affected. */\n keys: string[] | null\n }\n > {}\n\nexport class Controller {\n readonly id = nextId++\n\n /** The animated values */\n springs: SpringValues = {} as any\n\n /** The queue of props passed to the `update` method. */\n queue: ControllerQueue = []\n\n /**\n * The injected ref. When defined, render-based updates are pushed\n * onto the `queue` instead of being auto-started.\n */\n ref?: SpringRef\n\n /** Custom handler for flushing update queues */\n protected _flush?: ControllerFlushFn\n\n /** These props are used by all future spring values */\n protected _initialProps?: Lookup\n\n /** The counter for tracking `scheduleProps` calls */\n protected _lastAsyncId = 0\n\n /** The values currently being animated */\n protected _active = new Set()\n\n /** The values that changed recently */\n protected _changed = new Set()\n\n /** Equals false when `onStart` listeners can be called */\n protected _started = false\n\n private _item?: any\n\n /** State used by the `runAsync` function */\n protected _state: RunAsyncState = {\n paused: false,\n pauseQueue: new Set(),\n resumeQueue: new Set(),\n timeouts: new Set(),\n }\n\n /** The event queues that are flushed once per frame maximum */\n protected _events = {\n onStart: new Map<\n OnStart, Controller, any>,\n AnimationResult\n >(),\n onChange: new Map<\n OnChange, Controller, any>,\n AnimationResult\n >(),\n onRest: new Map<\n OnRest, Controller, any>,\n AnimationResult\n >(),\n }\n\n constructor(\n props?: ControllerUpdate | null,\n flush?: ControllerFlushFn\n ) {\n this._onFrame = this._onFrame.bind(this)\n if (flush) {\n this._flush = flush\n }\n if (props) {\n this.start({ default: true, ...props })\n }\n }\n\n /**\n * Equals `true` when no spring values are in the frameloop, and\n * no async animation is currently active.\n */\n get idle() {\n return (\n !this._state.asyncTo &&\n Object.values(this.springs as Lookup).every(spring => {\n return spring.idle && !spring.isDelayed && !spring.isPaused\n })\n )\n }\n\n get item() {\n return this._item\n }\n\n set item(item) {\n this._item = item\n }\n\n /** Get the current values of our springs */\n get(): State & UnknownProps {\n const values: any = {}\n this.each((spring, key) => (values[key] = spring.get()))\n return values\n }\n\n /** Set the current values without animating. */\n set(values: Partial) {\n for (const key in values) {\n const value = values[key]\n if (!is.und(value)) {\n this.springs[key].set(value)\n }\n }\n }\n\n /** Push an update onto the queue of each value. */\n update(props: ControllerUpdate | Falsy) {\n if (props) {\n this.queue.push(createUpdate(props))\n }\n return this\n }\n\n /**\n * Start the queued animations for every spring, and resolve the returned\n * promise once all queued animations have finished or been cancelled.\n *\n * When you pass a queue (instead of nothing), that queue is used instead of\n * the queued animations added with the `update` method, which are left alone.\n */\n start(props?: OneOrMore> | null): AsyncResult {\n let { queue } = this as any\n if (props) {\n queue = toArray(props).map(createUpdate)\n } else {\n this.queue = []\n }\n\n if (this._flush) {\n return this._flush(this, queue)\n }\n\n prepareKeys(this, queue)\n return flushUpdateQueue(this, queue)\n }\n\n /** Stop all animations. */\n stop(): this\n /** Stop animations for the given keys. */\n stop(keys: OneOrMore): this\n /** Cancel all animations. */\n stop(cancel: boolean): this\n /** Cancel animations for the given keys. */\n stop(cancel: boolean, keys: OneOrMore): this\n /** Stop some or all animations. */\n stop(keys?: OneOrMore): this\n /** Cancel some or all animations. */\n stop(cancel: boolean, keys?: OneOrMore): this\n /** @internal */\n stop(arg?: boolean | OneOrMore, keys?: OneOrMore) {\n if (arg !== !!arg) {\n keys = arg as OneOrMore\n }\n if (keys) {\n const springs = this.springs as Lookup\n each(toArray(keys) as string[], key => springs[key].stop(!!arg))\n } else {\n stopAsync(this._state, this._lastAsyncId)\n this.each(spring => spring.stop(!!arg))\n }\n return this\n }\n\n /** Freeze the active animation in time */\n pause(keys?: OneOrMore) {\n if (is.und(keys)) {\n this.start({ pause: true })\n } else {\n const springs = this.springs as Lookup\n each(toArray(keys) as string[], key => springs[key].pause())\n }\n return this\n }\n\n /** Resume the animation if paused. */\n resume(keys?: OneOrMore) {\n if (is.und(keys)) {\n this.start({ pause: false })\n } else {\n const springs = this.springs as Lookup\n each(toArray(keys) as string[], key => springs[key].resume())\n }\n return this\n }\n\n /** Call a function once per spring value */\n each(iterator: (spring: SpringValue, key: string) => void) {\n eachProp(this.springs, iterator as any)\n }\n\n /** @internal Called at the end of every animation frame */\n protected _onFrame() {\n const { onStart, onChange, onRest } = this._events\n\n const active = this._active.size > 0\n const changed = this._changed.size > 0\n\n if ((active && !this._started) || (changed && !this._started)) {\n this._started = true\n flush(onStart, ([onStart, result]) => {\n result.value = this.get()\n onStart(result, this, this._item)\n })\n }\n\n const idle = !active && this._started\n const values = changed || (idle && onRest.size) ? this.get() : null\n\n if (changed && onChange.size) {\n flush(onChange, ([onChange, result]) => {\n result.value = values\n onChange(result, this, this._item)\n })\n }\n\n // The \"onRest\" queue is only flushed when all springs are idle.\n if (idle) {\n this._started = false\n flush(onRest, ([onRest, result]) => {\n result.value = values\n onRest(result, this, this._item)\n })\n }\n }\n\n /** @internal */\n eventObserved(event: FrameValue.Event) {\n if (event.type == 'change') {\n this._changed.add(event.parent)\n if (!event.idle) {\n this._active.add(event.parent)\n }\n } else if (event.type == 'idle') {\n this._active.delete(event.parent)\n }\n // The `onFrame` handler runs when a parent is changed or idle.\n else return\n raf.onFrame(this._onFrame)\n }\n}\n\n/**\n * Warning: Props might be mutated.\n */\nexport function flushUpdateQueue(\n ctrl: Controller,\n queue: ControllerQueue\n) {\n return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(\n results => getCombinedResult(ctrl, results)\n )\n}\n\n/**\n * Warning: Props might be mutated.\n *\n * Process a single set of props using the given controller.\n *\n * The returned promise resolves to `true` once the update is\n * applied and any animations it starts are finished without being\n * stopped or cancelled.\n */\nexport async function flushUpdate(\n ctrl: Controller,\n props: ControllerQueue[number],\n isLoop?: boolean\n): AsyncResult {\n const { keys, to, from, loop, onRest, onResolve } = props\n const defaults = is.obj(props.default) && props.default\n\n // Looping must be handled in this function, or else the values\n // would end up looping out-of-sync in many common cases.\n if (loop) {\n props.loop = false\n }\n\n // Treat false like null, which gets ignored.\n if (to === false) props.to = null\n if (from === false) props.from = null\n\n const asyncTo = is.arr(to) || is.fun(to) ? to : undefined\n if (asyncTo) {\n props.to = undefined\n props.onRest = undefined\n if (defaults) {\n defaults.onRest = undefined\n }\n }\n // For certain events, use batching to prevent multiple calls per frame.\n // However, batching is avoided when the `to` prop is async, because any\n // event props are used as default props instead.\n else {\n each(BATCHED_EVENTS, key => {\n const handler: any = props[key]\n if (is.fun(handler)) {\n const queue = ctrl['_events'][key]\n props[key] = (({ finished, cancelled }: AnimationResult) => {\n const result = queue.get(handler)\n if (result) {\n if (!finished) result.finished = false\n if (cancelled) result.cancelled = true\n } else {\n // The \"value\" is set before the \"handler\" is called.\n queue.set(handler, {\n value: null,\n finished: finished || false,\n cancelled: cancelled || false,\n })\n }\n }) as any\n\n // Avoid using a batched `handler` as a default prop.\n if (defaults) {\n defaults[key] = props[key] as any\n }\n }\n })\n }\n\n const state = ctrl['_state']\n\n // Pause/resume the `asyncTo` when `props.pause` is true/false.\n if (props.pause === !state.paused) {\n state.paused = props.pause\n flushCalls(props.pause ? state.pauseQueue : state.resumeQueue)\n }\n // When a controller is paused, its values are also paused.\n else if (state.paused) {\n props.pause = true\n }\n\n const promises: AsyncResult[] = (keys || Object.keys(ctrl.springs)).map(key =>\n ctrl.springs[key]!.start(props as any)\n )\n\n const cancel =\n props.cancel === true || getDefaultProp(props, 'cancel') === true\n\n if (asyncTo || (cancel && state.asyncId)) {\n promises.push(\n scheduleProps(++ctrl['_lastAsyncId'], {\n props,\n state,\n actions: {\n pause: noop,\n resume: noop,\n start(props, resolve) {\n if (cancel) {\n stopAsync(state, ctrl['_lastAsyncId'])\n resolve(getCancelledResult(ctrl))\n } else {\n props.onRest = onRest\n resolve(\n runAsync(\n asyncTo as SpringChain | SpringToFn,\n props,\n state,\n ctrl\n )\n )\n }\n },\n },\n })\n )\n }\n\n // Pause after updating each spring, so they can be resumed separately\n // and so their default `pause` and `cancel` props are updated.\n if (state.paused) {\n // Ensure `this` must be resumed before the returned promise\n // is resolved and before starting the next `loop` repetition.\n await new Promise(resume => {\n state.resumeQueue.add(resume)\n })\n }\n\n const result = getCombinedResult(ctrl, await Promise.all(promises))\n if (loop && result.finished && !(isLoop && result.noop)) {\n const nextProps = createLoopUpdate(props, loop, to)\n if (nextProps) {\n prepareKeys(ctrl, [nextProps])\n return flushUpdate(ctrl, nextProps, true)\n }\n }\n if (onResolve) {\n raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item))\n }\n return result\n}\n\n/**\n * From an array of updates, get the map of `SpringValue` objects\n * by their keys. Springs are created when any update wants to\n * animate a new key.\n *\n * Springs created by `getSprings` are neither cached nor observed\n * until they're given to `setSprings`.\n */\nexport function getSprings(\n ctrl: Controller>,\n props?: OneOrMore>\n) {\n const springs = { ...ctrl.springs }\n if (props) {\n each(toArray(props), (props: any) => {\n if (is.und(props.keys)) {\n props = createUpdate(props)\n }\n if (!is.obj(props.to)) {\n // Avoid passing array/function to each spring.\n props = { ...props, to: undefined }\n }\n prepareSprings(springs as any, props, key => {\n return createSpring(key)\n })\n })\n }\n setSprings(ctrl, springs)\n return springs\n}\n\n/**\n * Tell a controller to manage the given `SpringValue` objects\n * whose key is not already in use.\n */\nexport function setSprings(\n ctrl: Controller>,\n springs: SpringValues\n) {\n eachProp(springs, (spring, key) => {\n if (!ctrl.springs[key]) {\n ctrl.springs[key] = spring\n addFluidObserver(spring, ctrl)\n }\n })\n}\n\nfunction createSpring(key: string, observer?: FluidObserver) {\n const spring = new SpringValue()\n spring.key = key\n if (observer) {\n addFluidObserver(spring, observer)\n }\n return spring\n}\n\n/**\n * Ensure spring objects exist for each defined key.\n *\n * Using the `props`, the `Animated` node of each `SpringValue` may\n * be created or updated.\n */\nfunction prepareSprings(\n springs: SpringValues,\n props: ControllerQueue[number],\n create: (key: string) => SpringValue\n) {\n if (props.keys) {\n each(props.keys, key => {\n const spring = springs[key] || (springs[key] = create(key))\n spring['_prepareNode'](props)\n })\n }\n}\n\n/**\n * Ensure spring objects exist for each defined key, and attach the\n * `ctrl` to them for observation.\n *\n * The queue is expected to contain `createUpdate` results.\n */\nfunction prepareKeys(ctrl: Controller, queue: ControllerQueue[number][]) {\n each(queue, props => {\n prepareSprings(ctrl.springs, props, key => {\n return createSpring(key, ctrl)\n })\n })\n}\n","import * as React from 'react'\nimport { useContext, PropsWithChildren } from 'react'\nimport { useMemoOne } from '@react-spring/shared'\n\n/**\n * This context affects all new and existing `SpringValue` objects\n * created with the hook API or the renderprops API.\n */\nexport interface SpringContext {\n /** Pause all new and existing animations. */\n pause?: boolean\n /** Force all new and existing animations to be immediate. */\n immediate?: boolean\n}\n\nexport const SpringContext = ({\n children,\n ...props\n}: PropsWithChildren) => {\n const inherited = useContext(ctx)\n\n // Inherited values are dominant when truthy.\n const pause = props.pause || !!inherited.pause,\n immediate = props.immediate || !!inherited.immediate\n\n // Memoize the context to avoid unwanted renders.\n props = useMemoOne(() => ({ pause, immediate }), [pause, immediate])\n\n const { Provider } = ctx\n return {children}\n}\n\nconst ctx = makeContext(SpringContext, {} as SpringContext)\n\n// Allow `useContext(SpringContext)` in TypeScript.\nSpringContext.Provider = ctx.Provider\nSpringContext.Consumer = ctx.Consumer\n\n/** Make the `target` compatible with `useContext` */\nfunction makeContext(target: any, init: T): React.Context {\n Object.assign(target, React.createContext(init))\n target.Provider._context = target\n target.Consumer._context = target\n return target\n}\n","import { useEffect, useRef, useState } from 'react'\n\ntype Cache = {\n inputs?: any[]\n result?: T\n}\n\n// TODO: remove once merged (https://github.com/alexreardon/use-memo-one/pull/10)\nexport function useMemoOne(getResult: () => T, inputs?: any[]): T {\n const [initial] = useState(\n (): Cache => ({\n inputs,\n result: getResult(),\n })\n )\n\n const committed = useRef>()\n const prevCache = committed.current\n\n let cache = prevCache\n if (cache) {\n const useCache = Boolean(\n inputs && cache.inputs && areInputsEqual(inputs, cache.inputs)\n )\n if (!useCache) {\n cache = {\n inputs,\n result: getResult(),\n }\n }\n } else {\n cache = initial\n }\n\n useEffect(() => {\n committed.current = cache\n if (prevCache == initial) {\n initial.inputs = initial.result = undefined\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [cache])\n\n return cache.result!\n}\n\nfunction areInputsEqual(next: any[], prev: any[]) {\n if (next.length !== prev.length) {\n return false\n }\n for (let i = 0; i < next.length; i++) {\n if (next[i] !== prev[i]) {\n return false\n }\n }\n return true\n}\n","import { each, is, deprecateDirectCall } from '@react-spring/shared'\nimport { Lookup, Falsy, OneOrMore } from '@react-spring/types'\nimport { AsyncResult, ControllerUpdate } from './types'\nimport { Controller } from './Controller'\n\nexport interface ControllerUpdateFn {\n (i: number, ctrl: Controller): ControllerUpdate | Falsy\n}\n\nexport interface SpringRef {\n (\n props?: ControllerUpdate | ControllerUpdateFn\n ): AsyncResult>[]\n current: Controller[]\n\n /** Add a controller to this ref */\n add(ctrl: Controller): void\n\n /** Remove a controller from this ref */\n delete(ctrl: Controller): void\n\n /** Pause all animations. */\n pause(): this\n /** Pause animations for the given keys. */\n pause(keys: OneOrMore): this\n /** Pause some or all animations. */\n pause(keys?: OneOrMore): this\n\n /** Resume all animations. */\n resume(): this\n /** Resume animations for the given keys. */\n resume(keys: OneOrMore): this\n /** Resume some or all animations. */\n resume(keys?: OneOrMore): this\n\n /** Update the state of each controller without animating. */\n set(values: Partial): void\n /** Update the state of each controller without animating based on their passed state. */\n set(values: (index: number, ctrl: Controller) => Partial): void\n\n /** Start the queued animations of each controller. */\n start(): AsyncResult>[]\n /** Update every controller with the same props. */\n start(props: ControllerUpdate): AsyncResult>[]\n /** Update controllers based on their state. */\n start(props: ControllerUpdateFn): AsyncResult>[]\n /** Start animating each controller. */\n start(\n props?: ControllerUpdate | ControllerUpdateFn\n ): AsyncResult>[]\n\n /** Stop all animations. */\n stop(): this\n /** Stop animations for the given keys. */\n stop(keys: OneOrMore): this\n /** Cancel all animations. */\n stop(cancel: boolean): this\n /** Cancel animations for the given keys. */\n stop(cancel: boolean, keys: OneOrMore): this\n /** Stop some or all animations. */\n stop(keys?: OneOrMore): this\n /** Cancel some or all animations. */\n stop(cancel: boolean, keys?: OneOrMore): this\n\n /** Add the same props to each controller's update queue. */\n update(props: ControllerUpdate): this\n /** Generate separate props for each controller's update queue. */\n update(props: ControllerUpdateFn): this\n /** Add props to each controller's update queue. */\n update(props: ControllerUpdate | ControllerUpdateFn): this\n\n _getProps(\n arg: ControllerUpdate | ControllerUpdateFn,\n ctrl: Controller,\n index: number\n ): ControllerUpdate | Falsy\n}\n\nexport const SpringRef = <\n State extends Lookup = Lookup,\n>(): SpringRef => {\n const current: Controller[] = []\n\n const SpringRef: SpringRef = function (props) {\n deprecateDirectCall()\n\n const results: AsyncResult[] = []\n\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start())\n } else {\n const update = _getProps(props, ctrl, i)\n if (update) {\n results.push(ctrl.start(update))\n }\n }\n })\n\n return results\n }\n\n SpringRef.current = current\n\n /** Add a controller to this ref */\n SpringRef.add = function (ctrl: Controller) {\n if (!current.includes(ctrl)) {\n current.push(ctrl)\n }\n }\n\n /** Remove a controller from this ref */\n SpringRef.delete = function (ctrl: Controller) {\n const i = current.indexOf(ctrl)\n if (~i) current.splice(i, 1)\n }\n\n /** Pause all animations. */\n SpringRef.pause = function () {\n each(current, ctrl => ctrl.pause(...arguments))\n return this\n }\n\n /** Resume all animations. */\n SpringRef.resume = function () {\n each(current, ctrl => ctrl.resume(...arguments))\n return this\n }\n\n /** Update the state of each controller without animating. */\n SpringRef.set = function (\n values:\n | Partial\n | ((i: number, ctrl: Controller) => Partial)\n ) {\n each(current, (ctrl, i) => {\n const update = is.fun(values) ? values(i, ctrl) : values\n if (update) {\n ctrl.set(update)\n }\n })\n }\n\n SpringRef.start = function (props?: object | ControllerUpdateFn) {\n const results: AsyncResult[] = []\n\n each(current, (ctrl, i) => {\n if (is.und(props)) {\n results.push(ctrl.start())\n } else {\n const update = this._getProps(props, ctrl, i)\n if (update) {\n results.push(ctrl.start(update))\n }\n }\n })\n\n return results\n }\n\n /** Stop all animations. */\n SpringRef.stop = function () {\n each(current, ctrl => ctrl.stop(...arguments))\n return this\n }\n\n SpringRef.update = function (props: object | ControllerUpdateFn) {\n each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)))\n return this\n }\n\n /** Overridden by `useTrail` to manipulate props */\n const _getProps = function (\n arg: ControllerUpdate | ControllerUpdateFn,\n ctrl: Controller,\n index: number\n ) {\n return is.fun(arg) ? arg(index, ctrl) : arg\n }\n\n SpringRef._getProps = _getProps\n\n return SpringRef\n}\n","import { useContext, useMemo, useRef } from 'react'\nimport { Lookup } from '@react-spring/types'\nimport {\n is,\n each,\n usePrev,\n useOnce,\n useForceUpdate,\n useIsomorphicLayoutEffect,\n} from '@react-spring/shared'\n\nimport {\n ControllerFlushFn,\n ControllerUpdate,\n PickAnimated,\n SpringValues,\n} from '../types'\nimport { UseSpringProps } from './useSpring'\nimport { declareUpdate } from '../SpringValue'\nimport {\n Controller,\n getSprings,\n flushUpdateQueue,\n setSprings,\n} from '../Controller'\nimport { hasProps, detachRefs, replaceRef } from '../helpers'\nimport { SpringContext } from '../SpringContext'\nimport { SpringRef } from '../SpringRef'\nimport type { SpringRef as SpringRefType } from '../SpringRef'\n\nexport type UseSpringsProps = unknown &\n ControllerUpdate & {\n ref?: SpringRefType\n }\n\n/**\n * When the `deps` argument exists, the `props` function is called whenever\n * the `deps` change on re-render.\n *\n * Without the `deps` argument, the `props` function is only called once.\n */\nexport function useSprings(\n length: number,\n props: (i: number, ctrl: Controller) => Props,\n deps?: readonly any[]\n): PickAnimated extends infer State\n ? State extends Lookup\n ? [SpringValues[], SpringRefType]\n : never\n : never\n\n/**\n * Animations are updated on re-render.\n */\nexport function useSprings(\n length: number,\n props: Props[] & UseSpringsProps>[]\n): SpringValues>[]\n\n/**\n * When the `deps` argument exists, you get the `update` and `stop` function.\n */\nexport function useSprings(\n length: number,\n props: Props[] & UseSpringsProps>[],\n deps: readonly any[] | undefined\n): PickAnimated extends infer State\n ? State extends Lookup\n ? [SpringValues[], SpringRefType]\n : never\n : never\n\n/** @internal */\nexport function useSprings(\n length: number,\n props: any[] | ((i: number, ctrl: Controller) => any),\n deps?: readonly any[]\n): any {\n const propsFn = is.fun(props) && props\n if (propsFn && !deps) deps = []\n\n // Create a local ref if a props function or deps array is ever passed.\n const ref = useMemo(\n () => (propsFn || arguments.length == 3 ? SpringRef() : void 0),\n []\n )\n\n interface State {\n // The controllers used for applying updates.\n ctrls: Controller[]\n // The queue of changes to make on commit.\n queue: Array<() => void>\n // The flush function used by controllers.\n flush: ControllerFlushFn\n }\n\n // Set to 0 to prevent sync flush.\n const layoutId = useRef(0)\n const forceUpdate = useForceUpdate()\n\n // State is updated on commit.\n const state = useMemo(\n (): State => ({\n ctrls: [],\n queue: [],\n flush(ctrl, updates) {\n const springs = getSprings(ctrl, updates)\n\n // Flushing is postponed until the component's commit phase\n // if a spring was created since the last commit.\n const canFlushSync =\n layoutId.current > 0 &&\n !state.queue.length &&\n !Object.keys(springs).some(key => !ctrl.springs[key])\n\n return canFlushSync\n ? flushUpdateQueue(ctrl, updates)\n : new Promise(resolve => {\n setSprings(ctrl, springs)\n state.queue.push(() => {\n resolve(flushUpdateQueue(ctrl, updates))\n })\n forceUpdate()\n })\n },\n }),\n []\n )\n\n const ctrls = useRef([...state.ctrls])\n const updates: any[] = []\n\n // Cache old controllers to dispose in the commit phase.\n const prevLength = usePrev(length) || 0\n\n // Create new controllers when \"length\" increases, and destroy\n // the affected controllers when \"length\" decreases.\n useMemo(() => {\n // Clean up any unused controllers\n each(ctrls.current.slice(length, prevLength), ctrl => {\n detachRefs(ctrl, ref)\n ctrl.stop(true)\n })\n ctrls.current.length = length\n\n declareUpdates(prevLength, length)\n }, [length])\n\n // Update existing controllers when \"deps\" are changed.\n useMemo(() => {\n declareUpdates(0, Math.min(prevLength, length))\n }, deps)\n\n /** Fill the `updates` array with declarative updates for the given index range. */\n function declareUpdates(startIndex: number, endIndex: number) {\n for (let i = startIndex; i < endIndex; i++) {\n const ctrl =\n ctrls.current[i] ||\n (ctrls.current[i] = new Controller(null, state.flush))\n\n const update: UseSpringProps = propsFn\n ? propsFn(i, ctrl)\n : (props as any)[i]\n\n if (update) {\n updates[i] = declareUpdate(update)\n }\n }\n }\n\n // New springs are created during render so users can pass them to\n // their animated components, but new springs aren't cached until the\n // commit phase (see the `useIsomorphicLayoutEffect` callback below).\n const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]))\n\n const context = useContext(SpringContext)\n const prevContext = usePrev(context)\n const hasContext = context !== prevContext && hasProps(context)\n\n useIsomorphicLayoutEffect(() => {\n layoutId.current++\n\n // Replace the cached controllers.\n state.ctrls = ctrls.current\n\n // Flush the commit queue.\n const { queue } = state\n if (queue.length) {\n state.queue = []\n each(queue, cb => cb())\n }\n\n // Update existing controllers.\n each(ctrls.current, (ctrl, i) => {\n // Attach the controller to the local ref.\n ref?.add(ctrl)\n\n // Update the default props.\n if (hasContext) {\n ctrl.start({ default: context })\n }\n\n // Apply updates created during render.\n const update = updates[i]\n if (update) {\n // Update the injected ref if needed.\n replaceRef(ctrl, update.ref)\n\n // When an injected ref exists, the update is postponed\n // until the ref has its `start` method called.\n if (ctrl.ref) {\n ctrl.queue.push(update)\n } else {\n ctrl.start(update)\n }\n }\n })\n })\n\n // Cancel the animations of all controllers on unmount.\n useOnce(() => () => {\n each(state.ctrls, ctrl => ctrl.stop(true))\n })\n\n // Return a deep copy of the `springs` array so the caller can\n // safely mutate it during render.\n const values = springs.map(x => ({ ...x }))\n\n return ref ? [values, ref] : values\n}\n","import { Arrify, InterpolatorArgs, InterpolatorFn } from '@react-spring/types'\nimport {\n is,\n raf,\n each,\n isEqual,\n toArray,\n frameLoop,\n FluidValue,\n getFluidValue,\n createInterpolator,\n Globals as G,\n callFluidObservers,\n addFluidObserver,\n removeFluidObserver,\n hasFluidValue,\n} from '@react-spring/shared'\n\nimport { FrameValue, isFrameValue } from './FrameValue'\nimport {\n getAnimated,\n setAnimated,\n getAnimatedType,\n getPayload,\n} from '@react-spring/animated'\n\n/**\n * An `Interpolation` is a memoized value that's computed whenever one of its\n * `FluidValue` dependencies has its value changed.\n *\n * Other `FrameValue` objects can depend on this. For example, passing an\n * `Interpolation` as the `to` prop of a `useSpring` call will trigger an\n * animation toward the memoized value.\n */\nexport class Interpolation<\n Input = any,\n Output = any,\n> extends FrameValue {\n /** Useful for debugging. */\n key?: string\n\n /** Equals false when in the frameloop */\n idle = true\n\n /** The function that maps inputs values to output */\n readonly calc: InterpolatorFn\n\n /** The inputs which are currently animating */\n protected _active = new Set()\n\n constructor(\n /** The source of input values */\n readonly source: unknown,\n args: InterpolatorArgs\n ) {\n super()\n this.calc = createInterpolator(...args)\n\n const value = this._get()\n const nodeType = getAnimatedType(value)\n\n // Assume the computed value never changes type.\n setAnimated(this, nodeType.create(value))\n }\n\n advance(_dt?: number) {\n const value = this._get()\n const oldValue = this.get()\n if (!isEqual(value, oldValue)) {\n getAnimated(this)!.setValue(value)\n this._onChange(value, this.idle)\n }\n // Become idle when all parents are idle or paused.\n if (!this.idle && checkIdle(this._active)) {\n becomeIdle(this)\n }\n }\n\n protected _get() {\n const inputs: Arrify = is.arr(this.source)\n ? this.source.map(getFluidValue)\n : (toArray(getFluidValue(this.source)) as any)\n\n return this.calc(...inputs)\n }\n\n protected _start() {\n if (this.idle && !checkIdle(this._active)) {\n this.idle = false\n\n each(getPayload(this)!, node => {\n node.done = false\n })\n\n if (G.skipAnimation) {\n raf.batchedUpdates(() => this.advance())\n becomeIdle(this)\n } else {\n frameLoop.start(this)\n }\n }\n }\n\n // Observe our sources only when we're observed.\n protected _attach() {\n let priority = 1\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n addFluidObserver(source, this)\n }\n if (isFrameValue(source)) {\n if (!source.idle) {\n this._active.add(source)\n }\n priority = Math.max(priority, source.priority + 1)\n }\n })\n this.priority = priority\n this._start()\n }\n\n // Stop observing our sources once we have no observers.\n protected _detach() {\n each(toArray(this.source), source => {\n if (hasFluidValue(source)) {\n removeFluidObserver(source, this)\n }\n })\n this._active.clear()\n becomeIdle(this)\n }\n\n /** @internal */\n eventObserved(event: FrameValue.Event) {\n // Update our value when an idle parent is changed,\n // and enter the frameloop when a parent is resumed.\n if (event.type == 'change') {\n if (event.idle) {\n this.advance()\n } else {\n this._active.add(event.parent)\n this._start()\n }\n }\n // Once all parents are idle, the `advance` method runs one more time,\n // so we should avoid updating the `idle` status here.\n else if (event.type == 'idle') {\n this._active.delete(event.parent)\n }\n // Ensure our priority is greater than all parents, which means\n // our value won't be updated until our parents have updated.\n else if (event.type == 'priority') {\n this.priority = toArray(this.source).reduce(\n (highest: number, parent) =>\n Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1),\n 0\n )\n }\n }\n}\n\n/** Returns true for an idle source. */\nfunction isIdle(source: any) {\n return source.idle !== false\n}\n\n/** Return true if all values in the given set are idle or paused. */\nfunction checkIdle(active: Set) {\n // Parents can be active even when paused, so the `.every` check\n // removes us from the frameloop if all active parents are paused.\n return !active.size || Array.from(active).every(isIdle)\n}\n\n/** Become idle if not already idle. */\nfunction becomeIdle(self: Interpolation) {\n if (!self.idle) {\n self.idle = true\n\n each(getPayload(self)!, node => {\n node.done = true\n })\n\n callFluidObservers(self, {\n type: 'idle',\n parent: self,\n })\n }\n}\n","import {\n Globals,\n frameLoop,\n createStringInterpolator,\n} from '@react-spring/shared'\nimport { Interpolation } from './Interpolation'\n\n// Sane defaults\nGlobals.assign({\n createStringInterpolator,\n to: (source, args) => new Interpolation(source, args),\n})\n\nexport { Globals }\n\n/** Advance all animations by the given time */\nexport const update = frameLoop.advance\n","import { Lookup } from '@react-spring/types'\n\nconst isCustomPropRE = /^--/\n\ntype Value = string | number | boolean | null\n\nfunction dangerousStyleValue(name: string, value: Value) {\n if (value == null || typeof value === 'boolean' || value === '') return ''\n if (\n typeof value === 'number' &&\n value !== 0 &&\n !isCustomPropRE.test(name) &&\n !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])\n )\n return value + 'px'\n // Presumes implicit 'px' suffix for unitless numbers\n return ('' + value).trim()\n}\n\nconst attributeCache: Lookup = {}\n\ntype Instance = HTMLDivElement & { style?: Lookup }\n\nexport function applyAnimatedValues(instance: Instance, props: Lookup) {\n if (!instance.nodeType || !instance.setAttribute) {\n return false\n }\n\n const isFilterElement =\n instance.nodeName === 'filter' ||\n (instance.parentNode && instance.parentNode.nodeName === 'filter')\n\n const {\n className,\n style,\n children,\n scrollTop,\n scrollLeft,\n viewBox,\n ...attributes\n } = props!\n\n const values = Object.values(attributes)\n const names = Object.keys(attributes).map(name =>\n isFilterElement || instance.hasAttribute(name)\n ? name\n : attributeCache[name] ||\n (attributeCache[name] = name.replace(\n /([A-Z])/g,\n // Attributes are written in dash case\n n => '-' + n.toLowerCase()\n ))\n )\n\n if (children !== void 0) {\n instance.textContent = children\n }\n\n // Apply CSS styles\n for (const name in style) {\n if (style.hasOwnProperty(name)) {\n const value = dangerousStyleValue(name, style[name])\n if (isCustomPropRE.test(name)) {\n instance.style.setProperty(name, value)\n } else {\n instance.style[name] = value\n }\n }\n }\n\n // Apply DOM attributes\n names.forEach((name, i) => {\n instance.setAttribute(name, values[i])\n })\n\n if (className !== void 0) {\n instance.className = className\n }\n if (scrollTop !== void 0) {\n instance.scrollTop = scrollTop\n }\n if (scrollLeft !== void 0) {\n instance.scrollLeft = scrollLeft\n }\n if (viewBox !== void 0) {\n instance.setAttribute('viewBox', viewBox)\n }\n}\n\nlet isUnitlessNumber: { [key: string]: true } = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n}\n\nconst prefixKey = (prefix: string, key: string) =>\n prefix + key.charAt(0).toUpperCase() + key.substring(1)\nconst prefixes = ['Webkit', 'Ms', 'Moz', 'O']\n\nisUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {\n prefixes.forEach(prefix => (acc[prefixKey(prefix, prop)] = acc[prop]))\n return acc\n}, isUnitlessNumber)\n","import { AnimatedObject } from '@react-spring/animated'\nimport { Lookup, OneOrMore } from '@react-spring/types'\nimport {\n is,\n each,\n toArray,\n eachProp,\n FluidValue,\n FluidEvent,\n getFluidValue,\n callFluidObservers,\n hasFluidValue,\n addFluidObserver,\n removeFluidObserver,\n} from '@react-spring/shared'\n\n/** The transform-functions\n * (https://developer.mozilla.org/fr/docs/Web/CSS/transform-function)\n * that you can pass as keys to your animated component style and that will be\n * animated. Perspective has been left out as it would conflict with the\n * non-transform perspective style.\n */\nconst domTransforms = /^(matrix|translate|scale|rotate|skew)/\n\n// These keys have \"px\" units by default\nconst pxTransforms = /^(translate)/\n\n// These keys have \"deg\" units by default\nconst degTransforms = /^(rotate|skew)/\n\ntype Value = number | string\n\n/** Add a unit to the value when the value is unit-less (eg: a number) */\nconst addUnit = (value: Value, unit: string): string | 0 =>\n is.num(value) && value !== 0 ? value + unit : value\n\n/**\n * Checks if the input value matches the identity value.\n *\n * isValueIdentity(0, 0) // => true\n * isValueIdentity('0px', 0) // => true\n * isValueIdentity([0, '0px', 0], 0) // => true\n */\nconst isValueIdentity = (value: OneOrMore, id: number): boolean =>\n is.arr(value)\n ? value.every(v => isValueIdentity(v, id))\n : is.num(value)\n ? value === id\n : parseFloat(value) === id\n\ntype Inputs = ReadonlyArray>[]\ntype Transforms = ((value: any) => [string, boolean])[]\n\n/**\n * This AnimatedStyle will simplify animated components transforms by\n * interpolating all transform function passed as keys in the style object\n * including shortcuts such as x, y and z for translateX/Y/Z\n */\nexport class AnimatedStyle extends AnimatedObject {\n constructor({ x, y, z, ...style }: Lookup) {\n /**\n * An array of arrays that contains the values (static or fluid)\n * used by each transform function.\n */\n const inputs: Inputs = []\n /**\n * An array of functions that take a list of values (static or fluid)\n * and returns (1) a CSS transform string and (2) a boolean that's true\n * when the transform has no effect (eg: an identity transform).\n */\n const transforms: Transforms = []\n\n // Combine x/y/z into translate3d\n if (x || y || z) {\n inputs.push([x || 0, y || 0, z || 0])\n transforms.push((xyz: Value[]) => [\n `translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, // prettier-ignore\n isValueIdentity(xyz, 0),\n ])\n }\n\n // Pluck any other transform-related props\n eachProp(style, (value, key) => {\n if (key === 'transform') {\n inputs.push([value || ''])\n transforms.push((transform: string) => [transform, transform === ''])\n } else if (domTransforms.test(key)) {\n delete style[key]\n if (is.und(value)) return\n\n const unit = pxTransforms.test(key)\n ? 'px'\n : degTransforms.test(key)\n ? 'deg'\n : ''\n\n inputs.push(toArray(value))\n transforms.push(\n key === 'rotate3d'\n ? ([x, y, z, deg]: [number, number, number, Value]) => [\n `rotate3d(${x},${y},${z},${addUnit(deg, unit)})`,\n isValueIdentity(deg, 0),\n ]\n : (input: Value[]) => [\n `${key}(${input.map(v => addUnit(v, unit)).join(',')})`,\n isValueIdentity(input, key.startsWith('scale') ? 1 : 0),\n ]\n )\n }\n })\n\n if (inputs.length) {\n style.transform = new FluidTransform(inputs, transforms)\n }\n\n super(style)\n }\n}\n\n/** @internal */\nclass FluidTransform extends FluidValue {\n protected _value: string | null = null\n\n constructor(\n readonly inputs: Inputs,\n readonly transforms: Transforms\n ) {\n super()\n }\n\n get() {\n return this._value || (this._value = this._get())\n }\n\n protected _get() {\n let transform = ''\n let identity = true\n each(this.inputs, (input, i) => {\n const arg1 = getFluidValue(input[0])\n const [t, id] = this.transforms[i](\n is.arr(arg1) ? arg1 : input.map(getFluidValue)\n )\n transform += ' ' + t\n identity = identity && id\n })\n return identity ? 'none' : transform\n }\n\n // Start observing our inputs once we have an observer.\n protected observerAdded(count: number) {\n if (count == 1)\n each(this.inputs, input =>\n each(\n input,\n value => hasFluidValue(value) && addFluidObserver(value, this)\n )\n )\n }\n\n // Stop observing our inputs once we have no observers.\n protected observerRemoved(count: number) {\n if (count == 0)\n each(this.inputs, input =>\n each(\n input,\n value => hasFluidValue(value) && removeFluidObserver(value, this)\n )\n )\n }\n\n eventObserved(event: FluidEvent) {\n if (event.type == 'change') {\n this._value = null\n }\n callFluidObservers(this, event)\n }\n}\n","import { Globals } from '@react-spring/core'\nimport { unstable_batchedUpdates } from 'react-dom'\nimport { createStringInterpolator, colors } from '@react-spring/shared'\nimport { createHost } from '@react-spring/animated'\nimport { applyAnimatedValues } from './applyAnimatedValues'\nimport { AnimatedStyle } from './AnimatedStyle'\nimport { WithAnimated } from './animated'\nimport { primitives } from './primitives'\n\nGlobals.assign({\n batchedUpdates: unstable_batchedUpdates,\n createStringInterpolator,\n colors,\n})\n\nconst host = createHost(primitives, {\n applyAnimatedValues,\n createAnimatedStyle: style => new AnimatedStyle(style),\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getComponentProps: ({ scrollTop, scrollLeft, ...props }) => props,\n})\n\nexport const animated = host.animated as WithAnimated\nexport { animated as a }\n\nexport * from './animated'\nexport * from '@react-spring/core'\n","export type ColorName = keyof typeof colors\n\n// http://www.w3.org/TR/css3-color/#svg-color\nexport const colors = {\n transparent: 0x00000000,\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n}\n","export type Primitives = keyof JSX.IntrinsicElements\nexport const primitives: Primitives[] = [\n 'a',\n 'abbr',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'base',\n 'bdi',\n 'bdo',\n 'big',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'data',\n 'datalist',\n 'dd',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'embed',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'iframe',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'keygen',\n 'label',\n 'legend',\n 'li',\n 'link',\n 'main',\n 'map',\n 'mark',\n 'menu',\n 'menuitem',\n 'meta',\n 'meter',\n 'nav',\n 'noscript',\n 'object',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'param',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'script',\n 'section',\n 'select',\n 'small',\n 'source',\n 'span',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'title',\n 'tr',\n 'track',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n // SVG\n 'circle',\n 'clipPath',\n 'defs',\n 'ellipse',\n 'foreignObject',\n 'g',\n 'image',\n 'line',\n 'linearGradient',\n 'mask',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialGradient',\n 'rect',\n 'stop',\n 'svg',\n 'text',\n 'tspan',\n]\n"],"names":["ex","React","require","React__default","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","canUseDOM","window","document","createElement","module","exports","reducePropsToState","handleStateChangeOnClient","mapStateOnServer","Error","WrappedComponent","state","mountedInstances","emitChange","map","instance","props","SideEffect","_PureComponent","subClass","superClass","apply","this","arguments","prototype","create","constructor","__proto__","peek","rewind","recordedState","undefined","_proto","UNSAFE_componentWillMount","push","componentDidUpdate","componentWillUnmount","index","indexOf","splice","render","PureComponent","displayName","name","getDisplayName","runtime","undefined$1","Op","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","GenStateSuspendedYield","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","resolve","reject","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","awrap","async","Promise","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","updateQueue","makeQueue","raf","schedule","writeQueue","write","onStartQueue","onStart","onFrameQueue","onFrame","onFinishQueue","onFinish","timeouts","setTimeout","handler","ms","time","now","cancel","findIndex","t","pendingCount","timeout","findTimeout","start","delete","sync","batchedUpdates","throttle","lastArgs","queuedFn","throttled","_len","args","Array","_key","nativeRaf","requestAnimationFrame","use","impl","performance","Date","catch","console","frameLoop","advance","warn","update","ts","queue","add","loop","prevTs","count","eachSafely","flush","Math","min","Set","current","has","size","each","e","globals_exports","noop","__export","assign","colors","createStringInterpolator","skipAnimation","to","willAdvance","is","arr","isArray","a","fun","str","num","und","isEqual","b","eachProp","ctx","concat","toArray","items","from","clear","flushCalls","isSSR","navigator","test","userAgent","globals","startQueue","currentFrame","prevFrame","priority","idle","animation","raf2","flushStartQueue","startSafely","sort","prevIndex","startUnsafely","includes","other","dt","nextFrame","NUMBER","PERCENTAGE","_len2","parts","_key2","join","rgb","RegExp","rgba","hsl","hsla","hex3","hex4","hex6","hex8","hue2rgb","p","q","hslToRgb","h","s","l","r","g","round","parse255","int","parseInt","parse360","parseFloat","parse1","parsePercentage","colorToRgba","input","int32Color","color","match","exec","normalizeColor","createInterpolator","range","output","extrapolate","config","outputRange","inputRange","extrapolateLeft","extrapolateRight","easing","range2","findRange","inputMin","inputMax","outputMin","outputMax","Infinity","interpolate","c1","c2","c3","c4","PI","c5","bounceOut","x","n1","d1","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","pow","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","easeOutSine","sin","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","sqrt","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInElastic","easeOutElastic","easeInOutElastic","easeInBounce","easeOutBounce","easeInOutBounce","steps","steps2","direction","progress2","expanded","max","rounded","floor","ceil","v","clamp","$get","for","$observers","hasFluidValue","Boolean","getFluidValue","getFluidObservers","target","callFluidObservers","event","observers","observer2","eventObserved","callFluidObserver","FluidValue","get","setFluidGetter","setHidden","addFluidObserver","observerAdded","removeFluidObserver","observerRemoved","namedColorRegex","numberRegex","colorRegex","unitRegex","source","rgbaRegex","cssVariableRegex","variableToRgba","token","fallback","parseCSSVariable","getComputedStyle","documentElement","getPropertyValue","trim","startsWith","value2","rgbaRound","_","p1","p2","p3","p4","createStringInterpolator2","replace","keyframes","Number","interpolators","output2","_objectSpread","_output$find","missingUnit","find","prefix","once","func","called","warnInterpolate","warnDirectCall","isAnimatedString","useIsomorphicLayoutEffect","useEffect","useLayoutEffect","useIsMounted","isMounted","useRef2","useForceUpdate","useState","random","useOnce","effect","useEffect3","emptyDeps","usePrev","prevRef","useRef4","useEffect4","$node","getAnimated","owner","setAnimated","node","defineHidden","getPayload","Animated","payload","AnimatedValue","_value","super","durationProgress","lastPosition","getValue","setValue","step","elapsedTime","lastVelocity","v0","AnimatedString","_string","_toString","is2","goal","TreeContext","dependencies","AnimatedObject","animated","_makePayload","_addToPayload","AnimatedArray","some","makeAnimated","getAnimatedType","parentNode","is3","isAnimatedString2","withAnimated","Component","host","hasInstance","is4","isReactComponent","forwardRef","givenProps","givenRef","instanceRef","useRef","ref","useCallback","updateRef","deps","style","createAnimatedStyle","getAnimatedState","forceUpdate","callback","applyAnimatedValues","observer","PropsObserver","observerRef","each2","dep","usedProps","getComponentProps","cacheKey","is5","callProp","matchProp","resolveProp","prop","getDefaultProp","default","noopTransform","getDefaultProps","transform","DEFAULT_PROPS","defaults2","RESERVED_PROPS","pause","immediate","delay","onProps","onChange","onPause","onResume","onRest","onResolve","trail","expires","initial","enter","leave","children","onDestroyed","callId","parentId","inferTo","to2","forward","getForwardProps","out","val","computeGoal","G","hasProps","isAsyncTo","detachRefs","ctrl","_ctrl$ref","replaceRef","_ctrl$ref2","defaults","tension","friction","mass","damping","AnimationConfig","velocity","sanitizeConfig","config2","decay","isTensionConfig","frequency","duration","emptyArray","Animation","changed","toValues","fromValues","scheduleProps","_ref","defaultProps","actions","_props$cancel","paused","resumeQueue","resume","G2","delayed","pauseQueue","cancelId","getCombinedResult","results","cancelled","getCancelledResult","every","getNoopResult","getFinishedResult","finished","runAsync","asyncTo","prevTo","promise","prevPromise","asyncId","preventBail","bail","bailPromise","bailIfEnded","bailSignal","bailResult","animate","arg1","arg2","BailSignal","skipAnimationSignal","SkipAnimationSignal","G3","stopAsync","props2","eachProp2","result2","animating","bind","all","item","isFrameValue","FrameValue","nextId","FluidValue2","id","_priority","_onPriorityChange","G4","_len3","_key3","toJSON","_attach","_detach","_onChange","parent","$P","hasAnimated","isAnimating","isPaused","setActiveBit","active","IS_ANIMATING","setPausedBit","SpringValue","_state","_pendingCalls","_lastCallId","_lastToId","_memoizedDuration","getFluidValue2","getAnimated2","node2","isDelayed","anim","toArray2","position","elapsed","precision","abs","exp","restVelocity","bounceFactor","bounce","canBounce","isGrowing","isMoving","isBouncing","numSteps","n","progress","currVal","finalVal","_stop","set","raf3","_focus","_set","_update","_onStart","_start","_prepareNode","_ref2","isLoop","_objectDestructuringEmpty","mergeActiveFn","sendEvent","isFrozen","checkFinished","_resume","_merge","nextProps","createLoopUpdate","hasToProp","hasFromProp","prevFrom","hasFromChanged","hasToChanged","hasAsyncTo","newConfig","defaultConfig","mergeConfig","isAnimatable","nodeType","goalType","started","hasValueChanged","ACTIVE_EVENTS","_anim$onStart","oldNode","G5","frameLoop2","callFluidObservers2","loopRet","overrides","createUpdate","findDefined","declareUpdate","update2","eachProp3","_target$animation$typ","_target$animation","_target$defaultProps$","_target$defaultProps","_len4","_key4","BATCHED_EVENTS","nextId2","Controller","flush3","springs","_lastAsyncId","_active","_changed","_started","_events","Map","_onFrame","_flush","spring","_item","is6","toArray3","prepareKeys","flushUpdateQueue","each3","eachProp4","flush2","_ref3","onStart2","_ref4","onChange2","_ref5","onRest2","raf4","flushUpdate","_ref6","flushCalls2","promises","getSprings","prepareSprings","createSpring","setSprings","addFluidObserver2","init","SpringContext","_ref7","_objectWithoutProperties","_excluded","inherited","useContext","getResult","inputs","useState2","committed","useRef3","prevCache","cache","areInputsEqual","useEffect2","useMemoOne","Provider","_context","Consumer","SpringRef","SpringRef2","each4","is7","_getProps","useSprings","propsFn","is8","useMemo","layoutId","ctrls","updates2","springs2","updates","prevLength","declareUpdates","startIndex","endIndex","each5","useContext2","prevContext","hasContext","useIsomorphicLayoutEffect2","cb","Interpolation","calc","_get","getAnimatedType2","setAnimated2","_dt","isEqual2","getAnimated3","checkIdle","becomeIdle","is14","getFluidValue3","toArray5","each10","getPayload2","G6","raf5","frameLoop3","hasFluidValue2","addFluidObserver3","removeFluidObserver2","reduce","highest","isIdle","callFluidObservers3","Globals","frameLoop4","isCustomPropRE","dangerousStyleValue","isUnitlessNumber","attributeCache","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","acc","prefixKey","toUpperCase","substring","domTransforms","pxTransforms","degTransforms","addUnit","unit","isValueIdentity","AnimatedStyle","y","z","_excluded2","transforms","xyz","x2","y2","z2","deg","FluidTransform","identity","unstable_batchedUpdates","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","components","hostConfig","createHost","setAttribute","isFilterElement","nodeName","className","scrollTop","scrollLeft","viewBox","attributes","names","hasAttribute","toLowerCase","textContent","setProperty","_excluded3"],"sourceRoot":""}