-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5a788004d38fcd196ce61d6868b368e1b5218be3-7abc9b7e3b9fcd0c68f8.js.map
1 lines (1 loc) · 269 KB
/
5a788004d38fcd196ce61d6868b368e1b5218be3-7abc9b7e3b9fcd0c68f8.js.map
1
{"version":3,"sources":["webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/style-value-types/dist/style-value-types.es.js","webpack:///./node_modules/framesync/dist/framesync.es.js","webpack:///./node_modules/@popmotion/easing/dist/easing.es.js","webpack:///./node_modules/@popmotion/popcorn/dist/popcorn.es.js","webpack:///./node_modules/stylefire/dist/stylefire.es.js","webpack:///./node_modules/popmotion/dist/popmotion.es.js","webpack:///./node_modules/popmotion-pose/dist/popmotion-pose.es.js","webpack:///./node_modules/pose-core/dist/pose-core.es.js","webpack:///./node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack:///./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js","webpack:///./node_modules/react-pose/dist/react-pose.es.js"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__spreadArrays","il","r","k","a","j","jl","min","max","v","Math","sanitize","Number","toFixed","floatRegex","colorRegex","singleColorRegex","number","test","parse","parseFloat","transform","alpha","default","createUnitType","unit","endsWith","split","degrees","percent","px","vh","vw","progressPercentage","clampRgbUnit","isRgba","undefined","red","isHsla","hue","splitColorValues","terms","values","valuesArray","value","substring","lastIndexOf","getValueFromFunctionString","replace","rgbUnit","round","isColorString","color","colorType","startsWith","rgba","_a","green","blue","_b","alpha$1","rgbaTemplate","hsla","saturation","lightness","hslaTemplate","hex","g","substr","parseInt","convertNumbersToZero","complex","isNaN","numValues","foundNumbers","match","foundColors","input","parsed","push","map","createTransformer","prop","template","token","numColors","numNumbers","output","getAnimatableNone","target","parsedTarget","targetTransformer","prevTime","onNextFrame","window","requestAnimationFrame","callback","timestamp","Date","now","timeToCall","setTimeout","defaultElapsed","useDefaultElapsed","willRunNextFrame","delta","stepsOrder","setWillRunNextFrame","willRun","steps","reduce","acc","key","setRunNextFrame","processToRun","processToRunNextFrame","numThisFrame","isProcessing","cancelled","toKeepAlive","renderStep","WeakSet","cancel","process","indexOfCallback","add","splice","frame","process_1","has","schedule","keepAlive","immediate","addToCurrentBuffer","buffer","delete","sync","step","startLoop","cancelSync","processStep","stepId","processFrame","forEach","getFrameData","reversed","easing","mirrored","createReversedEasing","createBackIn","power","createAnticipateEasing","backEasing","pow","linear","easeIn","createExpoIn","easeOut","easeInOut","circIn","sin","acos","circOut","circInOut","backIn","backOut","backInOut","anticipate","FLOAT_32_SUPPORTED","Float32Array","a1","a2","c","getSlope","calcBezier","cubicBezier","mX1","mY1","mX2","mY2","sampleValues","getTForX","aX","dist","guessForT","initialSlope","intervalStart","currentSample","K_SPLINE_TABLE_SIZE","aGuessT","currentSlope","newtonRaphsonIterate","aA","aB","currentX","currentT","abs","binarySubdivide","calcSampleValues","zeroPoint","x","y","z","isNum","radiansToDegrees","radians","PI","angle","atan2","applyOffset","from","to","hasReceivedFrom","curryRange","func","cv","clamp$1","isPoint","point","isPoint3D","distance1D","distance","xDelta","yDelta","zDelta","sqrt","toFromDifference","mix","progress","mixLinearColor","fromExpo","toExpo","colorTypes","getColorType","find","type","notAnimatable","color$$1","mixColor","fromColorType","toColorType","fromColor","toColor","blended","mixFunc","combineFunctions","pipe","transformers","_i","getMixer","origin","mixComplex","mixArray","slice","blendValue","fromThis","mixObject","analyse","numRGB","numHSL","originStats","targetStats","mixNumber","createMixers","ease","customMixer","mixers","mixerFactory","isArray","numMixers","mixer","easingFunction","testElement","smoothFrame","prevValue","nextValue","duration","smoothing","num","precision","identity","springForce","alterDisplacement","constant","displacement","springModifiedDisplacement","springForceLinear","springForceExpo","velocityPerFrame","xps","frameDuration","velocityPerSecond","velocity","wrap$1","rangeSize","createStyler","onRead","onRender","uncachedValues","Set","_c","useCache","props","state","changedValues","hasChanged","setValue","hasCSSVariable","currentValue","render","styler","get","forceRead","set","forceRender","CAMEL_CASE_PATTERN","camelToDash","str","toLowerCase","camelCache","Map","dashCache","prefixes","numPrefixes","isBrowser","document","setDashPrefix","prefixed","prefixer","asDashCase","cache","createElement","prefix","noPrefix","prefixedPropertyName","charAt","toUpperCase","style","testPrefix","setServerProperty","axes","transformProps","axesAcc","axesKey","transformPropDictionary","dict","isTransformProp","sortTransformProps","transformOriginProps","isTransformOriginProp","valueTypes","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","size","top","right","bottom","left","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","translateX","translateY","translateZ","perspective","opacity","originX","originY","originZ","zIndex","fillOpacity","strokeOpacity","numOctaves","getValueType","getValueAsType","scrollKeys","blacklist","translateAlias","isCustomTemplate","buildStyleProperty","enableHardwareAcceleration","styles","transformOrigin","transformKeys","isDashCase","allowTransformNone","transformIsDefault","hasTransform","hasTransformOrigin","valueType","valueAsType","transformString","transformHasZ","sort","numTransformKeys","trim","buildTransform","createStyleBuilder","_d","_e","cssStyler","options","element","preparseOutput","defaultValueType","domValue","getComputedStyle","getPropertyValue","buildStyles","numChangedValues","setProperty","camelCaseAttributes","progressToPixels","unmeasured","calcOrigin","offset","svgStyleConfig","buildSVGAttrs","dimensions","totalPathLength","cssBuilder","attrs","attrX","attrY","pathLength","pathSpacing","pathOffset","calculateSVGTransformOrigin","createAttrBuilder","svgStyler","getAttribute","buildAttrs","setAttribute","viewport","pageYOffset","pageXOffset","scrollTop","scrollLeft","scrollTo","WeakMap","createDOMStyler","node","HTMLElement","click","isHTMLElement","SVGElement","isSVGElement","getBBox","getBoundingClientRect","getDimensions","getSVGElementDimensions","tagName","isPath","getTotalLength","createCssStyler","nodeOrSelector","getStyler","querySelector","Chainable","applyMiddleware","middleware","funcs","pipedUpdate","update","while","predicate","complete","filter","Observer","observer","_this","onComplete","isActive","updateObserver","error","err","m","createObserver","observerCandidate","_super","Action","start","isComplete","subscription","stop","init","observerProps","api","registerParent","BaseMulticast","subscribers","subscriber","subscribe","unsubscribe","index","parent","stepProgress","segment","subsegment","subsegmentProgressOfTarget","floor","ValueReaction","typeOfV","scheduleVelocityCheck","postRender","velocityCheck","lastUpdated","prev","current","updateCurrent","getVelocityOfCurrent","getSingleVelocity","isValueList","getMapVelocity","getListVelocity","initialSubscription","getVelocity","timeDelta","sub","multi","getCount","getFirst","getOutput","mapApi","setProp","startActions","actions","numActions","updateOutput","numCompletedActions","subs","name","hasCompleted","keys","methodName","composite","args","propKey","starter","parallel","action","parallel$1","unitTypes","findUnitType","createAction","createArrayAction","vectorKeys","firstVectorKey","actionList","childActionProps","reduceArrayValue","getActionCreator","createObjectAction","actionMap","reduceObjectValue","createUnitAction","unitType","createMixerAction","createColorAction","createComplexAction","createVectorAction","typeTests","testNames","isVectorProp","getVectorKeys","testVectorProps","some","createVectorTests","testProp","Boolean","isUnitProp","decay","timeConstant","_f","restDelta","modifyTarget","elapsed","amplitude","idealTarget","frameDelta","exp","isMoving","vectorDecay","spring","stiffness","damping","_g","mass","_h","restSpeed","_j","initialVelocity","position","prevPosition","dampingRatio","angularFreq","envelope","expoDecay","cos","isBelowVelocityThreshold","isBelowDisplacementThreshold","vectorSpring","vectorScrubber","reverseEase","seek","tween","flip","loop","yoyo","repeatDelay","_k","_l","flipCount","_m","yoyoCount","_o","loopCount","playhead","currentProgress","reverseAnimation","updateTween","startTimer","stopTimer","getElapsed","getProgress","pause","resume","newProgress","reverse","clampProgress$1","keyframes","easings","times","tweenProps","defaultEasings","defaultTimings","scrubbers","rangeLength","finalInputIndex","finalScrubberIndex","scrub","progressInRange","interpolateScrubbers","vectorPhysics","acceleration","friction","springStrength","setAcceleration","setFriction","setSpringStrength","setSpringTarget","setVelocity","listen","events","eventNames","eventName","addEventListener","removeEventListener","defaultPointerPos","clientX","clientY","pageX","pageY","eventToPoint","points","isTouchDevice","passive","capture","touches","numTouches","thisTouch","isMouseDevice","BoundingBoxDimension","getFirstTouch","pointer","preventDefault","initialDistance","initialRotation","isGesture","firstTouch","secondTouch","updatePoint","newDistance","newRotation","updateOnMove","mouse","chain","playCurrent","timeToDelay","timeout","clearTimeout","freeze","clamp","conditional","check","interpolate","inputLength","concat","interpolator","fastInterpolate","lastInputIndex","mixerIndex","foundMixerIndex","slowInterpolate","blendArray","blendColor","smooth","strength","previousValue","currentFramestamp","newValue","snap","i_1","numPoints_1","lastDistance","generateStaticSpring","nonlinearSpring","linearSpring","wrap","appendUnit","st","transformMap","childTransformers","childTransformer","getPoseValues","transition","delay","delayChildren","staggerChildren","staggerDirection","afterChildren","beforeChildren","preTransition","applyAtStart","applyAtEnd","resolveProp","poseDefault","pose","defaultValue","resolveProps","resolveTransition","convertTransitionDefinition","getInstantTransition","resolvedTransition","resolvedTransitionMap","keyTransition","applyValues","toApply","setValueNative","valueToSet","createPoseSetter","setterProps","poses","startAction","stopAction","addActionDelay","getTransitionProps","resolveTarget","transformPose","posePriority","next","nextProps","propagate","children","activeActions","activePoses","hasChildren","baseTransitionProps","nextPose","getChildAnimations","animations","stagger","maxStaggerDuration","generateStaggerDuration","child","startChildAnimations","getParentAnimations","getTransition","valuePoses","existingIndex","priority","insertionIndex","poseList","priorityList","priorityIndex","nextHighestPriorityIndex","findInsertionIndex","Promise","transitionProps","resolveTransitionProps","poseDelay","resolve","all","then","defaultReadValueFromSource","includes","isScale","getPosesToSearch","posesToSearch","getInitialValue","initialPose","readValueFromSource","thisPose","valueToResolve","readValueFromPose","scrapeValuesFromPose","userSetValues","createValue","convertValue","initValue","createValues","createValueMap","valuesHaveSet","setValues","poseKey","setNativeValues","ancestorValues","readValue","valueKey","passiveProps","fromParent","valueToBind","ancestors","foundAncestor","label","getAncestorValue","passiveParentKey","passiveParent","bindPassiveValues","generateTransitions","defaultTransitions","applyDefaultTransition","getDefaultProps","bindOnChange","selectValueToRead","extendAPI","config","parentValues","unshift","onChange","selectPoses","unset","poseName","poseProps","posesToSet","poseIndex","currentPose","priorityOrder","animationsToResolve","aP","bP","poseToSet","valueName","selectValue","allValues","selectAllValues","setProps","newProps","_addChild","childConfig","factory","removeChild","clearChildren","destroy","clear","singleAxisPointer","axis","applyXOffset_1","applyYOffset_1","delta_1","pointerX","pointerY","createPointer","axisPointerCreator","measurement","dragBounds","axisPointer","measurementAsPixels","transformQueue","resolvedDragBounds_1","just","underDampedSpring","overDampedSpring","intelligentTransition","dragAction","justAxis","animationLookup","physics","easingLookup","valueTypeTests","testValueType","delay$$1","addListenerToValue","raw","elementStyler","val","transform$$1","createPassiveValue","_","action$$1","reaction","def","isAction","definedEase","baseProps","getAction","outputPipe","createDimensions","hasMeasured","measure","value$$1","makeUIEventApplicator","startEvents","endEvents","startPose","endPose","startCallback","endCallback","useDocumentToEnd","preventScroll","poser","startListener","endListener","moveListener","touchMoveListener","eventStartListener","startEvent","eventEndListener","documentElement","endEvent","buttons","draggable","hoverable","focusable","pressable","eventKeys","findCenter","positionalProps","positionalPropsDict","checkPositionalProp","implicitlyFlipPose","bbox","measureWithoutTransform","prevCenter","nextCenter","flipPose","remainingPose","propsToSet","explicitlyFlipPose","getPosFromMatrix","matrix","pos","getTranslateFromMatrix","pos2","pos3","matrix3d","positionalValues","isPositionalKey","getCurrent","createPoseConfig","onDragStart","onDragEnd","onPressStart","onPressEnd","poseConfig","drag","dragEnd","dragPoses","domPose","pose$$1","isFlipPose","positionalPoseKeys","changedPositionalKeys","elementComputedStyle","applyAtEndHasBeenCopied","fromValueType","originBbox","originComputedStyle","targetBbox","convertPositionalUnits","bound","poserApi","addChild","op","appendEventListeners","reactPropsRegex","fn","arg","charCodeAt","PoseParentConsumer","Consumer","PoseParentProvider","Provider","hasPose","testAlwaysTrue","filterProps","elementType","onValueChange","innerRef","_pose","onPoseComplete","getParentPoseConfig","registerChild","onUnmount","getInitialPoseFromParent","popFromFlow","PoseElement","childrenHandlers","flushChildren","getInitialPose","setRef","ref","Element","shouldForwardProp","parentPose","initialPoses","getFirstPose","firstPose","getSetProps","el","popStyle","offsetTop","offsetLeft","offsetWidth","offsetHeight","componentDidMount","obj","onRegistered","initPoser","getSnapshotBeforeUpdate","componentDidUpdate","prevProps","prevIsArray","nextIsArray","numPrev","setPose","componentWillUnmount","shouldPick","picked","source","componentCache","createComponentFactory","componentFactory","withParent","parentCtx","posed","component","getKey","toString","prependProps","handleChildrenTransitions","newState","displayedChildren","finishedLeaving","hasInitialized","indexedChildren","scheduleChildRemoval","incomingChildren","preEnterPose","enterPose","exitPose","animateOnMount","flipMove","enterAfterExit","propsForChildren","onRest","targetChildren","makeChildList","nextState","prevKeys","nextKeys","hasPropsForChildren","entering","leaving","newlyLeaving","isLeaving","moving","newChildProps","newChild","handleTransition","list","Transition","every","leavingKey","setState","shouldComponentUpdate","defaultProps","getDerivedStateFromProps","PoseGroup"],"mappings":";2FAgBA,IAAIA,EAAgB,SAAUC,EAAGC,GAQ/B,OAPAF,EAAgBG,OAAOC,gBAAkB,CACvCC,UAAW,cACAC,OAAS,SAAUL,EAAGC,GACjCD,EAAEI,UAAYH,IACX,SAAUD,EAAGC,GAChB,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MAEhCN,EAAGC,IAEnB,SAASO,EAAUR,EAAGC,GAE3B,SAASQ,IACPC,KAAKC,YAAcX,EAFrBD,EAAcC,EAAGC,GAIjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GA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AAmBc,GAErBrmC,KAAKunC,SAASjC,EAAUc,KAE1BgB,EAAWlnC,UAAUsnC,sBAAwB,SAAUpU,EAAWmT,GAChE,OAAOvmC,KAAKkU,QAAUqyB,GAExBa,EAAWlnC,UAAUsU,OAAS,WAC5B,OAAOxU,KAAKkU,MAAMqxB,mBAEpB6B,EAAWK,aAAe,CACxBxB,UAAU,EACVC,gBAAgB,EAChBL,aAAc,OACdC,UAAW,QACXC,SAAU,QAEZqB,EAAWM,yBAA2BrC,GAC/B+B,EA1DQ,CA2Df,cACc,SAAU1lB,GAExB,SAASimB,IACP,OAAkB,OAAXjmB,GAAmBA,EAAO7gB,MAAMb,KAAMU,YAAcV,KAF7DF,EAAU6nC,EAAWjmB,GAIrBimB,EAAUznC,UAAUsU,OAAS,WAC3B,OAAO,wBAAc,GAAYpU,EAAS,GAAIJ,KAAKiU,SAErD0zB,EAAUF,aAAe,CACvBxB,UAAU,IATE,CAYd,aACa","file":"5a788004d38fcd196ce61d6868b368e1b5218be3-7abc9b7e3b9fcd0c68f8.js","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nexport function __extends(d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nexport var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport function __createBinding(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}\nexport function __exportStar(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result.default = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n}","import { __assign } from 'tslib';\nvar clamp = function (min, max) {\n return function (v) {\n return Math.max(Math.min(v, max), min);\n };\n};\nvar sanitize = function (v) {\n return v % 1 ? Number(v.toFixed(5)) : v;\n};\nvar floatRegex = /(-)?(\\d[\\d\\.]*)/g;\nvar colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))/gi;\nvar singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\\((-?[\\d\\.]+%?[,\\s]+){2,3}\\s*\\/*\\s*[\\d\\.]+%?\\))$/i;\nvar number = {\n test: function (v) {\n return typeof v === 'number';\n },\n parse: parseFloat,\n transform: function (v) {\n return v;\n }\n};\nvar alpha = __assign(__assign({}, number), {\n transform: clamp(0, 1)\n});\nvar scale = __assign(__assign({}, number), {\n default: 1\n});\nvar createUnitType = function (unit) {\n return {\n test: function (v) {\n return typeof v === 'string' && v.endsWith(unit) && v.split(' ').length === 1;\n },\n parse: parseFloat,\n transform: function (v) {\n return \"\" + v + unit;\n }\n };\n};\nvar degrees = createUnitType('deg');\nvar percent = createUnitType('%');\nvar px = createUnitType('px');\nvar vh = createUnitType('vh');\nvar vw = createUnitType('vw');\nvar progressPercentage = __assign(__assign({}, percent), {\n parse: function (v) {\n return percent.parse(v) / 100;\n },\n transform: function (v) {\n return percent.transform(v * 100);\n }\n});\nvar getValueFromFunctionString = function (value) {\n return value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));\n};\nvar clampRgbUnit = clamp(0, 255);\nvar isRgba = function (v) {\n return v.red !== undefined;\n};\nvar isHsla = function (v) {\n return v.hue !== undefined;\n};\nfunction getValuesAsArray(value) {\n return getValueFromFunctionString(value).replace(/(,|\\/)/g, ' ').split(/ \\s*/);\n}\nvar splitColorValues = function (terms) {\n return function (v) {\n if (typeof v !== 'string') return v;\n var values = {};\n var valuesArray = getValuesAsArray(v);\n for (var i = 0; i < 4; i++) {\n values[terms[i]] = valuesArray[i] !== undefined ? parseFloat(valuesArray[i]) : 1;\n }\n return values;\n };\n};\nvar rgbaTemplate = function (_a) {\n var red = _a.red,\n green = _a.green,\n blue = _a.blue,\n _b = _a.alpha,\n alpha = _b === void 0 ? 1 : _b;\n return \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + alpha + \")\";\n};\nvar hslaTemplate = function (_a) {\n var hue = _a.hue,\n saturation = _a.saturation,\n lightness = _a.lightness,\n _b = _a.alpha,\n alpha = _b === void 0 ? 1 : _b;\n return \"hsla(\" + hue + \", \" + saturation + \", \" + lightness + \", \" + alpha + \")\";\n};\nvar rgbUnit = __assign(__assign({}, number), {\n transform: function (v) {\n return Math.round(clampRgbUnit(v));\n }\n});\nfunction isColorString(color, colorType) {\n return color.startsWith(colorType) && singleColorRegex.test(color);\n}\nvar rgba = {\n test: function (v) {\n return typeof v === 'string' ? isColorString(v, 'rgb') : isRgba(v);\n },\n parse: splitColorValues(['red', 'green', 'blue', 'alpha']),\n transform: function (_a) {\n var red = _a.red,\n green = _a.green,\n blue = _a.blue,\n _b = _a.alpha,\n alpha$1 = _b === void 0 ? 1 : _b;\n return rgbaTemplate({\n red: rgbUnit.transform(red),\n green: rgbUnit.transform(green),\n blue: rgbUnit.transform(blue),\n alpha: sanitize(alpha.transform(alpha$1))\n });\n }\n};\nvar hsla = {\n test: function (v) {\n return typeof v === 'string' ? isColorString(v, 'hsl') : isHsla(v);\n },\n parse: splitColorValues(['hue', 'saturation', 'lightness', 'alpha']),\n transform: function (_a) {\n var hue = _a.hue,\n saturation = _a.saturation,\n lightness = _a.lightness,\n _b = _a.alpha,\n alpha$1 = _b === void 0 ? 1 : _b;\n return hslaTemplate({\n hue: Math.round(hue),\n saturation: percent.transform(sanitize(saturation)),\n lightness: percent.transform(sanitize(lightness)),\n alpha: sanitize(alpha.transform(alpha$1))\n });\n }\n};\nvar hex = __assign(__assign({}, rgba), {\n test: function (v) {\n return typeof v === 'string' && isColorString(v, '#');\n },\n parse: function (v) {\n var r = '';\n var g = '';\n var b = '';\n if (v.length > 4) {\n r = v.substr(1, 2);\n g = v.substr(3, 2);\n b = v.substr(5, 2);\n } else {\n r = v.substr(1, 1);\n g = v.substr(2, 1);\n b = v.substr(3, 1);\n r += r;\n g += g;\n b += b;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: 1\n };\n }\n});\nvar color = {\n test: function (v) {\n return typeof v === 'string' && singleColorRegex.test(v) || isRgba(v) || isHsla(v);\n },\n parse: function (v) {\n if (rgba.test(v)) {\n return rgba.parse(v);\n } else if (hsla.test(v)) {\n return hsla.parse(v);\n } else if (hex.test(v)) {\n return hex.parse(v);\n }\n return v;\n },\n transform: function (v) {\n if (isRgba(v)) {\n return rgba.transform(v);\n } else if (isHsla(v)) {\n return hsla.transform(v);\n }\n return v;\n }\n};\nvar COLOR_TOKEN = '${c}';\nvar NUMBER_TOKEN = '${n}';\nvar convertNumbersToZero = function (v) {\n return typeof v === 'number' ? 0 : v;\n};\nvar complex = {\n test: function (v) {\n if (typeof v !== 'string' || !isNaN(v)) return false;\n var numValues = 0;\n var foundNumbers = v.match(floatRegex);\n var foundColors = v.match(colorRegex);\n if (foundNumbers) numValues += foundNumbers.length;\n if (foundColors) numValues += foundColors.length;\n return numValues > 0;\n },\n parse: function (v) {\n var input = v;\n var parsed = [];\n var foundColors = input.match(colorRegex);\n if (foundColors) {\n input = input.replace(colorRegex, COLOR_TOKEN);\n parsed.push.apply(parsed, foundColors.map(color.parse));\n }\n var foundNumbers = input.match(floatRegex);\n if (foundNumbers) {\n parsed.push.apply(parsed, foundNumbers.map(number.parse));\n }\n return parsed;\n },\n createTransformer: function (prop) {\n var template = prop;\n var token = 0;\n var foundColors = prop.match(colorRegex);\n var numColors = foundColors ? foundColors.length : 0;\n if (foundColors) {\n for (var i = 0; i < numColors; i++) {\n template = template.replace(foundColors[i], COLOR_TOKEN);\n token++;\n }\n }\n var foundNumbers = template.match(floatRegex);\n var numNumbers = foundNumbers ? foundNumbers.length : 0;\n if (foundNumbers) {\n for (var i = 0; i < numNumbers; i++) {\n template = template.replace(foundNumbers[i], NUMBER_TOKEN);\n token++;\n }\n }\n return function (v) {\n var output = template;\n for (var i = 0; i < token; i++) {\n output = output.replace(i < numColors ? COLOR_TOKEN : NUMBER_TOKEN, i < numColors ? color.transform(v[i]) : sanitize(v[i]));\n }\n return output;\n };\n },\n getAnimatableNone: function (target) {\n var parsedTarget = complex.parse(target);\n var targetTransformer = complex.createTransformer(target);\n return targetTransformer(parsedTarget.map(convertNumbersToZero));\n }\n};\nexport { alpha, color, complex, degrees, hex, hsla, number, percent, progressPercentage, px, rgbUnit, rgba, scale, vh, vw };","import { invariant } from 'hey-listen';\nvar prevTime = 0;\nvar onNextFrame = typeof window !== 'undefined' && window.requestAnimationFrame !== undefined ? function (callback) {\n return window.requestAnimationFrame(callback);\n} : function (callback) {\n var timestamp = Date.now();\n var timeToCall = Math.max(0, 16.7 - (timestamp - prevTime));\n prevTime = timestamp + timeToCall;\n setTimeout(function () {\n return callback(prevTime);\n }, timeToCall);\n};\nvar createStep = function (setRunNextFrame) {\n var processToRun = [];\n var processToRunNextFrame = [];\n var numThisFrame = 0;\n var isProcessing = false;\n var i = 0;\n var cancelled = new WeakSet();\n var toKeepAlive = new WeakSet();\n var renderStep = {\n cancel: function (process) {\n var indexOfCallback = processToRunNextFrame.indexOf(process);\n cancelled.add(process);\n if (indexOfCallback !== -1) {\n processToRunNextFrame.splice(indexOfCallback, 1);\n }\n },\n process: function (frame) {\n var _a;\n isProcessing = true;\n _a = [processToRunNextFrame, processToRun], processToRun = _a[0], processToRunNextFrame = _a[1];\n processToRunNextFrame.length = 0;\n numThisFrame = processToRun.length;\n if (numThisFrame) {\n var process_1;\n for (i = 0; i < numThisFrame; i++) {\n process_1 = processToRun[i];\n process_1(frame);\n if (toKeepAlive.has(process_1) === true && !cancelled.has(process_1)) {\n renderStep.schedule(process_1);\n setRunNextFrame(true);\n }\n }\n }\n isProcessing = false;\n },\n schedule: function (process, keepAlive, immediate) {\n if (keepAlive === void 0) {\n keepAlive = false;\n }\n if (immediate === void 0) {\n immediate = false;\n }\n invariant(typeof process === \"function\", \"Argument must be a function\");\n var addToCurrentBuffer = immediate && isProcessing;\n var buffer = addToCurrentBuffer ? processToRun : processToRunNextFrame;\n cancelled.delete(process);\n if (keepAlive) toKeepAlive.add(process);\n if (buffer.indexOf(process) === -1) {\n buffer.push(process);\n if (addToCurrentBuffer) numThisFrame = processToRun.length;\n }\n }\n };\n return renderStep;\n};\nvar maxElapsed = 40;\nvar defaultElapsed = 1 / 60 * 1000;\nvar useDefaultElapsed = true;\nvar willRunNextFrame = false;\nvar isProcessing = false;\nvar frame = {\n delta: 0,\n timestamp: 0\n};\nvar stepsOrder = [\"read\", \"update\", \"preRender\", \"render\", \"postRender\"];\nvar setWillRunNextFrame = function (willRun) {\n return willRunNextFrame = willRun;\n};\nvar steps = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {\n acc[key] = createStep(setWillRunNextFrame);\n return acc;\n}, {});\nvar sync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {\n var step = steps[key];\n acc[key] = function (process, keepAlive, immediate) {\n if (keepAlive === void 0) {\n keepAlive = false;\n }\n if (immediate === void 0) {\n immediate = false;\n }\n if (!willRunNextFrame) startLoop();\n step.schedule(process, keepAlive, immediate);\n return process;\n };\n return acc;\n}, {});\nvar cancelSync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {\n acc[key] = steps[key].cancel;\n return acc;\n}, {});\nvar processStep = function (stepId) {\n return steps[stepId].process(frame);\n};\nvar processFrame = function (timestamp) {\n willRunNextFrame = false;\n frame.delta = useDefaultElapsed ? defaultElapsed : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);\n if (!useDefaultElapsed) defaultElapsed = frame.delta;\n frame.timestamp = timestamp;\n isProcessing = true;\n stepsOrder.forEach(processStep);\n isProcessing = false;\n if (willRunNextFrame) {\n useDefaultElapsed = false;\n onNextFrame(processFrame);\n }\n};\nvar startLoop = function () {\n willRunNextFrame = true;\n useDefaultElapsed = true;\n if (!isProcessing) onNextFrame(processFrame);\n};\nvar getFrameData = function () {\n return frame;\n};\nexport default sync;\nexport { cancelSync, getFrameData };","var DEFAULT_OVERSHOOT_STRENGTH = 1.525;\nvar reversed = function (easing) {\n return function (p) {\n return 1 - easing(1 - p);\n };\n};\nvar mirrored = function (easing) {\n return function (p) {\n return p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n };\n};\nvar createReversedEasing = reversed;\nvar createMirroredEasing = mirrored;\nvar createExpoIn = function (power) {\n return function (p) {\n return Math.pow(p, power);\n };\n};\nvar createBackIn = function (power) {\n return function (p) {\n return p * p * ((power + 1) * p - power);\n };\n};\nvar createAnticipateEasing = function (power) {\n var backEasing = createBackIn(power);\n return function (p) {\n return (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\n };\n};\nvar linear = function (p) {\n return p;\n};\nvar easeIn = /*#__PURE__*/createExpoIn(2);\nvar easeOut = /*#__PURE__*/reversed(easeIn);\nvar easeInOut = /*#__PURE__*/mirrored(easeIn);\nvar circIn = function (p) {\n return 1 - Math.sin(Math.acos(p));\n};\nvar circOut = /*#__PURE__*/reversed(circIn);\nvar circInOut = /*#__PURE__*/mirrored(circOut);\nvar backIn = /*#__PURE__*/createBackIn(DEFAULT_OVERSHOOT_STRENGTH);\nvar backOut = /*#__PURE__*/reversed(backIn);\nvar backInOut = /*#__PURE__*/mirrored(backIn);\nvar anticipate = /*#__PURE__*/createAnticipateEasing(DEFAULT_OVERSHOOT_STRENGTH);\nvar BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;\nvar BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;\nvar BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;\nvar ca = 4356.0 / 361.0;\nvar cb = 35442.0 / 1805.0;\nvar cc = 16061.0 / 1805.0;\nvar bounceOut = function (p) {\n var p2 = p * p;\n return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72;\n};\nvar bounceIn = function (p) {\n return 1.0 - bounceOut(1.0 - p);\n};\nvar bounceInOut = function (p) {\n return p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;\n};\nvar NEWTON_ITERATIONS = 8;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar K_SPLINE_TABLE_SIZE = 11;\nvar K_SAMPLE_STEP_SIZE = 1.0 / (K_SPLINE_TABLE_SIZE - 1.0);\nvar FLOAT_32_SUPPORTED = typeof Float32Array !== 'undefined';\nvar a = function (a1, a2) {\n return 1.0 - 3.0 * a2 + 3.0 * a1;\n};\nvar b = function (a1, a2) {\n return 3.0 * a2 - 6.0 * a1;\n};\nvar c = function (a1) {\n return 3.0 * a1;\n};\nvar getSlope = function (t, a1, a2) {\n return 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);\n};\nvar calcBezier = function (t, a1, a2) {\n return ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n};\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n var sampleValues = FLOAT_32_SUPPORTED ? new Float32Array(K_SPLINE_TABLE_SIZE) : new Array(K_SPLINE_TABLE_SIZE);\n var binarySubdivide = function (aX, aA, aB) {\n var i = 0;\n var currentX;\n var currentT;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n };\n var newtonRaphsonIterate = function (aX, aGuessT) {\n var i = 0;\n var currentSlope = 0;\n var currentX;\n for (; i < NEWTON_ITERATIONS; ++i) {\n currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n var calcSampleValues = function () {\n for (var i = 0; i < K_SPLINE_TABLE_SIZE; ++i) {\n sampleValues[i] = calcBezier(i * K_SAMPLE_STEP_SIZE, mX1, mX2);\n }\n };\n var getTForX = function (aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = K_SPLINE_TABLE_SIZE - 1;\n var dist = 0.0;\n var guessForT = 0.0;\n var initialSlope = 0.0;\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += K_SAMPLE_STEP_SIZE;\n }\n --currentSample;\n dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n guessForT = intervalStart + dist * K_SAMPLE_STEP_SIZE;\n initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + K_SAMPLE_STEP_SIZE);\n }\n };\n calcSampleValues();\n var resolver = function (aX) {\n var returnValue;\n if (mX1 === mY1 && mX2 === mY2) {\n returnValue = aX;\n } else if (aX === 0) {\n returnValue = 0;\n } else if (aX === 1) {\n returnValue = 1;\n } else {\n returnValue = calcBezier(getTForX(aX), mY1, mY2);\n }\n return returnValue;\n };\n return resolver;\n}\nexport { reversed, mirrored, createReversedEasing, createMirroredEasing, createExpoIn, createBackIn, createAnticipateEasing, linear, easeIn, easeOut, easeInOut, circIn, circOut, circInOut, backIn, backOut, backInOut, anticipate, bounceOut, bounceIn, bounceInOut, cubicBezier };","import { hsla, rgba, hex, color, complex } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nimport { getFrameData } from 'framesync';\nimport { createAnticipateEasing, createBackIn, createExpoIn, cubicBezier, linear, easeIn, easeOut, easeInOut, circIn, circOut, circInOut, backIn, backOut, backInOut, anticipate, reversed, mirrored } from '@popmotion/easing';\nexport { createAnticipateEasing, createBackIn, createExpoIn, cubicBezier, linear, easeIn, easeOut, easeInOut, circIn, circOut, circInOut, backIn, backOut, backInOut, anticipate, reversed, mirrored } from '@popmotion/easing';\nvar zeroPoint = {\n x: 0,\n y: 0,\n z: 0\n};\nvar isNum = function (v) {\n return typeof v === 'number';\n};\nvar radiansToDegrees = function (radians) {\n return radians * 180 / Math.PI;\n};\nvar angle = function (a, b) {\n if (b === void 0) {\n b = zeroPoint;\n }\n return radiansToDegrees(Math.atan2(b.y - a.y, b.x - a.x));\n};\nvar applyOffset = function (from, to) {\n var hasReceivedFrom = true;\n if (to === undefined) {\n to = from;\n hasReceivedFrom = false;\n }\n return function (v) {\n if (hasReceivedFrom) {\n return v - from + to;\n } else {\n from = v;\n hasReceivedFrom = true;\n return to;\n }\n };\n};\nvar curryRange = function (func) {\n return function (min, max, v) {\n return v !== undefined ? func(min, max, v) : function (cv) {\n return func(min, max, cv);\n };\n };\n};\nvar clamp = function (min, max, v) {\n return Math.min(Math.max(v, min), max);\n};\nvar clamp$1 = curryRange(clamp);\nvar conditional = function (check, apply) {\n return function (v) {\n return check(v) ? apply(v) : v;\n };\n};\nvar degreesToRadians = function (degrees) {\n return degrees * Math.PI / 180;\n};\nvar isPoint = function (point) {\n return point.hasOwnProperty('x') && point.hasOwnProperty('y');\n};\nvar isPoint3D = function (point) {\n return isPoint(point) && point.hasOwnProperty('z');\n};\nvar distance1D = function (a, b) {\n return Math.abs(a - b);\n};\nvar distance = function (a, b) {\n if (b === void 0) {\n b = zeroPoint;\n }\n if (isNum(a) && isNum(b)) {\n return distance1D(a, b);\n } else if (isPoint(a) && isPoint(b)) {\n var xDelta = distance1D(a.x, b.x);\n var yDelta = distance1D(a.y, b.y);\n var zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0;\n return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));\n }\n return 0;\n};\nvar progress = function (from, to, value) {\n var toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\nvar mix = function (from, to, progress) {\n return -progress * from + progress * to + from;\n};\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\n\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar mixLinearColor = function (from, to, v) {\n var fromExpo = from * from;\n var toExpo = to * to;\n return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));\n};\nvar colorTypes = [hex, rgba, hsla];\nvar getColorType = function (v) {\n return colorTypes.find(function (type) {\n return type.test(v);\n });\n};\nvar notAnimatable = function (color$$1) {\n return \"'\" + color$$1 + \"' is not an animatable color. Use the equivalent color code instead.\";\n};\nvar mixColor = function (from, to) {\n var fromColorType = getColorType(from);\n var toColorType = getColorType(to);\n invariant(!!fromColorType, notAnimatable(from));\n invariant(!!toColorType, notAnimatable(to));\n invariant(fromColorType.transform === toColorType.transform, 'Both colors must be hex/RGBA, OR both must be HSLA.');\n var fromColor = fromColorType.parse(from);\n var toColor = toColorType.parse(to);\n var blended = __assign({}, fromColor);\n var mixFunc = fromColorType === hsla ? mix : mixLinearColor;\n return function (v) {\n for (var key in blended) {\n if (key !== 'alpha') {\n blended[key] = mixFunc(fromColor[key], toColor[key], v);\n }\n }\n blended.alpha = mix(fromColor.alpha, toColor.alpha, v);\n return fromColorType.transform(blended);\n };\n};\nvar combineFunctions = function (a, b) {\n return function (v) {\n return b(a(v));\n };\n};\nvar pipe = function () {\n var transformers = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n transformers[_i] = arguments[_i];\n }\n return transformers.reduce(combineFunctions);\n};\nfunction getMixer(origin, target) {\n if (isNum(origin)) {\n return function (v) {\n return mix(origin, target, v);\n };\n } else if (color.test(origin)) {\n return mixColor(origin, target);\n } else {\n return mixComplex(origin, target);\n }\n}\nvar mixArray = function (from, to) {\n var output = from.slice();\n var numValues = output.length;\n var blendValue = from.map(function (fromThis, i) {\n return getMixer(fromThis, to[i]);\n });\n return function (v) {\n for (var i = 0; i < numValues; i++) {\n output[i] = blendValue[i](v);\n }\n return output;\n };\n};\nvar mixObject = function (origin, target) {\n var output = __assign({}, origin, target);\n var blendValue = {};\n for (var key in output) {\n if (origin[key] !== undefined && target[key] !== undefined) {\n blendValue[key] = getMixer(origin[key], target[key]);\n }\n }\n return function (v) {\n for (var key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n};\nfunction analyse(value) {\n var parsed = complex.parse(value);\n var numValues = parsed.length;\n var numNumbers = 0;\n var numRGB = 0;\n var numHSL = 0;\n for (var i = 0; i < numValues; i++) {\n if (numNumbers || typeof parsed[i] === 'number') {\n numNumbers++;\n } else {\n if (parsed[i].hue !== undefined) {\n numHSL++;\n } else {\n numRGB++;\n }\n }\n }\n return {\n parsed: parsed,\n numNumbers: numNumbers,\n numRGB: numRGB,\n numHSL: numHSL\n };\n}\nvar mixComplex = function (origin, target) {\n var template = complex.createTransformer(target);\n var originStats = analyse(origin);\n var targetStats = analyse(target);\n invariant(originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers, \"Complex values '\" + origin + \"' and '\" + target + \"' too different to mix. Ensure all colors are of the same type.\");\n return pipe(mixArray(originStats.parsed, targetStats.parsed), template);\n};\nvar mixNumber = function (from, to) {\n return function (p) {\n return mix(from, to, p);\n };\n};\nfunction detectMixerFactory(v) {\n if (typeof v === 'number') {\n return mixNumber;\n } else if (typeof v === 'string') {\n if (color.test(v)) {\n return mixColor;\n } else {\n return mixComplex;\n }\n } else if (Array.isArray(v)) {\n return mixArray;\n } else if (typeof v === 'object') {\n return mixObject;\n }\n}\nfunction createMixers(output, ease, customMixer) {\n var mixers = [];\n var mixerFactory = customMixer || detectMixerFactory(output[0]);\n var numMixers = output.length - 1;\n for (var i = 0; i < numMixers; i++) {\n var mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n var easingFunction = Array.isArray(ease) ? ease[i] : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\nfunction fastInterpolate(_a, _b) {\n var from = _a[0],\n to = _a[1];\n var mixer = _b[0];\n return function (v) {\n return mixer(progress(from, to, v));\n };\n}\nfunction slowInterpolate(input, mixers) {\n var inputLength = input.length;\n var lastInputIndex = inputLength - 1;\n return function (v) {\n var mixerIndex = 0;\n var foundMixerIndex = false;\n if (v <= input[0]) {\n foundMixerIndex = true;\n } else if (v >= input[lastInputIndex]) {\n mixerIndex = lastInputIndex - 1;\n foundMixerIndex = true;\n }\n if (!foundMixerIndex) {\n var i = 1;\n for (; i < inputLength; i++) {\n if (input[i] > v || i === lastInputIndex) {\n break;\n }\n }\n mixerIndex = i - 1;\n }\n var progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v);\n return mixers[mixerIndex](progressInRange);\n };\n}\nfunction interpolate(input, output, _a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.clamp,\n clamp = _c === void 0 ? true : _c,\n ease = _b.ease,\n mixer = _b.mixer;\n var inputLength = input.length;\n invariant(inputLength === output.length, 'Both input and output ranges must be the same length');\n invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');\n if (input[0] > input[inputLength - 1]) {\n input = [].concat(input);\n output = [].concat(output);\n input.reverse();\n output.reverse();\n }\n var mixers = createMixers(output, ease, mixer);\n var interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers);\n return clamp ? pipe(clamp$1(input[0], input[inputLength - 1]), interpolator) : interpolator;\n}\nvar pointFromVector = function (origin, angle, distance) {\n angle = degreesToRadians(angle);\n return {\n x: distance * Math.cos(angle) + origin.x,\n y: distance * Math.sin(angle) + origin.y\n };\n};\nvar toDecimal = function (num, precision) {\n if (precision === void 0) {\n precision = 2;\n }\n precision = Math.pow(10, precision);\n return Math.round(num * precision) / precision;\n};\nvar smoothFrame = function (prevValue, nextValue, duration, smoothing) {\n if (smoothing === void 0) {\n smoothing = 0;\n }\n return toDecimal(prevValue + duration * (nextValue - prevValue) / Math.max(smoothing, duration));\n};\nvar smooth = function (strength) {\n if (strength === void 0) {\n strength = 50;\n }\n var previousValue = 0;\n var lastUpdated = 0;\n return function (v) {\n var currentFramestamp = getFrameData().timestamp;\n var timeDelta = currentFramestamp !== lastUpdated ? currentFramestamp - lastUpdated : 0;\n var newValue = timeDelta ? smoothFrame(previousValue, v, timeDelta, strength) : previousValue;\n lastUpdated = currentFramestamp;\n previousValue = newValue;\n return newValue;\n };\n};\nvar snap = function (points) {\n if (typeof points === 'number') {\n return function (v) {\n return Math.round(v / points) * points;\n };\n } else {\n var i_1 = 0;\n var numPoints_1 = points.length;\n return function (v) {\n var lastDistance = Math.abs(points[0] - v);\n for (i_1 = 1; i_1 < numPoints_1; i_1++) {\n var point = points[i_1];\n var distance = Math.abs(point - v);\n if (distance === 0) return point;\n if (distance > lastDistance) return points[i_1 - 1];\n if (i_1 === numPoints_1 - 1) return point;\n lastDistance = distance;\n }\n };\n }\n};\nvar identity = function (v) {\n return v;\n};\nvar springForce = function (alterDisplacement) {\n if (alterDisplacement === void 0) {\n alterDisplacement = identity;\n }\n return curryRange(function (constant, origin, v) {\n var displacement = origin - v;\n var springModifiedDisplacement = -(0 - constant + 1) * (0 - alterDisplacement(Math.abs(displacement)));\n return displacement <= 0 ? origin + springModifiedDisplacement : origin - springModifiedDisplacement;\n });\n};\nvar springForceLinear = springForce();\nvar springForceExpo = springForce(Math.sqrt);\nvar velocityPerFrame = function (xps, frameDuration) {\n return isNum(xps) ? xps / (1000 / frameDuration) : 0;\n};\nvar velocityPerSecond = function (velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n};\nvar wrap = function (min, max, v) {\n var rangeSize = max - min;\n return ((v - min) % rangeSize + rangeSize) % rangeSize + min;\n};\nvar wrap$1 = curryRange(wrap);\nvar clampProgress = clamp$1(0, 1);\nvar steps = function (steps, direction) {\n if (direction === void 0) {\n direction = 'end';\n }\n return function (progress) {\n progress = direction === 'end' ? Math.min(progress, 0.999) : Math.max(progress, 0.001);\n var expanded = progress * steps;\n var rounded = direction === 'end' ? Math.floor(expanded) : Math.ceil(expanded);\n return clampProgress(rounded / steps);\n };\n};\nexport { angle, applyOffset, clamp$1 as clamp, conditional, degreesToRadians, distance, interpolate, isPoint, isPoint3D, mix, mixArray, mixColor, mixComplex, mixObject, pipe, pointFromVector, progress, radiansToDegrees, smooth, smoothFrame, snap, springForce, springForceExpo, springForceLinear, steps, toDecimal, velocityPerFrame, velocityPerSecond, wrap$1 as wrap };","import { __rest, __assign } from 'tslib';\nimport sync from 'framesync';\nimport { number, color, px, degrees, scale, alpha, progressPercentage } from 'style-value-types';\nimport { invariant } from 'hey-listen';\nvar createStyler = function (_a) {\n var onRead = _a.onRead,\n onRender = _a.onRender,\n _b = _a.uncachedValues,\n uncachedValues = _b === void 0 ? new Set() : _b,\n _c = _a.useCache,\n useCache = _c === void 0 ? true : _c;\n return function (_a) {\n if (_a === void 0) {\n _a = {};\n }\n var props = __rest(_a, []);\n var state = {};\n var changedValues = [];\n var hasChanged = false;\n function setValue(key, value) {\n if (key.startsWith('--')) {\n props.hasCSSVariable = true;\n }\n var currentValue = state[key];\n state[key] = value;\n if (state[key] === currentValue) return;\n if (changedValues.indexOf(key) === -1) {\n changedValues.push(key);\n }\n if (!hasChanged) {\n hasChanged = true;\n sync.render(styler.render);\n }\n }\n var styler = {\n get: function (key, forceRead) {\n if (forceRead === void 0) {\n forceRead = false;\n }\n var useCached = !forceRead && useCache && !uncachedValues.has(key) && state[key] !== undefined;\n return useCached ? state[key] : onRead(key, props);\n },\n set: function (values, value) {\n if (typeof values === 'string') {\n setValue(values, value);\n } else {\n for (var key in values) {\n setValue(key, values[key]);\n }\n }\n return this;\n },\n render: function (forceRender) {\n if (forceRender === void 0) {\n forceRender = false;\n }\n if (hasChanged || forceRender === true) {\n onRender(state, props, changedValues);\n hasChanged = false;\n changedValues.length = 0;\n }\n return this;\n }\n };\n return styler;\n };\n};\nvar CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;\nvar REPLACE_TEMPLATE = '$1-$2';\nvar camelToDash = function (str) {\n return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();\n};\nvar camelCache = /*#__PURE__*/new Map();\nvar dashCache = /*#__PURE__*/new Map();\nvar prefixes = ['Webkit', 'Moz', 'O', 'ms', ''];\nvar numPrefixes = prefixes.length;\nvar isBrowser = typeof document !== 'undefined';\nvar testElement;\nvar setDashPrefix = function (key, prefixed) {\n return dashCache.set(key, camelToDash(prefixed));\n};\nvar testPrefix = function (key) {\n testElement = testElement || document.createElement('div');\n for (var i = 0; i < numPrefixes; i++) {\n var prefix = prefixes[i];\n var noPrefix = prefix === '';\n var prefixedPropertyName = noPrefix ? key : prefix + key.charAt(0).toUpperCase() + key.slice(1);\n if (prefixedPropertyName in testElement.style || noPrefix) {\n if (noPrefix && key === 'clipPath' && dashCache.has(key)) {\n return;\n }\n camelCache.set(key, prefixedPropertyName);\n setDashPrefix(key, \"\" + (noPrefix ? '' : '-') + camelToDash(prefixedPropertyName));\n }\n }\n};\nvar setServerProperty = function (key) {\n return setDashPrefix(key, key);\n};\nvar prefixer = function (key, asDashCase) {\n if (asDashCase === void 0) {\n asDashCase = false;\n }\n var cache = asDashCase ? dashCache : camelCache;\n if (!cache.has(key)) {\n isBrowser ? testPrefix(key) : setServerProperty(key);\n }\n return cache.get(key) || key;\n};\nvar axes = ['', 'X', 'Y', 'Z'];\nvar order = ['translate', 'scale', 'rotate', 'skew', 'transformPerspective'];\nvar transformProps = /*#__PURE__*/order.reduce(function (acc, key) {\n return axes.reduce(function (axesAcc, axesKey) {\n axesAcc.push(key + axesKey);\n return axesAcc;\n }, acc);\n}, ['x', 'y', 'z']);\nvar transformPropDictionary = /*#__PURE__*/transformProps.reduce(function (dict, key) {\n dict[key] = true;\n return dict;\n}, {});\nfunction isTransformProp(key) {\n return transformPropDictionary[key] === true;\n}\nfunction sortTransformProps(a, b) {\n return transformProps.indexOf(a) - transformProps.indexOf(b);\n}\nvar transformOriginProps = /*#__PURE__*/new Set(['originX', 'originY', 'originZ']);\nfunction isTransformOriginProp(key) {\n return transformOriginProps.has(key);\n}\nvar int = /*#__PURE__*/__assign(/*#__PURE__*/__assign({}, number), {\n transform: Math.round\n});\nvar valueTypes = {\n color: color,\n backgroundColor: color,\n outlineColor: color,\n fill: color,\n stroke: color,\n borderColor: color,\n borderTopColor: color,\n borderRightColor: color,\n borderBottomColor: color,\n borderLeftColor: color,\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n size: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n rotate: degrees,\n rotateX: degrees,\n rotateY: degrees,\n rotateZ: degrees,\n scale: scale,\n scaleX: scale,\n scaleY: scale,\n scaleZ: scale,\n skew: degrees,\n skewX: degrees,\n skewY: degrees,\n distance: px,\n translateX: px,\n translateY: px,\n translateZ: px,\n x: px,\n y: px,\n z: px,\n perspective: px,\n opacity: alpha,\n originX: progressPercentage,\n originY: progressPercentage,\n originZ: px,\n zIndex: int,\n fillOpacity: alpha,\n strokeOpacity: alpha,\n numOctaves: int\n};\nvar getValueType = function (key) {\n return valueTypes[key];\n};\nvar getValueAsType = function (value, type) {\n return type && typeof value === 'number' ? type.transform(value) : value;\n};\nvar SCROLL_LEFT = 'scrollLeft';\nvar SCROLL_TOP = 'scrollTop';\nvar scrollKeys = /*#__PURE__*/new Set([SCROLL_LEFT, SCROLL_TOP]);\nvar blacklist = /*#__PURE__*/new Set([SCROLL_LEFT, SCROLL_TOP, 'transform']);\nvar translateAlias = {\n x: 'translateX',\n y: 'translateY',\n z: 'translateZ'\n};\nfunction isCustomTemplate(v) {\n return typeof v === 'function';\n}\nfunction buildTransform(state, transform, transformKeys, transformIsDefault, enableHardwareAcceleration, allowTransformNone) {\n if (allowTransformNone === void 0) {\n allowTransformNone = true;\n }\n var transformString = '';\n var transformHasZ = false;\n transformKeys.sort(sortTransformProps);\n var numTransformKeys = transformKeys.length;\n for (var i = 0; i < numTransformKeys; i++) {\n var key = transformKeys[i];\n transformString += (translateAlias[key] || key) + \"(\" + transform[key] + \") \";\n transformHasZ = key === 'z' ? true : transformHasZ;\n }\n if (!transformHasZ && enableHardwareAcceleration) {\n transformString += 'translateZ(0)';\n } else {\n transformString = transformString.trim();\n }\n if (isCustomTemplate(state.transform)) {\n transformString = state.transform(transform, transformIsDefault ? '' : transformString);\n } else if (allowTransformNone && transformIsDefault) {\n transformString = 'none';\n }\n return transformString;\n}\nfunction buildStyleProperty(state, enableHardwareAcceleration, styles, transform, transformOrigin, transformKeys, isDashCase, allowTransformNone) {\n if (enableHardwareAcceleration === void 0) {\n enableHardwareAcceleration = true;\n }\n if (styles === void 0) {\n styles = {};\n }\n if (transform === void 0) {\n transform = {};\n }\n if (transformOrigin === void 0) {\n transformOrigin = {};\n }\n if (transformKeys === void 0) {\n transformKeys = [];\n }\n if (isDashCase === void 0) {\n isDashCase = false;\n }\n if (allowTransformNone === void 0) {\n allowTransformNone = true;\n }\n var transformIsDefault = true;\n var hasTransform = false;\n var hasTransformOrigin = false;\n for (var key in state) {\n var value = state[key];\n var valueType = getValueType(key);\n var valueAsType = getValueAsType(value, valueType);\n if (isTransformProp(key)) {\n hasTransform = true;\n transform[key] = valueAsType;\n transformKeys.push(key);\n if (transformIsDefault) {\n if (valueType.default && value !== valueType.default || !valueType.default && value !== 0) {\n transformIsDefault = false;\n }\n }\n } else if (isTransformOriginProp(key)) {\n transformOrigin[key] = valueAsType;\n hasTransformOrigin = true;\n } else if (!blacklist.has(key) || !isCustomTemplate(valueAsType)) {\n styles[prefixer(key, isDashCase)] = valueAsType;\n }\n }\n if (hasTransform || typeof state.transform === 'function') {\n styles.transform = buildTransform(state, transform, transformKeys, transformIsDefault, enableHardwareAcceleration, allowTransformNone);\n }\n if (hasTransformOrigin) {\n styles.transformOrigin = (transformOrigin.originX || '50%') + \" \" + (transformOrigin.originY || '50%') + \" \" + (transformOrigin.originZ || 0);\n }\n return styles;\n}\nfunction createStyleBuilder(_a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.enableHardwareAcceleration,\n enableHardwareAcceleration = _c === void 0 ? true : _c,\n _d = _b.isDashCase,\n isDashCase = _d === void 0 ? true : _d,\n _e = _b.allowTransformNone,\n allowTransformNone = _e === void 0 ? true : _e;\n var styles = {};\n var transform = {};\n var transformOrigin = {};\n var transformKeys = [];\n return function (state) {\n transformKeys.length = 0;\n buildStyleProperty(state, enableHardwareAcceleration, styles, transform, transformOrigin, transformKeys, isDashCase, allowTransformNone);\n return styles;\n };\n}\nfunction onRead(key, options) {\n var element = options.element,\n preparseOutput = options.preparseOutput;\n var defaultValueType = getValueType(key);\n if (isTransformProp(key)) {\n return defaultValueType ? defaultValueType.default || 0 : 0;\n } else if (scrollKeys.has(key)) {\n return element[key];\n } else {\n var domValue = window.getComputedStyle(element, null).getPropertyValue(prefixer(key, true)) || 0;\n return preparseOutput && defaultValueType && defaultValueType.test(domValue) && defaultValueType.parse ? defaultValueType.parse(domValue) : domValue;\n }\n}\nfunction onRender(state, _a, changedValues) {\n var element = _a.element,\n buildStyles = _a.buildStyles,\n hasCSSVariable = _a.hasCSSVariable;\n Object.assign(element.style, buildStyles(state));\n if (hasCSSVariable) {\n var numChangedValues = changedValues.length;\n for (var i = 0; i < numChangedValues; i++) {\n var key = changedValues[i];\n if (key.startsWith('--')) {\n element.style.setProperty(key, state[key]);\n }\n }\n }\n if (changedValues.indexOf(SCROLL_LEFT) !== -1) {\n element[SCROLL_LEFT] = state[SCROLL_LEFT];\n }\n if (changedValues.indexOf(SCROLL_TOP) !== -1) {\n element[SCROLL_TOP] = state[SCROLL_TOP];\n }\n}\nvar cssStyler = /*#__PURE__*/createStyler({\n onRead: onRead,\n onRender: onRender,\n uncachedValues: scrollKeys\n});\nfunction createCssStyler(element, _a) {\n if (_a === void 0) {\n _a = {};\n }\n var enableHardwareAcceleration = _a.enableHardwareAcceleration,\n allowTransformNone = _a.allowTransformNone,\n props = __rest(_a, [\"enableHardwareAcceleration\", \"allowTransformNone\"]);\n return cssStyler(__assign({\n element: element,\n buildStyles: createStyleBuilder({\n enableHardwareAcceleration: enableHardwareAcceleration,\n allowTransformNone: allowTransformNone\n }),\n preparseOutput: true\n }, props));\n}\nvar camelCaseAttributes = /*#__PURE__*/new Set(['baseFrequency', 'diffuseConstant', 'kernelMatrix', 'kernelUnitLength', 'keySplines', 'keyTimes', 'limitingConeAngle', 'markerHeight', 'markerWidth', 'numOctaves', 'targetX', 'targetY', 'surfaceScale', 'specularConstant', 'specularExponent', 'stdDeviation', 'tableValues']);\nvar defaultOrigin = 0.5;\nvar svgAttrsTemplate = function () {\n return {\n style: {}\n };\n};\nvar progressToPixels = function (progress, length) {\n return px.transform(progress * length);\n};\nvar unmeasured = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n};\nfunction calcOrigin(origin, offset, size) {\n return typeof origin === 'string' ? origin : px.transform(offset + size * origin);\n}\nfunction calculateSVGTransformOrigin(dimensions, originX, originY) {\n return calcOrigin(originX, dimensions.x, dimensions.width) + \" \" + calcOrigin(originY, dimensions.y, dimensions.height);\n}\nvar svgStyleConfig = {\n enableHardwareAcceleration: false,\n isDashCase: false\n};\nfunction buildSVGAttrs(_a, dimensions, totalPathLength, cssBuilder, attrs, isDashCase) {\n if (dimensions === void 0) {\n dimensions = unmeasured;\n }\n if (cssBuilder === void 0) {\n cssBuilder = createStyleBuilder(svgStyleConfig);\n }\n if (attrs === void 0) {\n attrs = svgAttrsTemplate();\n }\n if (isDashCase === void 0) {\n isDashCase = true;\n }\n var attrX = _a.attrX,\n attrY = _a.attrY,\n originX = _a.originX,\n originY = _a.originY,\n pathLength = _a.pathLength,\n _b = _a.pathSpacing,\n pathSpacing = _b === void 0 ? 1 : _b,\n _c = _a.pathOffset,\n pathOffset = _c === void 0 ? 0 : _c,\n state = __rest(_a, [\"attrX\", \"attrY\", \"originX\", \"originY\", \"pathLength\", \"pathSpacing\", \"pathOffset\"]);\n var style = cssBuilder(state);\n for (var key in style) {\n if (key === 'transform') {\n attrs.style.transform = style[key];\n } else {\n var attrKey = isDashCase && !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n attrs[attrKey] = style[key];\n }\n }\n if (originX !== undefined || originY !== undefined || style.transform) {\n attrs.style.transformOrigin = calculateSVGTransformOrigin(dimensions, originX !== undefined ? originX : defaultOrigin, originY !== undefined ? originY : defaultOrigin);\n }\n if (attrX !== undefined) attrs.x = attrX;\n if (attrY !== undefined) attrs.y = attrY;\n if (totalPathLength !== undefined && pathLength !== undefined) {\n attrs[isDashCase ? 'stroke-dashoffset' : 'strokeDashoffset'] = progressToPixels(-pathOffset, totalPathLength);\n attrs[isDashCase ? 'stroke-dasharray' : 'strokeDasharray'] = progressToPixels(pathLength, totalPathLength) + \" \" + progressToPixels(pathSpacing, totalPathLength);\n }\n return attrs;\n}\nfunction createAttrBuilder(dimensions, totalPathLength, isDashCase) {\n if (isDashCase === void 0) {\n isDashCase = true;\n }\n var attrs = svgAttrsTemplate();\n var cssBuilder = createStyleBuilder(svgStyleConfig);\n return function (state) {\n return buildSVGAttrs(state, dimensions, totalPathLength, cssBuilder, attrs, isDashCase);\n };\n}\nvar getDimensions = function (element) {\n return typeof element.getBBox === 'function' ? element.getBBox() : element.getBoundingClientRect();\n};\nvar getSVGElementDimensions = function (element) {\n try {\n return getDimensions(element);\n } catch (e) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n }\n};\nvar isPath = function (element) {\n return element.tagName === 'path';\n};\nvar svgStyler = /*#__PURE__*/createStyler({\n onRead: function (key, _a) {\n var element = _a.element;\n key = !camelCaseAttributes.has(key) ? camelToDash(key) : key;\n if (!isTransformProp(key)) {\n return element.getAttribute(key);\n } else {\n var valueType = getValueType(key);\n return valueType ? valueType.default || 0 : 0;\n }\n },\n onRender: function (state, _a) {\n var element = _a.element,\n buildAttrs = _a.buildAttrs;\n var attrs = buildAttrs(state);\n for (var key in attrs) {\n if (key === 'style') {\n Object.assign(element.style, attrs.style);\n } else {\n element.setAttribute(key, attrs[key]);\n }\n }\n }\n});\nvar svg = function (element) {\n var dimensions = getSVGElementDimensions(element);\n var pathLength = isPath(element) && element.getTotalLength ? element.getTotalLength() : undefined;\n return svgStyler({\n element: element,\n buildAttrs: createAttrBuilder(dimensions, pathLength)\n });\n};\nvar viewport = /*#__PURE__*/createStyler({\n useCache: false,\n onRead: function (key) {\n return key === 'scrollTop' ? window.pageYOffset : window.pageXOffset;\n },\n onRender: function (_a) {\n var _b = _a.scrollTop,\n scrollTop = _b === void 0 ? 0 : _b,\n _c = _a.scrollLeft,\n scrollLeft = _c === void 0 ? 0 : _c;\n return window.scrollTo(scrollLeft, scrollTop);\n }\n});\nvar cache = /*#__PURE__*/new WeakMap();\nvar isHTMLElement = function (node) {\n return node instanceof HTMLElement || typeof node.click === 'function';\n};\nvar isSVGElement = function (node) {\n return node instanceof SVGElement || 'ownerSVGElement' in node;\n};\nvar createDOMStyler = function (node, props) {\n var styler;\n if (node === window) {\n styler = viewport(node);\n } else if (isHTMLElement(node)) {\n styler = createCssStyler(node, props);\n } else if (isSVGElement(node)) {\n styler = svg(node);\n }\n invariant(styler !== undefined, 'No valid node provided. Node must be HTMLElement, SVGElement or window.');\n cache.set(node, styler);\n return styler;\n};\nvar getStyler = function (node, props) {\n return cache.has(node) ? cache.get(node) : createDOMStyler(node, props);\n};\nfunction index(nodeOrSelector, props) {\n var node = typeof nodeOrSelector === 'string' ? document.querySelector(nodeOrSelector) : nodeOrSelector;\n return getStyler(node, props);\n}\nexport default index;\nexport { buildSVGAttrs, buildStyleProperty, createStyler as createStylerFactory, isTransformProp, transformProps };","import { __assign, __spreadArrays, __extends, __rest } from 'tslib';\nimport { pipe, angle, degreesToRadians, distance, isPoint3D, isPoint, mix, pointFromVector, progress, radiansToDegrees, smoothFrame, velocityPerFrame, velocityPerSecond, mixComplex, mixColor, clamp, applyOffset, conditional, interpolate, mixArray, smooth, snap, springForce, springForceExpo, springForceLinear, wrap } from '@popmotion/popcorn';\nimport sync, { getFrameData, cancelSync } from 'framesync';\nimport { color, complex, px, percent, degrees, vh, vw, number } from 'style-value-types';\nimport * as styleValueTypes from 'style-value-types';\nexport { styleValueTypes as valueTypes };\nimport { createReversedEasing, linear, easeOut, easeInOut } from '@popmotion/easing';\nimport * as easing from '@popmotion/easing';\nexport { easing };\nimport styler from 'stylefire';\nexport { default as styler } from 'stylefire';\nimport { warning } from 'hey-listen';\nvar Chainable = /*#__PURE__*/function () {\n function Chainable(props) {\n if (props === void 0) {\n props = {};\n }\n this.props = props;\n }\n Chainable.prototype.applyMiddleware = function (middleware) {\n return this.create(__assign(__assign({}, this.props), {\n middleware: this.props.middleware ? __spreadArrays([middleware], this.props.middleware) : [middleware]\n }));\n };\n Chainable.prototype.pipe = function () {\n var funcs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n funcs[_i] = arguments[_i];\n }\n var pipedUpdate = funcs.length === 1 ? funcs[0] : pipe.apply(void 0, funcs);\n return this.applyMiddleware(function (update) {\n return function (v) {\n return update(pipedUpdate(v));\n };\n });\n };\n Chainable.prototype.while = function (predicate) {\n return this.applyMiddleware(function (update, complete) {\n return function (v) {\n return predicate(v) ? update(v) : complete();\n };\n });\n };\n Chainable.prototype.filter = function (predicate) {\n return this.applyMiddleware(function (update) {\n return function (v) {\n return predicate(v) && update(v);\n };\n });\n };\n return Chainable;\n}();\nvar Observer = /*#__PURE__*/function () {\n function Observer(_a, observer) {\n var _this = this;\n var middleware = _a.middleware,\n onComplete = _a.onComplete;\n this.isActive = true;\n this.update = function (v) {\n if (_this.observer.update) _this.updateObserver(v);\n };\n this.complete = function () {\n if (_this.observer.complete && _this.isActive) _this.observer.complete();\n if (_this.onComplete) _this.onComplete();\n _this.isActive = false;\n };\n this.error = function (err) {\n if (_this.observer.error && _this.isActive) _this.observer.error(err);\n _this.isActive = false;\n };\n this.observer = observer;\n this.updateObserver = function (v) {\n return observer.update(v);\n };\n this.onComplete = onComplete;\n if (observer.update && middleware && middleware.length) {\n middleware.forEach(function (m) {\n return _this.updateObserver = m(_this.updateObserver, _this.complete);\n });\n }\n }\n return Observer;\n}();\nvar createObserver = function (observerCandidate, _a, onComplete) {\n var middleware = _a.middleware;\n if (typeof observerCandidate === 'function') {\n return new Observer({\n middleware: middleware,\n onComplete: onComplete\n }, {\n update: observerCandidate\n });\n } else {\n return new Observer({\n middleware: middleware,\n onComplete: onComplete\n }, observerCandidate);\n }\n};\nvar Action = /*#__PURE__*/function (_super) {\n __extends(Action, _super);\n function Action() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Action.prototype.create = function (props) {\n return new Action(props);\n };\n Action.prototype.start = function (observerCandidate) {\n if (observerCandidate === void 0) {\n observerCandidate = {};\n }\n var isComplete = false;\n var subscription = {\n stop: function () {\n return undefined;\n }\n };\n var _a = this.props,\n init = _a.init,\n observerProps = __rest(_a, [\"init\"]);\n var observer = createObserver(observerCandidate, observerProps, function () {\n isComplete = true;\n subscription.stop();\n });\n var api = init(observer);\n subscription = api ? __assign(__assign({}, subscription), api) : subscription;\n if (observerCandidate.registerParent) {\n observerCandidate.registerParent(subscription);\n }\n if (isComplete) subscription.stop();\n return subscription;\n };\n return Action;\n}(Chainable);\nvar action = function (init) {\n return new Action({\n init: init\n });\n};\nvar BaseMulticast = /*#__PURE__*/function (_super) {\n __extends(BaseMulticast, _super);\n function BaseMulticast() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.subscribers = [];\n return _this;\n }\n BaseMulticast.prototype.complete = function () {\n this.subscribers.forEach(function (subscriber) {\n return subscriber.complete();\n });\n };\n BaseMulticast.prototype.error = function (err) {\n this.subscribers.forEach(function (subscriber) {\n return subscriber.error(err);\n });\n };\n BaseMulticast.prototype.update = function (v) {\n for (var i = 0; i < this.subscribers.length; i++) {\n this.subscribers[i].update(v);\n }\n };\n BaseMulticast.prototype.subscribe = function (observerCandidate) {\n var _this = this;\n var observer = createObserver(observerCandidate, this.props);\n this.subscribers.push(observer);\n var subscription = {\n unsubscribe: function () {\n var index = _this.subscribers.indexOf(observer);\n if (index !== -1) _this.subscribers.splice(index, 1);\n }\n };\n return subscription;\n };\n BaseMulticast.prototype.stop = function () {\n if (this.parent) this.parent.stop();\n };\n BaseMulticast.prototype.registerParent = function (subscription) {\n this.stop();\n this.parent = subscription;\n };\n return BaseMulticast;\n}(Chainable);\nvar Multicast = /*#__PURE__*/function (_super) {\n __extends(Multicast, _super);\n function Multicast() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Multicast.prototype.create = function (props) {\n return new Multicast(props);\n };\n return Multicast;\n}(BaseMulticast);\nvar multicast = function () {\n return new Multicast();\n};\nvar stepProgress = function (steps, progress) {\n var segment = 1 / (steps - 1);\n var subsegment = 1 / (2 * (steps - 1));\n var percentProgressOfTarget = Math.min(progress, 1);\n var subsegmentProgressOfTarget = percentProgressOfTarget / subsegment;\n var segmentProgressOfTarget = Math.floor((subsegmentProgressOfTarget + 1) / 2);\n return segmentProgressOfTarget * segment;\n};\nvar calc = /*#__PURE__*/Object.freeze({\n __proto__: null,\n angle: angle,\n degreesToRadians: degreesToRadians,\n distance: distance,\n isPoint3D: isPoint3D,\n isPoint: isPoint,\n dilate: mix,\n getValueFromProgress: mix,\n pointFromAngleAndDistance: pointFromVector,\n getProgressFromValue: progress,\n radiansToDegrees: radiansToDegrees,\n smooth: smoothFrame,\n speedPerFrame: velocityPerFrame,\n speedPerSecond: velocityPerSecond,\n stepProgress: stepProgress\n});\nvar isValueList = function (v) {\n return Array.isArray(v);\n};\nvar isSingleValue = function (v) {\n var typeOfV = typeof v;\n return typeOfV === 'string' || typeOfV === 'number';\n};\nvar ValueReaction = /*#__PURE__*/function (_super) {\n __extends(ValueReaction, _super);\n function ValueReaction(props) {\n var _this = _super.call(this, props) || this;\n _this.scheduleVelocityCheck = function () {\n return sync.postRender(_this.velocityCheck);\n };\n _this.velocityCheck = function (_a) {\n var timestamp = _a.timestamp;\n if (timestamp !== _this.lastUpdated) {\n _this.prev = _this.current;\n }\n };\n _this.prev = _this.current = props.value || 0;\n if (isSingleValue(_this.current)) {\n _this.updateCurrent = function (v) {\n return _this.current = v;\n };\n _this.getVelocityOfCurrent = function () {\n return _this.getSingleVelocity(_this.current, _this.prev);\n };\n } else if (isValueList(_this.current)) {\n _this.updateCurrent = function (v) {\n return _this.current = __spreadArrays(v);\n };\n _this.getVelocityOfCurrent = function () {\n return _this.getListVelocity();\n };\n } else {\n _this.updateCurrent = function (v) {\n _this.current = {};\n for (var key in v) {\n if (v.hasOwnProperty(key)) {\n _this.current[key] = v[key];\n }\n }\n };\n _this.getVelocityOfCurrent = function () {\n return _this.getMapVelocity();\n };\n }\n if (props.initialSubscription) _this.subscribe(props.initialSubscription);\n return _this;\n }\n ValueReaction.prototype.create = function (props) {\n return new ValueReaction(props);\n };\n ValueReaction.prototype.get = function () {\n return this.current;\n };\n ValueReaction.prototype.getVelocity = function () {\n return this.getVelocityOfCurrent();\n };\n ValueReaction.prototype.update = function (v) {\n _super.prototype.update.call(this, v);\n this.prev = this.current;\n this.updateCurrent(v);\n var _a = getFrameData(),\n delta = _a.delta,\n timestamp = _a.timestamp;\n this.timeDelta = delta;\n this.lastUpdated = timestamp;\n sync.postRender(this.scheduleVelocityCheck);\n };\n ValueReaction.prototype.subscribe = function (observerCandidate) {\n var sub = _super.prototype.subscribe.call(this, observerCandidate);\n this.subscribers[this.subscribers.length - 1].update(this.current);\n return sub;\n };\n ValueReaction.prototype.getSingleVelocity = function (current, prev) {\n return typeof current === 'number' && typeof prev === 'number' ? velocityPerSecond(current - prev, this.timeDelta) : velocityPerSecond(parseFloat(current) - parseFloat(prev), this.timeDelta) || 0;\n };\n ValueReaction.prototype.getListVelocity = function () {\n var _this = this;\n return this.current.map(function (c, i) {\n return _this.getSingleVelocity(c, _this.prev[i]);\n });\n };\n ValueReaction.prototype.getMapVelocity = function () {\n var velocity = {};\n for (var key in this.current) {\n if (this.current.hasOwnProperty(key)) {\n velocity[key] = this.getSingleVelocity(this.current[key], this.prev[key]);\n }\n }\n return velocity;\n };\n return ValueReaction;\n}(BaseMulticast);\nvar value = function (value, initialSubscription) {\n return new ValueReaction({\n value: value,\n initialSubscription: initialSubscription\n });\n};\nvar multi = function (_a) {\n var getCount = _a.getCount,\n getFirst = _a.getFirst,\n getOutput = _a.getOutput,\n mapApi = _a.mapApi,\n setProp = _a.setProp,\n startActions = _a.startActions;\n return function (actions) {\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete,\n error = _a.error;\n var numActions = getCount(actions);\n var output = getOutput();\n var updateOutput = function () {\n return update(output);\n };\n var numCompletedActions = 0;\n var subs = startActions(actions, function (a, name) {\n var hasCompleted = false;\n return a.start({\n complete: function () {\n if (!hasCompleted) {\n hasCompleted = true;\n numCompletedActions++;\n if (numCompletedActions === numActions) sync.update(complete);\n }\n },\n error: error,\n update: function (v) {\n setProp(output, name, v);\n sync.update(updateOutput, false, true);\n }\n });\n });\n return Object.keys(getFirst(subs)).reduce(function (api, methodName) {\n api[methodName] = mapApi(subs, methodName);\n return api;\n }, {});\n });\n };\n};\nvar composite = /*#__PURE__*/multi({\n getOutput: function () {\n return {};\n },\n getCount: function (subs) {\n return Object.keys(subs).length;\n },\n getFirst: function (subs) {\n return subs[Object.keys(subs)[0]];\n },\n mapApi: function (subs, methodName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return Object.keys(subs).reduce(function (output, propKey) {\n var _a;\n if (subs[propKey][methodName]) {\n args[0] && args[0][propKey] !== undefined ? output[propKey] = subs[propKey][methodName](args[0][propKey]) : output[propKey] = (_a = subs[propKey])[methodName].apply(_a, args);\n }\n return output;\n }, {});\n };\n },\n setProp: function (output, name, v) {\n return output[name] = v;\n },\n startActions: function (actions, starter) {\n return Object.keys(actions).reduce(function (subs, key) {\n subs[key] = starter(actions[key], key);\n return subs;\n }, {});\n }\n});\nvar parallel = /*#__PURE__*/multi({\n getOutput: function () {\n return [];\n },\n getCount: function (subs) {\n return subs.length;\n },\n getFirst: function (subs) {\n return subs[0];\n },\n mapApi: function (subs, methodName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return subs.map(function (sub, i) {\n if (sub[methodName]) {\n return Array.isArray(args[0]) ? sub[methodName](args[0][i]) : sub[methodName].apply(sub, args);\n }\n });\n };\n },\n setProp: function (output, name, v) {\n return output[name] = v;\n },\n startActions: function (actions, starter) {\n return actions.map(function (action, i) {\n return starter(action, i);\n });\n }\n});\nvar parallel$1 = function () {\n var actions = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n actions[_i] = arguments[_i];\n }\n return parallel(actions);\n};\nvar createVectorTests = function (typeTests) {\n var testNames = Object.keys(typeTests);\n var isVectorProp = function (prop, key) {\n return prop !== undefined && !typeTests[key](prop);\n };\n var getVectorKeys = function (props) {\n return testNames.reduce(function (vectorKeys, key) {\n if (isVectorProp(props[key], key)) vectorKeys.push(key);\n return vectorKeys;\n }, []);\n };\n var testVectorProps = function (props) {\n return props && testNames.some(function (key) {\n return isVectorProp(props[key], key);\n });\n };\n return {\n getVectorKeys: getVectorKeys,\n testVectorProps: testVectorProps\n };\n};\nvar unitTypes = [px, percent, degrees, vh, vw];\nvar findUnitType = function (prop) {\n return unitTypes.find(function (type) {\n return type.test(prop);\n });\n};\nvar isUnitProp = function (prop) {\n return Boolean(findUnitType(prop));\n};\nvar createAction = function (action, props) {\n return action(props);\n};\nvar reduceArrayValue = function (i) {\n return function (props, key) {\n props[key] = props[key][i];\n return props;\n };\n};\nvar createArrayAction = function (action, props, vectorKeys) {\n var firstVectorKey = vectorKeys[0];\n var actionList = props[firstVectorKey].map(function (v, i) {\n var childActionProps = vectorKeys.reduce(reduceArrayValue(i), __assign({}, props));\n return getActionCreator(v)(action, childActionProps);\n });\n return parallel$1.apply(void 0, actionList);\n};\nvar reduceObjectValue = function (key) {\n return function (props, propKey) {\n props[propKey] = props[propKey][key];\n return props;\n };\n};\nvar createObjectAction = function (action, props, vectorKeys) {\n var firstVectorKey = vectorKeys[0];\n var actionMap = Object.keys(props[firstVectorKey]).reduce(function (map, key) {\n var childActionProps = vectorKeys.reduce(reduceObjectValue(key), __assign({}, props));\n map[key] = getActionCreator(props[firstVectorKey][key])(action, childActionProps);\n return map;\n }, {});\n return composite(actionMap);\n};\nvar createUnitAction = function (action, _a) {\n var from = _a.from,\n to = _a.to,\n props = __rest(_a, [\"from\", \"to\"]);\n var unitType = findUnitType(from) || findUnitType(to);\n var transform = unitType.transform,\n parse = unitType.parse;\n return action(__assign(__assign({}, props), {\n from: typeof from === 'string' ? parse(from) : from,\n to: typeof to === 'string' ? parse(to) : to\n })).pipe(transform);\n};\nvar createMixerAction = function (mixer) {\n return function (action, _a) {\n var from = _a.from,\n to = _a.to,\n props = __rest(_a, [\"from\", \"to\"]);\n return action(__assign(__assign({}, props), {\n from: 0,\n to: 1\n })).pipe(mixer(from, to));\n };\n};\nvar createColorAction = /*#__PURE__*/createMixerAction(mixColor);\nvar createComplexAction = /*#__PURE__*/createMixerAction(mixComplex);\nvar createVectorAction = function (action, typeTests) {\n var _a = createVectorTests(typeTests),\n testVectorProps = _a.testVectorProps,\n getVectorKeys = _a.getVectorKeys;\n var vectorAction = function (props) {\n var isVector = testVectorProps(props);\n if (!isVector) return action(props);\n var vectorKeys = getVectorKeys(props);\n var testKey = vectorKeys[0];\n var testProp = props[testKey];\n return getActionCreator(testProp)(action, props, vectorKeys);\n };\n return vectorAction;\n};\nvar getActionCreator = function (prop) {\n if (typeof prop === 'number') {\n return createAction;\n } else if (Array.isArray(prop)) {\n return createArrayAction;\n } else if (isUnitProp(prop)) {\n return createUnitAction;\n } else if (color.test(prop)) {\n return createColorAction;\n } else if (complex.test(prop)) {\n return createComplexAction;\n } else if (typeof prop === 'object') {\n return createObjectAction;\n } else {\n return createAction;\n }\n};\nvar decay = function (props) {\n if (props === void 0) {\n props = {};\n }\n return action(function (_a) {\n var complete = _a.complete,\n update = _a.update;\n var _b = props.velocity,\n velocity = _b === void 0 ? 0 : _b,\n _c = props.from,\n from = _c === void 0 ? 0 : _c,\n _d = props.power,\n power = _d === void 0 ? 0.8 : _d,\n _e = props.timeConstant,\n timeConstant = _e === void 0 ? 350 : _e,\n _f = props.restDelta,\n restDelta = _f === void 0 ? 0.5 : _f,\n modifyTarget = props.modifyTarget;\n var elapsed = 0;\n var amplitude = power * velocity;\n var idealTarget = from + amplitude;\n var target = typeof modifyTarget === 'undefined' ? idealTarget : modifyTarget(idealTarget);\n if (target !== idealTarget) amplitude = target - from;\n var process = sync.update(function (_a) {\n var frameDelta = _a.delta;\n elapsed += frameDelta;\n var delta = -amplitude * Math.exp(-elapsed / timeConstant);\n var isMoving = delta > restDelta || delta < -restDelta;\n var current = isMoving ? target + delta : target;\n update(current);\n if (!isMoving) {\n cancelSync.update(process);\n complete();\n }\n }, true);\n return {\n stop: function () {\n return cancelSync.update(process);\n }\n };\n });\n};\nvar vectorDecay = /*#__PURE__*/createVectorAction(decay, {\n from: number.test,\n modifyTarget: function (func) {\n return typeof func === 'function';\n },\n velocity: number.test\n});\nvar spring = function (props) {\n if (props === void 0) {\n props = {};\n }\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n var _b = props.velocity,\n velocity = _b === void 0 ? 0.0 : _b;\n var _c = props.from,\n from = _c === void 0 ? 0.0 : _c,\n _d = props.to,\n to = _d === void 0 ? 0.0 : _d,\n _e = props.stiffness,\n stiffness = _e === void 0 ? 100 : _e,\n _f = props.damping,\n damping = _f === void 0 ? 10 : _f,\n _g = props.mass,\n mass = _g === void 0 ? 1.0 : _g,\n _h = props.restSpeed,\n restSpeed = _h === void 0 ? 0.01 : _h,\n _j = props.restDelta,\n restDelta = _j === void 0 ? 0.01 : _j;\n var initialVelocity = velocity ? -(velocity / 1000) : 0.0;\n var t = 0;\n var delta = to - from;\n var position = from;\n var prevPosition = position;\n var process = sync.update(function (_a) {\n var timeDelta = _a.delta;\n t += timeDelta;\n var dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));\n var angularFreq = Math.sqrt(stiffness / mass) / 1000;\n prevPosition = position;\n if (dampingRatio < 1) {\n var envelope = Math.exp(-dampingRatio * angularFreq * t);\n var expoDecay = angularFreq * Math.sqrt(1.0 - dampingRatio * dampingRatio);\n position = to - envelope * ((initialVelocity + dampingRatio * angularFreq * delta) / expoDecay * Math.sin(expoDecay * t) + delta * Math.cos(expoDecay * t));\n } else {\n var envelope = Math.exp(-angularFreq * t);\n position = to - envelope * (delta + (initialVelocity + angularFreq * delta) * t);\n }\n velocity = velocityPerSecond(position - prevPosition, timeDelta);\n var isBelowVelocityThreshold = Math.abs(velocity) <= restSpeed;\n var isBelowDisplacementThreshold = Math.abs(to - position) <= restDelta;\n if (isBelowVelocityThreshold && isBelowDisplacementThreshold) {\n position = to;\n update(position);\n cancelSync.update(process);\n complete();\n } else {\n update(position);\n }\n }, true);\n return {\n stop: function () {\n return cancelSync.update(process);\n }\n };\n });\n};\nvar vectorSpring = /*#__PURE__*/createVectorAction(spring, {\n from: number.test,\n to: number.test,\n stiffness: number.test,\n damping: number.test,\n mass: number.test,\n velocity: number.test\n});\nvar inertia = function (_a) {\n var _b = _a.from,\n from = _b === void 0 ? 0 : _b,\n _c = _a.velocity,\n velocity = _c === void 0 ? 0 : _c,\n min = _a.min,\n max = _a.max,\n _d = _a.power,\n power = _d === void 0 ? 0.8 : _d,\n _e = _a.timeConstant,\n timeConstant = _e === void 0 ? 700 : _e,\n _f = _a.bounceStiffness,\n bounceStiffness = _f === void 0 ? 500 : _f,\n _g = _a.bounceDamping,\n bounceDamping = _g === void 0 ? 10 : _g,\n _h = _a.restDelta,\n restDelta = _h === void 0 ? 1 : _h,\n modifyTarget = _a.modifyTarget;\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n var prev = from;\n var current = from;\n var activeAnimation;\n var isOutOfBounds = function (v) {\n return min !== undefined && v < min || max !== undefined && v > max;\n };\n var boundaryNearest = function (v) {\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n var startAnimation = function (animation, next) {\n activeAnimation && activeAnimation.stop();\n activeAnimation = animation.start({\n update: update,\n complete: function () {\n if (next) {\n next();\n return;\n }\n complete();\n }\n });\n };\n var startSpring = function (props) {\n startAnimation(spring(__assign(__assign({}, props), {\n stiffness: bounceStiffness,\n damping: bounceDamping,\n restDelta: restDelta\n })));\n };\n if (isOutOfBounds(from)) {\n startSpring({\n from: from,\n velocity: velocity,\n to: boundaryNearest(from)\n });\n } else {\n var to = power * velocity + from;\n if (typeof modifyTarget !== 'undefined') {\n to = modifyTarget(to);\n modifyTarget = void 0;\n velocity = (to - from) / power;\n }\n var animation = decay({\n from: from,\n velocity: velocity,\n timeConstant: timeConstant,\n power: power,\n restDelta: restDelta,\n modifyTarget: modifyTarget\n });\n var next = void 0;\n if (isOutOfBounds(to)) {\n var boundary_1 = boundaryNearest(to);\n var heading_1 = boundary_1 == min ? -1 : 1;\n animation = animation.while(function (v) {\n prev = current;\n velocity = velocityPerSecond(v - prev, getFrameData().delta);\n current = v;\n return boundary_1 - v * heading_1 > 0;\n });\n next = function () {\n return startSpring({\n from: current,\n to: boundary_1,\n velocity: velocity\n });\n };\n }\n startAnimation(animation, next);\n }\n return {\n stop: function () {\n return activeAnimation && activeAnimation.stop();\n }\n };\n });\n};\nvar index = /*#__PURE__*/createVectorAction(inertia, {\n from: number.test,\n velocity: number.test,\n min: number.test,\n max: number.test,\n damping: number.test,\n stiffness: number.test,\n modifyTarget: function (func) {\n return typeof func === 'function';\n }\n});\nvar frame = function () {\n return action(function (_a) {\n var update = _a.update;\n var initialTime = 0;\n var process = sync.update(function (_a) {\n var timestamp = _a.timestamp;\n if (!initialTime) initialTime = timestamp;\n update(timestamp - initialTime);\n }, true, true);\n return {\n stop: function () {\n return cancelSync.update(process);\n }\n };\n });\n};\nvar scrubber = function (_a) {\n var _b = _a.from,\n from = _b === void 0 ? 0 : _b,\n _c = _a.to,\n to = _c === void 0 ? 1 : _c,\n _d = _a.ease,\n ease = _d === void 0 ? linear : _d,\n _e = _a.reverseEase,\n reverseEase = _e === void 0 ? false : _e;\n if (reverseEase) {\n ease = createReversedEasing(ease);\n }\n return action(function (_a) {\n var update = _a.update;\n return {\n seek: function (progress) {\n return update(progress);\n }\n };\n }).pipe(ease, function (v) {\n return mix(from, to, v);\n });\n};\nvar vectorScrubber = /*#__PURE__*/createVectorAction(scrubber, {\n ease: function (func) {\n return typeof func === 'function';\n },\n from: number.test,\n to: number.test\n});\nvar clampProgress = /*#__PURE__*/clamp(0, 1);\nvar tween = function (props) {\n if (props === void 0) {\n props = {};\n }\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n var _b = props.duration,\n duration = _b === void 0 ? 300 : _b,\n _c = props.ease,\n ease = _c === void 0 ? easeOut : _c,\n _d = props.flip,\n flip = _d === void 0 ? 0 : _d,\n _e = props.loop,\n loop = _e === void 0 ? 0 : _e,\n _f = props.yoyo,\n yoyo = _f === void 0 ? 0 : _f,\n _g = props.repeatDelay,\n repeatDelay = _g === void 0 ? 0 : _g;\n var _h = props.from,\n from = _h === void 0 ? 0 : _h,\n _j = props.to,\n to = _j === void 0 ? 1 : _j,\n _k = props.elapsed,\n elapsed = _k === void 0 ? 0 : _k,\n _l = props.flipCount,\n flipCount = _l === void 0 ? 0 : _l,\n _m = props.yoyoCount,\n yoyoCount = _m === void 0 ? 0 : _m,\n _o = props.loopCount,\n loopCount = _o === void 0 ? 0 : _o;\n var playhead = vectorScrubber({\n from: from,\n to: to,\n ease: ease\n }).start(update);\n var currentProgress = 0;\n var process;\n var isActive = false;\n var reverseAnimation = function (reverseEase) {\n var _a;\n if (reverseEase === void 0) {\n reverseEase = false;\n }\n _a = [to, from], from = _a[0], to = _a[1];\n playhead = vectorScrubber({\n from: from,\n to: to,\n ease: ease,\n reverseEase: reverseEase\n }).start(update);\n };\n var isTweenComplete = function () {\n var isComplete = isActive && elapsed > duration + repeatDelay;\n if (!isComplete) return false;\n if (isComplete && !loop && !flip && !yoyo) return true;\n elapsed = duration - (elapsed - repeatDelay);\n if (loop && loopCount < loop) {\n loopCount++;\n return false;\n } else if (flip && flipCount < flip) {\n flipCount++;\n reverseAnimation();\n return false;\n } else if (yoyo && yoyoCount < yoyo) {\n yoyoCount++;\n reverseAnimation(yoyoCount % 2 !== 0);\n return false;\n }\n return true;\n };\n var updateTween = function () {\n currentProgress = clampProgress(progress(0, duration, elapsed));\n playhead.seek(currentProgress);\n };\n var startTimer = function () {\n isActive = true;\n process = sync.update(function (_a) {\n var delta = _a.delta;\n elapsed += delta;\n updateTween();\n if (isTweenComplete()) {\n cancelSync.update(process);\n complete && sync.update(complete, false, true);\n }\n }, true);\n };\n var stopTimer = function () {\n isActive = false;\n if (process) cancelSync.update(process);\n };\n startTimer();\n return {\n isActive: function () {\n return isActive;\n },\n getElapsed: function () {\n return clamp(0, duration, elapsed);\n },\n getProgress: function () {\n return currentProgress;\n },\n stop: function () {\n stopTimer();\n },\n pause: function () {\n stopTimer();\n return this;\n },\n resume: function () {\n if (!isActive) startTimer();\n return this;\n },\n seek: function (newProgress) {\n elapsed = mix(0, duration, newProgress);\n sync.update(updateTween, false, true);\n return this;\n },\n reverse: function () {\n reverseAnimation();\n return this;\n }\n };\n });\n};\nvar clampProgress$1 = /*#__PURE__*/clamp(0, 1);\nvar defaultEasings = function (values, easing) {\n return values.map(function () {\n return easing || easeOut;\n }).splice(0, values.length - 1);\n};\nvar defaultTimings = function (values) {\n var numValues = values.length;\n return values.map(function (value, i) {\n return i !== 0 ? i / (numValues - 1) : 0;\n });\n};\nvar interpolateScrubbers = function (input, scrubbers, update) {\n var rangeLength = input.length;\n var finalInputIndex = rangeLength - 1;\n var finalScrubberIndex = finalInputIndex - 1;\n var subs = scrubbers.map(function (scrub) {\n return scrub.start(update);\n });\n return function (v) {\n if (v <= input[0]) {\n subs[0].seek(0);\n }\n if (v >= input[finalInputIndex]) {\n subs[finalScrubberIndex].seek(1);\n }\n var i = 1;\n for (; i < rangeLength; i++) {\n if (input[i] > v || i === finalInputIndex) break;\n }\n var progressInRange = progress(input[i - 1], input[i], v);\n subs[i - 1].seek(clampProgress$1(progressInRange));\n };\n};\nvar keyframes = function (_a) {\n var easings = _a.easings,\n _b = _a.ease,\n ease = _b === void 0 ? linear : _b,\n times = _a.times,\n values = _a.values,\n tweenProps = __rest(_a, [\"easings\", \"ease\", \"times\", \"values\"]);\n easings = Array.isArray(easings) ? easings : defaultEasings(values, easings);\n times = times || defaultTimings(values);\n var scrubbers = easings.map(function (easing, i) {\n return vectorScrubber({\n from: values[i],\n to: values[i + 1],\n ease: easing\n });\n });\n return tween(__assign(__assign({}, tweenProps), {\n ease: ease\n })).applyMiddleware(function (update) {\n return interpolateScrubbers(times, scrubbers, update);\n });\n};\nvar physics = function (props) {\n if (props === void 0) {\n props = {};\n }\n return action(function (_a) {\n var complete = _a.complete,\n update = _a.update;\n var _b = props.acceleration,\n acceleration = _b === void 0 ? 0 : _b,\n _c = props.friction,\n friction = _c === void 0 ? 0 : _c,\n _d = props.velocity,\n velocity = _d === void 0 ? 0 : _d,\n springStrength = props.springStrength,\n to = props.to;\n var _e = props.restSpeed,\n restSpeed = _e === void 0 ? 0.001 : _e,\n _f = props.from,\n from = _f === void 0 ? 0 : _f;\n var current = from;\n var process = sync.update(function (_a) {\n var delta = _a.delta;\n var elapsed = Math.max(delta, 16);\n if (acceleration) velocity += velocityPerFrame(acceleration, elapsed);\n if (friction) velocity *= Math.pow(1 - friction, elapsed / 100);\n if (springStrength !== undefined && to !== undefined) {\n var distanceToTarget = to - current;\n velocity += distanceToTarget * velocityPerFrame(springStrength, elapsed);\n }\n current += velocityPerFrame(velocity, elapsed);\n update(current);\n var isComplete = restSpeed !== false && (!velocity || Math.abs(velocity) <= restSpeed);\n if (isComplete) {\n cancelSync.update(process);\n complete();\n }\n }, true);\n return {\n set: function (v) {\n current = v;\n return this;\n },\n setAcceleration: function (v) {\n acceleration = v;\n return this;\n },\n setFriction: function (v) {\n friction = v;\n return this;\n },\n setSpringStrength: function (v) {\n springStrength = v;\n return this;\n },\n setSpringTarget: function (v) {\n to = v;\n return this;\n },\n setVelocity: function (v) {\n velocity = v;\n return this;\n },\n stop: function () {\n return cancelSync.update(process);\n }\n };\n });\n};\nvar vectorPhysics = /*#__PURE__*/createVectorAction(physics, {\n acceleration: number.test,\n friction: number.test,\n velocity: number.test,\n from: number.test,\n to: number.test,\n springStrength: number.test\n});\nvar DEFAULT_DURATION = 300;\nvar flattenTimings = function (instructions) {\n var flatInstructions = [];\n var lastArg = instructions[instructions.length - 1];\n var isStaggered = typeof lastArg === 'number';\n var staggerDelay = isStaggered ? lastArg : 0;\n var segments = isStaggered ? instructions.slice(0, -1) : instructions;\n var numSegments = segments.length;\n var offset = 0;\n segments.forEach(function (item, i) {\n flatInstructions.push(item);\n if (i !== numSegments - 1) {\n var duration = item.duration || DEFAULT_DURATION;\n offset = staggerDelay;\n flatInstructions.push(\"\" + (offset - duration));\n }\n });\n return flatInstructions;\n};\nvar flattenArrayInstructions = function (instructions, instruction) {\n Array.isArray(instruction) ? instructions.push.apply(instructions, flattenTimings(instruction)) : instructions.push(instruction);\n return instructions;\n};\nvar convertDefToProps = function (props, def, i) {\n var duration = props.duration,\n easings = props.easings,\n times = props.times,\n values = props.values;\n var numValues = values.length;\n var prevTimeTo = times[numValues - 1];\n var timeFrom = def.at === 0 ? 0 : def.at / duration;\n var timeTo = (def.at + def.duration) / duration;\n if (i === 0) {\n values.push(def.from);\n times.push(timeFrom);\n } else {\n if (prevTimeTo !== timeFrom) {\n if (def.from !== undefined) {\n values.push(values[numValues - 1]);\n times.push(timeFrom);\n easings.push(linear);\n }\n var from = def.from !== undefined ? def.from : values[numValues - 1];\n values.push(from);\n times.push(timeFrom);\n easings.push(linear);\n } else if (def.from !== undefined) {\n values.push(def.from);\n times.push(timeFrom);\n easings.push(linear);\n }\n }\n values.push(def.to);\n times.push(timeTo);\n easings.push(def.ease || easeInOut);\n return props;\n};\nvar timeline = function (instructions, _a) {\n var _b = _a === void 0 ? {} : _a,\n duration = _b.duration,\n elapsed = _b.elapsed,\n ease = _b.ease,\n loop = _b.loop,\n flip = _b.flip,\n yoyo = _b.yoyo;\n var playhead = 0;\n var calculatedDuration = 0;\n var flatInstructions = instructions.reduce(flattenArrayInstructions, []);\n var animationDefs = [];\n flatInstructions.forEach(function (instruction) {\n if (typeof instruction === 'string') {\n playhead += parseFloat(instruction);\n } else if (typeof instruction === 'number') {\n playhead = instruction;\n } else {\n var def = __assign(__assign({}, instruction), {\n at: playhead\n });\n def.duration = def.duration === undefined ? DEFAULT_DURATION : def.duration;\n animationDefs.push(def);\n playhead += def.duration;\n calculatedDuration = Math.max(calculatedDuration, def.at + def.duration);\n }\n });\n var tracks = {};\n var numDefs = animationDefs.length;\n for (var i = 0; i < numDefs; i++) {\n var def = animationDefs[i];\n var track = def.track;\n if (track === undefined) {\n throw new Error('No track defined');\n }\n if (!tracks.hasOwnProperty(track)) tracks[track] = [];\n tracks[track].push(def);\n }\n var trackKeyframes = {};\n for (var key in tracks) {\n if (tracks.hasOwnProperty(key)) {\n var keyframeProps = tracks[key].reduce(convertDefToProps, {\n duration: calculatedDuration,\n easings: [],\n times: [],\n values: []\n });\n trackKeyframes[key] = keyframes(__assign(__assign({}, keyframeProps), {\n duration: duration || calculatedDuration,\n ease: ease,\n elapsed: elapsed,\n loop: loop,\n yoyo: yoyo,\n flip: flip\n }));\n }\n }\n return composite(trackKeyframes);\n};\nvar listen = function (element, events, options) {\n return action(function (_a) {\n var update = _a.update;\n var eventNames = events.split(' ').map(function (eventName) {\n element.addEventListener(eventName, update, options);\n return eventName;\n });\n return {\n stop: function () {\n return eventNames.forEach(function (eventName) {\n return element.removeEventListener(eventName, update, options);\n });\n }\n };\n });\n};\nvar defaultPointerPos = function () {\n return {\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n x: 0,\n y: 0\n };\n};\nvar eventToPoint = function (e, point) {\n if (point === void 0) {\n point = defaultPointerPos();\n }\n point.clientX = point.x = e.clientX;\n point.clientY = point.y = e.clientY;\n point.pageX = e.pageX;\n point.pageY = e.pageY;\n return point;\n};\nvar points = [/*#__PURE__*/defaultPointerPos()];\nvar isTouchDevice = false;\nif (typeof document !== 'undefined') {\n var updatePointsLocation = function (_a) {\n var touches = _a.touches;\n isTouchDevice = true;\n var numTouches = touches.length;\n points.length = 0;\n for (var i = 0; i < numTouches; i++) {\n var thisTouch = touches[i];\n points.push(eventToPoint(thisTouch));\n }\n };\n listen(document, 'touchstart touchmove', {\n passive: true,\n capture: true\n }).start(updatePointsLocation);\n}\nvar multitouch = function (_a) {\n var _b = _a === void 0 ? {} : _a,\n _c = _b.preventDefault,\n preventDefault = _c === void 0 ? true : _c,\n _d = _b.scale,\n scale = _d === void 0 ? 1.0 : _d,\n _e = _b.rotate,\n rotate = _e === void 0 ? 0.0 : _e;\n return action(function (_a) {\n var update = _a.update;\n var output = {\n touches: points,\n scale: scale,\n rotate: rotate\n };\n var initialDistance = 0.0;\n var initialRotation = 0.0;\n var isGesture = points.length > 1;\n if (isGesture) {\n var firstTouch = points[0],\n secondTouch = points[1];\n initialDistance = distance(firstTouch, secondTouch);\n initialRotation = angle(firstTouch, secondTouch);\n }\n var updatePoint = function () {\n if (isGesture) {\n var firstTouch = points[0],\n secondTouch = points[1];\n var newDistance = distance(firstTouch, secondTouch);\n var newRotation = angle(firstTouch, secondTouch);\n output.scale = scale * (newDistance / initialDistance);\n output.rotate = rotate + (newRotation - initialRotation);\n }\n update(output);\n };\n var onMove = function (e) {\n if (preventDefault || e.touches.length > 1) e.preventDefault();\n sync.update(updatePoint);\n };\n var updateOnMove = listen(document, 'touchmove', {\n passive: !preventDefault\n }).start(onMove);\n if (isTouchDevice) sync.update(updatePoint);\n return {\n stop: function () {\n cancelSync.update(updatePoint);\n updateOnMove.stop();\n }\n };\n });\n};\nvar getIsTouchDevice = function () {\n return isTouchDevice;\n};\nvar point = /*#__PURE__*/defaultPointerPos();\nvar isMouseDevice = false;\nif (typeof document !== 'undefined') {\n var updatePointLocation = function (e) {\n isMouseDevice = true;\n eventToPoint(e, point);\n };\n listen(document, 'mousedown mousemove', true).start(updatePointLocation);\n}\nvar mouse = function (_a) {\n var _b = (_a === void 0 ? {} : _a).preventDefault,\n preventDefault = _b === void 0 ? true : _b;\n return action(function (_a) {\n var update = _a.update;\n var updatePoint = function () {\n return update(point);\n };\n var onMove = function (e) {\n if (preventDefault) e.preventDefault();\n sync.update(updatePoint);\n };\n var updateOnMove = listen(document, 'mousemove').start(onMove);\n if (isMouseDevice) sync.update(updatePoint);\n return {\n stop: function () {\n cancelSync.update(updatePoint);\n updateOnMove.stop();\n }\n };\n });\n};\nvar getFirstTouch = function (_a) {\n var firstTouch = _a[0];\n return firstTouch;\n};\nvar pointer = function (props) {\n if (props === void 0) {\n props = {};\n }\n return getIsTouchDevice() ? multitouch(props).pipe(function (_a) {\n var touches = _a.touches;\n return touches;\n }, getFirstTouch) : mouse(props);\n};\nvar index$1 = function (_a) {\n if (_a === void 0) {\n _a = {};\n }\n var x = _a.x,\n y = _a.y,\n props = __rest(_a, [\"x\", \"y\"]);\n if (x !== undefined || y !== undefined) {\n var applyXOffset_1 = applyOffset(x || 0);\n var applyYOffset_1 = applyOffset(y || 0);\n var delta_1 = {\n x: 0,\n y: 0\n };\n return pointer(props).pipe(function (point) {\n delta_1.x = applyXOffset_1(point.x);\n delta_1.y = applyYOffset_1(point.y);\n return delta_1;\n });\n } else {\n return pointer(props);\n }\n};\nvar chain = function () {\n var actions = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n actions[_i] = arguments[_i];\n }\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n var i = 0;\n var current;\n var playCurrent = function () {\n current = actions[i].start({\n complete: function () {\n i++;\n i >= actions.length ? complete() : playCurrent();\n },\n update: update\n });\n };\n playCurrent();\n return {\n stop: function () {\n return current && current.stop();\n }\n };\n });\n};\nvar crossfade = function (a, b) {\n return action(function (observer) {\n var balance = 0;\n var fadable = parallel$1(a, b).start(__assign(__assign({}, observer), {\n update: function (_a) {\n var va = _a[0],\n vb = _a[1];\n observer.update(mix(va, vb, balance));\n }\n }));\n return {\n setBalance: function (v) {\n return balance = v;\n },\n stop: function () {\n return fadable.stop();\n }\n };\n });\n};\nvar delay = function (timeToDelay) {\n return action(function (_a) {\n var complete = _a.complete;\n var timeout = setTimeout(complete, timeToDelay);\n return {\n stop: function () {\n return clearTimeout(timeout);\n }\n };\n });\n};\nvar merge = function () {\n var actions = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n actions[_i] = arguments[_i];\n }\n return action(function (observer) {\n var subs = actions.map(function (thisAction) {\n return thisAction.start(observer);\n });\n return {\n stop: function () {\n return subs.forEach(function (sub) {\n return sub.stop();\n });\n }\n };\n });\n};\nvar schedule = function (scheduler, schedulee) {\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n var latest;\n var schedulerSub = scheduler.start({\n update: function () {\n return latest !== undefined && update(latest);\n },\n complete: complete\n });\n var scheduleeSub = schedulee.start({\n update: function (v) {\n return latest = v;\n },\n complete: complete\n });\n return {\n stop: function () {\n schedulerSub.stop();\n scheduleeSub.stop();\n }\n };\n });\n};\nvar stagger = function (actions, interval) {\n var intervalIsNumber = typeof interval === 'number';\n var actionsWithDelay = actions.map(function (a, i) {\n var timeToDelay = intervalIsNumber ? interval * i : interval(i);\n return chain(delay(timeToDelay), a);\n });\n return parallel$1.apply(void 0, actionsWithDelay);\n};\nvar appendUnit = function (unit) {\n return function (v) {\n return \"\" + v + unit;\n };\n};\nvar steps = function (st, min, max) {\n if (min === void 0) {\n min = 0;\n }\n if (max === void 0) {\n max = 1;\n }\n return function (v) {\n var current = progress(min, max, v);\n return mix(min, max, stepProgress(st, current));\n };\n};\nvar transformMap = function (childTransformers) {\n return function (v) {\n var output = __assign({}, v);\n for (var key in childTransformers) {\n if (childTransformers.hasOwnProperty(key)) {\n var childTransformer = childTransformers[key];\n output[key] = childTransformer(v[key]);\n }\n }\n return output;\n };\n};\nvar transformers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n applyOffset: applyOffset,\n clamp: clamp,\n conditional: conditional,\n interpolate: interpolate,\n blendArray: mixArray,\n blendColor: mixColor,\n pipe: pipe,\n smooth: smooth,\n snap: snap,\n generateStaticSpring: springForce,\n nonlinearSpring: springForceExpo,\n linearSpring: springForceLinear,\n wrap: wrap,\n appendUnit: appendUnit,\n steps: steps,\n transformMap: transformMap\n});\nvar css = function (element, props) {\n warning(false, 'css() is deprecated, use styler instead');\n return styler(element, props);\n};\nvar svg = function (element, props) {\n warning(false, 'svg() is deprecated, use styler instead');\n return styler(element, props);\n};\nexport { Action, ValueReaction, action, calc, chain, composite, crossfade, css, vectorDecay as decay, delay, frame as everyFrame, index as inertia, keyframes, listen, merge, mouse, multicast, multitouch, parallel$1 as parallel, vectorPhysics as physics, index$1 as pointer, schedule, vectorSpring as spring, stagger, svg, timeline, transformers as transform, tween, value };","import { spring, tween, action, pointer, transform, decay, keyframes, physics, value, chain, delay, listen, styler } from 'popmotion';\nimport { linear, easeIn, easeOut, easeInOut, circIn, circOut, circInOut, backIn, backOut, backInOut, anticipate, cubicBezier } from '@popmotion/easing';\nimport { percent, number, degrees, px, vw, vh } from 'style-value-types';\nimport poseFactory from 'pose-core';\nimport { invariant } from 'hey-listen';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\n\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar measureWithoutTransform = function (element) {\n var transform$$1 = element.style.transform;\n element.style.transform = '';\n var bbox = element.getBoundingClientRect();\n element.style.transform = transform$$1;\n return bbox;\n};\nvar resolveProp = function (target, props) {\n return typeof target === 'function' ? target(props) : target;\n};\nvar interpolate = transform.interpolate;\nvar singleAxisPointer = function (axis) {\n return function (from) {\n var _a;\n return pointer((_a = {}, _a[axis] = typeof from === 'string' ? parseFloat(from) : from, _a)).pipe(function (v) {\n return v[axis];\n });\n };\n};\nvar pointerX = /*#__PURE__*/singleAxisPointer('x');\nvar pointerY = /*#__PURE__*/singleAxisPointer('y');\nvar createPointer = function (axisPointerCreator, min, max, measurement) {\n return function (transitionProps) {\n var from = transitionProps.from,\n type = transitionProps.type,\n dimensions = transitionProps.dimensions,\n dragBounds = transitionProps.dragBounds;\n var axisPointer = axisPointerCreator(dimensions.measurementAsPixels(measurement, from, type));\n var transformQueue = [];\n if (dragBounds) {\n var resolvedDragBounds_1 = resolveProp(dragBounds, transitionProps);\n if (resolvedDragBounds_1[min] !== undefined) {\n transformQueue.push(function (v) {\n return Math.max(v, dimensions.measurementAsPixels(measurement, resolvedDragBounds_1[min], type));\n });\n }\n if (resolvedDragBounds_1[max] !== undefined) {\n transformQueue.push(function (v) {\n return Math.min(v, dimensions.measurementAsPixels(measurement, resolvedDragBounds_1[max], type));\n });\n }\n }\n if (type === percent) {\n transformQueue.push(interpolate([0, dimensions.get(measurement)], [0, 100], {\n clamp: false\n }), function (v) {\n return v + '%';\n });\n }\n return transformQueue.length ? axisPointer.pipe.apply(axisPointer, transformQueue) : axisPointer;\n };\n};\nvar just = function (from) {\n return action(function (_a) {\n var update = _a.update,\n complete = _a.complete;\n update(from);\n complete();\n });\n};\nvar underDampedSpring = function (_a) {\n var from = _a.from,\n velocity = _a.velocity,\n to = _a.to;\n return spring({\n from: from,\n to: to,\n velocity: velocity,\n stiffness: 500,\n damping: 25,\n restDelta: 0.5,\n restSpeed: 10\n });\n};\nvar overDampedSpring = function (_a) {\n var from = _a.from,\n velocity = _a.velocity,\n to = _a.to;\n return spring({\n from: from,\n to: to,\n velocity: velocity,\n stiffness: 700,\n damping: to === 0 ? 100 : 35\n });\n};\nvar linearTween = function (_a) {\n var from = _a.from,\n to = _a.to;\n return tween({\n from: from,\n to: to,\n ease: linear\n });\n};\nvar intelligentTransition = {\n x: underDampedSpring,\n y: underDampedSpring,\n z: underDampedSpring,\n rotate: underDampedSpring,\n rotateX: underDampedSpring,\n rotateY: underDampedSpring,\n rotateZ: underDampedSpring,\n scaleX: overDampedSpring,\n scaleY: overDampedSpring,\n scale: overDampedSpring,\n opacity: linearTween,\n default: tween\n};\nvar dragAction = /*#__PURE__*/__assign(/*#__PURE__*/__assign({}, intelligentTransition), {\n x: /*#__PURE__*/createPointer(pointerX, 'left', 'right', BoundingBoxDimension.width),\n y: /*#__PURE__*/createPointer(pointerY, 'top', 'bottom', BoundingBoxDimension.height)\n});\nvar justAxis = function (_a) {\n var from = _a.from;\n return just(from);\n};\nvar intelligentDragEnd = /*#__PURE__*/__assign(/*#__PURE__*/__assign({}, intelligentTransition), {\n x: justAxis,\n y: justAxis\n});\nvar defaultTransitions = /*#__PURE__*/new Map([['default', intelligentTransition], ['drag', dragAction], ['dragEnd', intelligentDragEnd]]);\nvar animationLookup = {\n tween: tween,\n spring: spring,\n decay: decay,\n keyframes: keyframes,\n physics: physics\n};\nvar easingLookup = {\n linear: linear,\n easeIn: easeIn,\n easeOut: easeOut,\n easeInOut: easeInOut,\n circIn: circIn,\n circOut: circOut,\n circInOut: circInOut,\n backIn: backIn,\n backOut: backOut,\n backInOut: backInOut,\n anticipate: anticipate\n};\nvar auto = {\n test: function (v) {\n return v === 'auto';\n },\n parse: function (v) {\n return v;\n }\n};\nvar valueTypeTests = [number, degrees, percent, px, vw, vh, auto];\nvar testValueType = function (v) {\n return function (type) {\n return type.test(v);\n };\n};\nvar getValueType = function (v) {\n return valueTypeTests.find(testValueType(v));\n};\nvar createPassiveValue = function (init, parent, transform$$1) {\n var raw = value(transform$$1(init));\n parent.raw.subscribe(function (v) {\n return raw.update(transform$$1(v));\n });\n return {\n raw: raw\n };\n};\nvar createValue = function (init) {\n var type = getValueType(init);\n var raw = value(init);\n return {\n raw: raw,\n type: type\n };\n};\nvar addActionDelay = function (delay$$1, transition) {\n if (delay$$1 === void 0) {\n delay$$1 = 0;\n }\n return chain(delay(delay$$1), transition);\n};\nvar isCubicBezierArgs = function (args) {\n return typeof args[0] === 'number';\n};\nvar getAction = function (v, _a, _b) {\n var from = _b.from,\n to = _b.to,\n velocity = _b.velocity;\n var _c = _a.type,\n type = _c === void 0 ? 'tween' : _c,\n definedEase = _a.ease,\n def = __rest(_a, [\"type\", \"ease\"]);\n invariant(animationLookup[type] !== undefined, \"Invalid transition type '\" + type + \"'. Valid transition types are: tween, spring, decay, physics and keyframes.\");\n var ease;\n if (type === 'tween') {\n if (typeof definedEase !== 'function') {\n if (typeof definedEase === 'string') {\n invariant(easingLookup[definedEase] !== undefined, \"Invalid easing type '\" + definedEase + \"'. popmotion.io/pose/api/config\");\n ease = easingLookup[definedEase];\n } else if (Array.isArray(definedEase) && isCubicBezierArgs(definedEase)) {\n invariant(definedEase.length === 4, \"Cubic bezier arrays must contain four numerical values.\");\n var x1 = definedEase[0],\n y1 = definedEase[1],\n x2 = definedEase[2],\n y2 = definedEase[3];\n ease = cubicBezier(x1, y1, x2, y2);\n }\n }\n }\n ease = ease || definedEase;\n var baseProps = type !== 'keyframes' ? {\n from: from,\n to: to,\n velocity: velocity,\n ease: ease\n } : {\n ease: ease\n };\n return animationLookup[type](__assign(__assign({}, baseProps), def));\n};\nvar isAction = function (action$$1) {\n return typeof action$$1.start !== 'undefined';\n};\nvar pose = function (_a) {\n var transformPose = _a.transformPose,\n addListenerToValue = _a.addListenerToValue,\n extendAPI = _a.extendAPI,\n readValueFromSource = _a.readValueFromSource,\n posePriority = _a.posePriority,\n setValueNative = _a.setValueNative;\n return poseFactory({\n bindOnChange: function (values, onChange) {\n return function (key) {\n if (!values.has(key)) return;\n var raw = values.get(key).raw;\n raw.subscribe(onChange[key]);\n };\n },\n readValue: function (_a) {\n var raw = _a.raw;\n return raw.get();\n },\n setValue: function (_a, to) {\n var raw = _a.raw;\n return raw.update(to);\n },\n createValue: function (init, key, _a, _b) {\n var elementStyler = _a.elementStyler;\n var _c = _b === void 0 ? {} : _b,\n passiveParent = _c.passiveParent,\n passiveProps = _c.passiveProps;\n var val = passiveParent ? createPassiveValue(init, passiveParent, passiveProps) : createValue(init);\n val.raw.subscribe(addListenerToValue(key, elementStyler));\n return val;\n },\n convertValue: function (raw, key, _a) {\n var elementStyler = _a.elementStyler;\n raw.subscribe(addListenerToValue(key, elementStyler));\n return {\n raw: raw,\n type: getValueType(raw.get())\n };\n },\n getTransitionProps: function (_a, to) {\n var raw = _a.raw,\n type = _a.type;\n return {\n from: raw.get(),\n velocity: raw.getVelocity(),\n to: to,\n type: type\n };\n },\n resolveTarget: function (_, to) {\n return to;\n },\n selectValueToRead: function (_a) {\n var raw = _a.raw;\n return raw;\n },\n startAction: function (_a, action$$1, complete) {\n var raw = _a.raw;\n var reaction = {\n update: function (v) {\n return raw.update(v);\n },\n complete: complete\n };\n return action$$1.start(reaction);\n },\n stopAction: function (action$$1) {\n return action$$1.stop();\n },\n getInstantTransition: function (_, _a) {\n var to = _a.to;\n return just(to);\n },\n convertTransitionDefinition: function (val, def, props) {\n if (isAction(def)) return def;\n var delay$$1 = def.delay,\n min = def.min,\n max = def.max,\n round = def.round,\n remainingDef = __rest(def, [\"delay\", \"min\", \"max\", \"round\"]);\n var action$$1 = getAction(val, remainingDef, props);\n var outputPipe = [];\n if (delay$$1) action$$1 = addActionDelay(delay$$1, action$$1);\n if (min !== undefined) outputPipe.push(function (v) {\n return Math.max(v, min);\n });\n if (max !== undefined) outputPipe.push(function (v) {\n return Math.min(v, max);\n });\n if (round) outputPipe.push(Math.round);\n return outputPipe.length ? action$$1.pipe.apply(action$$1, outputPipe) : action$$1;\n },\n setValueNative: setValueNative,\n addActionDelay: addActionDelay,\n defaultTransitions: defaultTransitions,\n transformPose: transformPose,\n readValueFromSource: readValueFromSource,\n posePriority: posePriority,\n extendAPI: extendAPI\n });\n};\nvar createDimensions = function (element) {\n var hasMeasured = false;\n var current = {\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0\n };\n return {\n get: function (measurement) {\n return measurement ? current[measurement] : current;\n },\n measure: function () {\n current = element.getBoundingClientRect();\n hasMeasured = true;\n return current;\n },\n measurementAsPixels: function (measurement, value$$1, type) {\n return type === percent ? (typeof value$$1 === 'string' ? parseFloat(value$$1) : value$$1) / 100 * current[measurement] : value$$1;\n },\n has: function () {\n return hasMeasured;\n }\n };\n};\nvar makeUIEventApplicator = function (_a) {\n var startEvents = _a.startEvents,\n endEvents = _a.endEvents,\n startPose = _a.startPose,\n endPose = _a.endPose,\n startCallback = _a.startCallback,\n endCallback = _a.endCallback,\n useDocumentToEnd = _a.useDocumentToEnd,\n preventScroll = _a.preventScroll;\n return function (element, activeActions, poser, config) {\n var startListener = startPose + 'Start';\n var endListener = startPose + 'End';\n var moveListener = startPose + 'Move';\n if (preventScroll) {\n var touchMoveListener = listen(element, 'touchmove', {\n passive: false\n }).start(function (e) {\n e.preventDefault();\n });\n activeActions.set(moveListener, touchMoveListener);\n }\n var eventStartListener = listen(element, startEvents).start(function (startEvent) {\n poser.unset(endPose);\n poser.set(startPose);\n if (startCallback && config[startCallback]) config[startCallback](startEvent);\n var eventEndListener = listen(useDocumentToEnd ? document.documentElement : element, endEvents + (useDocumentToEnd ? ' mouseenter' : '')).start(function (endEvent) {\n if (useDocumentToEnd && endEvent.type === 'mouseenter' && endEvent.buttons === 1) {\n return;\n }\n activeActions.get(endListener).stop();\n poser.unset(startPose);\n poser.set(endPose);\n if (endCallback && config[endCallback]) config[endCallback](endEvent);\n });\n activeActions.set(endListener, eventEndListener);\n });\n activeActions.set(startListener, eventStartListener);\n };\n};\nvar events = {\n draggable: /*#__PURE__*/makeUIEventApplicator({\n startEvents: 'mousedown touchstart',\n endEvents: 'mouseup touchend',\n startPose: 'drag',\n endPose: 'dragEnd',\n startCallback: 'onDragStart',\n endCallback: 'onDragEnd',\n useDocumentToEnd: true,\n preventScroll: true\n }),\n hoverable: /*#__PURE__*/makeUIEventApplicator({\n startEvents: 'mouseenter',\n endEvents: 'mouseleave',\n startPose: 'hover',\n endPose: 'hoverEnd'\n }),\n focusable: /*#__PURE__*/makeUIEventApplicator({\n startEvents: 'focus',\n endEvents: 'blur',\n startPose: 'focus',\n endPose: 'blur'\n }),\n pressable: /*#__PURE__*/makeUIEventApplicator({\n startEvents: 'mousedown touchstart',\n endEvents: 'mouseup touchend',\n startPose: 'press',\n endPose: 'pressEnd',\n startCallback: 'onPressStart',\n endCallback: 'onPressEnd',\n useDocumentToEnd: true\n })\n};\nvar eventKeys = /*#__PURE__*/Object.keys(events);\nvar appendEventListeners = function (element, activeActions, poser, _a) {\n var props = _a.props;\n return eventKeys.forEach(function (key) {\n if (props[key]) events[key](element, activeActions, poser, props);\n });\n};\nvar ORIGIN_START = 0;\nvar ORIGIN_CENTER = '50%';\nvar ORIGIN_END = '100%';\nvar findCenter = function (_a) {\n var top = _a.top,\n right = _a.right,\n bottom = _a.bottom,\n left = _a.left;\n return {\n x: (left + right) / 2,\n y: (top + bottom) / 2\n };\n};\nvar positionalProps = ['width', 'height', 'top', 'left', 'bottom', 'right'];\nvar positionalPropsDict = /*#__PURE__*/new Set(positionalProps);\nvar checkPositionalProp = function (key) {\n return positionalPropsDict.has(key);\n};\nvar hasPositionalProps = function (pose) {\n return Object.keys(pose).some(checkPositionalProp);\n};\nvar isFlipPose = function (flip, key, state) {\n return state.props.element instanceof HTMLElement && (flip === true || key === 'flip');\n};\nvar setValue = function (_a, key, to) {\n var values = _a.values,\n props = _a.props;\n if (values.has(key)) {\n var raw = values.get(key).raw;\n raw.update(to);\n raw.update(to);\n } else {\n values.set(key, {\n raw: value(to, function (v) {\n return props.elementStyler.set(key, v);\n })\n });\n }\n};\nvar explicitlyFlipPose = function (state, nextPose) {\n var _a = state.props,\n dimensions = _a.dimensions,\n elementStyler = _a.elementStyler;\n dimensions.measure();\n var width = nextPose.width,\n height = nextPose.height,\n top = nextPose.top,\n left = nextPose.left,\n bottom = nextPose.bottom,\n right = nextPose.right,\n position = nextPose.position,\n remainingPose = __rest(nextPose, [\"width\", \"height\", \"top\", \"left\", \"bottom\", \"right\", \"position\"]);\n var propsToSet = positionalProps.concat('position').reduce(function (acc, key) {\n if (nextPose[key] !== undefined) {\n acc[key] = resolveProp(nextPose[key], state.props);\n }\n return acc;\n }, {});\n elementStyler.set(propsToSet).render();\n return implicitlyFlipPose(state, remainingPose);\n};\nvar implicitlyFlipPose = function (state, nextPose) {\n var _a = state.props,\n dimensions = _a.dimensions,\n element = _a.element,\n elementStyler = _a.elementStyler;\n if (!dimensions.has()) return {};\n var prev = dimensions.get();\n var next = measureWithoutTransform(element);\n var originX = prev.left === next.left ? ORIGIN_START : prev.right === next.right ? ORIGIN_END : ORIGIN_CENTER;\n var originY = prev.top === next.top ? ORIGIN_START : prev.bottom === next.bottom ? ORIGIN_END : ORIGIN_CENTER;\n elementStyler.set({\n originX: originX,\n originY: originY\n });\n if (prev.width !== next.width) {\n setValue(state, 'scaleX', prev.width / next.width);\n nextPose.scaleX = 1;\n }\n if (prev.height !== next.height) {\n setValue(state, 'scaleY', prev.height / next.height);\n nextPose.scaleY = 1;\n }\n var prevCenter = findCenter(prev);\n var nextCenter = findCenter(next);\n if (originX === ORIGIN_CENTER) {\n setValue(state, 'x', prevCenter.x - nextCenter.x);\n nextPose.x = 0;\n }\n if (originY === ORIGIN_CENTER) {\n setValue(state, 'y', prevCenter.y - nextCenter.y);\n nextPose.y = 0;\n }\n elementStyler.render();\n return nextPose;\n};\nvar flipPose = function (props, nextPose) {\n return hasPositionalProps(nextPose) ? explicitlyFlipPose(props, nextPose) : implicitlyFlipPose(props, nextPose);\n};\nvar getPosFromMatrix = function (matrix, pos) {\n return parseFloat(matrix.split(', ')[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n return function (element, bbox, _a) {\n var transform$$1 = _a.transform;\n if (!transform$$1 || transform$$1 === 'none') return 0;\n var matrix3d = transform$$1.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) return getPosFromMatrix(matrix3d[1], pos3);\n return getPosFromMatrix(transform$$1.match(/^matrix\\((.+)\\)$/)[1], pos2);\n };\n};\nvar positionalValues = {\n width: function (element, _a) {\n var width = _a.width;\n return width;\n },\n height: function (element, _a) {\n var height = _a.height;\n return height;\n },\n top: function (element, bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function (element, bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function (element, _a, _b) {\n var height = _a.height;\n var top = _b.top;\n return parseFloat(top) + height;\n },\n right: function (element, _a, _b) {\n var width = _a.width;\n var left = _b.left;\n return parseFloat(left) + width;\n },\n x: /*#__PURE__*/getTranslateFromMatrix(4, 13),\n y: /*#__PURE__*/getTranslateFromMatrix(5, 14)\n};\nvar isPositionalKey = function (v) {\n return positionalValues[v] !== undefined;\n};\nvar isPositional = function (pose) {\n return Object.keys(pose).some(isPositionalKey);\n};\nvar convertPositionalUnits = function (state, nextPose) {\n var values = state.values,\n props = state.props;\n var element = props.element,\n elementStyler = props.elementStyler;\n var positionalPoseKeys = Object.keys(nextPose).filter(isPositionalKey);\n var changedPositionalKeys = [];\n var elementComputedStyle = getComputedStyle(element);\n var applyAtEndHasBeenCopied = false;\n positionalPoseKeys.forEach(function (key) {\n var value$$1 = values.get(key);\n var fromValueType = getValueType(value$$1.raw.get());\n var to = resolveProp(nextPose[key], props);\n var toValueType = getValueType(to);\n if (fromValueType !== toValueType) {\n changedPositionalKeys.push(key);\n if (!applyAtEndHasBeenCopied) {\n applyAtEndHasBeenCopied = true;\n nextPose.applyAtEnd = nextPose.applyAtEnd ? __assign({}, nextPose.applyAtEnd) : {};\n }\n nextPose.applyAtEnd[key] = nextPose.applyAtEnd[key] || nextPose[key];\n setValue(state, key, to);\n }\n });\n if (!changedPositionalKeys.length) return nextPose;\n var originBbox = element.getBoundingClientRect();\n var top = elementComputedStyle.top,\n left = elementComputedStyle.left,\n bottom = elementComputedStyle.bottom,\n right = elementComputedStyle.right,\n transform$$1 = elementComputedStyle.transform;\n var originComputedStyle = {\n top: top,\n left: left,\n bottom: bottom,\n right: right,\n transform: transform$$1\n };\n elementStyler.render();\n var targetBbox = element.getBoundingClientRect();\n changedPositionalKeys.forEach(function (key) {\n setValue(state, key, positionalValues[key](element, originBbox, originComputedStyle));\n nextPose[key] = positionalValues[key](element, targetBbox, elementComputedStyle);\n });\n elementStyler.render();\n return nextPose;\n};\nvar getCurrent = function (prop) {\n return function (_a) {\n var elementStyler = _a.elementStyler;\n return elementStyler.get(prop);\n };\n};\nvar dragPoses = function (draggable) {\n var drag = {\n preTransition: function (_a) {\n var dimensions = _a.dimensions;\n return dimensions.measure();\n }\n };\n var dragEnd = {};\n if (draggable === true || draggable === 'x') {\n drag.x = dragEnd.x = getCurrent('x');\n }\n if (draggable === true || draggable === 'y') {\n drag.y = dragEnd.y = getCurrent('y');\n }\n return {\n drag: drag,\n dragEnd: dragEnd\n };\n};\nvar createPoseConfig = function (element, _a) {\n var onDragStart = _a.onDragStart,\n onDragEnd = _a.onDragEnd,\n onPressStart = _a.onPressStart,\n onPressEnd = _a.onPressEnd,\n draggable = _a.draggable,\n hoverable = _a.hoverable,\n focusable = _a.focusable,\n pressable = _a.pressable,\n dragBounds = _a.dragBounds,\n config = __rest(_a, [\"onDragStart\", \"onDragEnd\", \"onPressStart\", \"onPressEnd\", \"draggable\", \"hoverable\", \"focusable\", \"pressable\", \"dragBounds\"]);\n var poseConfig = __assign(__assign({\n flip: {}\n }, config), {\n props: __assign(__assign({}, config.props), {\n onDragStart: onDragStart,\n onDragEnd: onDragEnd,\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n dragBounds: dragBounds,\n draggable: draggable,\n hoverable: hoverable,\n focusable: focusable,\n pressable: pressable,\n element: element,\n elementStyler: styler(element, {\n preparseOutput: false\n }),\n dimensions: createDimensions(element)\n })\n });\n if (draggable) {\n var _b = dragPoses(draggable),\n drag = _b.drag,\n dragEnd = _b.dragEnd;\n poseConfig.drag = __assign(__assign({}, drag), poseConfig.drag);\n poseConfig.dragEnd = __assign(__assign({}, dragEnd), poseConfig.dragEnd);\n }\n return poseConfig;\n};\nvar domPose = /*#__PURE__*/pose({\n posePriority: ['drag', 'press', 'focus', 'hover'],\n transformPose: function (_a, name, state) {\n var flip = _a.flip,\n pose$$1 = __rest(_a, [\"flip\"]);\n if (isFlipPose(flip, name, state)) {\n return flipPose(state, pose$$1);\n } else if (isPositional(pose$$1)) {\n return convertPositionalUnits(state, pose$$1);\n }\n return pose$$1;\n },\n forceRender: function (_a) {\n var elementStyler = _a.elementStyler;\n elementStyler.render();\n },\n addListenerToValue: function (key, elementStyler) {\n return function (v) {\n return elementStyler.set(key, v);\n };\n },\n readValueFromSource: function (key, _a) {\n var elementStyler = _a.elementStyler,\n dragBounds = _a.dragBounds;\n var value$$1 = elementStyler.get(key);\n if (dragBounds && (key === 'x' || key === 'y')) {\n var bound = key === 'x' ? dragBounds.left || dragBounds.right : dragBounds.top || dragBounds.bottom;\n if (bound) {\n var boundType = getValueType(bound);\n value$$1 = boundType.transform(value$$1);\n }\n }\n return isNaN(value$$1) ? value$$1 : parseFloat(value$$1);\n },\n setValueNative: function (key, to, _a) {\n var elementStyler = _a.elementStyler;\n return elementStyler.set(key, to);\n },\n extendAPI: function (api, _a, config) {\n var props = _a.props,\n activeActions = _a.activeActions;\n var measure = props.dimensions.measure;\n var poserApi = __assign(__assign({}, api), {\n addChild: function (element, childConfig) {\n return api._addChild(createPoseConfig(element, childConfig), domPose);\n },\n measure: measure,\n flip: function (op) {\n if (op) {\n measure();\n op();\n }\n return api.set('flip');\n }\n });\n props.elementStyler.render();\n appendEventListeners(props.element, activeActions, poserApi, config);\n return poserApi;\n }\n});\nvar domPose$1 = function (element, config) {\n return domPose(createPoseConfig(element, config));\n};\nexport default domPose$1;","import { __rest, __assign, __spreadArrays } from 'tslib';\nimport { invariant } from 'hey-listen';\nvar getPoseValues = function (_a) {\n var transition = _a.transition,\n flip = _a.flip,\n delay = _a.delay,\n delayChildren = _a.delayChildren,\n staggerChildren = _a.staggerChildren,\n staggerDirection = _a.staggerDirection,\n afterChildren = _a.afterChildren,\n beforeChildren = _a.beforeChildren,\n preTransition = _a.preTransition,\n applyAtStart = _a.applyAtStart,\n applyAtEnd = _a.applyAtEnd,\n props = __rest(_a, [\"transition\", \"flip\", \"delay\", \"delayChildren\", \"staggerChildren\", \"staggerDirection\", \"afterChildren\", \"beforeChildren\", \"preTransition\", \"applyAtStart\", \"applyAtEnd\"]);\n return props;\n};\nvar selectPoses = function (_a) {\n var label = _a.label,\n props = _a.props,\n values = _a.values,\n parentValues = _a.parentValues,\n ancestorValues = _a.ancestorValues,\n onChange = _a.onChange,\n passive = _a.passive,\n initialPose = _a.initialPose,\n poses = __rest(_a, [\"label\", \"props\", \"values\", \"parentValues\", \"ancestorValues\", \"onChange\", \"passive\", \"initialPose\"]);\n return poses;\n};\nvar selectAllValues = function (values, selectValue) {\n var allValues = {};\n values.forEach(function (value, key) {\n return allValues[key] = selectValue(value);\n });\n return allValues;\n};\nvar resolveProp = function (target, props) {\n return typeof target === 'function' ? target(props) : target;\n};\nvar poseDefault = function (pose, prop, defaultValue, resolveProps) {\n return pose && pose[prop] !== undefined ? resolveProp(pose[prop], resolveProps) : defaultValue;\n};\nvar startChildAnimations = function (children, next, pose, props) {\n var animations = [];\n var delay = poseDefault(pose, 'delayChildren', 0, props);\n var stagger = poseDefault(pose, 'staggerChildren', 0, props);\n var staggerDirection = poseDefault(pose, 'staggerDirection', 1, props);\n var maxStaggerDuration = (children.size - 1) * stagger;\n var generateStaggerDuration = staggerDirection === 1 ? function (i) {\n return i * stagger;\n } : function (i) {\n return maxStaggerDuration - i * stagger;\n };\n Array.from(children).forEach(function (child, i) {\n animations.push(child.set(next, {\n delay: delay + generateStaggerDuration(i)\n }));\n });\n return animations;\n};\nvar resolveTransition = function (transition, key, value, props, convertTransitionDefinition, getInstantTransition) {\n var resolvedTransition;\n if (typeof transition === 'function') {\n var resolvedTransitionMap = transition(props);\n resolvedTransition = resolveTransition(resolvedTransitionMap, key, value, props, convertTransitionDefinition, getInstantTransition);\n } else if (transition[key] || transition.default) {\n var keyTransition = transition[key] || transition.default;\n if (typeof keyTransition === 'function') {\n resolvedTransition = keyTransition(props);\n } else {\n resolvedTransition = keyTransition;\n }\n } else {\n resolvedTransition = transition;\n }\n return resolvedTransition === false ? getInstantTransition(value, props) : convertTransitionDefinition(value, resolvedTransition, props);\n};\nvar findInsertionIndex = function (poseList, priorityList, priorityIndex) {\n var insertionIndex = 0;\n for (var i = priorityIndex - 1; i >= 0; i--) {\n var nextHighestPriorityIndex = poseList.indexOf(priorityList[i]);\n if (nextHighestPriorityIndex !== -1) {\n insertionIndex = nextHighestPriorityIndex + 1;\n break;\n }\n }\n return insertionIndex;\n};\nvar applyValues = function (toApply, values, props, setValue, setValueNative) {\n invariant(typeof toApply === 'object', 'applyAtStart and applyAtEnd must be of type object');\n return Object.keys(toApply).forEach(function (key) {\n var valueToSet = resolveProp(toApply[key], props);\n values.has(key) ? setValue(values.get(key), valueToSet) : setValueNative(key, valueToSet, props);\n });\n};\nvar createPoseSetter = function (setterProps) {\n var state = setterProps.state,\n poses = setterProps.poses,\n startAction = setterProps.startAction,\n stopAction = setterProps.stopAction,\n getInstantTransition = setterProps.getInstantTransition,\n addActionDelay = setterProps.addActionDelay,\n getTransitionProps = setterProps.getTransitionProps,\n resolveTarget = setterProps.resolveTarget,\n transformPose = setterProps.transformPose,\n posePriority = setterProps.posePriority,\n convertTransitionDefinition = setterProps.convertTransitionDefinition,\n setValue = setterProps.setValue,\n setValueNative = setterProps.setValueNative,\n forceRender = setterProps.forceRender;\n return function (next, nextProps, propagate) {\n if (nextProps === void 0) {\n nextProps = {};\n }\n if (propagate === void 0) {\n propagate = true;\n }\n var children = state.children,\n values = state.values,\n props = state.props,\n activeActions = state.activeActions,\n activePoses = state.activePoses;\n var _a = nextProps.delay,\n delay = _a === void 0 ? 0 : _a;\n var hasChildren = children.size;\n var baseTransitionProps = __assign(__assign({}, props), nextProps);\n var nextPose = poses[next];\n var getChildAnimations = function () {\n return hasChildren && propagate ? startChildAnimations(children, next, nextPose, baseTransitionProps) : [];\n };\n var getParentAnimations = function () {\n if (!nextPose) return [];\n var applyAtStart = nextPose.applyAtStart;\n if (applyAtStart) {\n applyValues(applyAtStart, values, baseTransitionProps, setValue, setValueNative);\n if (forceRender) forceRender(baseTransitionProps);\n }\n if (transformPose) nextPose = transformPose(nextPose, next, state);\n var preTransition = nextPose.preTransition,\n getTransition = nextPose.transition,\n applyAtEnd = nextPose.applyAtEnd;\n if (preTransition) preTransition(baseTransitionProps);\n var animations = Object.keys(getPoseValues(nextPose)).map(function (key) {\n var valuePoses = activePoses.has(key) ? activePoses.get(key) : (activePoses.set(key, []), activePoses.get(key));\n var existingIndex = valuePoses.indexOf(next);\n if (existingIndex !== -1) valuePoses.splice(existingIndex, 1);\n var priority = posePriority ? posePriority.indexOf(next) : 0;\n var insertionIndex = priority <= 0 ? 0 : findInsertionIndex(valuePoses, posePriority, priority);\n valuePoses.splice(insertionIndex, 0, next);\n return insertionIndex === 0 ? new Promise(function (complete) {\n var value = values.get(key);\n var transitionProps = __assign(__assign({}, baseTransitionProps), {\n key: key,\n value: value\n });\n var target = resolveTarget(value, resolveProp(nextPose[key], transitionProps));\n if (activeActions.has(key)) stopAction(activeActions.get(key));\n var resolveTransitionProps = __assign(__assign({\n to: target\n }, transitionProps), getTransitionProps(value, target, transitionProps));\n var transition = resolveTransition(getTransition, key, value, resolveTransitionProps, convertTransitionDefinition, getInstantTransition);\n var poseDelay = delay || resolveProp(nextPose.delay, transitionProps);\n if (poseDelay) {\n transition = addActionDelay(poseDelay, transition);\n }\n activeActions.set(key, startAction(value, transition, complete));\n }) : Promise.resolve();\n });\n return applyAtEnd ? [Promise.all(animations).then(function () {\n applyValues(applyAtEnd, values, baseTransitionProps, setValue, setValueNative);\n })] : animations;\n };\n if (nextPose && hasChildren) {\n if (resolveProp(nextPose.beforeChildren, baseTransitionProps)) {\n return Promise.all(getParentAnimations()).then(function () {\n return Promise.all(getChildAnimations());\n });\n } else if (resolveProp(nextPose.afterChildren, baseTransitionProps)) {\n return Promise.all(getChildAnimations()).then(function () {\n return Promise.all(getParentAnimations());\n });\n }\n }\n return Promise.all(__spreadArrays(getParentAnimations(), getChildAnimations()));\n };\n};\nvar DEFAULT_INITIAL_POSE = 'init';\nvar isScale = function (key) {\n return key.includes('scale');\n};\nvar defaultReadValueFromSource = function (key) {\n return isScale(key) ? 1 : 0;\n};\nvar readValueFromPose = function (pose, key, props) {\n var valueToResolve = pose.applyAtEnd && pose.applyAtEnd[key] !== undefined ? pose.applyAtEnd[key] : pose[key] !== undefined ? pose[key] : pose.applyAtStart && pose.applyAtStart[key] !== undefined ? pose.applyAtStart[key] : 0;\n return resolveProp(valueToResolve, props);\n};\nvar getPosesToSearch = function (pose) {\n var posesToSearch = Array.isArray(pose) ? pose : [pose];\n posesToSearch.push(DEFAULT_INITIAL_POSE);\n return posesToSearch;\n};\nvar getInitialValue = function (poses, key, initialPose, props, readValueFromSource, activePoses) {\n if (readValueFromSource === void 0) {\n readValueFromSource = defaultReadValueFromSource;\n }\n var posesToSearch = getPosesToSearch(initialPose);\n var pose = posesToSearch.filter(Boolean).find(function (name) {\n var thisPose = poses[name];\n return thisPose && (thisPose[key] !== undefined || thisPose.applyAtStart && thisPose.applyAtStart[key] !== undefined || thisPose.applyAtEnd && thisPose.applyAtEnd[key] !== undefined);\n });\n activePoses.set(key, [pose || DEFAULT_INITIAL_POSE]);\n return pose ? readValueFromPose(poses[pose], key, props) : readValueFromSource(key, props);\n};\nvar createValues = function (values, _a) {\n var userSetValues = _a.userSetValues,\n createValue = _a.createValue,\n convertValue = _a.convertValue,\n readValueFromSource = _a.readValueFromSource,\n initialPose = _a.initialPose,\n poses = _a.poses,\n activePoses = _a.activePoses,\n props = _a.props;\n return function (key) {\n if (values.has(key)) return;\n var value;\n if (userSetValues && userSetValues[key] !== undefined) {\n value = convertValue(userSetValues[key], key, props);\n } else {\n var initValue = getInitialValue(poses, key, initialPose, props, readValueFromSource, activePoses);\n value = createValue(initValue, key, props);\n }\n values.set(key, value);\n };\n};\nvar scrapeValuesFromPose = function (values, props) {\n return function (key) {\n var pose = props.poses[key];\n Object.keys(getPoseValues(pose)).forEach(createValues(values, props));\n };\n};\nvar getAncestorValue = function (key, fromParent, ancestors) {\n if (fromParent === true) {\n return ancestors[0] && ancestors[0].values.get(key);\n } else {\n var foundAncestor = ancestors.find(function (_a) {\n var label = _a.label;\n return label === fromParent;\n });\n return foundAncestor && foundAncestor.values.get(key);\n }\n};\nvar bindPassiveValues = function (values, _a) {\n var passive = _a.passive,\n ancestorValues = _a.ancestorValues,\n createValue = _a.createValue,\n readValue = _a.readValue,\n props = _a.props;\n return function (key) {\n var _a = passive[key],\n valueKey = _a[0],\n passiveProps = _a[1],\n fromParent = _a[2];\n var valueToBind = fromParent && ancestorValues.length ? getAncestorValue(valueKey, fromParent, ancestorValues) : values.has(valueKey) ? values.get(valueKey) : false;\n if (!valueToBind) return;\n var newValue = createValue(readValue(valueToBind), key, props, {\n passiveParentKey: valueKey,\n passiveParent: valueToBind,\n passiveProps: passiveProps\n });\n values.set(key, newValue);\n };\n};\nvar setNativeValues = function (_a) {\n var setValueNative = _a.setValueNative,\n initialPose = _a.initialPose,\n props = _a.props,\n poses = _a.poses;\n var valuesHaveSet = new Set();\n var setValues = function (pose, propKey) {\n if (pose[propKey]) {\n for (var key in pose[propKey]) {\n if (!valuesHaveSet.has(key)) {\n valuesHaveSet.add(key);\n setValueNative(key, resolveProp(pose[propKey][key], props), props);\n }\n }\n }\n };\n getPosesToSearch(initialPose).forEach(function (poseKey) {\n var pose = poses[poseKey];\n if (pose) {\n setValues(pose, 'applyAtEnd');\n setValues(pose, 'applyAtStart');\n }\n });\n};\nvar createValueMap = function (props) {\n var poses = props.poses,\n passive = props.passive;\n var values = new Map();\n Object.keys(poses).forEach(scrapeValuesFromPose(values, props));\n setNativeValues(props);\n if (passive) Object.keys(passive).forEach(bindPassiveValues(values, props));\n return values;\n};\nvar applyDefaultTransition = function (pose, key, defaultTransitions) {\n return __assign(__assign({}, pose), {\n transition: defaultTransitions.has(key) ? defaultTransitions.get(key) : defaultTransitions.get('default')\n });\n};\nvar generateTransitions = function (poses, defaultTransitions) {\n Object.keys(poses).forEach(function (key) {\n var pose = poses[key];\n invariant(typeof pose === 'object', \"Pose '\" + key + \"' is of invalid type. All poses should be objects.\");\n poses[key] = pose.transition !== undefined ? pose : applyDefaultTransition(pose, key, defaultTransitions);\n });\n return poses;\n};\nvar sortByReversePriority = function (priorityOrder) {\n return function (a, b) {\n var aP = priorityOrder.indexOf(a);\n var bP = priorityOrder.indexOf(b);\n if (aP === -1 && bP !== -1) return -1;\n if (aP !== -1 && bP === -1) return 1;\n return aP - bP;\n };\n};\nvar poseFactory = function (_a) {\n var getDefaultProps = _a.getDefaultProps,\n defaultTransitions = _a.defaultTransitions,\n bindOnChange = _a.bindOnChange,\n startAction = _a.startAction,\n stopAction = _a.stopAction,\n readValue = _a.readValue,\n readValueFromSource = _a.readValueFromSource,\n resolveTarget = _a.resolveTarget,\n setValue = _a.setValue,\n setValueNative = _a.setValueNative,\n createValue = _a.createValue,\n convertValue = _a.convertValue,\n getInstantTransition = _a.getInstantTransition,\n getTransitionProps = _a.getTransitionProps,\n addActionDelay = _a.addActionDelay,\n selectValueToRead = _a.selectValueToRead,\n convertTransitionDefinition = _a.convertTransitionDefinition,\n transformPose = _a.transformPose,\n posePriority = _a.posePriority,\n forceRender = _a.forceRender,\n extendAPI = _a.extendAPI;\n return function (config) {\n var parentValues = config.parentValues,\n _a = config.ancestorValues,\n ancestorValues = _a === void 0 ? [] : _a;\n if (parentValues) ancestorValues.unshift({\n values: parentValues\n });\n var activeActions = new Map();\n var activePoses = new Map();\n var children = new Set();\n var poses = generateTransitions(selectPoses(config), defaultTransitions);\n var _b = config.props,\n props = _b === void 0 ? {} : _b;\n if (getDefaultProps) props = __assign(__assign({}, getDefaultProps(config)), props);\n var passive = config.passive,\n userSetValues = config.values,\n _c = config.initialPose,\n initialPose = _c === void 0 ? DEFAULT_INITIAL_POSE : _c;\n var values = createValueMap({\n poses: poses,\n passive: passive,\n ancestorValues: ancestorValues,\n readValue: readValue,\n setValueNative: setValueNative,\n createValue: createValue,\n convertValue: convertValue,\n readValueFromSource: readValueFromSource,\n userSetValues: userSetValues,\n initialPose: initialPose,\n activePoses: activePoses,\n props: props\n });\n var state = {\n activeActions: activeActions,\n activePoses: activePoses,\n children: children,\n props: props,\n values: values\n };\n var onChange = config.onChange;\n if (onChange) Object.keys(onChange).forEach(bindOnChange(values, onChange));\n var set = createPoseSetter({\n state: state,\n poses: poses,\n getInstantTransition: getInstantTransition,\n getTransitionProps: getTransitionProps,\n convertTransitionDefinition: convertTransitionDefinition,\n setValue: setValue,\n setValueNative: setValueNative,\n startAction: startAction,\n stopAction: stopAction,\n resolveTarget: resolveTarget,\n addActionDelay: addActionDelay,\n transformPose: transformPose,\n posePriority: posePriority,\n forceRender: forceRender\n });\n var has = function (poseName) {\n return !!poses[poseName];\n };\n var api = {\n set: set,\n unset: function (poseName, poseProps) {\n var posesToSet = [];\n activePoses.forEach(function (valuePoses) {\n var poseIndex = valuePoses.indexOf(poseName);\n if (poseIndex === -1) return;\n var currentPose = valuePoses[0];\n valuePoses.splice(poseIndex, 1);\n var nextPose = valuePoses[0];\n if (nextPose === currentPose) return;\n if (posesToSet.indexOf(nextPose) === -1) {\n posesToSet.push(nextPose);\n }\n });\n var animationsToResolve = posesToSet.sort(sortByReversePriority(posePriority)).map(function (poseToSet) {\n return set(poseToSet, poseProps, false);\n });\n children.forEach(function (child) {\n return animationsToResolve.push(child.unset(poseName));\n });\n return Promise.all(animationsToResolve);\n },\n get: function (valueName) {\n return valueName ? selectValueToRead(values.get(valueName)) : selectAllValues(values, selectValueToRead);\n },\n has: has,\n setProps: function (newProps) {\n return state.props = __assign(__assign({}, state.props), newProps);\n },\n _addChild: function (childConfig, factory) {\n var child = factory(__assign(__assign({\n initialPose: initialPose\n }, childConfig), {\n ancestorValues: __spreadArrays([{\n label: config.label,\n values: values\n }], ancestorValues)\n }));\n children.add(child);\n return child;\n },\n removeChild: function (child) {\n return children.delete(child);\n },\n clearChildren: function () {\n children.forEach(function (child) {\n return child.destroy();\n });\n children.clear();\n },\n destroy: function () {\n activeActions.forEach(stopAction);\n children.forEach(function (child) {\n return child.destroy();\n });\n }\n };\n return extendAPI(api, state, config);\n };\n};\nexport default poseFactory;","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\nexport default memoize;","import memoize from '@emotion/memoize';\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */ && prop.charCodeAt(1) === 110\n /* n */ && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */);\nexport default index;","import { __assign, __extends, __rest } from 'tslib';\nimport React__default, { PureComponent, createContext, createElement, forwardRef, Component, cloneElement, Children } from 'react';\nimport poseFactory from 'popmotion-pose';\nimport isValidProp from '@emotion/is-prop-valid';\nimport { invariant, warning } from 'hey-listen';\nvar hasChanged = function (prev, next) {\n if (prev === next) return false;\n var prevIsArray = Array.isArray(prev);\n var nextIsArray = Array.isArray(next);\n if (prevIsArray !== nextIsArray || !prevIsArray && !nextIsArray) {\n return true;\n } else if (prevIsArray && nextIsArray) {\n var numPrev = prev.length;\n var numNext = next.length;\n if (numPrev !== numNext) return true;\n for (var i = 0; i < numPrev; i++) {\n if (prev[i] !== next[i]) return true;\n }\n }\n return false;\n};\nvar pickAssign = function (shouldPick, sources) {\n return sources.reduce(function (picked, source) {\n for (var key in source) {\n if (shouldPick(key)) {\n picked[key] = source[key];\n }\n }\n return picked;\n }, {});\n};\nvar _a = createContext({}),\n PoseParentConsumer = _a.Consumer,\n PoseParentProvider = _a.Provider;\nvar calcPopFromFlowStyle = function (el) {\n var offsetTop = el.offsetTop,\n offsetLeft = el.offsetLeft,\n offsetWidth = el.offsetWidth,\n offsetHeight = el.offsetHeight;\n return {\n position: 'absolute',\n top: offsetTop,\n left: offsetLeft,\n width: offsetWidth,\n height: offsetHeight\n };\n};\nvar hasPose = function (pose, key) {\n return Array.isArray(pose) ? pose.indexOf(key) !== -1 : pose === key;\n};\nvar objectToMap = function (obj) {\n return Object.keys(obj).reduce(function (map, key) {\n map.set(key, {\n raw: obj[key]\n });\n return map;\n }, new Map());\n};\nvar testAlwaysTrue = function () {\n return true;\n};\nvar filterProps = function (_a) {\n var elementType = _a.elementType,\n poseConfig = _a.poseConfig,\n onValueChange = _a.onValueChange,\n innerRef = _a.innerRef,\n _pose = _a._pose,\n pose = _a.pose,\n initialPose = _a.initialPose,\n poseKey = _a.poseKey,\n onPoseComplete = _a.onPoseComplete,\n getParentPoseConfig = _a.getParentPoseConfig,\n registerChild = _a.registerChild,\n onUnmount = _a.onUnmount,\n getInitialPoseFromParent = _a.getInitialPoseFromParent,\n popFromFlow = _a.popFromFlow,\n values = _a.values,\n parentValues = _a.parentValues,\n onDragStart = _a.onDragStart,\n onDragEnd = _a.onDragEnd,\n onPressStart = _a.onPressStart,\n onPressEnd = _a.onPressEnd,\n props = __rest(_a, [\"elementType\", \"poseConfig\", \"onValueChange\", \"innerRef\", \"_pose\", \"pose\", \"initialPose\", \"poseKey\", \"onPoseComplete\", \"getParentPoseConfig\", \"registerChild\", \"onUnmount\", \"getInitialPoseFromParent\", \"popFromFlow\", \"values\", \"parentValues\", \"onDragStart\", \"onDragEnd\", \"onPressStart\", \"onPressEnd\"]);\n return props;\n};\nvar PoseElement = function (_super) {\n __extends(PoseElement, _super);\n function PoseElement(props) {\n var _this = _super.call(this, props) || this;\n _this.children = new Set();\n _this.childrenHandlers = {\n registerChild: function (props) {\n _this.children.add(props);\n if (_this.poser) _this.flushChildren();\n },\n onUnmount: function (child) {\n return _this.poser.removeChild(child);\n },\n getParentPoseConfig: function () {\n return _this.poseConfig;\n },\n getInitialPoseFromParent: function () {\n return _this.getInitialPose();\n }\n };\n _this.setRef = function (ref) {\n warning(ref === null || ref instanceof Element && _this.ref === undefined, 'ref must be provided to the same DOM component for the entire lifecycle of a posed component.');\n _this.ref = ref;\n var innerRef = _this.props.innerRef;\n if (!innerRef) return;\n if (typeof innerRef === 'function') {\n innerRef(ref);\n } else {\n innerRef.current = ref;\n }\n };\n _this.shouldForwardProp = typeof _this.props.elementType === 'string' ? isValidProp : testAlwaysTrue;\n var poseConfig = _this.props.poseConfig;\n _this.poseConfig = typeof poseConfig === 'function' ? poseConfig(filterProps(props)) : poseConfig;\n return _this;\n }\n PoseElement.prototype.getInitialPose = function () {\n var _a = this.props,\n getInitialPoseFromParent = _a.getInitialPoseFromParent,\n pose = _a.pose,\n _pose = _a._pose,\n initialPose = _a.initialPose;\n if (initialPose) {\n return initialPose;\n } else {\n var parentPose = getInitialPoseFromParent && getInitialPoseFromParent();\n var initialPoses = (Array.isArray(parentPose) ? parentPose : [parentPose]).concat(pose, _pose).filter(Boolean);\n return initialPoses.length > 0 ? initialPoses : undefined;\n }\n };\n PoseElement.prototype.getFirstPose = function () {\n var _a = this.props,\n initialPose = _a.initialPose,\n pose = _a.pose,\n _pose = _a._pose;\n if (!initialPose) return;\n var firstPose = (Array.isArray(pose) ? pose : [pose]).concat(_pose).filter(Boolean);\n return firstPose.length === 1 ? firstPose[0] : firstPose;\n };\n PoseElement.prototype.getSetProps = function () {\n var props = filterProps(this.props);\n if (this.props.popFromFlow && this.ref && this.ref instanceof HTMLElement) {\n if (!this.popStyle) {\n props.style = __assign(__assign({}, props.style), calcPopFromFlowStyle(this.ref));\n this.popStyle = props.style;\n } else {\n props.style = this.popStyle;\n }\n } else {\n this.popStyle = null;\n }\n return props;\n };\n PoseElement.prototype.componentDidMount = function () {\n var _this = this;\n invariant(this.ref instanceof Element, \"No valid DOM ref found. If you're converting an existing component via posed(Component), you must ensure you're passing the ref to the host DOM node via the React.forwardRef function.\");\n var _a = this.props,\n onValueChange = _a.onValueChange,\n registerChild = _a.registerChild,\n values = _a.values,\n parentValues = _a.parentValues,\n onDragStart = _a.onDragStart,\n onDragEnd = _a.onDragEnd,\n onPressStart = _a.onPressStart,\n onPressEnd = _a.onPressEnd;\n var config = __assign(__assign({}, this.poseConfig), {\n initialPose: this.getInitialPose(),\n values: values || this.poseConfig.values,\n parentValues: parentValues ? objectToMap(parentValues) : undefined,\n props: this.getSetProps(),\n onDragStart: onDragStart,\n onDragEnd: onDragEnd,\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onChange: onValueChange\n });\n if (!registerChild) {\n this.initPoser(poseFactory(this.ref, config));\n } else {\n registerChild({\n element: this.ref,\n poseConfig: config,\n onRegistered: function (poser) {\n return _this.initPoser(poser);\n }\n });\n }\n };\n PoseElement.prototype.getSnapshotBeforeUpdate = function () {\n var _a = this.props,\n pose = _a.pose,\n _pose = _a._pose;\n if (hasPose(pose, 'flip') || hasPose(_pose, 'flip')) this.poser.measure();\n return null;\n };\n PoseElement.prototype.componentDidUpdate = function (prevProps) {\n var _a = this.props,\n pose = _a.pose,\n _pose = _a._pose,\n poseKey = _a.poseKey;\n this.poser.setProps(this.getSetProps());\n if (poseKey !== prevProps.poseKey || hasChanged(prevProps.pose, pose) || pose === 'flip') {\n this.setPose(pose);\n }\n if (_pose !== prevProps._pose || _pose === 'flip') this.setPose(_pose);\n };\n PoseElement.prototype.componentWillUnmount = function () {\n if (!this.poser) return;\n var onUnmount = this.props.onUnmount;\n if (onUnmount) onUnmount(this.poser);\n this.poser.destroy();\n };\n PoseElement.prototype.initPoser = function (poser) {\n this.poser = poser;\n this.flushChildren();\n var firstPose = this.getFirstPose();\n if (firstPose) this.setPose(firstPose);\n };\n PoseElement.prototype.setPose = function (pose) {\n var _this = this;\n var onPoseComplete = this.props.onPoseComplete;\n var poseList = Array.isArray(pose) ? pose : [pose];\n Promise.all(poseList.map(function (key) {\n return key && _this.poser.set(key);\n })).then(function () {\n return onPoseComplete && onPoseComplete(pose);\n });\n };\n PoseElement.prototype.flushChildren = function () {\n var _this = this;\n this.children.forEach(function (_a) {\n var element = _a.element,\n poseConfig = _a.poseConfig,\n onRegistered = _a.onRegistered;\n return onRegistered(_this.poser.addChild(element, poseConfig));\n });\n this.children.clear();\n };\n PoseElement.prototype.render = function () {\n var elementType = this.props.elementType;\n return React__default.createElement(PoseParentProvider, {\n value: this.childrenHandlers\n }, createElement(elementType, pickAssign(this.shouldForwardProp, [this.getSetProps(), {\n ref: this.setRef\n }])));\n };\n return PoseElement;\n}(PureComponent);\nvar supportedElements = ['a', 'article', 'aside', 'audio', 'b', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dialog', 'div', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'label', 'legend', 'li', 'nav', 'object', 'ol', 'option', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'section', 'select', 'span', 'strong', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'ul', 'video', 'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\nvar componentCache = new Map();\nvar createComponentFactory = function (key) {\n var componentFactory = function (poseConfig) {\n if (poseConfig === void 0) {\n poseConfig = {};\n }\n return forwardRef(function (_a, ref) {\n var _b = _a.withParent,\n withParent = _b === void 0 ? true : _b,\n props = __rest(_a, [\"withParent\"]);\n warning(props.innerRef === undefined, 'innerRef is deprecated. Please use ref instead.');\n return !withParent || props.parentValues ? React__default.createElement(PoseElement, __assign({\n poseConfig: poseConfig,\n innerRef: ref,\n elementType: key\n }, props)) : React__default.createElement(PoseParentConsumer, null, function (parentCtx) {\n return React__default.createElement(PoseElement, __assign({\n poseConfig: poseConfig,\n elementType: key,\n innerRef: ref\n }, props, parentCtx));\n });\n });\n };\n componentCache.set(key, componentFactory);\n return componentFactory;\n};\nvar getComponentFactory = function (key) {\n return componentCache.has(key) ? componentCache.get(key) : createComponentFactory(key);\n};\nvar posed = function (component) {\n return getComponentFactory(component);\n};\nsupportedElements.reduce(function (acc, key) {\n acc[key] = createComponentFactory(key);\n return acc;\n}, posed);\nvar getKey = function (child) {\n invariant(child && child.key !== null, 'Every child of Transition must be given a unique key');\n var childKey = typeof child.key === 'number' ? child.key.toString() : child.key;\n return childKey.replace('.$', '');\n};\nvar prependProps = function (element, props) {\n return createElement(element.type, __assign(__assign({\n key: element.key,\n ref: element.ref\n }, props), element.props));\n};\nvar handleTransition = function (_a, _b) {\n var displayedChildren = _b.displayedChildren,\n finishedLeaving = _b.finishedLeaving,\n hasInitialized = _b.hasInitialized,\n indexedChildren = _b.indexedChildren,\n scheduleChildRemoval = _b.scheduleChildRemoval;\n var incomingChildren = _a.children,\n preEnterPose = _a.preEnterPose,\n enterPose = _a.enterPose,\n exitPose = _a.exitPose,\n animateOnMount = _a.animateOnMount,\n enterAfterExit = _a.enterAfterExit,\n flipMove = _a.flipMove,\n onRest = _a.onRest,\n propsForChildren = __rest(_a, [\"children\", \"preEnterPose\", \"enterPose\", \"exitPose\", \"animateOnMount\", \"enterAfterExit\", \"flipMove\", \"onRest\"]);\n var targetChildren = makeChildList(incomingChildren);\n var nextState = {\n displayedChildren: []\n };\n if (process.env.NODE_ENV !== 'production') {\n warning(!propsForChildren.onPoseComplete, \"<Transition/> (or <PoseGroup/>) doesn't accept onPoseComplete prop.\");\n }\n var prevKeys = displayedChildren.map(getKey);\n var nextKeys = targetChildren.map(getKey);\n var hasPropsForChildren = Object.keys(propsForChildren).length !== 0;\n var entering = new Set(nextKeys.filter(function (key) {\n return finishedLeaving.hasOwnProperty(key) || prevKeys.indexOf(key) === -1;\n }));\n entering.forEach(function (key) {\n return delete finishedLeaving[key];\n });\n var leaving = [];\n var newlyLeaving = {};\n prevKeys.forEach(function (key) {\n if (entering.has(key)) {\n return;\n }\n var isLeaving = finishedLeaving.hasOwnProperty(key);\n if (!isLeaving && nextKeys.indexOf(key) !== -1) {\n return;\n }\n leaving.push(key);\n if (!isLeaving) {\n finishedLeaving[key] = false;\n newlyLeaving[key] = true;\n }\n });\n var moving = new Set(prevKeys.filter(function (key, i) {\n return !entering.has(key) || leaving.indexOf(key) === -1;\n }));\n targetChildren.forEach(function (child) {\n var newChildProps = {};\n if (entering.has(child.key)) {\n if (hasInitialized || animateOnMount) {\n newChildProps.initialPose = preEnterPose;\n }\n newChildProps._pose = enterPose;\n } else if (moving.has(child.key) && flipMove) {\n newChildProps._pose = [enterPose, 'flip'];\n } else {\n newChildProps._pose = enterPose;\n }\n var newChild = cloneElement(child, newChildProps);\n indexedChildren[child.key] = newChild;\n nextState.displayedChildren.push(hasPropsForChildren ? prependProps(newChild, propsForChildren) : newChild);\n });\n leaving.forEach(function (key) {\n var child = indexedChildren[key];\n var newChild = newlyLeaving[key] ? cloneElement(child, {\n _pose: exitPose,\n onPoseComplete: function (pose) {\n if (pose === exitPose) scheduleChildRemoval(key);\n var onPoseComplete = child.props.onPoseComplete;\n if (onPoseComplete) onPoseComplete(pose);\n },\n popFromFlow: flipMove\n }) : child;\n var insertionIndex = prevKeys.indexOf(key);\n indexedChildren[child.key] = newChild;\n nextState.displayedChildren.splice(insertionIndex, 0, hasPropsForChildren ? prependProps(newChild, propsForChildren) : newChild);\n });\n return nextState;\n};\nvar handleChildrenTransitions = function (props, state) {\n var newState = handleTransition(props, state);\n newState.hasInitialized = true;\n return newState;\n};\nvar makeChildList = function (children) {\n var list = [];\n Children.forEach(children, function (child) {\n return child && list.push(child);\n });\n return list;\n};\nvar Transition = function (_super) {\n __extends(Transition, _super);\n function Transition() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n displayedChildren: [],\n finishedLeaving: {},\n hasInitialized: false,\n indexedChildren: {},\n scheduleChildRemoval: function (key) {\n return _this.removeChild(key);\n }\n };\n return _this;\n }\n Transition.prototype.removeChild = function (key) {\n var _a = this.state,\n displayedChildren = _a.displayedChildren,\n finishedLeaving = _a.finishedLeaving;\n var _b = this.props,\n enterAfterExit = _b.enterAfterExit,\n onRest = _b.onRest;\n if (!finishedLeaving.hasOwnProperty(key)) return;\n finishedLeaving[key] = true;\n if (!Object.keys(finishedLeaving).every(function (leavingKey) {\n return finishedLeaving[leavingKey];\n })) {\n return;\n }\n var targetChildren = displayedChildren.filter(function (child) {\n return !finishedLeaving.hasOwnProperty(child.key);\n });\n var newState = enterAfterExit ? __assign({\n finishedLeaving: {}\n }, handleChildrenTransitions(__assign(__assign({}, this.props), {\n enterAfterExit: false\n }), __assign(__assign({}, this.state), {\n displayedChildren: targetChildren\n }))) : {\n finishedLeaving: {},\n displayedChildren: targetChildren\n };\n this.setState(newState, onRest);\n };\n Transition.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n return this.state !== nextState;\n };\n Transition.prototype.render = function () {\n return this.state.displayedChildren;\n };\n Transition.defaultProps = {\n flipMove: false,\n enterAfterExit: false,\n preEnterPose: 'exit',\n enterPose: 'enter',\n exitPose: 'exit'\n };\n Transition.getDerivedStateFromProps = handleChildrenTransitions;\n return Transition;\n}(Component);\nvar PoseGroup = function (_super) {\n __extends(PoseGroup, _super);\n function PoseGroup() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PoseGroup.prototype.render = function () {\n return createElement(Transition, __assign({}, this.props));\n };\n PoseGroup.defaultProps = {\n flipMove: true\n };\n return PoseGroup;\n}(Component);\nexport default posed;\nexport { Transition, PoseGroup };"],"sourceRoot":""}