diff --git a/README.md b/README.md index ccc9d101..cf38be48 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Velocity 2.0.0 +# Velocity 2.0.0 beta -# This is a dev branch - files are *not* available on CDN +# This is a public beta - files are *not* available on CDN ## Docs -[http://VelocityJS.org](http://velocityjs.org) +[https://github.com/julianshapiro/velocity/wiki](https://github.com/julianshapiro/velocity/wiki) ## News WhatsApp, Tumblr, Windows, Samsung, Uber, and thousands of other companies rely on Velocity. Visit [Libscore.com](http://libscore.com/#$.Velocity) to see which sites use Velocity on their homepage. diff --git a/V2_CHANGES.md b/V2_CHANGES.md new file mode 100644 index 00000000..82b8dd32 --- /dev/null +++ b/V2_CHANGES.md @@ -0,0 +1,22 @@ +# Major Changes in Velocity V2 + +* Transforms - Use these directly within CSS, don't try the old shortcuts as they don't exist. +* Colors - All web colors are supported internally. +* SVG - All SVG attributes are supported internally, though they must be placed on the correct type of element. +* Loop - This no longer copies the animation call, it calls it multiple times. +* Repeat - This is almost identical to loop, but only runs one way. +* Chaining - Chaining is awesome, use it. Chained commands are designed to operate on the chained animation, not on the elements within it. +* Styles - Use `element.velocity("style", "propertyName"[, value])`, the old .Hook has gone. +* Per-element - Animations are now copied per-element, and not one a one-animation-per-array basis as in other libraries (and old Velocity v1). +* Sync - You can now de-sync animations so they start immediately per-element, rather than waiting for all to be ready. +* Speed - You can control the speed of the animation playback. +* Delay - You can pass a negative number to start inside the animation rather than just having a delay before it. +* There are APIs for extending Velocity - see the various register* commands. +* Display - This is a property, no longer an option. +* Visibility - This is a property, no longer an option. + +# Currently disabled / not updated: + +* UI-Pack +* Reverse +* Scroll (working, but not happy with interface - it's a property if people want to play, alias of scrollTop, there's also scrollLeft) diff --git a/index.d.ts b/index.d.ts index 3771e9ee..58d69658 100644 --- a/index.d.ts +++ b/index.d.ts @@ -738,12 +738,15 @@ interface VelocityExtended { // Action: Finish // //////////////////// interface Velocity { - (action: "finish", queue?: string): VelocityResult; - (elements: VelocityElements, action: "finish", queue?: string): VelocityResult; + (action: "finish", stopAll?: true): VelocityResult; + (action: "finish", queue?: string | false, stopAll?: true): VelocityResult; + (elements: VelocityElements, action: "finish", stopAll?: true): VelocityResult; + (elements: VelocityElements, action: "finish", queue?: string | false, stopAll?: true): VelocityResult; } interface VelocityChain { - (action: "finish", queue?: string): VelocityResult; + (action: "finish", stopAll?: true): VelocityResult; + (action: "finish", queue?: string | false, stopAll?: true): VelocityResult; } //////////////////// @@ -801,12 +804,15 @@ interface VelocityChain { // Action: Stop // ////////////////// interface Velocity { - (action: "stop", queue?: string): VelocityResult; - (elements: VelocityElements, action: "stop", queue?: string): VelocityResult; + (action: "stop", stopAll?: true): VelocityResult; + (action: "stop", queue?: string | false, stopAll?: true): VelocityResult; + (elements: VelocityElements, action: "stop", stopAll?: true): VelocityResult; + (elements: VelocityElements, action: "stop", queue?: string | false, stopAll?: true): VelocityResult; } interface VelocityChain { - (action: "stop", queue?: string): VelocityResult; + (action: "stop", stopAll?: true): VelocityResult; + (action: "stop", queue?: string | false, stopAll?: true): VelocityResult; } /////////////////// diff --git a/src/Velocity/actions/finish.ts b/src/Velocity/actions/finish.ts index 59c60555..48b6fcba 100644 --- a/src/Velocity/actions/finish.ts +++ b/src/Velocity/actions/finish.ts @@ -55,8 +55,18 @@ namespace VelocityStatic { } /** - * Clear the currently-active delay on each targeted element. - * @param {HTMLorSVGElement[]} elements The velocity elements + * When the finish action is triggered, the elements' currently active call is + * immediately finished. When an element is finished, the next item in its + * animation queue is immediately triggered. If passed via a chained call + * then this will only target the animations in that call, and not the + * elements linked to it. + * + * A queue name may be passed in to specify that only animations on the + * named queue are finished. The default queue is named "". In addition the + * value of `false` is allowed for the queue name. + * + * An final argument may be passed in to clear an element's remaining queued + * calls. This may only be the value `true`. */ function finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void { const queueName: string | false = validateQueue(args[0], true), diff --git a/src/Velocity/actions/stop.ts b/src/Velocity/actions/stop.ts index c4caea8c..bc06a838 100644 --- a/src/Velocity/actions/stop.ts +++ b/src/Velocity/actions/stop.ts @@ -22,17 +22,22 @@ namespace VelocityStatic { } /** - * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have - * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element - * is stopped, the next item in its animation queue is immediately triggered. - * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the "fx" queue) - * or a custom queue string can be passed in. - * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*, - * regardless of the element's current queue state. - * @param {any[]} args - * @param {VelocityResult} elements - * @param {VelocityPromise} promiseHandler - * @param {string} action + * When the stop action is triggered, the elements' currently active call is + * immediately stopped. When an element is stopped, the next item in its + * animation queue is immediately triggered. If passed via a chained call + * then this will only target the animations in that call, and not the + * elements linked to it. + * + * A queue name may be passed in to specify that only animations on the + * named queue are stopped. The default queue is named "". In addition the + * value of `false` is allowed for the queue name. + * + * An final argument may be passed in to clear an element's remaining queued + * calls. This may only be the value `true`. + * + * Note: The stop command runs prior to Velocity's Queueing phase since its + * behavior is intended to take effect *immediately*, regardless of the + * element's current queue state. */ function stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void { const queueName: string | false = validateQueue(args[0], true), diff --git a/velocity.js b/velocity.js index bbfc8f79..867f79b1 100644 --- a/velocity.js +++ b/velocity.js @@ -437,8 +437,18 @@ var VelocityStatic; } } /** - * Clear the currently-active delay on each targeted element. - * @param {HTMLorSVGElement[]} elements The velocity elements + * When the finish action is triggered, the elements' currently active call is + * immediately finished. When an element is finished, the next item in its + * animation queue is immediately triggered. If passed via a chained call + * then this will only target the animations in that call, and not the + * elements linked to it. + * + * A queue name may be passed in to specify that only animations on the + * named queue are finished. The default queue is named "". In addition the + * value of `false` is allowed for the queue name. + * + * An final argument may be passed in to clear an element's remaining queued + * calls. This may only be the value `true`. */ function finish(args, elements, promiseHandler) { var queueName = validateQueue(args[0], true), defaultQueue = VelocityStatic.defaults.queue, finishAll = args[queueName === undefined ? 0 : 1] === true; @@ -730,17 +740,22 @@ var VelocityStatic; } } /** - * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have - * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element - * is stopped, the next item in its animation queue is immediately triggered. - * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the "fx" queue) - * or a custom queue string can be passed in. - * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*, - * regardless of the element's current queue state. - * @param {any[]} args - * @param {VelocityResult} elements - * @param {VelocityPromise} promiseHandler - * @param {string} action + * When the stop action is triggered, the elements' currently active call is + * immediately stopped. When an element is stopped, the next item in its + * animation queue is immediately triggered. If passed via a chained call + * then this will only target the animations in that call, and not the + * elements linked to it. + * + * A queue name may be passed in to specify that only animations on the + * named queue are stopped. The default queue is named "". In addition the + * value of `false` is allowed for the queue name. + * + * An final argument may be passed in to clear an element's remaining queued + * calls. This may only be the value `true`. + * + * Note: The stop command runs prior to Velocity's Queueing phase since its + * behavior is intended to take effect *immediately*, regardless of the + * element's current queue state. */ function stop(args, elements, promiseHandler, action) { var queueName = validateQueue(args[0], true), defaultQueue = VelocityStatic.defaults.queue, finishAll = args[queueName === undefined ? 0 : 1] === true; diff --git a/velocity.js.map b/velocity.js.map index 710cce29..809e68f8 100644 --- a/velocity.js.map +++ b/velocity.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/constants.ts","../src/types.ts","../src/utility.ts","../src/Velocity/actions/actions.ts","../src/Velocity/actions/defaultAction.ts","../src/Velocity/actions/finish.ts","../src/Velocity/actions/option.ts","../src/Velocity/actions/pauseResume.ts","../src/Velocity/actions/reverse.ts","../src/Velocity/actions/stop.ts","../src/Velocity/actions/style.ts","../src/Velocity/actions/tween.ts","../src/Velocity/state.ts","../src/Velocity/css/camelCase.ts","../src/Velocity/css/fixColors.ts","../src/Velocity/css/colors.ts","../src/Velocity/css/getPropertyValue.ts","../src/Velocity/css/getUnit.ts","../src/Velocity/css/regex.ts","../src/Velocity/css/setPropertyValue.ts","../src/Velocity/easing/easings.ts","../src/Velocity/easing/bezier.ts","../src/Velocity/easing/bounce.ts","../src/Velocity/easing/elastic.ts","../src/Velocity/easing/spring_rk4.ts","../src/Velocity/easing/step.ts","../src/Velocity/easing/string.ts","../src/Velocity/normalizations/normalizations.ts","../src/Velocity/normalizations/svg/attributes.ts","../src/Velocity/normalizations/svg/dimensions.ts","../src/Velocity/normalizations/dimensions.ts","../src/Velocity/normalizations/display.ts","../src/Velocity/normalizations/genericReordering.ts","../src/Velocity/normalizations/scroll.ts","../src/Velocity/normalizations/vendorPrefix.ts","../src/Velocity/complete.ts","../src/Velocity/data.ts","../src/Velocity/debug.ts","../src/Velocity/defaults.ts","../src/Velocity/mock.ts","../src/Velocity/patch.ts","../src/Velocity/queue.ts","../src/Velocity/redirects.ts","../src/Velocity/registereffect.ts","../src/Velocity/runsequence.ts","../src/Velocity/tick.ts","../src/Velocity/timestamp.ts","../src/Velocity/tweens.ts","../src/Velocity/validate.ts","../src/Velocity/version.ts","../src/core.ts","../src/app.ts"],"names":["PUBLIC_MEMBERS","ALL_VENDOR_PREFIXES","DURATION_FAST","DURATION_NORMAL","DURATION_SLOW","FUZZY_MS_PER_SECOND","DEFAULT_CACHE","DEFAULT_DELAY","DEFAULT_DURATION","DEFAULT_EASING","DEFAULT_FPSLIMIT","DEFAULT_LOOP","DEFAULT_PROMISE","DEFAULT_PROMISE_REJECT_EMPTY","DEFAULT_QUEUE","DEFAULT_REPEAT","DEFAULT_SPEED","DEFAULT_SYNC","TWEEN_NUMBER_REGEX","CLASSNAME","VERSION","Duration","fast","normal","slow","isBoolean","variable","isNumber","isNumberWhenParsed","isNaN","Number","isString","isFunction","Object","prototype","toString","call","isNode","nodeType","isVelocityResult","length","velocity","propertyIsEnumerable","object","property","isWrapped","window","isSVG","SVGElement","isPlainObject","proto","getPrototypeOf","hasOwnProperty","constructor","isEmptyObject","name_1","defineProperty","name","value","configurable","writable","_deepCopyObject","target","sources","_i","arguments","TypeError","to","source","shift","key","Array","isArray","_now","Date","now","getTime","_inArray","array","i","sanitizeElements","elements","getValue","args","_args","_arg","undefined","addClass","element","className","Element","classList","add","removeClass","remove","replace","RegExp","VelocityStatic","Actions","create","registerAction","internal","callback","console","warn","defaultAction","promiseHandler","action","Redirects","options","opts_1","__assign","durationOriginal_1","parseFloat","duration","delayOriginal_1","delay","backwards","reverse","forEach","elementIndex","stagger","drag","test","Math","max","_resolver","abortError","_rejecter","Error","log","checkAnimationShouldBeFinished","animation","queueName","defaultQueue","validateTweens","queue","_flags","_started","_first","begin","callBegin","tweens","tween_1","pattern","currentValue","endValue","CSS","setPropertyValue","completeCall","finish","validateQueue","defaults","finishAll","animations","activeCall","State","first","nextCall","firstNew","_next","then","animationFlags","isExpanded","isReady","isStarted","isStopped","isPaused","isSync","isReverse","option","indexOf","push","result","flag","isPercentComplete","validateCache","validateBegin","validateComplete","validateDelay","validateDuration","validateFpsLimit","validateLoop","validateRepeat","num","timeStart","lastTick","checkAnimation","pauseResume","SyntaxError","checkAnimationShouldBeStopped","stop","style","styleAction","getPropertyValue","error","propertyName","value_1","String","tween","percentComplete","properties","easing","tweenAction","requireForcefeeding","info","document","body","fakeAnimation","singleResult","count","_a","activeEasing","validateEasing","expandProperties","tween_2","easing_1","rounding","startValue","result_1","round","isClient","isMobile","navigator","userAgent","isAndroid","isGingerbread","isChrome","chrome","isFirefox","prefixElement","createElement","windowScrollAnchor","pageYOffset","scrollAnchor","documentElement","parentNode","scrollPropertyLeft","scrollPropertyTop","isTicking","cache","camelCase","fixed","match","subMatch","toUpperCase","ColorNames","makeRGBA","ignore","r","g","b","parseInt","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","fixColors","str","$0","$1","$2","colorValues","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","name_2","color","floor","computePropertyValue","data","Data","computedStyle","getComputedStyle","computedValue","toggleDisplay","augmentDimension","topLeft","position","getBoundingClientRect","skipNormalisation","skipCache","propertyValue","NoCacheNormalizations","has","debug","types","best","index","Normalizations","Units","getUnit","start","units","unit","j","RegEx","isHex","valueUnwrap","wrappedValueAlreadyExtracted","valueSplit","Easing","Easings","registerEasing","cos","PI","exp","fixRange","min","A","aA1","aA2","B","C","calcBezier","aT","getSlope","generateBezier","mX1","mY1","mX2","mY2","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","isFinite","mSampleValues","Float32Array","newtonRaphsonIterate","aX","aGuessT","currentSlope","currentX","calcSampleValues","binarySubdivide","aA","aB","currentT","abs","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","_precomputed","precompute","f","getControlPoints","x","y","easeIn","easeOut","easeInOut","easeOutBounce","easeInBounce","pi2","registerElasticIn","amplitude","period","pow","sin","asin","registerElasticOut","registerElasticInOut","s","springAccelerationForState","state","tension","friction","v","springEvaluateStateWithDerivative","initialState","dt","derivative","dx","dv","springIntegrateState","a","c","d","dxdt","dvdt","generateSpringRK4","initState","path","time_lapsed","tolerance","DT","have_duration","last_state","generateStep","steps","fn","Set","constructors","registerNormalization","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","globals","subtype","exec","createElementNS","toLowerCase","attribute","getDimension","getBBox","e","wantInner","isBorderBox","sides","fields","augment","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","genericReordering","split","firstPart","newValue","join","matchedString","trim","clientWidth","scrollWidth","clientHeight","scrollHeight","scrollTop","clientHeight_1","scrollHeight_1","HTMLElement","vendorPrefix","unprefixed","vendors","$","letter","callComplete","complete","setTimeout","isLoop","loop","isRepeat","repeat","repeatAgain","lastFinishList","ellapsedTime","_completed","_total","resolver","dequeue","freeAnimationCall","newData","queueList","lastAnimationList","_cache","_begin","_complete","_delay","_duration","_easing","_fpsLimit","_loop","_minFrameTime","_promise","_promiseRejectEmpty","_queue","_repeat","_speed","_sync","mobileHA","defineProperties","reset","enumerable","get","set","fpsLimit","minFrameTime","promise","validatePromise","promiseRejectEmpty","validatePromiseRejectEmpty","speed","validateSpeed","sync","validateSync","mock","patch","global","VelocityFn","animate","prev","last","_prev","skip","next","direction","elementsIndex","elementsSize","opts","inlineValues","computedValues","height","marginTop","marginBottom","paddingTop","paddingBottom","isInline","overflow","promiseData","propertiesMap","opacity","this","animateParentHeight","totalDuration","totalHeightDelta","propertiesToSum","RegisterEffect","effectName","redirectOptions","finalElement","defaultDuration","callIndex","calls","durationPercentage","shareDuration","propertyMap","redirectDuration","callOptions","visibility","injectFinalCallbacks_1","resetProperty","resetValue","resetOptions","RunSequence","originalSequence","sequence","currentCall","currentCallOptions","o","nextCallOptions","timing","sequenceQueue","callbackOriginal_1","nextCallElements","callProgress","timeCurrent","tweenValue","progress","firstProgress","firstComplete","asyncCallbacks","_nextProgress","_nextComplete","FRAME_TIME","performance","perf","nowOffset_1","navigationStart","rAFProxy","rAFShim","requestAnimationFrame","ticker","hidden","addEventListener","updateTicker","event","tick","ticking","timestamp","deltaTime","defaultSpeed","defaultEasing","lastProgress","lastComplete","flags","queue_1","_ready","delta","millisecondsEllapsed","tween_3","JSON","stringify","Tween","commands","Map","elementArrayIndex","getUnitType","degree","unitless","valueData","found","tween_4","arr1","arr2","explodeTween","isForcefeed","runAgain","arrayStart","arrayEnd","indexStart","indexEnd","inCalc","inRGB","inRGBA","isStringValue","charStart","charEnd","tempStart","tempEnd","dotStart","dotEnd","unitStart","unitEnd","startNumbers_1","count_1","index_1","pop","tween_5","parseDuration","def","noError","parsed","apply","validateProgress","version","__args","_arguments","args0","syntacticSugar","p","names","argumentIndex","optionsMap","rejecter","assign","bind","isAction","Promise","_resolve","_reject","_then","catch","finally","optionsBegin","optionsComplete","optionsProgress","optionsSync","offset","rootAnimation","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,mBAAkB,WAAW,kBAAkB,SAAS,SAAS;;;;;;AAKvE,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,kBAAkB;;AACxB,IAAMC,gBAAgB;;AAEtB,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,gBAAgB;;AACtB,IAAMC,mBAAmBL;;AACzB,IAAMM,iBAAiB;;AACvB,IAAMC,mBAAmB;;AACzB,IAAMC,eAAe;;AACrB,IA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OuB,eAAe+kB,YAAYjkB;QACjCijB,YAAYvnB,eAAe2K,QAAQrG,QAAQ;QAC3CkjB,KAAK;YACJ,OAAOvhB,eAAe3B;;;;;;;;;;;;;;;;;;;;AAJzB,KAAK,IAAMA,OAAO2B,gBAAe;YAAtB3B","file":"velocity.js","sourceRoot":"src/","sourcesContent":["/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Constants and defaults. These values should never change without a MINOR\r\n * version bump.\r\n */\r\n\r\n//[\"completeCall\", \"CSS\", \"State\", \"getEasing\", \"Easings\", \"data\", \"debug\", \"defaults\", \"hook\", \"init\", \"mock\", \"pauseAll\", \"queue\", \"dequeue\", \"freeAnimationCall\", \"Redirects\", \"RegisterEffect\", \"resumeAll\", \"RunSequence\", \"lastTick\", \"tick\", \"timestamp\", \"expandTween\", \"version\"]\r\nconst PUBLIC_MEMBERS = [\"version\", \"RegisterEffect\", \"style\", \"patch\", \"timestamp\"];\r\n/**\r\n * Without this it will only un-prefix properties that have a valid \"normal\"\r\n * version.\r\n */\r\nconst ALL_VENDOR_PREFIXES = true;\r\n\r\nconst DURATION_FAST = 200;\r\nconst DURATION_NORMAL = 400;\r\nconst DURATION_SLOW = 600;\r\n\r\nconst FUZZY_MS_PER_SECOND = 980;\r\n\r\nconst DEFAULT_CACHE = true;\r\nconst DEFAULT_DELAY = 0;\r\nconst DEFAULT_DURATION = DURATION_NORMAL;\r\nconst DEFAULT_EASING = \"swing\";\r\nconst DEFAULT_FPSLIMIT = 60;\r\nconst DEFAULT_LOOP = 0;\r\nconst DEFAULT_PROMISE = true;\r\nconst DEFAULT_PROMISE_REJECT_EMPTY = true;\r\nconst DEFAULT_QUEUE = \"\";\r\nconst DEFAULT_REPEAT = 0;\r\nconst DEFAULT_SPEED = 1;\r\nconst DEFAULT_SYNC = true;\r\nconst TWEEN_NUMBER_REGEX = /[\\d\\.-]/;\r\n\r\nconst CLASSNAME = \"velocity-animating\";\r\n\r\nconst VERSION = \"2.0.0\";\r\n\r\nconst Duration = {\r\n\t\"fast\": DURATION_FAST,\r\n\t\"normal\": DURATION_NORMAL,\r\n\t\"slow\": DURATION_SLOW,\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Runtime type checking methods.\r\n */\r\n\r\nfunction isBoolean(variable): variable is boolean {\r\n\treturn variable === true || variable === false;\r\n}\r\n\r\nfunction isNumber(variable): variable is number {\r\n\treturn typeof variable === \"number\";\r\n}\r\n\r\n/**\r\n * Faster way to parse a string/number as a number https://jsperf.com/number-vs-parseint-vs-plus/3\r\n * @param variable The given string or number\r\n * @returns {variable is number} Returns boolean true if it is a number, false otherwise\r\n */\r\nfunction isNumberWhenParsed(variable: string | number): variable is number {\r\n\treturn !isNaN(Number(variable));\r\n}\r\n\r\nfunction isString(variable): variable is string {\r\n\treturn typeof variable === \"string\";\r\n}\r\n\r\nfunction isFunction(variable): variable is Function {\r\n\treturn Object.prototype.toString.call(variable) === \"[object Function]\";\r\n}\r\n\r\nfunction isNode(variable): variable is HTMLorSVGElement {\r\n\treturn !!(variable && variable.nodeType);\r\n}\r\n\r\nfunction isVelocityResult(variable): variable is VelocityResult {\r\n\treturn variable && isNumber(variable.length) && isFunction((variable as VelocityResult).velocity);\r\n}\r\n\r\nfunction propertyIsEnumerable(object: Object, property: string): boolean {\r\n\treturn Object.prototype.propertyIsEnumerable.call(object, property);\r\n}\r\n\r\n/* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */\r\n\r\n/* NOTE: HTMLFormElements also have a length. */\r\nfunction isWrapped(variable): variable is HTMLorSVGElement[] {\r\n\treturn variable\r\n\t\t&& variable !== window\r\n\t\t&& isNumber(variable.length)\r\n\t\t&& !isString(variable)\r\n\t\t&& !isFunction(variable)\r\n\t\t&& !isNode(variable)\r\n\t\t&& (variable.length === 0 || isNode(variable[0]));\r\n}\r\n\r\nfunction isSVG(variable): variable is SVGElement {\r\n\treturn SVGElement && variable instanceof SVGElement;\r\n}\r\n\r\nfunction isPlainObject(variable): variable is {} {\r\n\tif (!variable || typeof variable !== \"object\" || variable.nodeType || Object.prototype.toString.call(variable) !== \"[object Object]\") {\r\n\t\treturn false;\r\n\t}\r\n\tlet proto = Object.getPrototypeOf(variable) as Object;\r\n\r\n\treturn !proto || (proto.hasOwnProperty(\"constructor\") && proto.constructor === Object);\r\n}\r\n\r\nfunction isEmptyObject(variable): variable is {} {\r\n\tfor (let name in variable) {\r\n\t\tif (variable.hasOwnProperty(name)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\n/**\r\n * The defineProperty() function provides a\r\n * shortcut to defining a property that cannot be accidentally iterated across.\r\n */\r\nfunction defineProperty(proto: any, name: string, value: Function | any) {\r\n\tif (proto) {\r\n\t\tObject.defineProperty(proto, name, {\r\n\t\t\tconfigurable: true,\r\n\t\t\twritable: true,\r\n\t\t\tvalue: value\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Perform a deep copy of an object - also copies children so they're not\r\n * going to be affected by changing original.\r\n */\r\nfunction _deepCopyObject(target: T, ...sources: U[]): T & U {\r\n\tif (target == null) { // TypeError if undefined or null\r\n\t\tthrow new TypeError(\"Cannot convert undefined or null to object\");\r\n\t}\r\n\tconst to = Object(target),\r\n\t\thasOwnProperty = Object.prototype.hasOwnProperty;\r\n\tlet source: any;\r\n\r\n\twhile ((source = sources.shift())) {\r\n\t\tif (source != null) {\r\n\t\t\tfor (const key in source) {\r\n\t\t\t\tif (hasOwnProperty.call(source, key)) {\r\n\t\t\t\t\tconst value = source[key];\r\n\r\n\t\t\t\t\tif (Array.isArray(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = [], value);\r\n\t\t\t\t\t} else if (isPlainObject(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = {}, value);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tto[key] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn to;\r\n}\r\n\r\n/**\r\n * Shim to get the current milliseconds - on anything except old IE it'll use\r\n * Date.now() and save creating an object. If that doesn't exist then it'll\r\n * create one that gets GC.\r\n */\r\nconst _now = Date.now ? Date.now : function() {\r\n\treturn (new Date()).getTime();\r\n};\r\n\r\n/**\r\n * Check whether a value belongs to an array\r\n * https://jsperf.com/includes-vs-indexof-vs-while-loop/6\r\n * @param array The given array\r\n * @param value The given element to check if it is part of the array\r\n * @returns {boolean} True if it exists, false otherwise\r\n */\r\nfunction _inArray(array: T[], value: T): boolean {\r\n\tlet i = 0;\r\n\r\n\twhile (i < array.length) {\r\n\t\tif (array[i++] === value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Convert an element or array-like element list into an array if needed.\r\n */\r\nfunction sanitizeElements(elements: HTMLorSVGElement | HTMLorSVGElement[]): HTMLorSVGElement[] {\r\n\tif (isNode(elements)) {\r\n\t\treturn [elements];\r\n\t}\r\n\treturn elements as HTMLorSVGElement[];\r\n}\r\n\r\n/**\r\n * When there are multiple locations for a value pass them all in, then get the\r\n * first value that is valid.\r\n */\r\nfunction getValue(...args: T[]): T;\r\nfunction getValue(args: any): T {\r\n\tfor (let i = 0, _args = arguments; i < _args.length; i++) {\r\n\t\tconst _arg = _args[i];\r\n\r\n\t\tif (_arg !== undefined && _arg === _arg) {\r\n\t\t\treturn _arg;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Add a single className to an Element.\r\n */\r\nfunction addClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.add(className);\r\n\t\t} else {\r\n\t\t\tremoveClass(element, className);\r\n\t\t\telement.className += (element.className.length ? \" \" : \"\") + className;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Remove a single className from an Element.\r\n */\r\nfunction removeClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.remove(className);\r\n\t\t} else {\r\n\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\r\n\t\t\telement.className = element.className.toString().replace(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\", \"gi\"), \" \");\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\r\n\t * but they still exist). Otherwise they can be replaced by users.\r\n\t * \r\n\t * All external method calls should be using actions rather than sub-calls\r\n\t * of Velocity itself.\r\n\t */\r\n\texport const Actions: {[name: string]: VelocityActionFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register an action. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerAction\", \"name\", VelocityActionFn);\r\n\t * \r\n\t * @private\r\n\t */\r\n\texport function registerAction(args?: [string, VelocityActionFn], internal?: boolean) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Actions[name] && !propertyIsEnumerable(Actions, name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override internal 'registerAction' callback\", name);\r\n\t\t} else if (internal === true) {\r\n\t\t\tdefineProperty(Actions, name, callback);\r\n\t\t} else {\r\n\t\t\tActions[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerAction\", registerAction as any], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Default action.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have\r\n\t * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element\r\n\t * is stopped, the next item in its animation queue is immediately triggered.\r\n\t * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the \"fx\" queue)\r\n\t * or a custom queue string can be passed in.\r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t * regardless of the element's current queue state.\r\n\t * \r\n\t * @param {HTMLorSVGElement[]} elements The collection of HTML or SVG elements\r\n\t * @param {StrictVelocityOptions} The strict Velocity options\r\n\t * @param {Promise} An optional promise if the user uses promises\r\n\t * @param {(value?: (HTMLorSVGElement[] | VelocityResult)) => void} resolver The resolve method of the promise\r\n\t */\r\n\tfunction defaultAction(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\t// TODO: default is wrong, should be runSequence based, and needs all arguments\r\n\t\tif (isString(action) && VelocityStatic.Redirects[action]) {\r\n\t\t\tconst options = isPlainObject(args[0]) ? args[0] as VelocityOptions : {},\r\n\t\t\t\topts = {...options},\r\n\t\t\t\tdurationOriginal = parseFloat(options.duration as any),\r\n\t\t\t\tdelayOriginal = parseFloat(options.delay as any) || 0;\r\n\r\n\t\t\t/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */\r\n\t\t\tif (opts.backwards === true) {\r\n\t\t\t\telements = elements.reverse();\r\n\t\t\t}\r\n\r\n\t\t\t/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */\r\n\t\t\telements.forEach(function(element, elementIndex) {\r\n\r\n\t\t\t\t/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */\r\n\t\t\t\tif (parseFloat(opts.stagger as string)) {\r\n\t\t\t\t\topts.delay = delayOriginal + (parseFloat(opts.stagger as string) * elementIndex);\r\n\t\t\t\t} else if (isFunction(opts.stagger)) {\r\n\t\t\t\t\topts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elements.length);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)\r\n the duration of each element's animation, using floors to prevent producing very short durations. */\r\n\t\t\t\tif (opts.drag) {\r\n\t\t\t\t\t/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */\r\n\t\t\t\t\topts.duration = durationOriginal || (/^(callout|transition)/.test(action) ? 1000 : DEFAULT_DURATION);\r\n\r\n\t\t\t\t\t/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,\r\n B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).\r\n The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */\r\n\t\t\t\t\topts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elements.length : (elementIndex + 1) / elements.length), opts.duration * 0.75, 200);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to\r\n reduce the opts checking logic required inside the redirect. */\r\n\t\t\t\tVelocityStatic.Redirects[action].call(element, element, opts, elementIndex, elements.length, elements, promiseHandler && promiseHandler._resolver);\r\n\t\t\t});\r\n\r\n\t\t\t/* Since the animation logic resides within the redirect's own code, abort the remainder of this call.\r\n (The performance overhead up to this point is virtually non-existant.) */\r\n\t\t\t/* Note: The jQuery call chain is kept intact by returning the complete element set. */\r\n\t\t} else {\r\n\t\t\tconst abortError = \"Velocity: First argument (\" + action + \") was not a property map, a known action, or a registered redirect. Aborting.\";\r\n\r\n\t\t\tif (promiseHandler) {\r\n\t\t\t\tpromiseHandler._rejecter(new Error(abortError));\r\n\t\t\t} else if (window.console) {\r\n\t\t\t\tconsole.log(abortError);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"default\", defaultAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Finish all animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be finished, and if so we set the tweens to\r\n\t * the final value for it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeFinished(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (!(animation._flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t// Copied from tick.ts - ensure that the animation is completely\r\n\t\t\t\t// valid and run begin() before complete().\r\n\t\t\t\tconst options = animation.options;\r\n\r\n\t\t\t\t// The begin callback is fired once per call, not once per\r\n\t\t\t\t// element, and is passed the full raw DOM element set as both\r\n\t\t\t\t// its context and its first argument.\r\n\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\toptions._first = animation;\r\n\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\tcallBegin(animation);\r\n\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanimation._flags |= AnimationFlags.STARTED;\r\n\t\t\t}\r\n\t\t\tfor (const property in animation.tweens) {\r\n\t\t\t\tconst tween = animation.tweens[property],\r\n\t\t\t\t\tpattern = tween[Tween.PATTERN];\r\n\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\tif (pattern) {\r\n\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\tconst endValue = tween[Tween.END][i];\r\n\r\n\t\t\t\t\t\tcurrentValue += endValue == null ? pattern[i] : endValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tCSS.setPropertyValue(animation.element, property, currentValue);\r\n\t\t\t}\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clear the currently-active delay on each targeted element.\r\n\t * @param {HTMLorSVGElement[]} elements The velocity elements\r\n\t */\r\n\tfunction finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeFinished(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeFinished(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"finish\", finish], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a value from one or more running animations.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to map getters for the various AnimationFlags.\r\n\t */\r\n\tconst animationFlags: {[key: string]: number} = {\r\n\t\t\"isExpanded\": AnimationFlags.EXPANDED,\r\n\t\t\"isReady\": AnimationFlags.READY,\r\n\t\t\"isStarted\": AnimationFlags.STARTED,\r\n\t\t\"isStopped\": AnimationFlags.STOPPED,\r\n\t\t\"isPaused\": AnimationFlags.PAUSED,\r\n\t\t\"isSync\": AnimationFlags.SYNC,\r\n\t\t\"isReverse\": AnimationFlags.REVERSE\r\n\t};\r\n\r\n\t/**\r\n\t * Get or set an option or running AnimationCall data value. If there is no\r\n\t * value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t */\r\n\tfunction option(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst key = args[0],\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(queue, true);\r\n\t\tlet animations: AnimationCall[],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!key) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant key!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If we're chaining the return value from Velocity then we are only\r\n\t\t// interested in the values related to that call\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tanimations = elements.velocity.animations;\r\n\t\t} else {\r\n\t\t\tanimations = [];\r\n\r\n\t\t\tfor (let activeCall = State.first; activeCall; activeCall = activeCall._next) {\r\n\t\t\t\tif (elements.indexOf(activeCall.element) >= 0 && getValue(activeCall.queue, activeCall.options.queue) === queueName) {\r\n\t\t\t\t\tanimations.push(activeCall);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If we're dealing with multiple elements that are pointing at a\r\n\t\t\t// single running animation, then instead treat them as a single\r\n\t\t\t// animation.\r\n\t\t\tif (elements.length > 1 && animations.length > 1) {\r\n\t\t\t\tlet i = 1,\r\n\t\t\t\t\toptions = animations[0].options;\r\n\r\n\t\t\t\twhile (i < animations.length) {\r\n\t\t\t\t\tif (animations[i++].options !== options) {\r\n\t\t\t\t\t\toptions = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// TODO: this needs to check that they're actually a sync:true animation to merge the results, otherwise the individual values may be different\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tanimations = [animations[0]];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined) {\r\n\t\t\tconst result = [],\r\n\t\t\t\tflag = animationFlags[key];\r\n\r\n\t\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\t\tif (flag === undefined) {\r\n\t\t\t\t\t// A normal key to get.\r\n\t\t\t\t\tresult.push(getValue(animations[i][key], animations[i].options[key]));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// A flag that we're checking against.\r\n\t\t\t\t\tresult.push((animations[i]._flags & flag) === 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (elements.length === 1 && animations.length === 1) {\r\n\t\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t\t// single element, then return the value directly\r\n\t\t\t\treturn result[0];\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet isPercentComplete: boolean;\r\n\r\n\t\tswitch (key) {\r\n\t\t\tcase \"cache\":\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"begin\":\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delay\":\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"duration\":\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"fpsLimit\":\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"loop\":\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"percentComplete\":\r\n\t\t\t\tisPercentComplete = true;\r\n\t\t\t\tvalue = parseFloat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"repeat\":\r\n\t\t\tcase \"repeatAgain\":\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif (key[0] !== \"_\") {\r\n\t\t\t\t\tconst num = parseFloat(value);\r\n\r\n\t\t\t\t\tif (value == num) {\r\n\t\t\t\t\t\tvalue = num;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t// deliberate fallthrough\r\n\t\t\tcase \"queue\":\r\n\t\t\tcase \"promise\":\r\n\t\t\tcase \"promiseRejectEmpty\":\r\n\t\t\tcase \"easing\":\r\n\t\t\tcase \"started\":\r\n\t\t\t\tconsole.warn(\"VelocityJS: Trying to set a read-only key:\", key);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tif (value === undefined || value !== value) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set an invalid value:\", key, \"=\", value, \"(\" + args[1] + \")\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\tconst animation = animations[i];\r\n\r\n\t\t\tif (isPercentComplete) {\r\n\t\t\t\tanimation.timeStart = lastTick - (getValue(animation.duration, animation.options.duration, defaults.duration) * value);\r\n\t\t\t} else {\r\n\t\t\t\tanimation[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"option\", option], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Pause and resume animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be paused / resumed.\r\n\t */\r\n\tfunction checkAnimation(animation: AnimationCall, queueName: false | string, defaultQueue: false | string, isPaused: boolean) {\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (isPaused) {\r\n\t\t\t\tanimation._flags |= AnimationFlags.PAUSED;\r\n\t\t\t} else {\r\n\t\t\t\tanimation._flags &= ~AnimationFlags.PAUSED;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a\r\n\t * single element will cause any calls that contain tweens for that element to be paused/resumed\r\n\t * as well.\r\n\t */\r\n\tfunction pauseResume(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\tconst isPaused = action.indexOf(\"pause\") === 0,\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(args[0]),\r\n\t\t\tdefaultQueue = defaults.queue;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimation(animations[i], queueName, defaultQueue, isPaused);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall: AnimationCall = State.first;\r\n\r\n\t\t\twhile (activeCall) {\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimation(activeCall, queueName, defaultQueue, isPaused);\r\n\t\t\t\t}\r\n\t\t\t\tactiveCall = activeCall._next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"pause\", pauseResume], true);\r\n\tregisterAction([\"resume\", pauseResume], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tregisterAction([\"reverse\", function(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\t// TODO: Code needs to split out before here - but this is needed to prevent it being overridden\r\n\t\tthrow new SyntaxError(\"VelocityJS: The 'reverse' action is private.\");\r\n\t}], true)\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Stop animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be stopped, and if so then set the STOPPED\r\n\t * flag on it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeStopped(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tanimation._flags |= AnimationFlags.STOPPED;\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have\r\n\t * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element\r\n\t * is stopped, the next item in its animation queue is immediately triggered.\r\n\t * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the \"fx\" queue)\r\n\t * or a custom queue string can be passed in.\r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t * regardless of the element's current queue state.\r\n\t * @param {any[]} args\r\n\t * @param {VelocityResult} elements\r\n\t * @param {VelocityPromise} promiseHandler\r\n\t * @param {string} action\r\n\t */\r\n\tfunction stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeStopped(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeStopped(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"stop\", stop], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function style(elements: VelocityResult, property: {[property: string]: string}): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string): string | string[];\r\n\texport function style(elements: VelocityResult, property: string, value: string): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string | {[property: string]: string}, value?: string) {\r\n\t\treturn styleAction([property, value], elements);\r\n\t}\r\n\r\n\t/**\r\n\t * Get or set a style of Nomralised property value on one or more elements.\r\n\t * If there is no value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t * \r\n\t * This can fail to set, and will reject the Promise if it does so.\r\n\t * \r\n\t * Velocity(elements, \"style\", \"property\", \"value\") => elements;\r\n\t * Velocity(elements, \"style\", {\"property\": \"value\", ...}) => elements;\r\n\t * Velocity(element, \"style\", \"property\") => \"value\";\r\n\t * Velocity(elements, \"style\", \"property\") => [\"value\", ...];\r\n\t */\r\n\tfunction styleAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst property = args[0],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!property) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant property!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined && !isPlainObject(property)) {\r\n\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t// single element, then return the value directly\r\n\t\t\tif (elements.length === 1) {\r\n\t\t\t\treturn CSS.getPropertyValue(elements[0], property);\r\n\t\t\t}\r\n\t\t\tconst result = [];\r\n\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tresult.push(CSS.getPropertyValue(elements[i], property));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet error: string;\r\n\r\n\t\tif (isPlainObject(property)) {\r\n\t\t\tfor (const propertyName in property) {\r\n\t\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\t\tconst value = property[propertyName];\r\n\r\n\t\t\t\t\tif (isString(value) || isNumber(value)) {\r\n\t\t\t\t\t\tCSS.setPropertyValue(elements[i], propertyName, property[propertyName]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\terror = (error ? error + \", \" : \"\") + \"Cannot set a property '\" + propertyName + \"' to an unknown type: \" + (typeof value);\r\n\t\t\t\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + propertyName + \"' to an unknown type:\", value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (isString(value) || isNumber(value)) {\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tCSS.setPropertyValue(elements[i], property, String(value));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\terror = \"Cannot set a property '\" + property + \"' to an unknown type: \" + (typeof value);\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + property + \"' to an unknown type:\", value);\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (error) {\r\n\t\t\t\tpromiseHandler._rejecter(error);\r\n\t\t\t} else if (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"style\", styleAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, propertyName: string, property: VelocityProperty, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties | string, property?: VelocityProperty | VelocityEasingType, easing?: VelocityEasingType) {\r\n\t\treturn tweenAction(arguments as any, elements);\r\n\t}\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tfunction tweenAction(args?: any[], elements?: HTMLorSVGElement[], promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tlet requireForcefeeding: boolean;\r\n\r\n\t\tif (!elements) {\r\n\t\t\tif (!args.length) {\r\n\t\t\t\tconsole.info(\"Velocity(, \\\"tween\\\", percentComplete, property, end | [end, , ], ) => value\\n\"\r\n\t\t\t\t\t+ \"Velocity(, \\\"tween\\\", percentComplete, {property: end | [end, , ], ...}, ) => {property: value, ...}\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telements = [document.body];\r\n\t\t\trequireForcefeeding = true;\r\n\t\t} else if (elements.length !== 1) {\r\n\t\t\t// TODO: Allow more than a single element to return an array of results\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween more than one element!\");\r\n\t\t}\r\n\t\tconst percentComplete: number = args[0],\r\n\t\t\tfakeAnimation = {\r\n\t\t\t\telements: elements,\r\n\t\t\t\telement: elements[0],\r\n\t\t\t\tqueue: false,\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tduration: 1000\r\n\t\t\t\t},\r\n\t\t\t\ttweens: null as {[property: string]: VelocityTween}\r\n\t\t\t},\r\n\t\t\tresult: {[property: string]: string} = {};\r\n\t\tlet properties: VelocityProperties = args[1],\r\n\t\t\tsingleResult: boolean,\r\n\t\t\teasing: VelocityEasingType = args[2],\r\n\t\t\tcount = 0;\r\n\r\n\t\tif (isString(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t[args[1]]: args[2]\r\n\t\t\t};\r\n\t\t\teasing = args[3];\r\n\t\t} else if (Array.isArray(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t\"tween\": args[1]\r\n\t\t\t} as any;\r\n\t\t\teasing = args[2];\r\n\t\t}\r\n\t\tif (!isNumber(percentComplete) || percentComplete < 0 || percentComplete > 1) {\r\n\t\t\tthrow new Error(\"VelocityJS: Must tween a percentage from 0 to 1!\");\r\n\t\t}\r\n\t\tif (!isPlainObject(properties)) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween an invalid property!\");\r\n\t\t}\r\n\t\tif (requireForcefeeding) {\r\n\t\t\tfor (const property in properties) {\r\n\t\t\t\tif (properties.hasOwnProperty(property) && (!Array.isArray(properties[property]) || properties[property].length < 2)) {\r\n\t\t\t\t\tthrow new Error(\"VelocityJS: When not supplying an element you must force-feed values: \" + property);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst activeEasing = validateEasing(getValue(easing, defaults.easing), 1000);\r\n\r\n\t\texpandProperties(fakeAnimation as AnimationCall, properties);\r\n\t\tfor (const property in fakeAnimation.tweens) {\r\n\t\t\t// For every element, iterate through each property.\r\n\t\t\tconst tween = fakeAnimation.tweens[property],\r\n\t\t\t\teasing = tween[Tween.EASING] || activeEasing,\r\n\t\t\t\tpattern = tween[Tween.PATTERN],\r\n\t\t\t\trounding = tween[Tween.ROUNDING];\r\n\t\t\tlet currentValue = \"\";\r\n\r\n\t\t\tcount++;\r\n\t\t\tif (pattern) {\r\n\t\t\t\tfor (let i = 0; i < pattern.length; i++) {\r\n\t\t\t\t\tconst startValue = tween[Tween.START][i];\r\n\r\n\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst result = easing(percentComplete, startValue as number, tween[Tween.END][i] as number, property)\r\n\r\n\t\t\t\t\t\tcurrentValue += rounding && rounding[i] ? Math.round(result) : result;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult[property] = currentValue;\r\n\t\t}\r\n\t\tif (singleResult && count === 1) {\r\n\t\t\tfor (const property in result) {\r\n\t\t\t\tif (result.hasOwnProperty(property)) {\r\n\t\t\t\t\treturn result[property];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tregisterAction([\"tween\", tweenAction], true);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Container for page-wide Velocity state data.\r\n\t */\r\n\texport namespace State {\r\n\t\texport let\r\n\t\t\t/**\r\n\t\t\t * Detect if this is a NodeJS or web browser\r\n\t\t\t */\r\n\t\t\tisClient = window && window === window.window,\r\n\t\t\t/**\r\n\t\t\t * Detect mobile devices to determine if mobileHA should be turned\r\n\t\t\t * on.\r\n\t\t\t */\r\n\t\t\tisMobile = isClient && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisAndroid = isClient && /Android/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisGingerbread = isClient && /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Chrome browser\r\n\t\t\t */\r\n\t\t\tisChrome = isClient && (window as any).chrome,\r\n\t\t\t/**\r\n\t\t\t * Firefox browser\r\n\t\t\t */\r\n\t\t\tisFirefox = isClient && /Firefox/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Create a cached element for re-use when checking for CSS property\r\n\t\t\t * prefixes.\r\n\t\t\t */\r\n\t\t\tprefixElement = isClient && document.createElement(\"div\"),\r\n\t\t\t/**\r\n\t\t\t * Retrieve the appropriate scroll anchor and property name for the\r\n\t\t\t * browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY\r\n\t\t\t */\r\n\t\t\twindowScrollAnchor = isClient && window.pageYOffset !== undefined,\r\n\t\t\t/**\r\n\t\t\t * Cache the anchor used for animating window scrolling.\r\n\t\t\t */\r\n\t\t\tscrollAnchor = windowScrollAnchor ? window : (!isClient || document.documentElement || document.body.parentNode || document.body),\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyLeft = windowScrollAnchor ? \"pageXOffset\" : \"scrollLeft\",\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyTop = windowScrollAnchor ? \"pageYOffset\" : \"scrollTop\",\r\n\t\t\t/**\r\n\t\t\t * The className we add / remove when animating.\r\n\t\t\t */\r\n\t\t\tclassName = CLASSNAME,\r\n\t\t\t/**\r\n\t\t\t * Keep track of whether our RAF tick is running.\r\n\t\t\t */\r\n\t\t\tisTicking = false,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tfirst: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tlast: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * First new animation - to shortcut starting them all up and push\r\n\t\t\t * any css reads to the start of the tick\r\n\t\t\t */\r\n\t\t\tfirstNew: AnimationCall\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * Cache every camelCase match to avoid repeating lookups.\r\n\t */\r\n\tconst cache: {[property: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Camelcase a property name into its JavaScript notation (e.g.\r\n\t * \"background-color\" ==> \"backgroundColor\"). Camelcasing is used to\r\n\t * normalize property names between and across calls.\r\n\t */\r\n\texport function camelCase(property: string): string {\r\n\t\tconst fixed = cache[property];\r\n\r\n\t\tif (fixed) {\r\n\t\t\treturn fixed;\r\n\t\t}\r\n\t\treturn cache[property] = property.replace(/-([a-z])/g, function(match: string, subMatch: string) {\r\n\t\t\treturn subMatch.toUpperCase();\r\n\t\t})\r\n\t}\r\n}","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * This is the list of color names -> rgb values. The object is in here so\r\n\t * that the actual name conversion can be in a separate file and not\r\n\t * included for custom builds.\r\n\t */\r\n\texport const ColorNames: {[name: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Convert a hex list to an rgba value. Designed to be used in replace.\r\n\t */\r\n\tfunction makeRGBA(ignore: any, r: string, g: string, b: string): string {\r\n\t\treturn \"rgba(\" + parseInt(r, 16) + \",\" + parseInt(g, 16) + \",\" + parseInt(b, 16) + \",1)\";\r\n\t}\r\n\r\n\tconst rxColor6 = /#([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})/gi,\r\n\t\trxColor3 = /#([a-f\\d])([a-f\\d])([a-f\\d])/gi,\r\n\t\trxColorName = /(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g,\r\n\t\trxRGB = /rgba?\\([^\\)]+\\)/gi,\r\n\t\trxSpaces = /\\s+/g;\r\n\r\n\t/**\r\n\t * Replace any css colour name with its rgba() value. It is possible to use\r\n\t * the name within an \"rgba(blue, 0.4)\" string this way.\r\n\t */\r\n\texport function fixColors(str: string): string {\r\n\t\treturn str\r\n\t\t\t.replace(rxColor6, makeRGBA)\r\n\t\t\t.replace(rxColor3, function($0, r, g, b) {\r\n\t\t\t\treturn makeRGBA($0, r + r, g + g, b + b);\r\n\t\t\t})\r\n\t\t\t.replace(rxColorName, function($0, $1, $2) {\r\n\t\t\t\tif (ColorNames[$2]) {\r\n\t\t\t\t\treturn ($1 ? $1 : \"rgba(\") + ColorNames[$2] + ($1 ? \"\" : \",1)\");\r\n\t\t\t\t}\r\n\t\t\t\treturn $0;\r\n\t\t\t})\r\n\t\t\t.replace(rxRGB, function($0) {\r\n\t\t\t\treturn $0.replace(rxSpaces, \"\");\r\n\t\t\t});\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t// Converting from hex as it makes for a smaller file.\r\n\t// TODO: When build system changes to webpack, make this one optional.\r\n\tconst colorValues = {\r\n\t\t\"aliceblue\": 0xf0f8ff,\r\n\t\t\"antiquewhite\": 0xfaebd7,\r\n\t\t\"aqua\": 0x00ffff,\r\n\t\t\"aquamarine\": 0x7fffd4,\r\n\t\t\"azure\": 0xf0ffff,\r\n\t\t\"beige\": 0xf5f5dc,\r\n\t\t\"bisque\": 0xffe4c4,\r\n\t\t\"black\": 0x000000,\r\n\t\t\"blanchedalmond\": 0xffebcd,\r\n\t\t\"blue\": 0x0000ff,\r\n\t\t\"blueviolet\": 0x8a2be2,\r\n\t\t\"brown\": 0xa52a2a,\r\n\t\t\"burlywood\": 0xdeb887,\r\n\t\t\"cadetblue\": 0x5f9ea0,\r\n\t\t\"chartreuse\": 0x7fff00,\r\n\t\t\"chocolate\": 0xd2691e,\r\n\t\t\"coral\": 0xff7f50,\r\n\t\t\"cornflowerblue\": 0x6495ed,\r\n\t\t\"cornsilk\": 0xfff8dc,\r\n\t\t\"crimson\": 0xdc143c,\r\n\t\t\"cyan\": 0x00ffff,\r\n\t\t\"darkblue\": 0x00008b,\r\n\t\t\"darkcyan\": 0x008b8b,\r\n\t\t\"darkgoldenrod\": 0xb8860b,\r\n\t\t\"darkgray\": 0xa9a9a9,\r\n\t\t\"darkgrey\": 0xa9a9a9,\r\n\t\t\"darkgreen\": 0x006400,\r\n\t\t\"darkkhaki\": 0xbdb76b,\r\n\t\t\"darkmagenta\": 0x8b008b,\r\n\t\t\"darkolivegreen\": 0x556b2f,\r\n\t\t\"darkorange\": 0xff8c00,\r\n\t\t\"darkorchid\": 0x9932cc,\r\n\t\t\"darkred\": 0x8b0000,\r\n\t\t\"darksalmon\": 0xe9967a,\r\n\t\t\"darkseagreen\": 0x8fbc8f,\r\n\t\t\"darkslateblue\": 0x483d8b,\r\n\t\t\"darkslategray\": 0x2f4f4f,\r\n\t\t\"darkslategrey\": 0x2f4f4f,\r\n\t\t\"darkturquoise\": 0x00ced1,\r\n\t\t\"darkviolet\": 0x9400d3,\r\n\t\t\"deeppink\": 0xff1493,\r\n\t\t\"deepskyblue\": 0x00bfff,\r\n\t\t\"dimgray\": 0x696969,\r\n\t\t\"dimgrey\": 0x696969,\r\n\t\t\"dodgerblue\": 0x1e90ff,\r\n\t\t\"firebrick\": 0xb22222,\r\n\t\t\"floralwhite\": 0xfffaf0,\r\n\t\t\"forestgreen\": 0x228b22,\r\n\t\t\"fuchsia\": 0xff00ff,\r\n\t\t\"gainsboro\": 0xdcdcdc,\r\n\t\t\"ghostwhite\": 0xf8f8ff,\r\n\t\t\"gold\": 0xffd700,\r\n\t\t\"goldenrod\": 0xdaa520,\r\n\t\t\"gray\": 0x808080,\r\n\t\t\"grey\": 0x808080,\r\n\t\t\"green\": 0x008000,\r\n\t\t\"greenyellow\": 0xadff2f,\r\n\t\t\"honeydew\": 0xf0fff0,\r\n\t\t\"hotpink\": 0xff69b4,\r\n\t\t\"indianred\": 0xcd5c5c,\r\n\t\t\"indigo\": 0x4b0082,\r\n\t\t\"ivory\": 0xfffff0,\r\n\t\t\"khaki\": 0xf0e68c,\r\n\t\t\"lavender\": 0xe6e6fa,\r\n\t\t\"lavenderblush\": 0xfff0f5,\r\n\t\t\"lawngreen\": 0x7cfc00,\r\n\t\t\"lemonchiffon\": 0xfffacd,\r\n\t\t\"lightblue\": 0xadd8e6,\r\n\t\t\"lightcoral\": 0xf08080,\r\n\t\t\"lightcyan\": 0xe0ffff,\r\n\t\t\"lightgoldenrodyellow\": 0xfafad2,\r\n\t\t\"lightgray\": 0xd3d3d3,\r\n\t\t\"lightgrey\": 0xd3d3d3,\r\n\t\t\"lightgreen\": 0x90ee90,\r\n\t\t\"lightpink\": 0xffb6c1,\r\n\t\t\"lightsalmon\": 0xffa07a,\r\n\t\t\"lightseagreen\": 0x20b2aa,\r\n\t\t\"lightskyblue\": 0x87cefa,\r\n\t\t\"lightslategray\": 0x778899,\r\n\t\t\"lightslategrey\": 0x778899,\r\n\t\t\"lightsteelblue\": 0xb0c4de,\r\n\t\t\"lightyellow\": 0xffffe0,\r\n\t\t\"lime\": 0x00ff00,\r\n\t\t\"limegreen\": 0x32cd32,\r\n\t\t\"linen\": 0xfaf0e6,\r\n\t\t\"magenta\": 0xff00ff,\r\n\t\t\"maroon\": 0x800000,\r\n\t\t\"mediumaquamarine\": 0x66cdaa,\r\n\t\t\"mediumblue\": 0x0000cd,\r\n\t\t\"mediumorchid\": 0xba55d3,\r\n\t\t\"mediumpurple\": 0x9370db,\r\n\t\t\"mediumseagreen\": 0x3cb371,\r\n\t\t\"mediumslateblue\": 0x7b68ee,\r\n\t\t\"mediumspringgreen\": 0x00fa9a,\r\n\t\t\"mediumturquoise\": 0x48d1cc,\r\n\t\t\"mediumvioletred\": 0xc71585,\r\n\t\t\"midnightblue\": 0x191970,\r\n\t\t\"mintcream\": 0xf5fffa,\r\n\t\t\"mistyrose\": 0xffe4e1,\r\n\t\t\"moccasin\": 0xffe4b5,\r\n\t\t\"navajowhite\": 0xffdead,\r\n\t\t\"navy\": 0x000080,\r\n\t\t\"oldlace\": 0xfdf5e6,\r\n\t\t\"olive\": 0x808000,\r\n\t\t\"olivedrab\": 0x6b8e23,\r\n\t\t\"orange\": 0xffa500,\r\n\t\t\"orangered\": 0xff4500,\r\n\t\t\"orchid\": 0xda70d6,\r\n\t\t\"palegoldenrod\": 0xeee8aa,\r\n\t\t\"palegreen\": 0x98fb98,\r\n\t\t\"paleturquoise\": 0xafeeee,\r\n\t\t\"palevioletred\": 0xdb7093,\r\n\t\t\"papayawhip\": 0xffefd5,\r\n\t\t\"peachpuff\": 0xffdab9,\r\n\t\t\"peru\": 0xcd853f,\r\n\t\t\"pink\": 0xffc0cb,\r\n\t\t\"plum\": 0xdda0dd,\r\n\t\t\"powderblue\": 0xb0e0e6,\r\n\t\t\"purple\": 0x800080,\r\n\t\t\"rebeccapurple\": 0x663399,\r\n\t\t\"red\": 0xff0000,\r\n\t\t\"rosybrown\": 0xbc8f8f,\r\n\t\t\"royalblue\": 0x4169e1,\r\n\t\t\"saddlebrown\": 0x8b4513,\r\n\t\t\"salmon\": 0xfa8072,\r\n\t\t\"sandybrown\": 0xf4a460,\r\n\t\t\"seagreen\": 0x2e8b57,\r\n\t\t\"seashell\": 0xfff5ee,\r\n\t\t\"sienna\": 0xa0522d,\r\n\t\t\"silver\": 0xc0c0c0,\r\n\t\t\"skyblue\": 0x87ceeb,\r\n\t\t\"slateblue\": 0x6a5acd,\r\n\t\t\"slategray\": 0x708090,\r\n\t\t\"slategrey\": 0x708090,\r\n\t\t\"snow\": 0xfffafa,\r\n\t\t\"springgreen\": 0x00ff7f,\r\n\t\t\"steelblue\": 0x4682b4,\r\n\t\t\"tan\": 0xd2b48c,\r\n\t\t\"teal\": 0x008080,\r\n\t\t\"thistle\": 0xd8bfd8,\r\n\t\t\"tomato\": 0xff6347,\r\n\t\t\"turquoise\": 0x40e0d0,\r\n\t\t\"violet\": 0xee82ee,\r\n\t\t\"wheat\": 0xf5deb3,\r\n\t\t\"white\": 0xffffff,\r\n\t\t\"whitesmoke\": 0xf5f5f5,\r\n\t\t\"yellow\": 0xffff00,\r\n\t\t\"yellowgreen\": 0x9acd32\r\n\t};\r\n\r\n\tfor (let name in colorValues) {\r\n\t\tif (colorValues.hasOwnProperty(name)) {\r\n\t\t\tlet color = colorValues[name];\r\n\r\n\t\t\tColorNames[name] = Math.floor(color / 65536) + \",\" + Math.floor(color / 256 % 256) + \",\" + (color % 256);\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t// TODO: This is still a complete mess\r\n\texport function computePropertyValue(element: HTMLorSVGElement, property: string): string {\r\n\t\tconst data = Data(element),\r\n\t\t\t// If computedStyle is cached, use it.\r\n\t\t\tcomputedStyle = data && data.computedStyle ? data.computedStyle : window.getComputedStyle(element, null);\r\n\t\tlet computedValue: string | number = 0;\r\n\r\n\t\tif (data && !data.computedStyle) {\r\n\t\t\tdata.computedStyle = computedStyle;\r\n\t\t}\r\n\t\tif (property === \"width\" || property === \"height\") {\r\n\t\t\t// Browsers do not return height and width values for elements\r\n\t\t\t// that are set to display:\"none\". Thus, we temporarily toggle\r\n\t\t\t// display to the element type's default value.\r\n\t\t\tconst toggleDisplay: boolean = getPropertyValue(element, \"display\") === \"none\";\r\n\r\n\t\t\t// When box-sizing isn't set to border-box, height and width\r\n\t\t\t// style values are incorrectly computed when an element's\r\n\t\t\t// scrollbars are visible (which expands the element's\r\n\t\t\t// dimensions). Thus, we defer to the more accurate\r\n\t\t\t// offsetHeight/Width property, which includes the total\r\n\t\t\t// dimensions for interior, border, padding, and scrollbar. We\r\n\t\t\t// subtract border and padding to get the sum of interior +\r\n\t\t\t// scrollbar.\r\n\t\t\t// TODO: offsetHeight does not exist on SVGElement\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"auto\");\r\n\t\t\t}\r\n\t\t\tcomputedValue = augmentDimension(element, property, true);\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"none\");\r\n\t\t\t}\r\n\t\t\treturn String(computedValue);\r\n\t\t}\r\n\r\n\t\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\r\n\t\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\r\n\t\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\r\n\t\t/* TODO: There is a borderColor normalisation in legacy/ - figure out where this is needed... */\r\n\t\t//\t\tif (property === \"borderColor\") {\r\n\t\t//\t\t\tproperty = \"borderTopColor\";\r\n\t\t//\t\t}\r\n\r\n\t\tcomputedValue = computedStyle[property];\r\n\t\t/* Fall back to the property's style value (if defined) when computedValue returns nothing,\r\n\t\t which can happen when the element hasn't been painted. */\r\n\t\tif (!computedValue) {\r\n\t\t\tcomputedValue = element.style[property];\r\n\t\t}\r\n\t\t/* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\r\n\t\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\r\n\t\t effect as being set to 0, so no conversion is necessary.) */\r\n\t\t/* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\r\n\t\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\r\n\t\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\r\n\t\tif (computedValue === \"auto\") {\r\n\t\t\tswitch (property) {\r\n\t\t\t\tcase \"top\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tlet topLeft = true;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\tconst position = getPropertyValue(element, \"position\"); /* GET */\r\n\r\n\t\t\t\t\tif (position === \"fixed\" || (topLeft && position === \"absolute\")) {\r\n\t\t\t\t\t\t// Note: this has no pixel unit on its returned values,\r\n\t\t\t\t\t\t// we re-add it here to conform with\r\n\t\t\t\t\t\t// computePropertyValue's behavior.\r\n\t\t\t\t\t\tcomputedValue = element.getBoundingClientRect[property] + \"px\"; /* GET */\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t// Deliberate fallthrough!\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcomputedValue = \"0px\";\r\n\t\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn computedValue ? String(computedValue) : \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get a property value. This will grab via the cache if it exists, then\r\n\t * via any normalisations, then it will check the css values directly.\r\n\t */\r\n\texport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, skipNormalisation?: boolean, skipCache?: boolean): string {\r\n\t\tconst data = Data(element);\r\n\t\tlet propertyValue: string;\r\n\r\n\t\tif (NoCacheNormalizations.has(propertyName)) {\r\n\t\t\tskipCache = true;\r\n\t\t}\r\n\t\tif (!skipCache && data && data.cache[propertyName] != null) {\r\n\t\t\tpropertyValue = data.cache[propertyName];\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t\t}\r\n\t\t\treturn propertyValue;\r\n\t\t} else {\r\n\t\t\tlet types = data.types,\r\n\t\t\t\tbest: VelocityNormalizationsFn;\r\n\r\n\t\t\tfor (let index = 0; types; types >>= 1, index++) {\r\n\t\t\t\tif (types & 1) {\r\n\t\t\t\t\tbest = Normalizations[index][propertyName] || best;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (best) {\r\n\t\t\t\tpropertyValue = best(element);\r\n\t\t\t} else {\r\n\t\t\t\t// Note: Retrieving the value of a CSS property cannot simply be\r\n\t\t\t\t// performed by checking an element's style attribute (which\r\n\t\t\t\t// only reflects user-defined values). Instead, the browser must\r\n\t\t\t\t// be queried for a property's *computed* value. You can read\r\n\t\t\t\t// more about getComputedStyle here:\r\n\t\t\t\t// https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\r\n\t\t\t\tpropertyValue = computePropertyValue(element, propertyName);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (debug >= 2) {\r\n\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t}\r\n\t\tif (data) {\r\n\t\t\tdata.cache[propertyName] = propertyValue;\r\n\t\t}\r\n\t\treturn propertyValue;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * All possible units in CSS. Used to recognise units when parsing tweens.\r\n\t */\r\n\tconst Units = [\r\n\t\t\"%\", // relative\r\n\t\t\"em\", \"ex\", \"ch\", \"rem\", // font relative\r\n\t\t\"vw\", \"vh\", \"vmin\", \"vmax\", // viewport relative\r\n\t\t\"cm\", \"mm\", \"Q\", \"in\", \"pc\", \"pt\", \"px\", // absolute lengths\r\n\t\t\"deg\", \"grad\", \"rad\", \"turn\", // angles\r\n\t\t\"s\", \"ms\" // time\r\n\t];\r\n\r\n\t/**\r\n\t * Get the current unit for this property. Only used when parsing tweens\r\n\t * to check if the unit is changing between the start and end values.\r\n\t */\r\n\texport function getUnit(property: string, start?: number): string {\r\n\t\tstart = start || 0;\r\n\t\tif (property[start] && property[start] !== \" \") {\r\n\t\t\tfor (let i = 0, units = Units; i < units.length; i++) {\r\n\t\t\t\tconst unit = units[i];\r\n\t\t\t\tlet j = 0;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif (j >= unit.length) {\r\n\t\t\t\t\t\treturn unit;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unit[j] !== property[start + j]) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (++j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Regular Expressions - cached as they can be expensive to create.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\texport const RegEx = {\r\n\t\tisHex: /^#([A-f\\d]{3}){1,2}$/i,\r\n\t\t/* Unwrap a property value's surrounding text, e.g. \"rgba(4, 3, 2, 1)\" ==> \"4, 3, 2, 1\" and \"rect(4px 3px 2px 1px)\" ==> \"4px 3px 2px 1px\". */\r\n\t\tvalueUnwrap: /^[A-z]+\\((.*)\\)$/i,\r\n\t\twrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,\r\n\t\t/* Split a multi-value property into an array of subvalues, e.g. \"rgba(4, 3, 2, 1) 4px 3px 2px 1px\" ==> [ \"rgba(4, 3, 2, 1)\", \"4px\", \"3px\", \"2px\", \"1px\" ]. */\r\n\t\tvalueSplit: /([A-z]+\\(.+\\))|(([A-z0-9#-.]+?)(?=\\s|$))/ig\r\n\t};\r\n}","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * The singular setPropertyValue, which routes the logic for all\r\n\t * normalizations, hooks, and standard CSS properties.\r\n\t */\r\n\texport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any) {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (isString(propertyValue)\r\n\t\t\t&& propertyValue[0] === \"c\"\r\n\t\t\t&& propertyValue[1] === \"a\"\r\n\t\t\t&& propertyValue[2] === \"l\"\r\n\t\t\t&& propertyValue[3] === \"c\"\r\n\t\t\t&& propertyValue[4] === \"(\"\r\n\t\t\t&& propertyValue[5] === \"0\") {\r\n\t\t\t// Make sure we un-calc unit changing values - try not to trigger\r\n\t\t\t// this code any more often than we have to since it's expensive\r\n\t\t\tpropertyValue = propertyValue.replace(/^calc\\(0[^\\d]* \\+ ([^\\(\\)]+)\\)$/, \"$1\");\r\n\t\t}\r\n\t\tif (data && data.cache[propertyName] !== propertyValue) {\r\n\t\t\t// By setting it to undefined we force a true \"get\" later\r\n\t\t\tdata.cache[propertyName] = propertyValue || undefined;\r\n\t\t\tlet types = data.types,\r\n\t\t\t\tbest: VelocityNormalizationsFn;\r\n\r\n\t\t\tfor (let index = 0; types; types >>= 1, index++) {\r\n\t\t\t\tif (types & 1) {\r\n\t\t\t\t\tbest = Normalizations[index][propertyName] || best;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!best || !best(element, propertyValue)) {\r\n\t\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t\t}\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Set \" + propertyName + \": \" + propertyValue, element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport const Easings: {[name: string]: VelocityEasingFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register a easing. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerEasing\", \"name\", VelocityEasingFn);\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerEasing(args?: [string, VelocityEasingFn]) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Easings[name]) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override 'registerEasing' callback\", name);\r\n\t\t} else {\r\n\t\t\tEasings[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\t/* Basic (same as jQuery) easings. */\r\n\tregisterEasing([\"linear\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"swing\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (0.5 - Math.cos(percentComplete * Math.PI) / 2) * (endValue - startValue);\r\n\t}]);\r\n\r\n\t/* Bonus \"spring\" easing, which is a less exaggerated version of easeInOutElastic. */\r\n\tregisterEasing([\"spring\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (1 - (Math.cos(percentComplete * 4.5 * Math.PI) * Math.exp(-percentComplete * 6))) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Fix to a range of 0 <= num <= 1.\r\n\t */\r\n\tfunction fixRange(num: number) {\r\n\t\treturn Math.min(Math.max(num, 0), 1);\r\n\t}\r\n\r\n\tfunction A(aA1, aA2) {\r\n\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction B(aA1, aA2) {\r\n\t\treturn 3.0 * aA2 - 6.0 * aA1;\r\n\t}\r\n\r\n\tfunction C(aA1) {\r\n\t\treturn 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction calcBezier(aT, aA1, aA2) {\r\n\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n\t}\r\n\r\n\tfunction getSlope(aT, aA1, aA2) {\r\n\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n\t}\r\n\r\n\texport function generateBezier(mX1: number, mY1: number, mX2: number, mY2: number): VelocityEasingFn {\r\n\t\tconst NEWTON_ITERATIONS = 4,\r\n\t\t\tNEWTON_MIN_SLOPE = 0.001,\r\n\t\t\tSUBDIVISION_PRECISION = 0.0000001,\r\n\t\t\tSUBDIVISION_MAX_ITERATIONS = 10,\r\n\t\t\tkSplineTableSize = 11,\r\n\t\t\tkSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\r\n\t\t\tfloat32ArraySupported = \"Float32Array\" in window;\r\n\r\n\t\t/* Must contain four arguments. */\r\n\t\tif (arguments.length !== 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/* Arguments must be numbers. */\r\n\t\tfor (let i = 0; i < 4; ++i) {\r\n\t\t\tif (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* X values must be in the [0, 1] range. */\r\n\t\tmX1 = fixRange(mX1);\r\n\t\tmX2 = fixRange(mX2);\r\n\r\n\t\tconst mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n\r\n\t\tfunction newtonRaphsonIterate(aX, aGuessT) {\r\n\t\t\tfor (let i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n\t\t\t\tconst currentSlope = getSlope(aGuessT, mX1, mX2);\r\n\r\n\t\t\t\tif (currentSlope === 0.0) {\r\n\t\t\t\t\treturn aGuessT;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n\t\t\t\taGuessT -= currentX / currentSlope;\r\n\t\t\t}\r\n\r\n\t\t\treturn aGuessT;\r\n\t\t}\r\n\r\n\t\tfunction calcSampleValues() {\r\n\t\t\tfor (let i = 0; i < kSplineTableSize; ++i) {\r\n\t\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction binarySubdivide(aX, aA, aB) {\r\n\t\t\tlet currentX, currentT, i = 0;\r\n\r\n\t\t\tdo {\r\n\t\t\t\tcurrentT = aA + (aB - aA) / 2.0;\r\n\t\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\t\t\t\tif (currentX > 0.0) {\r\n\t\t\t\t\taB = currentT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taA = currentT;\r\n\t\t\t\t}\r\n\t\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n\t\t\treturn currentT;\r\n\t\t}\r\n\r\n\t\tfunction getTForX(aX) {\r\n\t\t\tlet intervalStart = 0.0,\r\n\t\t\t\tcurrentSample = 1,\r\n\t\t\t\tlastSample = kSplineTableSize - 1;\r\n\r\n\t\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n\t\t\t\tintervalStart += kSampleStepSize;\r\n\t\t\t}\r\n\r\n\t\t\t--currentSample;\r\n\r\n\t\t\tconst dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\r\n\t\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\r\n\t\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n\t\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\r\n\t\t\t\treturn newtonRaphsonIterate(aX, guessForT);\r\n\t\t\t} else if (initialSlope === 0.0) {\r\n\t\t\t\treturn guessForT;\r\n\t\t\t} else {\r\n\t\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet _precomputed = false;\r\n\r\n\t\tfunction precompute() {\r\n\t\t\t_precomputed = true;\r\n\t\t\tif (mX1 !== mY1 || mX2 !== mY2) {\r\n\t\t\t\tcalcSampleValues();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst f = function(percentComplete: number, startValue: number, endValue: number, property?: string) {\r\n\t\t\tif (!_precomputed) {\r\n\t\t\t\tprecompute();\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tif (mX1 === mY1 && mX2 === mY2) {\r\n\t\t\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t\t\t}\r\n\t\t\treturn startValue + calcBezier(getTForX(percentComplete), mY1, mY2) * (endValue - startValue);\r\n\t\t};\r\n\r\n\t\t(f as any).getControlPoints = function() {\r\n\t\t\treturn [{x: mX1, y: mY1}, {x: mX2, y: mY2}];\r\n\t\t};\r\n\r\n\t\tconst str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\r\n\t\tf.toString = function() {\r\n\t\t\treturn str;\r\n\t\t};\r\n\r\n\t\treturn f;\r\n\t}\r\n\r\n\t/* Common easings */\r\n\tconst easeIn = generateBezier(0.42, 0.0, 1.00, 1.0),\r\n\t\teaseOut = generateBezier(0.00, 0.0, 0.58, 1.0),\r\n\t\teaseInOut = generateBezier(0.42, 0.0, 0.58, 1.0);\r\n\r\n\tregisterEasing([\"ease\", generateBezier(0.25, 0.1, 0.25, 1.0)]);\r\n\tregisterEasing([\"easeIn\", easeIn]);\r\n\tregisterEasing([\"ease-in\", easeIn]);\r\n\tregisterEasing([\"easeOut\", easeOut]);\r\n\tregisterEasing([\"ease-out\", easeOut]);\r\n\tregisterEasing([\"easeInOut\", easeInOut]);\r\n\tregisterEasing([\"ease-in-out\", easeInOut]);\r\n\tregisterEasing([\"easeInSine\", generateBezier(0.47, 0, 0.745, 0.715)]);\r\n\tregisterEasing([\"easeOutSine\", generateBezier(0.39, 0.575, 0.565, 1)]);\r\n\tregisterEasing([\"easeInOutSine\", generateBezier(0.445, 0.05, 0.55, 0.95)]);\r\n\tregisterEasing([\"easeInQuad\", generateBezier(0.55, 0.085, 0.68, 0.53)]);\r\n\tregisterEasing([\"easeOutQuad\", generateBezier(0.25, 0.46, 0.45, 0.94)]);\r\n\tregisterEasing([\"easeInOutQuad\", generateBezier(0.455, 0.03, 0.515, 0.955)]);\r\n\tregisterEasing([\"easeInCubic\", generateBezier(0.55, 0.055, 0.675, 0.19)]);\r\n\tregisterEasing([\"easeOutCubic\", generateBezier(0.215, 0.61, 0.355, 1)]);\r\n\tregisterEasing([\"easeInOutCubic\", generateBezier(0.645, 0.045, 0.355, 1)]);\r\n\tregisterEasing([\"easeInQuart\", generateBezier(0.895, 0.03, 0.685, 0.22)]);\r\n\tregisterEasing([\"easeOutQuart\", generateBezier(0.165, 0.84, 0.44, 1)]);\r\n\tregisterEasing([\"easeInOutQuart\", generateBezier(0.77, 0, 0.175, 1)]);\r\n\tregisterEasing([\"easeInQuint\", generateBezier(0.755, 0.05, 0.855, 0.06)]);\r\n\tregisterEasing([\"easeOutQuint\", generateBezier(0.23, 1, 0.32, 1)]);\r\n\tregisterEasing([\"easeInOutQuint\", generateBezier(0.86, 0, 0.07, 1)]);\r\n\tregisterEasing([\"easeInExpo\", generateBezier(0.95, 0.05, 0.795, 0.035)]);\r\n\tregisterEasing([\"easeOutExpo\", generateBezier(0.19, 1, 0.22, 1)]);\r\n\tregisterEasing([\"easeInOutExpo\", generateBezier(1, 0, 0, 1)]);\r\n\tregisterEasing([\"easeInCirc\", generateBezier(0.6, 0.04, 0.98, 0.335)]);\r\n\tregisterEasing([\"easeOutCirc\", generateBezier(0.075, 0.82, 0.165, 1)]);\r\n\tregisterEasing([\"easeInOutCirc\", generateBezier(0.785, 0.135, 0.15, 0.86)]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bounce easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tfunction easeOutBounce(percentComplete: number): number {\r\n\t\tif (percentComplete < 1 / 2.75) {\r\n\t\t\treturn (7.5625 * percentComplete * percentComplete);\r\n\t\t}\r\n\t\tif (percentComplete < 2 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 1.5 / 2.75) * percentComplete + 0.75);\r\n\t\t}\r\n\t\tif (percentComplete < 2.5 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 2.25 / 2.75) * percentComplete + 0.9375);\r\n\t\t}\r\n\t\treturn (7.5625 * (percentComplete -= 2.625 / 2.75) * percentComplete + 0.984375);\r\n\t};\r\n\r\n\tfunction easeInBounce(percentComplete: number): number {\r\n\t\treturn 1 - easeOutBounce(1 - percentComplete);\r\n\t};\r\n\r\n\tregisterEasing([\"easeInBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeInBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeOutBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeInOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn (percentComplete < 0.5 ? easeInBounce(percentComplete * 2) * .5 : easeOutBounce(percentComplete * 2 - 1) * 0.5 + 0.5) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Elastic easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst pi2 = Math.PI * 2;\r\n\r\n\texport function registerElasticIn(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn -(amplitude * Math.pow(2, 10 * (percentComplete -= 1)) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period)) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticInOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tconst s = period / pi2 * Math.asin(1 / amplitude);\r\n\r\n\t\t\tpercentComplete = percentComplete * 2 - 1;\r\n\t\t\tif (percentComplete < 0) {\r\n\t\t\t\treturn -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period));\r\n\t\t\t}\r\n\t\t\treturn amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period) * 0.5 + 1;\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterElasticIn(\"easeInElastic\", 1, 0.3);\r\n\tregisterElasticOut(\"easeOutElastic\", 1, 0.3);\r\n\tregisterElasticInOut(\"easeInOutElastic\", 1, 0.3 * 1.5);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\r\n\tinterface springState {\r\n\t\tx: number;\r\n\t\tv: number;\r\n\t\ttension: number;\r\n\t\tfriction: number;\r\n\t};\r\n\r\n\tinterface springDelta {\r\n\t\tdx: number;\r\n\t\tdv: number;\r\n\t};\r\n\r\n\t/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\r\n\t then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\r\n\tfunction springAccelerationForState(state: springState) {\r\n\t\treturn (-state.tension * state.x) - (state.friction * state.v);\r\n\t}\r\n\r\n\tfunction springEvaluateStateWithDerivative(initialState: springState, dt: number, derivative: springDelta): springDelta {\r\n\t\tconst state = {\r\n\t\t\tx: initialState.x + derivative.dx * dt,\r\n\t\t\tv: initialState.v + derivative.dv * dt,\r\n\t\t\ttension: initialState.tension,\r\n\t\t\tfriction: initialState.friction\r\n\t\t};\r\n\r\n\t\treturn {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t};\r\n\t}\r\n\r\n\tfunction springIntegrateState(state: springState, dt: number) {\r\n\t\tconst a = {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t},\r\n\t\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\r\n\t\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\r\n\t\t\td = springEvaluateStateWithDerivative(state, dt, c),\r\n\t\t\tdxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\r\n\t\t\tdvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\r\n\r\n\t\tstate.x = state.x + dxdt * dt;\r\n\t\tstate.v = state.v + dvdt * dt;\r\n\r\n\t\treturn state;\r\n\t}\r\n\r\n\texport function generateSpringRK4(tension: number, friction: number): number;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration: number): VelocityEasingFn;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration?: number): any {\r\n\t\tlet initState: springState = {\r\n\t\t\tx: -1,\r\n\t\t\tv: 0,\r\n\t\t\ttension: parseFloat(tension as any) || 500,\r\n\t\t\tfriction: parseFloat(friction as any) || 20\r\n\t\t},\r\n\t\t\tpath = [0],\r\n\t\t\ttime_lapsed = 0,\r\n\t\t\ttolerance = 1 / 10000,\r\n\t\t\tDT = 16 / 1000,\r\n\t\t\thave_duration = duration != null, // deliberate \"==\", as undefined == null != 0\r\n\t\t\tdt: number,\r\n\t\t\tlast_state: springState;\r\n\r\n\t\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\r\n\t\tif (have_duration) {\r\n\t\t\t/* Run the simulation without a duration. */\r\n\t\t\ttime_lapsed = generateSpringRK4(initState.tension, initState.friction);\r\n\t\t\t/* Compute the adjusted time delta. */\r\n\t\t\tdt = (time_lapsed as number) / duration * DT;\r\n\t\t} else {\r\n\t\t\tdt = DT;\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\t/* Next/step function .*/\r\n\t\t\tlast_state = springIntegrateState(last_state || initState, dt);\r\n\t\t\t/* Store the position. */\r\n\t\t\tpath.push(1 + last_state.x);\r\n\t\t\ttime_lapsed += 16;\r\n\t\t\t/* If the change threshold is reached, break. */\r\n\t\t\tif (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\r\n\t\t computed path and returns a snapshot of the position according to a given percentComplete. */\r\n\t\treturn !have_duration ? time_lapsed : function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + path[(percentComplete * (path.length - 1)) | 0] * (endValue - startValue);\r\n\t\t};\r\n\t};\r\n};\r\n","///\n/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details\n * \n * Step easing generator.\n */\n\nnamespace VelocityStatic.Easing {\n\tconst cache: {[steps: number]: VelocityEasingFn} = {};\n\n\texport function generateStep(steps): VelocityEasingFn {\n\t\tconst fn = cache[steps];\n\n\t\tif (fn) {\n\t\t\treturn fn;\n\t\t}\n\t\treturn cache[steps] = function(percentComplete: number, startValue: number, endValue: number) {\n\t\t\tif (percentComplete === 0) {\n\t\t\t\treturn startValue;\n\t\t\t}\n\t\t\tif (percentComplete === 1) {\n\t\t\t\treturn endValue;\n\t\t\t}\n\t\t\treturn startValue + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\n\t\t};\n\t}\n};\n","///\n/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n * \n * Easings to act on strings, either set at the start or at the end depending on\n * need.\n */\n\nnamespace VelocityStatic.Easing {\n\t/**\n\t * Easing function that sets to the specified value immediately after the\n\t * animation starts.\n\t */\n\tregisterEasing([\"at-start\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 0\n\t\t\t? startValue\n\t\t\t: endValue;\n\t} as any]);\n\n\t/**\n\t * Easing function that sets to the specified value while the animation is\n\t * running.\n\t */\n\tregisterEasing([\"during\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 0 || percentComplete === 1\n\t\t\t? startValue\n\t\t\t: endValue;\n\t} as any]);\n\n\t/**\n\t * Easing function that sets to the specified value when the animation ends.\n\t */\n\tregisterEasing([\"at-end\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 1\n\t\t\t? endValue\n\t\t\t: startValue;\n\t} as any]);\n};\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Normalisations are used when getting or setting a (normally css compound\r\n * properties) value that can have a different order in different browsers.\r\n * \r\n * It can also be used to extend and create specific properties that otherwise\r\n * don't exist (such as for scrolling, or inner/outer dimensions).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Unlike \"actions\", normalizations can always be replaced by users.\r\n\t */\r\n\texport const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = [];\r\n\r\n\t/**\r\n\t * Any normalisations that should never be cached are listed here.\r\n\t * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has\r\n\t */\r\n\texport const NoCacheNormalizations = new Set();\r\n\r\n\t/**\r\n\t * Used to define a constructor.\r\n\t */\r\n\tinterface ClassConstructor {\r\n\t\tnew(): Object;\r\n\t}\r\n\r\n\t/**\r\n\t * An array of classes used for the per-class normalizations. This\r\n\t * translates into a bitwise enum for quick cross-reference, and so that\r\n\t * the element doesn't need multiple instanceof calls every\r\n\t * frame.\r\n\t */\r\n\texport const constructors: ClassConstructor[] = [];\r\n\r\n\t/**\r\n\t * Used to register a normalization. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerNormalization\", Element, \"name\", VelocityNormalizationsFn[, false]);\r\n\t * \r\n\t * The fourth argument can be an explicit false, which prevents\r\n\t * the property from being cached. Please note that this can be dangerous\r\n\t * for performance!\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1],\r\n\t\t\tcallback = args[2];\r\n\r\n\t\tif (isString(constructor) || !(constructor instanceof Object)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' constructor to an invalid value:\", constructor);\r\n\t\t} else if (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:\", name, callback);\r\n\t\t} else {\r\n\t\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tindex = constructors.push(constructor) - 1;\r\n\t\t\t\tNormalizations[index] = Object.create(null);\r\n\t\t\t}\r\n\t\t\tNormalizations[index][name] = callback;\r\n\t\t\tif (args[3] === false) {\r\n\t\t\t\tNoCacheNormalizations.add(name);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerNormalization\", registerNormalization as any]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set an attribute.\r\n\t */\r\n\tfunction getAttribute(name: string) {\r\n\t\treturn function(element: Element, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.getAttribute(name);\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst base = document.createElement(\"div\"),\r\n\t\trxSubtype = /^SVG(.*)Element$/,\r\n\t\trxElement = /Element$/;\r\n\r\n\tObject.getOwnPropertyNames(window).forEach(function(globals) {\r\n\t\tconst subtype = rxSubtype.exec(globals);\r\n\r\n\t\tif (subtype) {\r\n\t\t\tconst element = document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()),\r\n\t\t\t\tconstructor = element.constructor;\r\n\r\n\t\t\tfor (let attribute in element) {\r\n\t\t\t\tconst value = element[attribute];\r\n\r\n\t\t\t\tif (isString(attribute)\r\n\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\r\n\t\t\t\t\t&& attribute !== attribute.toUpperCase()\r\n\t\t\t\t\t&& !rxElement.test(attribute)\r\n\t\t\t\t\t&& !(attribute in base)\r\n\t\t\t\t\t&& !isFunction(value)) {\r\n\t\t\t\t\t// TODO: Should this all be set on the generic SVGElement, it would save space and time, but not as powerful\r\n\t\t\t\t\tregisterNormalization([constructor as any, attribute, getAttribute(attribute)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set the width or height.\r\n\t */\r\n\tfunction getDimension(name: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\t// Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn (element as SVGGraphicsElement).getBBox()[name] + \"px\";\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn \"0px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([SVGElement, \"width\", getDimension(\"width\")]);\r\n\tregisterNormalization([SVGElement, \"height\", getDimension(\"height\")]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Figure out the dimensions for this width / height based on the\r\n\t * potential borders and whether we care about them.\r\n\t */\r\n\texport function augmentDimension(element: HTMLorSVGElement, name: string, wantInner: boolean): number {\r\n\t\tconst isBorderBox = CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\";\r\n\r\n\t\tif (isBorderBox === wantInner) {\r\n\t\t\t// in box-sizing mode, the CSS width / height accessors already\r\n\t\t\t// give the outerWidth / outerHeight.\r\n\t\t\tconst sides = name === \"width\" ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"],\r\n\t\t\t\tfields = [\"padding\" + sides[0], \"padding\" + sides[1], \"border\" + sides[0] + \"Width\", \"border\" + sides[1] + \"Width\"];\r\n\t\t\tlet i: number,\r\n\t\t\t\tvalue: number,\r\n\t\t\t\taugment = 0;\r\n\r\n\t\t\tfor (i = 0; i < fields.length; i++) {\r\n\t\t\t\tvalue = parseFloat(CSS.getPropertyValue(element, fields[i]) as string);\r\n\t\t\t\tif (!isNaN(value)) {\r\n\t\t\t\t\taugment += value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn wantInner ? -augment : augment;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Get/set the inner/outer dimension.\r\n\t */\r\n\tfunction getDimension(name, wantInner: boolean) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn augmentDimension(element, name, wantInner) + \"px\";\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, name, (parseFloat(propertyValue) - augmentDimension(element, name, wantInner)) + \"px\");\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"innerWidth\", getDimension(\"width\", true)]);\r\n\tregisterNormalization([Element, \"innerHeight\", getDimension(\"height\", true)]);\r\n\tregisterNormalization([Element, \"outerWidth\", getDimension(\"width\", false)]);\r\n\tregisterNormalization([Element, \"outerHeight\", getDimension(\"height\", false)]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport const inlineRx = /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|let|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i,\r\n\t\tlistItemRx = /^(li)$/i,\r\n\t\ttableRowRx = /^(tr)$/i,\r\n\t\ttableRx = /^(table)$/i,\r\n\t\ttableRowGroupRx = /^(tbody)$/i;\r\n\r\n\t/**\r\n\t * Display has an extra value of \"auto\" that works out the correct value\r\n\t * based on the type of element.\r\n\t */\r\n\tfunction display(element: HTMLorSVGElement): string;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tconst style = element.style;\r\n\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn CSS.computePropertyValue(element, \"display\");\r\n\t\t}\r\n\t\tif (propertyValue === \"auto\") {\r\n\t\t\tconst nodeName = element && element.nodeName,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (inlineRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"inline\";\r\n\t\t\t} else if (listItemRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"list-item\";\r\n\t\t\t} else if (tableRowRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row\";\r\n\t\t\t} else if (tableRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table\";\r\n\t\t\t} else if (tableRowGroupRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row-group\";\r\n\t\t\t} else {\r\n\t\t\t\t// Default to \"block\" when no match is found.\r\n\t\t\t\tpropertyValue = \"block\";\r\n\t\t\t}\r\n\t\t\t// IMPORTANT: We need to do this as getPropertyValue bypasses the\r\n\t\t\t// Normalisation when it exists in the cache.\r\n\t\t\tdata.cache[\"display\"] = propertyValue;\r\n\t\t}\r\n\t\tstyle.display = propertyValue;\r\n\t\treturn true;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"display\", display]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tfunction genericReordering(element: HTMLorSVGElement): string;\r\n\tfunction genericReordering(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction genericReordering(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\tpropertyValue = CSS.getPropertyValue(element, \"textShadow\");\r\n\t\t\tconst split = propertyValue.split(/\\s/g),\r\n\t\t\t\tfirstPart = split[0];\r\n\t\t\tlet newValue = \"\";\r\n\r\n\t\t\tif (CSS.ColorNames[firstPart]) {\r\n\t\t\t\tsplit.shift();\r\n\t\t\t\tsplit.push(firstPart);\r\n\t\t\t\tnewValue = split.join(\" \");\r\n\t\t\t} else if (firstPart.match(/^#|^hsl|^rgb|-gradient/)) {\r\n\t\t\t\tconst matchedString = propertyValue.match(/(hsl.*\\)|#[\\da-fA-F]+|rgb.*\\)|.*gradient.*\\))\\s/g)[0];\r\n\r\n\t\t\t\tnewValue = propertyValue.replace(matchedString, \"\") + \" \" + matchedString.trim();\r\n\t\t\t} else {\r\n\t\t\t\tnewValue = propertyValue;\r\n\t\t\t}\r\n\t\t\treturn newValue;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"textShadow\", genericReordering]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction clientWidth(element: HTMLorSVGElement): string;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientWidth + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction scrollWidth(element: HTMLorSVGElement): string;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollWidth + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction clientHeight(element: HTMLorSVGElement): string;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientHeight + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction scrollHeight(element: HTMLorSVGElement): string;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollHeight + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll an element (vertical).\r\n\t */\r\n\tfunction scrollTop(element: HTMLorSVGElement): string;\r\n\tfunction scrollTop(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollTop(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"clientWidth\", false, true);\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"scrollWidth\", false, true);\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"scrollLeft\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"clientHeight\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"scrollHeight\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"scrollTop\", false, true);\r\n\t\t\treturn element.scrollTop + \"px\";\r\n\t\t}\r\n\t\tconsole.log(\"setScrollTop\", propertyValue)\r\n\t\tconst value = parseFloat(propertyValue),\r\n\t\t\tunit = propertyValue.replace(String(value), \"\");\r\n\r\n\t\tswitch (unit) {\r\n\t\t\tcase \"\":\r\n\t\t\tcase \"px\":\r\n\t\t\t\telement.scrollTop = value;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"%\":\r\n\t\t\t\tlet clientHeight = parseFloat(CSS.getPropertyValue(element, \"clientHeight\")),\r\n\t\t\t\t\tscrollHeight = parseFloat(CSS.getPropertyValue(element, \"scrollHeight\"));\r\n\r\n\t\t\t\tconsole.log(\"setScrollTop percent\", scrollHeight, clientHeight, value, Math.max(0, scrollHeight - clientHeight) * value / 100)\r\n\t\t\t\telement.scrollTop = Math.max(0, scrollHeight - clientHeight) * value / 100;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tregisterNormalization([HTMLElement, \"scrollTop\", scrollTop, false]);\r\n\tregisterNormalization([HTMLElement, \"scrollWidth\", scrollWidth]);\r\n\tregisterNormalization([HTMLElement, \"clientWidth\", clientWidth]);\r\n\tregisterNormalization([HTMLElement, \"scrollHeight\", scrollHeight]);\r\n\tregisterNormalization([HTMLElement, \"clientHeight\", clientHeight]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get the vendor prefixed\r\n\t * real name for a propery.\r\n\t */\r\n\tfunction vendorPrefix(property: string, unprefixed: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.style[unprefixed];\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, property, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst vendors = [/^webkit[A-Z]/, /^moz[A-Z]/, /^ms[A-Z]/, /^o[A-Z]/],\r\n\t\tprefixElement = State.prefixElement;\r\n\r\n\tfor (const property in prefixElement.style) {\r\n\t\tfor (let i = 0; i < vendors.length; i++) {\r\n\t\t\tif (vendors[i].test(property)) {\r\n\t\t\t\tlet unprefixed = property.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\r\n\r\n\t\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\r\n\t\t\t\t\tregisterNormalization([Element, unprefixed, vendorPrefix(property, unprefixed)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Call Completion\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Call the complete method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callComplete(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.complete as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Complete an animation. This might involve restarting (for loop or repeat\r\n\t * options). Once it is finished we also check for any callbacks or Promises\r\n\t * that need updating.\r\n\t */\r\n\texport function completeCall(activeCall: AnimationCall) {\r\n\t\t//\t\tconsole.log(\"complete\", activeCall)\r\n\t\t// TODO: Check if it's not been completed already\r\n\r\n\t\tconst options = activeCall.options,\r\n\t\t\tqueue = getValue(activeCall.queue, options.queue),\r\n\t\t\tisLoop = getValue(activeCall.loop, options.loop, defaults.loop),\r\n\t\t\tisRepeat = getValue(activeCall.repeat, options.repeat, defaults.repeat),\r\n\t\t\tisStopped = activeCall._flags & AnimationFlags.STOPPED;\r\n\r\n\t\tif (!isStopped && (isLoop || isRepeat)) {\r\n\r\n\t\t\t////////////////////\r\n\t\t\t// Option: Loop //\r\n\t\t\t// Option: Repeat //\r\n\t\t\t////////////////////\r\n\r\n\t\t\tif (isRepeat && isRepeat !== true) {\r\n\t\t\t\tactiveCall.repeat = isRepeat - 1;\r\n\t\t\t} else if (isLoop && isLoop !== true) {\r\n\t\t\t\tactiveCall.loop = isLoop - 1;\r\n\t\t\t\tactiveCall.repeat = getValue(activeCall.repeatAgain, options.repeatAgain, defaults.repeatAgain);\r\n\t\t\t}\r\n\t\t\tif (isLoop) {\r\n\t\t\t\tactiveCall._flags ^= AnimationFlags.REVERSE;\r\n\t\t\t}\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// Can't be called when stopped so no need for an extra check.\r\n\t\t\t\tData(activeCall.element).lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t}\r\n\t\t\tactiveCall.timeStart = activeCall.ellapsedTime = activeCall.percentComplete = 0;\r\n\t\t\tactiveCall._flags &= ~AnimationFlags.STARTED;\r\n\t\t} else {\r\n\t\t\tconst element = activeCall.element,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (!--data.count && !isStopped) {\r\n\r\n\t\t\t\t////////////////////////\r\n\t\t\t\t// Feature: Classname //\r\n\t\t\t\t////////////////////////\r\n\r\n\t\t\t\tremoveClass(element, State.className);\r\n\t\t\t}\r\n\r\n\t\t\t//////////////////////\r\n\t\t\t// Option: Complete //\r\n\t\t\t//////////////////////\r\n\r\n\t\t\t// If this is the last animation in this list then we can check for\r\n\t\t\t// and complete calls or Promises.\r\n\t\t\t// TODO: When deleting an element we need to adjust these values.\r\n\t\t\tif (options && ++options._completed === options._total) {\r\n\t\t\t\tif (!isStopped && options.complete) {\r\n\t\t\t\t\t// We don't call the complete if the animation is stopped,\r\n\t\t\t\t\t// and we clear the key to prevent it being called again.\r\n\t\t\t\t\tcallComplete(activeCall);\r\n\t\t\t\t\toptions.complete = null;\r\n\t\t\t\t}\r\n\t\t\t\tconst resolver = options._resolver;\r\n\r\n\t\t\t\tif (resolver) {\r\n\t\t\t\t\t// Fulfil the Promise\r\n\t\t\t\t\tresolver(activeCall.elements as any);\r\n\t\t\t\t\tdelete options._resolver;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t///////////////////\r\n\t\t\t// Option: Queue //\r\n\t\t\t///////////////////\r\n\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// We only do clever things with queues...\r\n\t\t\t\tif (!isStopped) {\r\n\t\t\t\t\t// If we're not stopping an animation, we need to remember\r\n\t\t\t\t\t// what time it finished so that the next animation in\r\n\t\t\t\t\t// sequence gets the correct start time.\r\n\t\t\t\t\tdata.lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t\t}\r\n\t\t\t\t// Start the next animation in sequence, or delete the queue if\r\n\t\t\t\t// this was the last one.\r\n\t\t\t\tdequeue(element, queue);\r\n\t\t\t}\r\n\t\t\t// Cleanup any pointers, and remember the last animation etc.\r\n\t\t\tfreeAnimationCall(activeCall);\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface Element {\r\n\tvelocityData: ElementData;\r\n}\r\n\r\n/**\r\n * Get (and create) the internal data store for an element.\r\n */\r\nfunction Data(element: HTMLorSVGElement): ElementData {\r\n\t// Use a string member so Uglify doesn't mangle it.\r\n\tconst data = element[\"velocityData\"];\r\n\r\n\tif (data) {\r\n\t\treturn data;\r\n\t}\r\n\tlet types = 0;\r\n\r\n\tfor (let index = 0, constructors = VelocityStatic.constructors; index < constructors.length; index++) {\r\n\t\tif (element instanceof constructors[index]) {\r\n\t\t\ttypes |= 1 << index;\r\n\t\t}\r\n\t}\r\n\t// Do it this way so it errors on incorrect data.\r\n\tlet newData: ElementData = {\r\n\t\ttypes: types,\r\n\t\tcount: 0,\r\n\t\tcomputedStyle: null,\r\n\t\tcache: Object.create(null),\r\n\t\tqueueList: Object.create(null),\r\n\t\tlastAnimationList: Object.create(null),\r\n\t\tlastFinishList: Object.create(null)\r\n\t};\r\n\tObject.defineProperty(element, \"velocityData\", {\r\n\t\tvalue: newData\r\n\t});\r\n\treturn newData;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\r\n\t */\r\n\texport let debug: boolean | 1 | 2 = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity option defaults, which can be overriden by the user.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t// NOTE: Add the variable here, then add the default state in \"reset\" below.\r\n\tlet _cache: boolean,\r\n\t\t_begin: VelocityCallback,\r\n\t\t_complete: VelocityCallback,\r\n\t\t_delay: number,\r\n\t\t_duration: number,\r\n\t\t_easing: VelocityEasingType,\r\n\t\t_fpsLimit: number,\r\n\t\t_loop: number | true,\r\n\t\t_minFrameTime: number,\r\n\t\t_promise: boolean,\r\n\t\t_promiseRejectEmpty: boolean,\r\n\t\t_queue: string | false,\r\n\t\t_repeat: number | true,\r\n\t\t_speed: number,\r\n\t\t_sync: boolean;\r\n\r\n\texport const defaults: StrictVelocityOptions & {reset?: () => void} = {\r\n\t\tmobileHA: true\r\n\t};\r\n\r\n\t// IMPORTANT: Make sure any new defaults get added to the actions/set.ts list\r\n\tObject.defineProperties(defaults, {\r\n\t\treset: {\r\n\t\t\tenumerable: true,\r\n\t\t\tvalue: function() {\r\n\t\t\t\t_cache = DEFAULT_CACHE;\r\n\t\t\t\t_begin = undefined;\r\n\t\t\t\t_complete = undefined;\r\n\t\t\t\t_delay = DEFAULT_DELAY;\r\n\t\t\t\t_duration = DEFAULT_DURATION;\r\n\t\t\t\t_easing = validateEasing(DEFAULT_EASING, DEFAULT_DURATION);\r\n\t\t\t\t_fpsLimit = DEFAULT_FPSLIMIT;\r\n\t\t\t\t_loop = DEFAULT_LOOP;\r\n\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / DEFAULT_FPSLIMIT;\r\n\t\t\t\t_promise = DEFAULT_PROMISE;\r\n\t\t\t\t_promiseRejectEmpty = DEFAULT_PROMISE_REJECT_EMPTY;\r\n\t\t\t\t_queue = DEFAULT_QUEUE;\r\n\t\t\t\t_repeat = DEFAULT_REPEAT;\r\n\t\t\t\t_speed = DEFAULT_SPEED;\r\n\t\t\t\t_sync = DEFAULT_SYNC;\r\n\t\t\t}\r\n\t\t},\r\n\t\tcache: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _cache;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_cache = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tbegin: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _begin;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_begin = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomplete: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _complete;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_complete = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdelay: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _delay;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_delay = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tduration: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _duration;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_duration = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\teasing: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityEasingType {\r\n\t\t\t\treturn _easing;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityEasingType) {\r\n\t\t\t\tvalue = validateEasing(value, _duration);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_easing = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfpsLimit: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _fpsLimit;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | false) {\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_fpsLimit = value;\r\n\t\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tloop: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _loop;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_loop = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tminFrameTime: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _minFrameTime;\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromise: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promise;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromise(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promise = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromiseRejectEmpty: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promiseRejectEmpty;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromiseRejectEmpty(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promiseRejectEmpty = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tqueue: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): string | false {\r\n\t\t\t\treturn _queue;\r\n\t\t\t},\r\n\t\t\tset: function(value: string | false) {\r\n\t\t\t\tvalue = validateQueue(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_queue = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepeat: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _repeat;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_repeat = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tspeed: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number {\r\n\t\t\t\treturn _speed;\r\n\t\t\t},\r\n\t\t\tset: function(value: number) {\r\n\t\t\t\tvalue = validateSpeed(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_speed = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsync: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _sync;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateSync(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_sync = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tdefaults.reset();\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity-wide animation time remapping for testing purposes.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * In mock mode, all animations are forced to complete immediately upon the\r\n\t * next rAF tick. If there are further animations queued then they will each\r\n\t * take one single frame in turn. Loops and repeats will be disabled while\r\n\t * mock = true.\r\n\t */\r\n\texport let mock: boolean = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\r\n\t * object must either be treatable as an array - with a .length\r\n\t * property, and each member a Node, or a Node directly.\r\n\t * \r\n\t * \r\n\t * By default Velocity will try to patch window,\r\n\t * jQuery, Zepto, and several classes that return\r\n\t * Nodes or lists of Nodes.\r\n\t * \r\n\t * @public\r\n\t */\r\n\texport function patch(proto: any, global?: boolean) {\r\n\t\ttry {\r\n\t\t\tdefineProperty(proto, (global ? \"V\" : \"v\") + \"elocity\", VelocityFn);\r\n\t\t} catch (e) {\r\n\t\t\tconsole.warn(\"VelocityJS: Error when trying to add prototype.\", e);\r\n\t\t}\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * AnimationCall queue\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Simple queue management. Un-named queue is directly within the element data,\r\n\t * named queue is within an object within it.\r\n\t */\r\n\tfunction animate(animation: AnimationCall) {\r\n\t\tconst prev = State.last;\r\n\r\n\t\tanimation._prev = prev;\r\n\t\tanimation._next = undefined;\r\n\t\tif (prev) {\r\n\t\t\tprev._next = animation;\r\n\t\t} else {\r\n\t\t\tState.first = animation;\r\n\t\t}\r\n\t\tState.last = animation;\r\n\t\tif (!State.firstNew) {\r\n\t\t\tState.firstNew = animation;\r\n\t\t}\r\n\t\tconst element = animation.element,\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (queue !== false) {\r\n\t\t\t// Store the last animation added so we can use it for the\r\n\t\t\t// beginning of the next one.\r\n\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t}\r\n\t\tif (!data.count++) {\r\n\r\n\t\t\t////////////////////////\r\n\t\t\t// Feature: Classname //\r\n\t\t\t////////////////////////\r\n\r\n\t\t\taddClass(element, State.className);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add an item to an animation queue.\r\n\t */\r\n\texport function queue(element: HTMLorSVGElement, animation: AnimationCall, queue?: string | false): void {\r\n\t\tif (queue === false) {\r\n\t\t\tanimate(animation);\r\n\t\t} else {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element);\r\n\t\t\tlet last = data.queueList[queue];\r\n\r\n\t\t\tif (!last) {\r\n\t\t\t\tif (last === null) {\r\n\t\t\t\t\tdata.queueList[queue] = animation;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdata.queueList[queue] = null;\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile (last._next) {\r\n\t\t\t\t\tlast = last._next;\r\n\t\t\t\t}\r\n\t\t\t\tlast._next = animation;\r\n\t\t\t\tanimation._prev = last;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Start the next animation on this element's queue (named or default).\r\n\t *\r\n\t * @returns the next animation that is starting.\r\n\t */\r\n\texport function dequeue(element: HTMLorSVGElement, queue?: string | boolean, skip?: boolean): AnimationCall {\r\n\t\tif (queue !== false) {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element),\r\n\t\t\t\tanimation = data.queueList[queue];\r\n\r\n\t\t\tif (animation) {\r\n\t\t\t\tdata.queueList[queue] = animation._next || null;\r\n\t\t\t\tif (!skip) {\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else if (animation === null) {\r\n\t\t\t\tdelete data.queueList[queue];\r\n\t\t\t}\r\n\t\t\treturn animation;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove an animation from the active animation list. If it has a queue set\r\n\t * then remember it as the last animation for that queue, and free the one\r\n\t * that was previously there. If the animation list is completely empty then\r\n\t * mark us as finished.\r\n\t */\r\n\texport function freeAnimationCall(animation: AnimationCall): void {\r\n\t\tconst next = animation._next,\r\n\t\t\tprev = animation._prev,\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (State.firstNew === animation) {\r\n\t\t\tState.firstNew = next;\r\n\t\t}\r\n\t\tif (State.first === animation) {\r\n\t\t\tState.first = next;\r\n\t\t} else if (prev) {\r\n\t\t\tprev._next = next;\r\n\t\t}\r\n\t\tif (State.last === animation) {\r\n\t\t\tState.last = prev;\r\n\t\t} else if (next) {\r\n\t\t\tnext._prev = prev;\r\n\t\t}\r\n\t\tif (queue) {\r\n\t\t\tconst data = Data(animation.element);\r\n\r\n\t\t\tif (data) {\r\n\t\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t\t\tanimation._next = animation._prev = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */\r\n\texport let Redirects = {/* Manually registered by the user. */};\r\n\r\n\t/***********************\r\n\t Packaged Redirects\r\n\t ***********************/\r\n\r\n\t/* slideUp, slideDown */\r\n\t[\"Down\", \"Up\"].forEach(function(direction) {\r\n\t\tRedirects[\"slide\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tbegin = opts.begin,\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tinlineValues = {},\r\n\t\t\t\tcomputedValues = {\r\n\t\t\t\t\theight: \"\",\r\n\t\t\t\t\tmarginTop: \"\",\r\n\t\t\t\t\tmarginBottom: \"\",\r\n\t\t\t\t\tpaddingTop: \"\",\r\n\t\t\t\t\tpaddingBottom: \"\"\r\n\t\t\t\t};\r\n\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\tlet isInline = inlineRx.test(element.nodeName.toLowerCase());\r\n\r\n\t\t\t\t/* Show the element before slideDown begins and hide the element after slideUp completes. */\r\n\t\t\t\t/* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */\r\n\t\t\t\topts.display = (direction === \"Down\" ? (isInline ? \"inline-block\" : \"block\") : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\topts.begin = function() {\r\n\t\t\t\t/* If the user passed in a begin callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === 0 && begin) {\r\n\t\t\t\t\tbegin.call(elements, elements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Cache the elements' original vertical dimensional property values so that we can animate back to them. */\r\n\t\t\t\tfor (let property in computedValues) {\r\n\t\t\t\t\tif (!computedValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinlineValues[property] = element.style[property];\r\n\r\n\t\t\t\t\t/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,\r\n\t\t\t\t\t use forcefeeding to start from computed values and animate down to 0. */\r\n\t\t\t\t\tlet propertyValue = CSS.getPropertyValue(element, property);\r\n\t\t\t\t\tcomputedValues[property] = (direction === \"Down\") ? [propertyValue, 0] : [0, propertyValue];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Force vertical overflow content to clip so that sliding works as expected. */\r\n\t\t\t\t(inlineValues as any).overflow = element.style.overflow;\r\n\t\t\t\telement.style.overflow = \"hidden\";\r\n\t\t\t};\r\n\r\n\t\t\topts.complete = function() {\r\n\t\t\t\t/* Reset element to its pre-slide inline values once its slide animation is complete. */\r\n\t\t\t\tfor (let property in inlineValues) {\r\n\t\t\t\t\tif (inlineValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\telement.style[property] = inlineValues[property];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the user passed in a complete callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === elementsSize - 1) {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\tresolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t(VelocityFn as any)(element, computedValues, opts);\r\n\t\t};\r\n\t});\r\n\r\n\t/* fadeIn, fadeOut */\r\n\t[\"In\", \"Out\"].forEach(function(direction) {\r\n\t\tRedirects[\"fade\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], promiseData) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tpropertiesMap = {\r\n\t\t\t\t\topacity: (direction === \"In\") ? 1 : 0\r\n\t\t\t\t};\r\n\r\n\t\t\t/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering\r\n\t\t\t callbacks by firing them only when the final element has been reached. */\r\n\t\t\tif (elementsIndex !== 0) {\r\n\t\t\t\topts.begin = null;\r\n\t\t\t}\r\n\t\t\tif (elementsIndex !== elementsSize - 1) {\r\n\t\t\t\topts.complete = null;\r\n\t\t\t} else {\r\n\t\t\t\topts.complete = function() {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t/* If a display was passed in, use it. Otherwise, default to \"none\" for fadeOut or the element-specific default for fadeIn. */\r\n\t\t\t/* Note: We allow users to pass in \"null\" to skip display setting altogether. */\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\topts.display = (direction === \"In\" ? \"auto\" : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\t(VelocityFn as any)(this, propertiesMap, opts);\r\n\t\t};\r\n\t});\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Effect Registration\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */\r\n\tfunction animateParentHeight(elements: HTMLorSVGElement | HTMLorSVGElement[], direction, totalDuration, stagger) {\r\n\t\tlet totalHeightDelta = 0,\r\n\t\t\tparentNode: HTMLorSVGElement;\r\n\r\n\t\t/* Sum the total height (including padding and margin) of all targeted elements. */\r\n\t\t((elements as HTMLorSVGElement).nodeType ? [elements as HTMLorSVGElement] : elements as HTMLorSVGElement[]).forEach(function(element: HTMLorSVGElement, i) {\r\n\t\t\tif (stagger) {\r\n\t\t\t\t/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */\r\n\t\t\t\ttotalDuration += i * stagger;\r\n\t\t\t}\r\n\r\n\t\t\tparentNode = element.parentNode as HTMLorSVGElement;\r\n\r\n\t\t\tlet propertiesToSum = [\"height\", \"paddingTop\", \"paddingBottom\", \"marginTop\", \"marginBottom\"];\r\n\r\n\t\t\t/* If box-sizing is border-box, the height already includes padding and margin */\r\n\t\t\tif (CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\") {\r\n\t\t\t\tpropertiesToSum = [\"height\"];\r\n\t\t\t}\r\n\r\n\t\t\tpropertiesToSum.forEach(function(property) {\r\n\t\t\t\ttotalHeightDelta += parseFloat(CSS.getPropertyValue(element, property) as string);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */\r\n\t\t// TODO: Get this typesafe again\r\n\t\t(VelocityFn as any)(\r\n\t\t\tparentNode,\r\n\t\t\t{height: (direction === \"In\" ? \"+\" : \"-\") + \"=\" + totalHeightDelta},\r\n\t\t\t{queue: false, easing: \"ease-in-out\", duration: totalDuration * (direction === \"In\" ? 0.6 : 1)}\r\n\t\t);\r\n\t}\r\n\r\n\t/* Note: RegisterUI is a legacy name. */\r\n\texport function RegisterEffect(effectName: string, properties): Velocity {\r\n\r\n\t\t/* Register a custom redirect for each effect. */\r\n\t\tRedirects[effectName] = function(element, redirectOptions, elementsIndex, elementsSize, elements, resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void, loop) {\r\n\t\t\tlet finalElement = (elementsIndex === elementsSize - 1),\r\n\t\t\t\ttotalDuration = 0;\r\n\r\n\t\t\tloop = loop || properties.loop;\r\n\t\t\tif (typeof properties.defaultDuration === \"function\") {\r\n\t\t\t\tproperties.defaultDuration = properties.defaultDuration.call(elements, elements);\r\n\t\t\t} else {\r\n\t\t\t\tproperties.defaultDuration = parseFloat(properties.defaultDuration);\r\n\t\t\t}\r\n\r\n\t\t\t/* Get the total duration used, so we can share it out with everything that doesn't have a duration */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet durationPercentage = properties.calls[callIndex][1];\r\n\t\t\t\tif (typeof durationPercentage === \"number\") {\r\n\t\t\t\t\ttotalDuration += durationPercentage;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet shareDuration = totalDuration >= 1 ? 0 : properties.calls.length ? (1 - totalDuration) / properties.calls.length : 1;\r\n\r\n\t\t\t/* Iterate through each effect's call array. */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet call = properties.calls[callIndex],\r\n\t\t\t\t\tpropertyMap = call[0],\r\n\t\t\t\t\tredirectDuration = 1000,\r\n\t\t\t\t\tdurationPercentage = call[1],\r\n\t\t\t\t\tcallOptions = call[2] || {},\r\n\t\t\t\t\topts: VelocityOptions = {};\r\n\r\n\t\t\t\tif (redirectOptions.duration !== undefined) {\r\n\t\t\t\t\tredirectDuration = redirectOptions.duration;\r\n\t\t\t\t} else if (properties.defaultDuration !== undefined) {\r\n\t\t\t\t\tredirectDuration = properties.defaultDuration;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Assign the whitelisted per-call options. */\r\n\t\t\t\topts.duration = redirectDuration * (typeof durationPercentage === \"number\" ? durationPercentage : shareDuration);\r\n\t\t\t\topts.queue = redirectOptions.queue || \"\";\r\n\t\t\t\topts.easing = callOptions.easing || \"ease\";\r\n\t\t\t\topts.delay = parseFloat(callOptions.delay) || 0;\r\n\t\t\t\topts.loop = !properties.loop && callOptions.loop;\r\n\t\t\t\topts.cache = callOptions.cache || true;\r\n\r\n\t\t\t\t/* Special processing for the first effect call. */\r\n\t\t\t\tif (callIndex === 0) {\r\n\t\t\t\t\t/* If a delay was passed into the redirect, combine it with the first call's delay. */\r\n\t\t\t\t\topts.delay += (parseFloat(redirectOptions.delay) || 0);\r\n\r\n\t\t\t\t\tif (elementsIndex === 0) {\r\n\t\t\t\t\t\topts.begin = function() {\r\n\t\t\t\t\t\t\t/* Only trigger a begin callback on the first effect call with the first element in the set. */\r\n\t\t\t\t\t\t\tif (redirectOptions.begin) {\r\n\t\t\t\t\t\t\t\tredirectOptions.begin.call(elements, elements);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tlet direction = effectName.match(/(In|Out)$/);\r\n\r\n\t\t\t\t\t\t\t/* Make \"in\" transitioning elements invisible immediately so that there's no FOUC between now\r\n\t\t\t\t\t\t\t and the first RAF tick. */\r\n\t\t\t\t\t\t\tif ((direction && direction[0] === \"In\") && propertyMap.opacity !== undefined) {\r\n\t\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"opacity\", 0);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Only trigger animateParentHeight() if we're using an In/Out transition. */\r\n\t\t\t\t\t\t\tif (redirectOptions.animateParentHeight && direction) {\r\n\t\t\t\t\t\t\t\tanimateParentHeight(elements, direction[0], redirectDuration + (opts.delay as number), redirectOptions.stagger);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If the user isn't overriding the display option, default to \"auto\" for \"In\"-suffixed transitions. */\r\n\t\t\t\t\t//\t\t\t\t\tif (redirectOptions.display !== null) {\r\n\t\t\t\t\t//\t\t\t\t\t\tif (redirectOptions.display !== undefined && redirectOptions.display !== \"none\") {\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = redirectOptions.display;\r\n\t\t\t\t\t//\t\t\t\t\t\t} else if (/In$/.test(effectName)) {\r\n\t\t\t\t\t//\t\t\t\t\t\t\t/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */\r\n\t\t\t\t\t//\t\t\t\t\t\t\tlet defaultDisplay = CSS.Values.getDisplayType(element);\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = (defaultDisplay === \"inline\") ? \"inline-block\" : defaultDisplay;\r\n\t\t\t\t\t//\t\t\t\t\t\t}\r\n\t\t\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility && redirectOptions.visibility !== \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Special processing for the last effect call. */\r\n\t\t\t\tif (callIndex === properties.calls.length - 1) {\r\n\t\t\t\t\t/* Append promise resolving onto the user's redirect callback. */\r\n\t\t\t\t\tlet injectFinalCallbacks = function() {\r\n\t\t\t\t\t\tif ((redirectOptions.display === undefined || redirectOptions.display === \"none\") && /Out$/.test(effectName)) {\r\n\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"display\", \"none\");\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (redirectOptions.complete) {\r\n\t\t\t\t\t\t\tredirectOptions.complete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\t\tresolver(elements || element);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\tRedirects[effectName](element, redirectOptions, elementsIndex, elementsSize, elements, resolver, loop === true ? true : Math.max(0, loop - 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (properties.reset) {\r\n\t\t\t\t\t\t\tfor (let resetProperty in properties.reset) {\r\n\t\t\t\t\t\t\t\tif (!properties.reset.hasOwnProperty(resetProperty)) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlet resetValue = properties.reset[resetProperty];\r\n\r\n\t\t\t\t\t\t\t\t/* Format each non-array value in the reset property map to [ value, value ] so that changes apply\r\n\t\t\t\t\t\t\t\t immediately and DOM querying is avoided (via forcefeeding). */\r\n\t\t\t\t\t\t\t\t/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */\r\n\t\t\t\t\t\t\t\t// TODO: Fix this\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === \"string\" || typeof resetValue === \"number\")) {\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tproperties.reset[resetProperty] = [properties.reset[resetProperty], properties.reset[resetProperty]];\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */\r\n\t\t\t\t\t\t\tlet resetOptions: VelocityOptions = {duration: 0, queue: false};\r\n\r\n\t\t\t\t\t\t\t/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */\r\n\t\t\t\t\t\t\tif (finalElement) {\r\n\t\t\t\t\t\t\t\tresetOptions.complete = injectFinalCallbacks;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tVelocityFn(element, properties.reset, resetOptions);\r\n\t\t\t\t\t\t\t/* Only trigger the user's complete callback on the last effect call with the last element in the set. */\r\n\t\t\t\t\t\t} else if (finalElement) {\r\n\t\t\t\t\t\t\tinjectFinalCallbacks();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility === \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVelocityFn(element, propertyMap, opts);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Return the Velocity object so that RegisterUI calls can be chained. */\r\n\t\treturn VelocityFn as any;\r\n\t};\r\n};","/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Sequence Running\n */\n\nnamespace VelocityStatic {\n\t/* Note: Sequence calls must use Velocity's single-object arguments syntax. */\n\texport function RunSequence(originalSequence): void {\n\t\tlet sequence = _deepCopyObject([], originalSequence);\n\n\t\tif (sequence.length > 1) {\n\t\t\tsequence.reverse().forEach(function(currentCall, i) {\n\t\t\t\tlet nextCall = sequence[i + 1];\n\n\t\t\t\tif (nextCall) {\n\t\t\t\t\t/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered\n\t\t\t\t\t in the previous call's begin callback. Otherwise, chained calls are normally triggered\n\t\t\t\t\t in the previous call's complete callback. */\n\t\t\t\t\tlet currentCallOptions = currentCall.o || currentCall.options,\n\t\t\t\t\t\tnextCallOptions = nextCall.o || nextCall.options;\n\n\t\t\t\t\tlet timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? \"begin\" : \"complete\",\n\t\t\t\t\t\tcallbackOriginal = nextCallOptions && nextCallOptions[timing],\n\t\t\t\t\t\toptions = {};\n\n\t\t\t\t\toptions[timing] = function() {\n\t\t\t\t\t\tlet nextCallElements = nextCall.e || nextCall.elements;\n\t\t\t\t\t\tlet elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;\n\n\t\t\t\t\t\tif (callbackOriginal) {\n\t\t\t\t\t\t\tcallbackOriginal.call(elements, elements);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tVelocityFn(currentCall);\n\t\t\t\t\t};\n\n\t\t\t\t\tif (nextCall.o) {\n\t\t\t\t\t\tnextCall.o = {...nextCallOptions, ...options};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextCall.options = {...nextCallOptions, ...options};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsequence.reverse();\n\t\t}\n\n\t\tVelocityFn(sequence[0]);\n\t};\n};\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tick\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Call the begin method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\texport function callBegin(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.begin as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Call the progress method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callProgress(activeCall: AnimationCall, timeCurrent: number) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements,\r\n\t\t\t\tpercentComplete = activeCall.percentComplete,\r\n\t\t\t\toptions = activeCall.options,\r\n\t\t\t\ttweenValue = activeCall.tween;\r\n\r\n\t\t\t(activeCall.options.progress as VelocityProgress).call(elements,\r\n\t\t\t\telements,\r\n\t\t\t\tpercentComplete,\r\n\t\t\t\tMath.max(0, activeCall.timeStart + (activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaults.duration) - timeCurrent),\r\n\t\t\t\ttweenValue !== undefined ? tweenValue : String(percentComplete * 100),\r\n\t\t\t\tactiveCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tlet firstProgress: AnimationCall,\r\n\t\tfirstComplete: AnimationCall;\r\n\r\n\tfunction asyncCallbacks() {\r\n\t\tlet activeCall: AnimationCall,\r\n\t\t\tnextCall: AnimationCall;\r\n\t\t// Callbacks and complete that might read the DOM again.\r\n\r\n\t\t// Progress callback\r\n\t\tfor (activeCall = firstProgress; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextProgress;\r\n\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\tcallProgress(activeCall, lastTick);\r\n\t\t}\r\n\t\t// Complete animations, including complete callback or looping\r\n\t\tfor (activeCall = firstComplete; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextComplete;\r\n\t\t\t/* If this call has finished tweening, pass it to complete() to handle call cleanup. */\r\n\t\t\tcompleteCall(activeCall);\r\n\t\t}\r\n\t}\r\n\r\n\t/**************\r\n\t Timing\r\n\t **************/\r\n\r\n\tconst FRAME_TIME = 1000 / 60,\r\n\t\t/**\r\n\t\t* Shim for window.performance in case it doesn't exist\r\n\t\t*/\r\n\t\tperformance = (function() {\r\n\t\t\tconst perf = window.performance || {} as Performance;\r\n\r\n\t\t\tif (typeof perf.now !== \"function\") {\r\n\t\t\t\tconst nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : _now();\r\n\r\n\t\t\t\tperf.now = function() {\r\n\t\t\t\t\treturn _now() - nowOffset;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn perf;\r\n\t\t})(),\r\n\t\t/**\r\n\t\t * Proxy function for when rAF is not available - try to be as accurate\r\n\t\t * as possible with the setTimeout calls, however they are far less\r\n\t\t * accurate than rAF can be - so try not to use normally (unless the tab\r\n\t\t * is in the background).\r\n\t\t */\r\n\t\trAFProxy = function(callback: FrameRequestCallback) {\r\n\t\t\tconsole.log(\"rAFProxy\", Math.max(0, FRAME_TIME - (performance.now() - lastTick)), performance.now(), lastTick, FRAME_TIME)\r\n\t\t\treturn setTimeout(function() {\r\n\t\t\t\tcallback(performance.now());\r\n\t\t\t}, Math.max(0, FRAME_TIME - (performance.now() - lastTick)));\r\n\t\t},\r\n\t\t/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */\r\n\t\trAFShim = window.requestAnimationFrame || rAFProxy;\r\n\t/**\r\n\t * The ticker function being used, either rAF, or a function that\r\n\t * emulates it.\r\n\t */\r\n\tlet ticker: (callback: FrameRequestCallback) => number = document.hidden ? rAFProxy : rAFShim;\r\n\t/**\r\n\t * The time that the last animation frame ran at. Set from tick(), and used\r\n\t * for missing rAF (ie, when not in focus etc).\r\n\t */\r\n\texport let lastTick: number = 0;\r\n\r\n\t/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.\r\n\t To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile\r\n\t devices to avoid wasting battery power on inactive tabs. */\r\n\t/* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */\r\n\tif (!State.isMobile && document.hidden !== undefined) {\r\n\t\tdocument.addEventListener(\"visibilitychange\", function updateTicker(event?: Event) {\r\n\t\t\tlet hidden = document.hidden;\r\n\r\n\t\t\tticker = hidden ? rAFProxy : rAFShim;\r\n\t\t\tif (event) {\r\n\t\t\t\tsetTimeout(tick, 2000);\r\n\t\t\t}\r\n\t\t\ttick();\r\n\t\t});\r\n\t}\r\n\r\n\tlet ticking: boolean;\r\n\r\n\t/**\r\n\t * Called on every tick, preferably through rAF. This is reponsible for\r\n\t * initialising any new animations, then starting any that need starting.\r\n\t * Finally it will expand any tweens and set the properties relating to\r\n\t * them. If there are any callbacks relating to the animations then they\r\n\t * will attempt to call at the end (with the exception of \"begin\").\r\n\t */\r\n\texport function tick(timestamp?: number | boolean) {\r\n\t\tif (ticking) {\r\n\t\t\t// Should never happen - but if we've swapped back from hidden to\r\n\t\t\t// visibile then we want to make sure\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tticking = true;\r\n\t\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\r\n\t\t We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever\r\n\t\t the browser's next tick sync time occurs, which results in the first elements subjected to Velocity\r\n\t\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\r\n\t\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\r\n\t\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\r\n\t\tif (timestamp) {\r\n\t\t\t/* We normally use RAF's high resolution timestamp but as it can be significantly offset when the browser is\r\n\t\t\t under high stress we give the option for choppiness over allowing the browser to drop huge chunks of frames.\r\n\t\t\t We use performance.now() and shim it if it doesn't exist for when the tab is hidden. */\r\n\t\t\tconst timeCurrent = timestamp && timestamp !== true ? timestamp : performance.now(),\r\n\t\t\t\tdeltaTime = lastTick ? timeCurrent - lastTick : FRAME_TIME,\r\n\t\t\t\tdefaultSpeed = defaults.speed,\r\n\t\t\t\tdefaultEasing = defaults.easing,\r\n\t\t\t\tdefaultDuration = defaults.duration;\r\n\t\t\tlet activeCall: AnimationCall,\r\n\t\t\t\tnextCall: AnimationCall,\r\n\t\t\t\tlastProgress: AnimationCall,\r\n\t\t\t\tlastComplete: AnimationCall;\r\n\r\n\t\t\tfirstProgress = null;\r\n\t\t\tfirstComplete = null;\r\n\t\t\tif (deltaTime >= defaults.minFrameTime || !lastTick) {\r\n\t\t\t\tlastTick = timeCurrent;\r\n\r\n\t\t\t\t/********************\r\n\t\t\t\t Call Iteration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\t// Expand any tweens that might need it.\r\n\t\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t\t}\r\n\t\t\t\t// Iterate through each active call.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = activeCall._next) {\r\n\t\t\t\t\tconst element = activeCall.element;\r\n\t\t\t\t\tlet data: ElementData;\r\n\r\n\t\t\t\t\t// Check to see if this element has been deleted midway\r\n\t\t\t\t\t// through the animation. If it's gone then end this\r\n\t\t\t\t\t// animation.\r\n\t\t\t\t\tif (!element.parentNode || !(data = Data(element))) {\r\n\t\t\t\t\t\t// TODO: Remove safely - decrease count, delete data, remove from arrays\r\n\t\t\t\t\t\tfreeAnimationCall(activeCall);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tconst options = activeCall.options,\r\n\t\t\t\t\t\tflags = activeCall._flags;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// If this is the first time that this call has been\r\n\t\t\t\t\t// processed by tick() then we assign timeStart now so that\r\n\t\t\t\t\t// it's value is as close to the real animation start time\r\n\t\t\t\t\t// as possible.\r\n\t\t\t\t\tif (!timeStart) {\r\n\t\t\t\t\t\tconst queue = activeCall.queue != null ? activeCall.queue : options.queue;\r\n\r\n\t\t\t\t\t\ttimeStart = timeCurrent - deltaTime;\r\n\t\t\t\t\t\tif (queue !== false) {\r\n\t\t\t\t\t\t\ttimeStart = Math.max(timeStart, data.lastFinishList[queue] || 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If this animation is paused then skip processing unless\r\n\t\t\t\t\t// it has been set to resume.\r\n\t\t\t\t\tif (flags & AnimationFlags.PAUSED) {\r\n\t\t\t\t\t\t// Update the time start to accomodate the paused\r\n\t\t\t\t\t\t// completion amount.\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Check if this animation is ready - if it's synced then it\r\n\t\t\t\t\t// needs to wait for all other animations in the sync\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY)) {\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.READY;\r\n\t\t\t\t\t\toptions._ready++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Need to split the loop, as ready sync animations must all get\r\n\t\t\t\t// the same start time.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = nextCall) {\r\n\t\t\t\t\tconst flags = activeCall._flags;\r\n\r\n\t\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY) || (flags & AnimationFlags.PAUSED)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst options = activeCall.options;\r\n\r\n\t\t\t\t\tif ((flags & AnimationFlags.SYNC) && options._ready < options._total) {\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst speed = activeCall.speed != null ? activeCall.speed : options.speed != null ? options.speed : defaultSpeed;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tif (!(flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t\t\tconst delay = activeCall.delay != null ? activeCall.delay : options.delay;\r\n\r\n\t\t\t\t\t\t// Make sure anything we've delayed doesn't start\r\n\t\t\t\t\t\t// animating yet, there might still be an active delay\r\n\t\t\t\t\t\t// after something has been un-paused\r\n\t\t\t\t\t\tif (delay) {\r\n\t\t\t\t\t\t\tif (timeStart + (delay / speed) > timeCurrent) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tactiveCall.timeStart = timeStart += delay / (delay > 0 ? speed : 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.STARTED;\r\n\t\t\t\t\t\t// The begin callback is fired once per call, not once\r\n\t\t\t\t\t\t// per element, and is passed the full raw DOM element\r\n\t\t\t\t\t\t// set as both its context and its first argument.\r\n\t\t\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\t\t\toptions._first = activeCall;\r\n\t\t\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\t\t\tcallBegin(activeCall);\r\n\t\t\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (speed !== 1) {\r\n\t\t\t\t\t\t// On the first frame we may have a shorter delta\r\n\t\t\t\t\t\tconst delta = Math.min(deltaTime, timeCurrent - timeStart);\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart += delta * (1 - speed);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options._first === activeCall && options.progress) {\r\n\t\t\t\t\t\tactiveCall._nextProgress = undefined;\r\n\t\t\t\t\t\tif (lastProgress) {\r\n\t\t\t\t\t\t\tlastProgress._nextProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst activeEasing = activeCall.easing != null ? activeCall.easing : options.easing != null ? options.easing : defaultEasing,\r\n\t\t\t\t\t\tmillisecondsEllapsed = activeCall.ellapsedTime = timeCurrent - timeStart,\r\n\t\t\t\t\t\tduration = activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaultDuration,\r\n\t\t\t\t\t\tpercentComplete = activeCall.percentComplete = mock ? 1 : Math.min(millisecondsEllapsed / duration, 1),\r\n\t\t\t\t\t\ttweens = activeCall.tweens,\r\n\t\t\t\t\t\treverse = flags & AnimationFlags.REVERSE;\r\n\r\n\t\t\t\t\tif (percentComplete === 1) {\r\n\t\t\t\t\t\tactiveCall._nextComplete = undefined;\r\n\t\t\t\t\t\tif (lastComplete) {\r\n\t\t\t\t\t\t\tlastComplete._nextComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const property in tweens) {\r\n\t\t\t\t\t\t// For every element, iterate through each property.\r\n\t\t\t\t\t\tconst tween = tweens[property],\r\n\t\t\t\t\t\t\teasing = tween[Tween.EASING] || activeEasing,\r\n\t\t\t\t\t\t\tpattern = tween[Tween.PATTERN],\r\n\t\t\t\t\t\t\trounding = tween[Tween.ROUNDING];\r\n\t\t\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\t\t\tconst startValue = tween[Tween.START][i];\r\n\r\n\t\t\t\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// All easings must deal with numbers except for\r\n\t\t\t\t\t\t\t\t\t// our internal ones\r\n\t\t\t\t\t\t\t\t\tconst result = easing(reverse ? 1 - percentComplete : percentComplete, startValue as number, tween[Tween.END][i] as number, property)\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue += rounding && rounding[i] ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (property !== \"tween\") {\r\n\t\t\t\t\t\t\t\t// TODO: To solve an IE<=8 positioning bug, the unit type must be dropped when setting a property value of 0 - add normalisations to legacy\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(activeCall.element, property, currentValue);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Skip the fake 'tween' property as that is only\r\n\t\t\t\t\t\t\t\t// passed into the progress callback.\r\n\t\t\t\t\t\t\t\tactiveCall.tween = currentValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.warn(\"VelocityJS: Missing pattern:\", property, JSON.stringify(tween[property]))\r\n\t\t\t\t\t\t\tdelete tweens[property];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (firstProgress || firstComplete) {\r\n\t\t\t\t\tsetTimeout(asyncCallbacks, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (State.first) {\r\n\t\t\tState.isTicking = true;\r\n\t\t\tticker(tick);\r\n\t\t} else {\r\n\t\t\tState.isTicking = false;\r\n\t\t\tlastTick = 0;\r\n\t\t}\r\n\t\tticking = false;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Use rAF high resolution timestamp when available.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let timestamp: boolean = true;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tweens\r\n */\r\n\r\nconst enum Tween {\r\n\tEND,\r\n\tEASING,\r\n\tSTART,\r\n\tPATTERN,\r\n\tROUNDING,\r\n\tlength\r\n};\r\n\r\nnamespace VelocityStatic {\r\n\tlet commands = new Map string>();\r\n\r\n\tcommands.set(\"function\", function(value: any, element: HTMLorSVGElement, elements: HTMLorSVGElement[], elementArrayIndex: number) {\r\n\t\treturn (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length);\r\n\t})\r\n\tcommands.set(\"number\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn value + (element instanceof HTMLElement ? getUnitType(propertyName) : \"\");\r\n\t});\r\n\tcommands.set(\"string\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn CSS.fixColors(value);\r\n\t});\r\n\tcommands.set(\"undefined\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn CSS.fixColors(CSS.getPropertyValue(element, propertyName) || \"\");\r\n\t});\r\n\r\n\tconst\r\n\t\t/**\r\n\t\t * Properties that take \"deg\" as the default numeric suffix.\r\n\t\t */\r\n\t\tdegree = [\r\n\t\t\t// \"azimuth\" // Deprecated\r\n\t\t],\r\n\t\t/**\r\n\t\t * Properties that take no default numeric suffix.\r\n\t\t */\r\n\t\tunitless = [\r\n\t\t\t\"borderImageSlice\",\r\n\t\t\t\"columnCount\",\r\n\t\t\t\"counterIncrement\",\r\n\t\t\t\"counterReset\",\r\n\t\t\t\"flex\",\r\n\t\t\t\"flexGrow\",\r\n\t\t\t\"flexShrink\",\r\n\t\t\t\"floodOpacity\",\r\n\t\t\t\"fontSizeAdjust\",\r\n\t\t\t\"fontWeight\",\r\n\t\t\t\"lineHeight\",\r\n\t\t\t\"opacity\",\r\n\t\t\t\"order\",\r\n\t\t\t\"orphans\",\r\n\t\t\t\"shapeImageThreshold\",\r\n\t\t\t\"tabSize\",\r\n\t\t\t\"widows\",\r\n\t\t\t\"zIndex\"\r\n\t\t];\r\n\r\n\t/**\r\n\t * Retrieve a property's default unit type. Used for assigning a unit\r\n\t * type when one is not supplied by the user. These are only valid for\r\n\t * HTMLElement style properties.\r\n\t */\r\n\tfunction getUnitType(property: string): string {\r\n\t\tif (_inArray(degree, property)) {\r\n\t\t\treturn \"deg\";\r\n\t\t}\r\n\t\tif (_inArray(unitless, property)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn \"px\";\r\n\t}\r\n\r\n\t/**\r\n\t * Expand a VelocityProperty argument into a valid sparse Tween array. This\r\n\t * pre-allocates the array as it is then the correct size and slightly\r\n\t * faster to access.\r\n\t */\r\n\texport function expandProperties(animation: AnimationCall, properties: VelocityProperties) {\r\n\t\tconst tweens = animation.tweens = Object.create(null),\r\n\t\t\telements = animation.elements,\r\n\t\t\telement = animation.element,\r\n\t\t\telementArrayIndex = elements.indexOf(element),\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = getValue(animation.queue, animation.options.queue),\r\n\t\t\tduration = getValue(animation.options.duration, defaults.duration);\r\n\r\n\t\tfor (const property in properties) {\r\n\t\t\tconst propertyName = CSS.camelCase(property);\r\n\t\t\tlet valueData = properties[property],\r\n\t\t\t\ttypes = data.types,\r\n\t\t\t\tfound: boolean = propertyName === \"tween\";\r\n\r\n\t\t\tfor (let index = 0; types && !found; types >>= 1, index++) {\r\n\t\t\t\tfound = !!(types & 1 && Normalizations[index][propertyName]);\r\n\t\t\t}\r\n\t\t\tif (!found\r\n\t\t\t\t&& (!State.prefixElement\r\n\t\t\t\t\t|| !isString(State.prefixElement.style[propertyName]))) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to a lack of browser support.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (valueData == null) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to no value supplied.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tconst tween: VelocityTween = tweens[propertyName] = new Array(Tween.length) as any;\r\n\t\t\tlet endValue: string,\r\n\t\t\t\tstartValue: string;\r\n\r\n\t\t\tif (isFunction(valueData)) {\r\n\t\t\t\t// If we have a function as the main argument then resolve\r\n\t\t\t\t// it first, in case it returns an array that needs to be\r\n\t\t\t\t// split.\r\n\t\t\t\tvalueData = (valueData as VelocityPropertyFn).call(element, elementArrayIndex, elements.length, elements);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(valueData)) {\r\n\t\t\t\t// valueData is an array in the form of\r\n\t\t\t\t// [ endValue, [, easing] [, startValue] ]\r\n\t\t\t\tconst arr1 = valueData[1],\r\n\t\t\t\t\tarr2 = valueData[2];\r\n\r\n\t\t\t\tendValue = valueData[0] as any;\r\n\t\t\t\tif ((isString(arr1) && (/^[\\d-]/.test(arr1) || CSS.RegEx.isHex.test(arr1))) || isFunction(arr1) || isNumber(arr1)) {\r\n\t\t\t\t\tstartValue = arr1 as any;\r\n\t\t\t\t} else if ((isString(arr1) && Easing.Easings[arr1]) || Array.isArray(arr1)) {\r\n\t\t\t\t\ttween[Tween.EASING] = arr1 as any;\r\n\t\t\t\t\tstartValue = arr2 as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartValue = arr1 || arr2 as any;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tendValue = valueData as any;\r\n\t\t\t}\r\n\t\t\ttween[Tween.END] = commands.get(typeof endValue)(endValue, element, elements, elementArrayIndex, propertyName) as any;\r\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\r\n\t\t\t\ttween[Tween.START] = commands.get(typeof startValue)(startValue, element, elements, elementArrayIndex, propertyName) as any;\r\n\t\t\t}\r\n\t\t\texplodeTween(propertyName, tween, duration, !!startValue);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Convert a string-based tween with start and end strings, into a pattern\r\n\t * based tween with arrays.\r\n\t */\r\n\tfunction explodeTween(propertyName: string, tween: VelocityTween, duration: number, isForcefeed?: boolean) {\r\n\t\tconst endValue: string = tween[Tween.END] as any as string;\r\n\t\tlet startValue: string = tween[Tween.START] as any as string;\r\n\r\n\t\tif (!isString(endValue) || !isString(startValue)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet runAgain = false; // Can only be set once if the Start value doesn't match the End value and it's not forcefed\r\n\t\tdo {\r\n\t\t\trunAgain = false;\r\n\t\t\tconst arrayStart: (string | number)[] = tween[Tween.START] = [null],\r\n\t\t\t\tarrayEnd: (string | number)[] = tween[Tween.END] = [null],\r\n\t\t\t\tpattern: (string | number)[] = tween[Tween.PATTERN] = [\"\"];\r\n\t\t\tlet easing = tween[Tween.EASING] as any,\r\n\t\t\t\trounding: boolean[],\r\n\t\t\t\tindexStart = 0, // index in startValue\r\n\t\t\t\tindexEnd = 0, // index in endValue\r\n\t\t\t\tinCalc = 0, // Keep track of being inside a \"calc()\" so we don't duplicate it\r\n\t\t\t\tinRGB = 0, // Keep track of being inside an RGB as we can't use fractional values\r\n\t\t\t\tinRGBA = 0, // Keep track of being inside an RGBA as we must pass fractional for the alpha channel\r\n\t\t\t\tisStringValue: boolean;\r\n\r\n\t\t\t// TODO: Relative Values\r\n\r\n\t\t\t/* Operator logic must be performed last since it requires unit-normalized start and end values. */\r\n\t\t\t/* Note: Relative *percent values* do not behave how most people think; while one would expect \"+=50%\"\r\n\t\t\t to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:\r\n\t\t\t 50 points is added on top of the current % value. */\r\n\t\t\t//\t\t\t\t\tswitch (operator as any as string) {\r\n\t\t\t//\t\t\t\t\t\tcase \"+\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue + endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"-\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue - endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"*\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue * endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"/\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue / endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t// TODO: Leading from a calc value\r\n\t\t\twhile (indexStart < startValue.length && indexEnd < endValue.length) {\r\n\t\t\t\tlet charStart = startValue[indexStart],\r\n\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\r\n\t\t\t\t// If they're both numbers, then parse them as a whole\r\n\t\t\t\tif (TWEEN_NUMBER_REGEX.test(charStart) && TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\tlet tempStart = charStart, // temporary character buffer\r\n\t\t\t\t\t\ttempEnd = charEnd, // temporary character buffer\r\n\t\t\t\t\t\tdotStart = \".\", // Make sure we can only ever match a single dot in a decimal\r\n\t\t\t\t\t\tdotEnd = \".\"; // Make sure we can only ever match a single dot in a decimal\r\n\r\n\t\t\t\t\twhile (++indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart];\r\n\t\t\t\t\t\tif (charStart === dotStart) {\r\n\t\t\t\t\t\t\tdotStart = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempStart += charStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (++indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\t\t\t\t\t\tif (charEnd === dotEnd) {\r\n\t\t\t\t\t\t\tdotEnd = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempEnd += charEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet unitStart = CSS.getUnit(startValue, indexStart), // temporary unit type\r\n\t\t\t\t\t\tunitEnd = CSS.getUnit(endValue, indexEnd); // temporary unit type\r\n\r\n\t\t\t\t\tindexStart += unitStart.length;\r\n\t\t\t\t\tindexEnd += unitEnd.length;\r\n\t\t\t\t\tif (unitEnd.length === 0) {\r\n\t\t\t\t\t\t// This order as it's most common for the user supplied\r\n\t\t\t\t\t\t// value to be a number.\r\n\t\t\t\t\t\tunitEnd = unitStart;\r\n\t\t\t\t\t} else if (unitStart.length === 0) {\r\n\t\t\t\t\t\tunitStart = unitEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unitStart === unitEnd) {\r\n\t\t\t\t\t\t// Same units\r\n\t\t\t\t\t\tif (tempStart === tempEnd) {\r\n\t\t\t\t\t\t\t// Same numbers, so just copy over\r\n\t\t\t\t\t\t\tpattern[pattern.length - 1] += tempStart + unitStart;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (inRGB) {\r\n\t\t\t\t\t\t\t\tif (!rounding) {\r\n\t\t\t\t\t\t\t\t\trounding = tween[Tween.ROUNDING] = [];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trounding[arrayStart.length] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpattern.push(0, unitStart);\r\n\t\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart), null);\r\n\t\t\t\t\t\t\tarrayEnd.push(parseFloat(tempEnd), null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Different units, so put into a \"calc(from + to)\" and\r\n\t\t\t\t\t\t// animate each side to/from zero. setPropertyValue will\r\n\t\t\t\t\t\t// look out for the final \"calc(0 + \" prefix and remove\r\n\t\t\t\t\t\t// it from the value when it finds it.\r\n\t\t\t\t\t\tpattern[pattern.length - 1] += inCalc ? \"+ (\" : \"calc(\";\r\n\t\t\t\t\t\tpattern.push(0, unitStart + \" + \", 0, unitEnd + \")\");\r\n\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart) || 0, null, 0, null);\r\n\t\t\t\t\t\tarrayEnd.push(0, null, parseFloat(tempEnd) || 0, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart === charEnd) {\r\n\t\t\t\t\tpattern[pattern.length - 1] += charStart;\r\n\t\t\t\t\tindexStart++;\r\n\t\t\t\t\tindexEnd++;\r\n\t\t\t\t\t// Keep track of being inside a calc()\r\n\t\t\t\t\tif (inCalc === 0 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc === 1 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inCalc === 2 && charStart === \"l\"\r\n\t\t\t\t\t\t|| inCalc === 3 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tinCalc++;\r\n\t\t\t\t\t} else if ((inCalc && inCalc < 5)\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \")\" && --inCalc < 5) {\r\n\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Keep track of being inside an rgb() / rgba()\r\n\t\t\t\t\t// The opacity must not be rounded.\r\n\t\t\t\t\tif (inRGB === 0 && charStart === \"r\"\r\n\t\t\t\t\t\t|| inRGB === 1 && charStart === \"g\"\r\n\t\t\t\t\t\t|| inRGB === 2 && charStart === \"b\"\r\n\t\t\t\t\t\t|| inRGB === 3 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inRGB >= 3 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (inRGB === 3 && charStart === \"a\") {\r\n\t\t\t\t\t\t\tinRGBA = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinRGB++;\r\n\t\t\t\t\t} else if (inRGBA && charStart === \",\") {\r\n\t\t\t\t\t\tif (++inRGBA > 3) {\r\n\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ((inRGBA && inRGB < (inRGBA ? 5 : 4))\r\n\t\t\t\t\t\t|| inRGB >= (inRGBA ? 4 : 3) && charStart === \")\" && --inRGB < (inRGBA ? 5 : 4)) {\r\n\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart || charEnd) {\r\n\t\t\t\t\t// Different letters, so we're going to push them into start\r\n\t\t\t\t\t// and end until the next word\r\n\t\t\t\t\tisStringValue = true;\r\n\t\t\t\t\tif (!isString(arrayStart[arrayStart.length - 1])) {\r\n\t\t\t\t\t\tif (pattern.length === 1 && !pattern[0]) {\r\n\t\t\t\t\t\t\tarrayStart[0] = arrayEnd[0] = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(\"\");\r\n\t\t\t\t\t\t\tarrayStart.push(\"\");\r\n\t\t\t\t\t\t\tarrayEnd.push(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart++];\r\n\t\t\t\t\t\tif (charStart === \" \") {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayStart[arrayStart.length - 1] += charStart;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd++];\r\n\t\t\t\t\t\tif (charEnd === \" \") {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayEnd[arrayEnd.length - 1] += charEnd;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isForcefeed && (indexStart === startValue.length) !== (indexEnd === endValue.length)) {\r\n\t\t\t\t\t// This little piece will take a startValue, split out the\r\n\t\t\t\t\t// various numbers in it, then copy the endValue into the\r\n\t\t\t\t\t// startValue while replacing the numbers in it to match the\r\n\t\t\t\t\t// original start numbers as a repeating sequence.\r\n\t\t\t\t\t// Finally this function will run again with the new\r\n\t\t\t\t\t// startValue and a now matching pattern.\r\n\t\t\t\t\tlet startNumbers = startValue.match(/\\d\\.?\\d*/g) || [\"0\"],\r\n\t\t\t\t\t\tcount = startNumbers.length,\r\n\t\t\t\t\t\tindex = 0;\r\n\r\n\t\t\t\t\tstartValue = endValue.replace(/\\d+\\.?\\d*/g, function() {\r\n\t\t\t\t\t\treturn startNumbers[index++ % count];\r\n\t\t\t\t\t});\r\n\t\t\t\t\trunAgain = isForcefeed = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!runAgain) {\r\n\t\t\t\t// TODO: These two would be slightly better to not add the array indices in the first place\r\n\t\t\t\tif (pattern[0] === \"\" && arrayEnd[0] == null) {\r\n\t\t\t\t\tpattern.shift();\r\n\t\t\t\t\tarrayStart.shift();\r\n\t\t\t\t\tarrayEnd.shift();\r\n\t\t\t\t}\r\n\t\t\t\tif (pattern[pattern.length] === \"\" && arrayEnd[arrayEnd.length] == null) {\r\n\t\t\t\t\tpattern.pop();\r\n\t\t\t\t\tarrayStart.pop();\r\n\t\t\t\t\tarrayEnd.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif (indexStart < startValue.length || indexEnd < endValue.length) {\r\n\t\t\t\t\t// NOTE: We should never be able to reach this code unless a\r\n\t\t\t\t\t// bad forcefed value is supplied.\r\n\t\t\t\t\tconsole.error(\"Velocity: Trying to pattern match mis-matched strings \" + propertyName + \":[\\\"\" + endValue + \"\\\", \\\"\" + startValue + \"\\\"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Velocity: Pattern found:\", pattern, \" -> \", arrayStart, arrayEnd, \"[\" + startValue + \",\" + endValue + \"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (propertyName === \"display\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"none\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (propertyName === \"visibility\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"hidden\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (isStringValue\r\n\t\t\t\t\t&& easing !== \"at-start\" && easing !== \"during\" && easing !== \"at-end\"\r\n\t\t\t\t\t&& easing !== Easing.Easings[\"at-Start\"] && easing !== Easing.Easings[\"during\"] && easing !== Easing.Easings[\"at-end\"]) {\r\n\t\t\t\t\tconsole.warn(\"Velocity: String easings must use one of 'at-start', 'during' or 'at-end': {\" + propertyName + \": [\\\"\" + endValue + \"\\\", \" + easing + \", \\\"\" + startValue + \"\\\"]}\");\r\n\t\t\t\t\teasing = \"at-start\";\r\n\t\t\t\t}\r\n\t\t\t\ttween[Tween.EASING] = validateEasing(easing, duration);\r\n\t\t\t}\r\n\t\t\t// This can only run a second time once - if going from automatic startValue to \"fixed\" pattern from endValue with startValue numbers\r\n\t\t} while (runAgain);\r\n\t}\r\n\r\n\t/**\r\n\t * Expand all queued animations that haven't gone yet\r\n\t *\r\n\t * This will automatically expand the properties map for any recently added\r\n\t * animations so that the start and end values are correct.\r\n\t */\r\n\texport function validateTweens(activeCall: AnimationCall) {\r\n\t\t// This might be called on an already-ready animation\r\n\t\tif (State.firstNew === activeCall) {\r\n\t\t\tState.firstNew = activeCall._next;\r\n\t\t}\r\n\t\t// Check if we're actually already ready\r\n\t\tif (activeCall._flags & AnimationFlags.EXPANDED) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet element = activeCall.element,\r\n\t\t\ttweens = activeCall.tweens,\r\n\t\t\tduration = getValue(activeCall.options.duration, defaults.duration);\r\n\r\n\t\tfor (const propertyName in tweens) {\r\n\t\t\tconst tween = tweens[propertyName];\r\n\r\n\t\t\tif (tween[Tween.START] == null) {\r\n\t\t\t\t// Get the start value as it's not been passed in\r\n\t\t\t\tconst startValue = CSS.getPropertyValue(activeCall.element, propertyName);\r\n\r\n\t\t\t\tif (isString(startValue)) {\r\n\t\t\t\t\ttween[Tween.START] = CSS.fixColors(startValue) as any;\r\n\t\t\t\t\texplodeTween(propertyName, tween, duration);\r\n\t\t\t\t} else if (!Array.isArray(startValue)) {\r\n\t\t\t\t\tconsole.warn(\"bad type\", tween, propertyName, startValue)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (debug) {\r\n\t\t\t\tconsole.log(\"tweensContainer (\" + propertyName + \"): \" + JSON.stringify(tween), element);\r\n\t\t\t}\r\n\t\t}\r\n\t\tactiveCall._flags |= AnimationFlags.EXPANDED;\r\n\t}\r\n}\r\n","/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Validation functions used for various types of data that can be supplied.\n * All errors are reported in the non-minified version for development. If a\n * validation fails then it should return undefined.\n */\n\n/**\n * Parse a duration value and return an ms number. Optionally return a\n * default value if the number is not valid.\n */\nfunction parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tif (isNumber(duration)) {\n\t\treturn duration;\n\t}\n\n\tif (isString(duration)) {\n\t\treturn Duration[duration.toLowerCase()] || parseFloat(duration.replace(\"ms\", \"\").replace(\"s\", \"000\"));\n\t}\n\n\treturn def == null ? undefined : parseDuration(def);\n}\n\n/**\n * Validate a cache option.\n * @private\n */\nfunction validateCache(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'cache' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a begin option.\n * @private\n */\nfunction validateBegin(value: VelocityCallback): VelocityCallback {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'begin' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a complete option.\n * @private\n */\nfunction validateComplete(value: VelocityCallback, noError?: true): VelocityCallback {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'complete' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a delay option.\n * @private\n */\nfunction validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed)) {\n\t\treturn parsed;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'delay' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a duration option.\n * @private\n */\nfunction validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed) && parsed >= 0) {\n\t\treturn parsed;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'duration' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a easing option.\n * @private\n */\nfunction validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\n\tconst Easing = VelocityStatic.Easing;\n\n\tif (isString(value)) {\n\t\t// Named easing\n\t\treturn Easing.Easings[value];\n\t}\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 1) {\n\t\t\t// Steps\n\t\t\treturn Easing.generateStep(value[0]);\n\t\t}\n\t\tif (value.length === 2) {\n\t\t\t// springRK4 must be passed the animation's duration.\n\t\t\t// Note: If the springRK4 array contains non-numbers,\n\t\t\t// generateSpringRK4() returns an easing function generated with\n\t\t\t// default tension and friction values.\n\t\t\treturn Easing.generateSpringRK4(value[0], value[1], duration);\n\t\t}\n\t\tif (value.length === 4) {\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\n\t\t\t// returns undefined.\n\t\t\treturn Easing.generateBezier.apply(null, value) || false;\n\t\t}\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'easing' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a fpsLimit option.\n * @private\n */\nfunction validateFpsLimit(value: number | false): number {\n\tif (value === false) {\n\t\treturn 0;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn Math.min(parsed, 60);\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'fpsLimit' to an invalid value:\", value);\n\t}\n}\n\n\n/**\n * Validate a loop option.\n * @private\n */\nfunction validateLoop(value: number | boolean): number | true {\n\tif (value === false) {\n\t\treturn 0;\n\t} else if (value === true) {\n\t\treturn true;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn parsed;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'loop' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a progress option.\n * @private\n */\nfunction validateProgress(value: VelocityProgress): VelocityProgress {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a promise option.\n * @private\n */\nfunction validatePromise(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promise' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a promiseRejectEmpty option.\n * @private\n */\nfunction validatePromiseRejectEmpty(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a queue option.\n * @private\n */\nfunction validateQueue(value: string | false, noError?: true): string | false {\n\tif (value === false || isString(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'queue' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a repeat option.\n * @private\n */\nfunction validateRepeat(value: number | boolean): number | true {\n\tif (value === false) {\n\t\treturn 0;\n\t} else if (value === true) {\n\t\treturn true;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn parsed;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'repeat' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a speed option.\n * @private\n */\nfunction validateSpeed(value: number): number {\n\tif (isNumber(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'speed' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a sync option.\n * @private\n */\nfunction validateSync(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'sync' to an invalid value:\", value);\n\t}\n}\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Velocity version (should grab from package.json during build).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let version = VERSION;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Core \"Velocity\" function.\r\n */\r\n\r\ninterface Document {\r\n\tdocumentMode: any; // IE\r\n}\r\n\r\n/**\r\n * The main Velocity function. Acts as a gateway to everything else.\r\n */\r\nfunction VelocityFn(options: VelocityObjectArgs): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, options?: VelocityOptions): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements | void, ...__args: any[]): VelocityResult {\r\n\tconst\r\n\t\t/**\r\n\t\t * A shortcut to the default options.\r\n\t\t */\r\n\t\tdefaults = VelocityStatic.defaults,\r\n\t\t/**\r\n\t\t * Shortcut to arguments for file size.\r\n\t\t */\r\n\t\t_arguments = arguments,\r\n\t\t/**\r\n\t\t * Cache of the first argument - this is used often enough to be saved.\r\n\t\t */\r\n\t\targs0 = _arguments[0] as VelocityObjectArgs,\r\n\t\t/**\r\n\t\t * To allow for expressive CoffeeScript code, Velocity supports an\r\n\t\t * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\r\n\t\t * \"p\"), and \"options\" (or \"o\") objects are defined on a container\r\n\t\t * object that's passed in as Velocity's sole argument.\r\n\t\t *\r\n\t\t * Note: Some browsers automatically populate arguments with a\r\n\t\t * \"properties\" object. We detect it by checking for its default\r\n\t\t * \"names\" property.\r\n\t\t */\r\n\t\t// TODO: Confirm which browsers - if <=IE8 the we can drop completely\r\n\t\tsyntacticSugar = isPlainObject(args0) && (args0.p || ((isPlainObject(args0.properties) && !(args0.properties as any).names) || isString(args0.properties)));\r\n\tlet\r\n\t\t/**\r\n\t\t * When Velocity is called via the utility function (Velocity()),\r\n\t\t * elements are explicitly passed in as the first parameter. Thus,\r\n\t\t * argument positioning varies.\r\n\t\t */\r\n\t\targumentIndex: number = 0,\r\n\t\t/**\r\n\t\t * The list of elements, extended with Promise and Velocity.\r\n\t\t */\r\n\t\telements: VelocityResult,\r\n\t\t/**\r\n\t\t * The properties being animated. This can be a string, in which case it\r\n\t\t * is either a function for these elements, or it is a \"named\" animation\r\n\t\t * sequence to use instead. Named sequences start with either \"callout.\"\r\n\t\t * or \"transition.\". When used as a callout the values will be reset\r\n\t\t * after finishing. When used as a transtition then there is no special\r\n\t\t * handling after finishing.\r\n\t\t */\r\n\t\tpropertiesMap: string | VelocityProperties,\r\n\t\t/**\r\n\t\t * Options supplied, this will be mapped and validated into\r\n\t\t * options.\r\n\t\t */\r\n\t\toptionsMap: VelocityOptions,\r\n\t\t/**\r\n\t\t * If called via a chain then this contains the last calls\r\n\t\t * animations. If this does not have a value then any access to the\r\n\t\t * element's animations needs to be to the currently-running ones.\r\n\t\t */\r\n\t\tanimations: AnimationCall[],\r\n\t\t/**\r\n\t\t * The promise that is returned.\r\n\t\t */\r\n\t\tpromise: Promise,\r\n\t\t// Used when the animation is finished\r\n\t\tresolver: (value?: VelocityResult) => void,\r\n\t\t// Used when there was an issue with one or more of the Velocity arguments\r\n\t\trejecter: (reason: any) => void;\r\n\r\n\t//console.log(\"Velocity\", _arguments)\r\n\t// First get the elements, and the animations connected to the last call if\r\n\t// this is chained.\r\n\t// TODO: Clean this up a bit\r\n\t// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\r\n\tif (isNode(this)) {\r\n\t\t// This is from a chain such as document.getElementById(\"\").velocity(...)\r\n\t\telements = [this as HTMLorSVGElement] as VelocityResult;\r\n\t} else if (isWrapped(this)) {\r\n\t\t// This might be a chain from something else, but if chained from a\r\n\t\t// previous Velocity() call then grab the animations it's related to.\r\n\t\telements = Object.assign([], this as HTMLorSVGElement[]) as VelocityResult;\r\n\t\tif (isVelocityResult(this)) {\r\n\t\t\tanimations = (this as VelocityResult).velocity.animations;\r\n\t\t}\r\n\t} else if (syntacticSugar) {\r\n\t\telements = Object.assign([], args0.elements || args0.e) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isNode(args0)) {\r\n\t\telements = Object.assign([], [args0]) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isWrapped(args0)) {\r\n\t\telements = Object.assign([], args0) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t}\r\n\t// Allow elements to be chained.\r\n\tif (elements) {\r\n\t\tdefineProperty(elements, \"velocity\", VelocityFn.bind(elements));\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t// Next get the propertiesMap and options.\r\n\tif (syntacticSugar) {\r\n\t\tpropertiesMap = getValue(args0.properties, args0.p);\r\n\t} else {\r\n\t\t// TODO: Should be possible to call Velocity(\"pauseAll\") - currently not possible\r\n\t\tpropertiesMap = _arguments[argumentIndex++] as string | VelocityProperties;\r\n\t}\r\n\t// Get any options map passed in as arguments first, expand any direct\r\n\t// options if possible.\r\n\tconst isAction = isString(propertiesMap),\r\n\t\topts = syntacticSugar ? getValue(args0.options, args0.o) : _arguments[argumentIndex];\r\n\r\n\tif (isPlainObject(opts)) {\r\n\t\toptionsMap = opts;\r\n\t}\r\n\t// Create the promise if supported and wanted.\r\n\tif (Promise && getValue(optionsMap && optionsMap.promise, defaults.promise)) {\r\n\t\tpromise = new Promise(function(_resolve, _reject) {\r\n\t\t\trejecter = _reject;\r\n\t\t\t// IMPORTANT:\r\n\t\t\t// If a resolver tries to run on a Promise then it will wait until\r\n\t\t\t// that Promise resolves - but in this case we're running on our own\r\n\t\t\t// Promise, so need to make sure it's not seen as one. Setting these\r\n\t\t\t// values to undefined for the duration of the resolve.\r\n\t\t\t// Due to being an async call, they should be back to \"normal\"\r\n\t\t\t// before the .then() function gets called.\r\n\t\t\tresolver = function(args: VelocityResult) {\r\n\t\t\t\tif (isVelocityResult(args)) {\r\n\t\t\t\t\tconst _then = args && args.then;\r\n\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = undefined; // Preserving enumeration etc\r\n\t\t\t\t\t}\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = _then;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t\tif (elements) {\r\n\t\t\tdefineProperty(elements, \"then\", promise.then.bind(promise));\r\n\t\t\tdefineProperty(elements, \"catch\", promise.catch.bind(promise));\r\n\t\t\tif ((promise as any).finally) {\r\n\t\t\t\t// Semi-standard\r\n\t\t\t\tdefineProperty(elements, \"finally\", (promise as any).finally.bind(promise));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tconst promiseRejectEmpty: boolean = getValue(optionsMap && optionsMap.promiseRejectEmpty, defaults.promiseRejectEmpty);\r\n\r\n\tif (promise) {\r\n\t\tif (!elements && !isAction) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No elements supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t} else if (!propertiesMap) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No properties supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((!elements && !isAction) || !propertiesMap) {\r\n\t\treturn promise as any;\r\n\t}\r\n\r\n\t// TODO: exception for the special \"reverse\" property\r\n\t// NOTE: Can't use isAction here due to type inference - there are callbacks\r\n\t// between so the type isn't considered safe.\r\n\tif (isString(propertiesMap)) {\r\n\t\tconst args: any[] = [],\r\n\t\t\tpromiseHandler: VelocityPromise = promise && {\r\n\t\t\t\t_promise: promise,\r\n\t\t\t\t_resolver: resolver,\r\n\t\t\t\t_rejecter: rejecter\r\n\t\t\t};\r\n\r\n\t\twhile (argumentIndex < _arguments.length) {\r\n\t\t\targs.push(_arguments[argumentIndex++]);\r\n\t\t}\r\n\r\n\t\t// Velocity's behavior is categorized into \"actions\". If a string is\r\n\t\t// passed in instead of a propertiesMap then that will call a function\r\n\t\t// to do something special to the animation linked.\r\n\t\t// There is one special case - \"reverse\" - which is handled differently,\r\n\t\t// by being stored on the animation and then expanded when the animation\r\n\t\t// starts.\r\n\t\tconst action = propertiesMap.replace(/\\..*$/, \"\"),\r\n\t\t\tcallback = VelocityStatic.Actions[action] || VelocityStatic.Actions[\"default\"];\r\n\r\n\t\tif (callback) {\r\n\t\t\tconst result = callback(args, elements, promiseHandler, propertiesMap);\r\n\r\n\t\t\tif (result !== undefined) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"VelocityJS: Unknown action:\", propertiesMap);\r\n\t\t}\r\n\t} else if (isPlainObject(propertiesMap)) {\r\n\t\t/**\r\n\t\t * The options for this set of animations.\r\n\t\t */\r\n\t\tconst options: StrictVelocityOptions = {};\r\n\t\tlet isSync = defaults.sync;\r\n\r\n\t\t// Private options first - set as non-enumerable, and starting with an\r\n\t\t// underscore so we can filter them out.\r\n\t\tif (promise) {\r\n\t\t\tdefineProperty(options, \"_promise\", promise);\r\n\t\t\tdefineProperty(options, \"_rejecter\", rejecter);\r\n\t\t\tdefineProperty(options, \"_resolver\", resolver);\r\n\t\t}\r\n\t\tdefineProperty(options, \"_ready\", 0);\r\n\t\tdefineProperty(options, \"_started\", 0);\r\n\t\tdefineProperty(options, \"_completed\", 0);\r\n\t\tdefineProperty(options, \"_total\", 0);\r\n\r\n\t\t// Now check the optionsMap\r\n\t\tif (isPlainObject(optionsMap)) {\r\n\t\t\toptions.duration = getValue(validateDuration(optionsMap.duration), defaults.duration);\r\n\t\t\toptions.delay = getValue(validateDelay(optionsMap.delay), defaults.delay);\r\n\t\t\t// Need the extra fallback here in case it supplies an invalid\r\n\t\t\t// easing that we need to overrride with the default.\r\n\t\t\toptions.easing = validateEasing(getValue(optionsMap.easing, defaults.easing), options.duration) || validateEasing(defaults.easing, options.duration);\r\n\t\t\toptions.loop = getValue(validateLoop(optionsMap.loop), defaults.loop);\r\n\t\t\toptions.repeat = options.repeatAgain = getValue(validateRepeat(optionsMap.repeat), defaults.repeat);\r\n\t\t\tif (optionsMap.speed != null) {\r\n\t\t\t\toptions.speed = getValue(validateSpeed(optionsMap.speed), 1);\r\n\t\t\t}\r\n\t\t\tif (isBoolean(optionsMap.promise)) {\r\n\t\t\t\toptions.promise = optionsMap.promise;\r\n\t\t\t}\r\n\t\t\toptions.queue = getValue(validateQueue(optionsMap.queue), defaults.queue);\r\n\t\t\tif (optionsMap.mobileHA && !VelocityStatic.State.isGingerbread) {\r\n\t\t\t\t/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)\r\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\r\n\t\t\t\t/* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */\r\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */\r\n\t\t\t\toptions.mobileHA = true;\r\n\t\t\t}\r\n\t\t\tif (optionsMap.display != null) {\r\n\t\t\t\t(propertiesMap as VelocityProperties).display = optionsMap.display as string;\r\n\t\t\t\tconsole.error(\"Deprecated 'options.display' used, this is now a property:\", optionsMap.display);\r\n\t\t\t}\r\n\t\t\tif (optionsMap.visibility != null) {\r\n\t\t\t\t(propertiesMap as VelocityProperties).visibility = optionsMap.visibility as string;\r\n\t\t\t\tconsole.error(\"Deprecated 'options.visibility' used, this is now a property:\", optionsMap.visibility);\r\n\t\t\t}\r\n\t\t\t// TODO: Allow functional options for different options per element\r\n\t\t\tconst optionsBegin = validateBegin(optionsMap.begin),\r\n\t\t\t\toptionsComplete = validateComplete(optionsMap.complete),\r\n\t\t\t\toptionsProgress = validateProgress(optionsMap.progress),\r\n\t\t\t\toptionsSync = validateSync(optionsMap.sync);\r\n\r\n\t\t\tif (optionsBegin != null) {\r\n\t\t\t\toptions.begin = optionsBegin;\r\n\t\t\t}\r\n\t\t\tif (optionsComplete != null) {\r\n\t\t\t\toptions.complete = optionsComplete;\r\n\t\t\t}\r\n\t\t\tif (optionsProgress != null) {\r\n\t\t\t\toptions.progress = optionsProgress;\r\n\t\t\t}\r\n\t\t\tif (optionsSync != null) {\r\n\t\t\t\tisSync = optionsSync;\r\n\t\t\t}\r\n\t\t} else if (!syntacticSugar) {\r\n\t\t\t// Expand any direct options if possible.\r\n\t\t\tconst duration = validateDuration(_arguments[argumentIndex], true);\r\n\t\t\tlet offset = 0;\r\n\r\n\t\t\tif (duration !== undefined) {\r\n\t\t\t\toffset++;\r\n\t\t\t\toptions.duration = duration;\r\n\t\t\t}\r\n\t\t\tif (!isFunction(_arguments[argumentIndex + offset])) {\r\n\t\t\t\t// Despite coming before Complete, we can't pass a fn easing\r\n\t\t\t\tconst easing = validateEasing(_arguments[argumentIndex + offset], getValue(options && validateDuration(options.duration), defaults.duration) as number, true);\r\n\r\n\t\t\t\tif (easing !== undefined) {\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t\toptions.easing = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconst complete = validateComplete(_arguments[argumentIndex + offset], true);\r\n\r\n\t\t\tif (complete !== undefined) {\r\n\t\t\t\toptions.complete = complete;\r\n\t\t\t}\r\n\t\t\toptions.loop = defaults.loop;\r\n\t\t\toptions.repeat = options.repeatAgain = defaults.repeat;\r\n\t\t}\r\n\r\n\t\t/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.\r\n\t\t In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */\r\n\t\t/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,\r\n\t\t the call array is pushed to VelocityStatic.State.calls for live processing by the requestAnimationFrame tick. */\r\n\r\n\t\tconst rootAnimation: AnimationCall = {\r\n\t\t\t_prev: undefined,\r\n\t\t\t_next: undefined,\r\n\t\t\t_flags: isSync ? AnimationFlags.SYNC : 0,\r\n\t\t\toptions: options,\r\n\t\t\tpercentComplete: 0,\r\n\t\t\t//element: element,\r\n\t\t\telements: elements,\r\n\t\t\tellapsedTime: 0,\r\n\t\t\ttimeStart: 0\r\n\t\t};\r\n\r\n\t\tanimations = [];\r\n\t\tfor (let index = 0; index < elements.length; index++) {\r\n\t\t\tconst element = elements[index];\r\n\r\n\t\t\tif (isNode(element)) {\r\n\t\t\t\tconst tweens = Object.create(null),\r\n\t\t\t\t\tanimation: AnimationCall = Object.assign({\r\n\t\t\t\t\t\telement: element,\r\n\t\t\t\t\t\ttweens: tweens\r\n\t\t\t\t\t}, rootAnimation);\r\n\r\n\t\t\t\toptions._total++;\r\n\t\t\t\tanimations.push(animation);\r\n\t\t\t\tVelocityStatic.expandProperties(animation, propertiesMap);\r\n\t\t\t\tVelocityStatic.queue(element, animation, getValue(animation.queue, options.queue));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (VelocityStatic.State.isTicking === false) {\r\n\t\t\t// If the animation tick isn't running, start it. (Velocity shuts it\r\n\t\t\t// off when there are no active calls to process.)\r\n\t\t\tVelocityStatic.tick();\r\n\t\t}\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t/***************\r\n\t Chaining\r\n\t ***************/\r\n\r\n\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\r\n\treturn elements || promise as any;\r\n};\r\n\r\n\r\n/***************\r\n Summary\r\n ***************/\r\n\r\n/*\r\n - CSS: CSS stack that works independently from the rest of Velocity.\r\n - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.\r\n - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options.\r\n - Queueing: The logic that runs once the call has reached its point of execution in the element's queue stack.\r\n Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed).\r\n - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.\r\n - completeCall(): Handles the cleanup process for each Velocity call.\r\n */\r\n\r\n/*********************\r\n Helper Functions\r\n *********************/\r\n\r\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\r\nvar IE = (function() {\r\n\tif (document.documentMode) {\r\n\t\treturn document.documentMode;\r\n\t} else {\r\n\t\tfor (let i = 7; i > 4; i--) {\r\n\t\t\tlet div = document.createElement(\"div\");\r\n\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\r\n\t\t\t\tdiv = null;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n})();\r\n\r\n/******************\r\n Unsupported\r\n ******************/\r\n\r\nif (IE <= 8) {\r\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\r\n}\r\n\r\n/******************\r\n Frameworks\r\n ******************/\r\n\r\ninterface Window {\r\n\tjQuery: {fn?: any};\r\n\tZepto: {fn?: any};\r\n\tVelocity: any;\r\n}\r\n\r\nif (window === this) {\r\n\t/*\r\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\r\n\t * wrapped elements to be subjected to plugin calls. If either framework is\r\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\r\n\t * animate() method. Velocity also registers itself onto a global container\r\n\t * (window.jQuery || window.Zepto || window) so that certain features are\r\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\r\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\r\n\t * elements.\r\n\t */\r\n\tconst patch = VelocityStatic.patch,\r\n\t\tjQuery = window.jQuery,\r\n\t\tZepto = window.Zepto;\r\n\r\n\tpatch(window, true);\r\n\tpatch(Element && Element.prototype);\r\n\tpatch(NodeList && NodeList.prototype);\r\n\tpatch(HTMLCollection && HTMLCollection.prototype);\r\n\r\n\tpatch(jQuery, true);\r\n\tpatch(jQuery && jQuery.fn);\r\n\r\n\tpatch(Zepto, true);\r\n\tpatch(Zepto && Zepto.fn);\r\n}\r\n\r\n/******************\r\n Known Issues\r\n ******************/\r\n\r\n/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.\r\n Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties\r\n will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */\r\n","///\r\n///\r\n///\r\n///\r\n///\r\n///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Merge the VelocityStatic namespace onto the Velocity function for external\r\n * use. This is done as a read-only way. Any attempt to change these values will\r\n * be allowed.\r\n */\r\nfor (const key in VelocityStatic) {\r\n\tObject.defineProperty(VelocityFn, key, {\r\n\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\tget: function() {\r\n\t\t\treturn VelocityStatic[key];\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// console.log(\"Velocity keys\", Object.keys(VelocityStatic));\r\n"]} \ No newline at end of file +{"version":3,"sources":["../src/constants.ts","../src/types.ts","../src/utility.ts","../src/Velocity/actions/actions.ts","../src/Velocity/actions/defaultAction.ts","../src/Velocity/actions/finish.ts","../src/Velocity/actions/option.ts","../src/Velocity/actions/pauseResume.ts","../src/Velocity/actions/reverse.ts","../src/Velocity/actions/stop.ts","../src/Velocity/actions/style.ts","../src/Velocity/actions/tween.ts","../src/Velocity/state.ts","../src/Velocity/css/camelCase.ts","../src/Velocity/css/fixColors.ts","../src/Velocity/css/colors.ts","../src/Velocity/css/getPropertyValue.ts","../src/Velocity/css/getUnit.ts","../src/Velocity/css/regex.ts","../src/Velocity/css/setPropertyValue.ts","../src/Velocity/easing/easings.ts","../src/Velocity/easing/bezier.ts","../src/Velocity/easing/bounce.ts","../src/Velocity/easing/elastic.ts","../src/Velocity/easing/spring_rk4.ts","../src/Velocity/easing/step.ts","../src/Velocity/easing/string.ts","../src/Velocity/normalizations/normalizations.ts","../src/Velocity/normalizations/svg/attributes.ts","../src/Velocity/normalizations/svg/dimensions.ts","../src/Velocity/normalizations/dimensions.ts","../src/Velocity/normalizations/display.ts","../src/Velocity/normalizations/genericReordering.ts","../src/Velocity/normalizations/scroll.ts","../src/Velocity/normalizations/vendorPrefix.ts","../src/Velocity/complete.ts","../src/Velocity/data.ts","../src/Velocity/debug.ts","../src/Velocity/defaults.ts","../src/Velocity/mock.ts","../src/Velocity/patch.ts","../src/Velocity/queue.ts","../src/Velocity/redirects.ts","../src/Velocity/registereffect.ts","../src/Velocity/runsequence.ts","../src/Velocity/tick.ts","../src/Velocity/timestamp.ts","../src/Velocity/tweens.ts","../src/Velocity/validate.ts","../src/Velocity/version.ts","../src/core.ts","../src/app.ts"],"names":["PUBLIC_MEMBERS","ALL_VENDOR_PREFIXES","DURATION_FAST","DURATION_NORMAL","DURATION_SLOW","FUZZY_MS_PER_SECOND","DEFAULT_CACHE","DEFAULT_DELAY","DEFAULT_DURATION","DEFAULT_EASING","DEFAULT_FPSLIMIT","DEFAULT_LOOP","DEFAULT_PROMISE","DEFAULT_PROMISE_REJECT_EMPTY","DEFAULT_QUEUE","DEFAULT_REPEAT","DEFAULT_SPEED","DEFAULT_SYNC","TWEEN_NUMBER_REGEX","CLASSNAME","VERSION","Duration","fast","normal","slow","isBoolean","variable","isNumber","isNumberWhenParsed","isNaN","Number","isString","isFunction","Object","prototype","toString","call","isNode","nodeType","isVelocityResult","length","velocity","propertyIsEnumerable","object","property","isWrapped","window","isSVG","SVGElement","isPlainObject","proto","getPrototypeOf","hasOwnProperty","constructor","isEmptyObject","name_1","defineProperty","name","value","configurable","writable","_deepCopyObject","target","sources","_i","arguments","TypeError","to","source","shift","key","Array","isArray","_now","Date","now","getTime","_inArray","array","i","sanitizeElements","elements","getValue","args","_args","_arg","undefined","addClass","element","className","Element","classList","add","removeClass","remove","replace","RegExp","VelocityStatic","Actions","create","registerAction","internal","callback","console","warn","defaultAction","promiseHandler","action","Redirects","options","opts_1","__assign","durationOriginal_1","parseFloat","duration","delayOriginal_1","delay","backwards","reverse","forEach","elementIndex","stagger","drag","test","Math","max","_resolver","abortError","_rejecter","Error","log","checkAnimationShouldBeFinished","animation","queueName","defaultQueue","validateTweens","queue","_flags","_started","_first","begin","callBegin","tweens","tween_1","pattern","currentValue","endValue","CSS","setPropertyValue","completeCall","finish","validateQueue","defaults","finishAll","animations","activeCall","State","first","nextCall","firstNew","_next","then","animationFlags","isExpanded","isReady","isStarted","isStopped","isPaused","isSync","isReverse","option","indexOf","push","result","flag","isPercentComplete","validateCache","validateBegin","validateComplete","validateDelay","validateDuration","validateFpsLimit","validateLoop","validateRepeat","num","timeStart","lastTick","checkAnimation","pauseResume","SyntaxError","checkAnimationShouldBeStopped","stop","style","styleAction","getPropertyValue","error","propertyName","value_1","String","tween","percentComplete","properties","easing","tweenAction","requireForcefeeding","info","document","body","fakeAnimation","singleResult","count","_a","activeEasing","validateEasing","expandProperties","tween_2","easing_1","rounding","startValue","result_1","round","isClient","isMobile","navigator","userAgent","isAndroid","isGingerbread","isChrome","chrome","isFirefox","prefixElement","createElement","windowScrollAnchor","pageYOffset","scrollAnchor","documentElement","parentNode","scrollPropertyLeft","scrollPropertyTop","isTicking","cache","camelCase","fixed","match","subMatch","toUpperCase","ColorNames","makeRGBA","ignore","r","g","b","parseInt","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","fixColors","str","$0","$1","$2","colorValues","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","name_2","color","floor","computePropertyValue","data","Data","computedStyle","getComputedStyle","computedValue","toggleDisplay","augmentDimension","topLeft","position","getBoundingClientRect","skipNormalisation","skipCache","propertyValue","NoCacheNormalizations","has","debug","types","best","index","Normalizations","Units","getUnit","start","units","unit","j","RegEx","isHex","valueUnwrap","wrappedValueAlreadyExtracted","valueSplit","Easing","Easings","registerEasing","cos","PI","exp","fixRange","min","A","aA1","aA2","B","C","calcBezier","aT","getSlope","generateBezier","mX1","mY1","mX2","mY2","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","isFinite","mSampleValues","Float32Array","newtonRaphsonIterate","aX","aGuessT","currentSlope","currentX","calcSampleValues","binarySubdivide","aA","aB","currentT","abs","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","_precomputed","precompute","f","getControlPoints","x","y","easeIn","easeOut","easeInOut","easeOutBounce","easeInBounce","pi2","registerElasticIn","amplitude","period","pow","sin","asin","registerElasticOut","registerElasticInOut","s","springAccelerationForState","state","tension","friction","v","springEvaluateStateWithDerivative","initialState","dt","derivative","dx","dv","springIntegrateState","a","c","d","dxdt","dvdt","generateSpringRK4","initState","path","time_lapsed","tolerance","DT","have_duration","last_state","generateStep","steps","fn","Set","constructors","registerNormalization","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","globals","subtype","exec","createElementNS","toLowerCase","attribute","getDimension","getBBox","e","wantInner","isBorderBox","sides","fields","augment","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","genericReordering","split","firstPart","newValue","join","matchedString","trim","clientWidth","scrollWidth","clientHeight","scrollHeight","scrollTop","clientHeight_1","scrollHeight_1","HTMLElement","vendorPrefix","unprefixed","vendors","$","letter","callComplete","complete","setTimeout","isLoop","loop","isRepeat","repeat","repeatAgain","lastFinishList","ellapsedTime","_completed","_total","resolver","dequeue","freeAnimationCall","newData","queueList","lastAnimationList","_cache","_begin","_complete","_delay","_duration","_easing","_fpsLimit","_loop","_minFrameTime","_promise","_promiseRejectEmpty","_queue","_repeat","_speed","_sync","mobileHA","defineProperties","reset","enumerable","get","set","fpsLimit","minFrameTime","promise","validatePromise","promiseRejectEmpty","validatePromiseRejectEmpty","speed","validateSpeed","sync","validateSync","mock","patch","global","VelocityFn","animate","prev","last","_prev","skip","next","direction","elementsIndex","elementsSize","opts","inlineValues","computedValues","height","marginTop","marginBottom","paddingTop","paddingBottom","isInline","overflow","promiseData","propertiesMap","opacity","this","animateParentHeight","totalDuration","totalHeightDelta","propertiesToSum","RegisterEffect","effectName","redirectOptions","finalElement","defaultDuration","callIndex","calls","durationPercentage","shareDuration","propertyMap","redirectDuration","callOptions","visibility","injectFinalCallbacks_1","resetProperty","resetValue","resetOptions","RunSequence","originalSequence","sequence","currentCall","currentCallOptions","o","nextCallOptions","timing","sequenceQueue","callbackOriginal_1","nextCallElements","callProgress","timeCurrent","tweenValue","progress","firstProgress","firstComplete","asyncCallbacks","_nextProgress","_nextComplete","FRAME_TIME","performance","perf","nowOffset_1","navigationStart","rAFProxy","rAFShim","requestAnimationFrame","ticker","hidden","addEventListener","updateTicker","event","tick","ticking","timestamp","deltaTime","defaultSpeed","defaultEasing","lastProgress","lastComplete","flags","queue_1","_ready","delta","millisecondsEllapsed","tween_3","JSON","stringify","Tween","commands","Map","elementArrayIndex","getUnitType","degree","unitless","valueData","found","tween_4","arr1","arr2","explodeTween","isForcefeed","runAgain","arrayStart","arrayEnd","indexStart","indexEnd","inCalc","inRGB","inRGBA","isStringValue","charStart","charEnd","tempStart","tempEnd","dotStart","dotEnd","unitStart","unitEnd","startNumbers_1","count_1","index_1","pop","tween_5","parseDuration","def","noError","parsed","apply","validateProgress","version","__args","_arguments","args0","syntacticSugar","p","names","argumentIndex","optionsMap","rejecter","assign","bind","isAction","Promise","_resolve","_reject","_then","catch","finally","optionsBegin","optionsComplete","optionsProgress","optionsSync","offset","rootAnimation","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,mBAAkB,WAAW,kBAAkB,SAAS,SAAS;;;;;;AAKvE,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,kBAAkB;;AACxB,IAAMC,gBAAgB;;AAEtB,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,gBAAgB;;AACtB,IAAMC,mBAAmBL;;AACzB,IAAMM,iBAAiB;;AACvB,IAAMC,mBAAmB;;AACzB,IAAMC,eAAe;;AACrB,IAAMC,kBAAkB;;AACxB,IAAMC,+BAA+B;;AACrC,IAAMC,gBAAgB;;AACtB,I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K,QAAQrG,QAAQ;QAC3CkjB,KAAK;YACJ,OAAOvhB,eAAe3B;;;;;;;;;;;;;;;;;;;;AAJzB,KAAK,IAAMA,OAAO2B,gBAAe;YAAtB3B","file":"velocity.js","sourceRoot":"src/","sourcesContent":["/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Constants and defaults. These values should never change without a MINOR\r\n * version bump.\r\n */\r\n\r\n//[\"completeCall\", \"CSS\", \"State\", \"getEasing\", \"Easings\", \"data\", \"debug\", \"defaults\", \"hook\", \"init\", \"mock\", \"pauseAll\", \"queue\", \"dequeue\", \"freeAnimationCall\", \"Redirects\", \"RegisterEffect\", \"resumeAll\", \"RunSequence\", \"lastTick\", \"tick\", \"timestamp\", \"expandTween\", \"version\"]\r\nconst PUBLIC_MEMBERS = [\"version\", \"RegisterEffect\", \"style\", \"patch\", \"timestamp\"];\r\n/**\r\n * Without this it will only un-prefix properties that have a valid \"normal\"\r\n * version.\r\n */\r\nconst ALL_VENDOR_PREFIXES = true;\r\n\r\nconst DURATION_FAST = 200;\r\nconst DURATION_NORMAL = 400;\r\nconst DURATION_SLOW = 600;\r\n\r\nconst FUZZY_MS_PER_SECOND = 980;\r\n\r\nconst DEFAULT_CACHE = true;\r\nconst DEFAULT_DELAY = 0;\r\nconst DEFAULT_DURATION = DURATION_NORMAL;\r\nconst DEFAULT_EASING = \"swing\";\r\nconst DEFAULT_FPSLIMIT = 60;\r\nconst DEFAULT_LOOP = 0;\r\nconst DEFAULT_PROMISE = true;\r\nconst DEFAULT_PROMISE_REJECT_EMPTY = true;\r\nconst DEFAULT_QUEUE = \"\";\r\nconst DEFAULT_REPEAT = 0;\r\nconst DEFAULT_SPEED = 1;\r\nconst DEFAULT_SYNC = true;\r\nconst TWEEN_NUMBER_REGEX = /[\\d\\.-]/;\r\n\r\nconst CLASSNAME = \"velocity-animating\";\r\n\r\nconst VERSION = \"2.0.0\";\r\n\r\nconst Duration = {\r\n\t\"fast\": DURATION_FAST,\r\n\t\"normal\": DURATION_NORMAL,\r\n\t\"slow\": DURATION_SLOW,\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Runtime type checking methods.\r\n */\r\n\r\nfunction isBoolean(variable): variable is boolean {\r\n\treturn variable === true || variable === false;\r\n}\r\n\r\nfunction isNumber(variable): variable is number {\r\n\treturn typeof variable === \"number\";\r\n}\r\n\r\n/**\r\n * Faster way to parse a string/number as a number https://jsperf.com/number-vs-parseint-vs-plus/3\r\n * @param variable The given string or number\r\n * @returns {variable is number} Returns boolean true if it is a number, false otherwise\r\n */\r\nfunction isNumberWhenParsed(variable: string | number): variable is number {\r\n\treturn !isNaN(Number(variable));\r\n}\r\n\r\nfunction isString(variable): variable is string {\r\n\treturn typeof variable === \"string\";\r\n}\r\n\r\nfunction isFunction(variable): variable is Function {\r\n\treturn Object.prototype.toString.call(variable) === \"[object Function]\";\r\n}\r\n\r\nfunction isNode(variable): variable is HTMLorSVGElement {\r\n\treturn !!(variable && variable.nodeType);\r\n}\r\n\r\nfunction isVelocityResult(variable): variable is VelocityResult {\r\n\treturn variable && isNumber(variable.length) && isFunction((variable as VelocityResult).velocity);\r\n}\r\n\r\nfunction propertyIsEnumerable(object: Object, property: string): boolean {\r\n\treturn Object.prototype.propertyIsEnumerable.call(object, property);\r\n}\r\n\r\n/* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */\r\n\r\n/* NOTE: HTMLFormElements also have a length. */\r\nfunction isWrapped(variable): variable is HTMLorSVGElement[] {\r\n\treturn variable\r\n\t\t&& variable !== window\r\n\t\t&& isNumber(variable.length)\r\n\t\t&& !isString(variable)\r\n\t\t&& !isFunction(variable)\r\n\t\t&& !isNode(variable)\r\n\t\t&& (variable.length === 0 || isNode(variable[0]));\r\n}\r\n\r\nfunction isSVG(variable): variable is SVGElement {\r\n\treturn SVGElement && variable instanceof SVGElement;\r\n}\r\n\r\nfunction isPlainObject(variable): variable is {} {\r\n\tif (!variable || typeof variable !== \"object\" || variable.nodeType || Object.prototype.toString.call(variable) !== \"[object Object]\") {\r\n\t\treturn false;\r\n\t}\r\n\tlet proto = Object.getPrototypeOf(variable) as Object;\r\n\r\n\treturn !proto || (proto.hasOwnProperty(\"constructor\") && proto.constructor === Object);\r\n}\r\n\r\nfunction isEmptyObject(variable): variable is {} {\r\n\tfor (let name in variable) {\r\n\t\tif (variable.hasOwnProperty(name)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\n/**\r\n * The defineProperty() function provides a\r\n * shortcut to defining a property that cannot be accidentally iterated across.\r\n */\r\nfunction defineProperty(proto: any, name: string, value: Function | any) {\r\n\tif (proto) {\r\n\t\tObject.defineProperty(proto, name, {\r\n\t\t\tconfigurable: true,\r\n\t\t\twritable: true,\r\n\t\t\tvalue: value\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Perform a deep copy of an object - also copies children so they're not\r\n * going to be affected by changing original.\r\n */\r\nfunction _deepCopyObject(target: T, ...sources: U[]): T & U {\r\n\tif (target == null) { // TypeError if undefined or null\r\n\t\tthrow new TypeError(\"Cannot convert undefined or null to object\");\r\n\t}\r\n\tconst to = Object(target),\r\n\t\thasOwnProperty = Object.prototype.hasOwnProperty;\r\n\tlet source: any;\r\n\r\n\twhile ((source = sources.shift())) {\r\n\t\tif (source != null) {\r\n\t\t\tfor (const key in source) {\r\n\t\t\t\tif (hasOwnProperty.call(source, key)) {\r\n\t\t\t\t\tconst value = source[key];\r\n\r\n\t\t\t\t\tif (Array.isArray(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = [], value);\r\n\t\t\t\t\t} else if (isPlainObject(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = {}, value);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tto[key] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn to;\r\n}\r\n\r\n/**\r\n * Shim to get the current milliseconds - on anything except old IE it'll use\r\n * Date.now() and save creating an object. If that doesn't exist then it'll\r\n * create one that gets GC.\r\n */\r\nconst _now = Date.now ? Date.now : function() {\r\n\treturn (new Date()).getTime();\r\n};\r\n\r\n/**\r\n * Check whether a value belongs to an array\r\n * https://jsperf.com/includes-vs-indexof-vs-while-loop/6\r\n * @param array The given array\r\n * @param value The given element to check if it is part of the array\r\n * @returns {boolean} True if it exists, false otherwise\r\n */\r\nfunction _inArray(array: T[], value: T): boolean {\r\n\tlet i = 0;\r\n\r\n\twhile (i < array.length) {\r\n\t\tif (array[i++] === value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Convert an element or array-like element list into an array if needed.\r\n */\r\nfunction sanitizeElements(elements: HTMLorSVGElement | HTMLorSVGElement[]): HTMLorSVGElement[] {\r\n\tif (isNode(elements)) {\r\n\t\treturn [elements];\r\n\t}\r\n\treturn elements as HTMLorSVGElement[];\r\n}\r\n\r\n/**\r\n * When there are multiple locations for a value pass them all in, then get the\r\n * first value that is valid.\r\n */\r\nfunction getValue(...args: T[]): T;\r\nfunction getValue(args: any): T {\r\n\tfor (let i = 0, _args = arguments; i < _args.length; i++) {\r\n\t\tconst _arg = _args[i];\r\n\r\n\t\tif (_arg !== undefined && _arg === _arg) {\r\n\t\t\treturn _arg;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Add a single className to an Element.\r\n */\r\nfunction addClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.add(className);\r\n\t\t} else {\r\n\t\t\tremoveClass(element, className);\r\n\t\t\telement.className += (element.className.length ? \" \" : \"\") + className;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Remove a single className from an Element.\r\n */\r\nfunction removeClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.remove(className);\r\n\t\t} else {\r\n\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\r\n\t\t\telement.className = element.className.toString().replace(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\", \"gi\"), \" \");\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\r\n\t * but they still exist). Otherwise they can be replaced by users.\r\n\t * \r\n\t * All external method calls should be using actions rather than sub-calls\r\n\t * of Velocity itself.\r\n\t */\r\n\texport const Actions: {[name: string]: VelocityActionFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register an action. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerAction\", \"name\", VelocityActionFn);\r\n\t * \r\n\t * @private\r\n\t */\r\n\texport function registerAction(args?: [string, VelocityActionFn], internal?: boolean) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Actions[name] && !propertyIsEnumerable(Actions, name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override internal 'registerAction' callback\", name);\r\n\t\t} else if (internal === true) {\r\n\t\t\tdefineProperty(Actions, name, callback);\r\n\t\t} else {\r\n\t\t\tActions[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerAction\", registerAction as any], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Default action.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have\r\n\t * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element\r\n\t * is stopped, the next item in its animation queue is immediately triggered.\r\n\t * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the \"fx\" queue)\r\n\t * or a custom queue string can be passed in.\r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t * regardless of the element's current queue state.\r\n\t * \r\n\t * @param {HTMLorSVGElement[]} elements The collection of HTML or SVG elements\r\n\t * @param {StrictVelocityOptions} The strict Velocity options\r\n\t * @param {Promise} An optional promise if the user uses promises\r\n\t * @param {(value?: (HTMLorSVGElement[] | VelocityResult)) => void} resolver The resolve method of the promise\r\n\t */\r\n\tfunction defaultAction(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\t// TODO: default is wrong, should be runSequence based, and needs all arguments\r\n\t\tif (isString(action) && VelocityStatic.Redirects[action]) {\r\n\t\t\tconst options = isPlainObject(args[0]) ? args[0] as VelocityOptions : {},\r\n\t\t\t\topts = {...options},\r\n\t\t\t\tdurationOriginal = parseFloat(options.duration as any),\r\n\t\t\t\tdelayOriginal = parseFloat(options.delay as any) || 0;\r\n\r\n\t\t\t/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */\r\n\t\t\tif (opts.backwards === true) {\r\n\t\t\t\telements = elements.reverse();\r\n\t\t\t}\r\n\r\n\t\t\t/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */\r\n\t\t\telements.forEach(function(element, elementIndex) {\r\n\r\n\t\t\t\t/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */\r\n\t\t\t\tif (parseFloat(opts.stagger as string)) {\r\n\t\t\t\t\topts.delay = delayOriginal + (parseFloat(opts.stagger as string) * elementIndex);\r\n\t\t\t\t} else if (isFunction(opts.stagger)) {\r\n\t\t\t\t\topts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elements.length);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)\r\n the duration of each element's animation, using floors to prevent producing very short durations. */\r\n\t\t\t\tif (opts.drag) {\r\n\t\t\t\t\t/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */\r\n\t\t\t\t\topts.duration = durationOriginal || (/^(callout|transition)/.test(action) ? 1000 : DEFAULT_DURATION);\r\n\r\n\t\t\t\t\t/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,\r\n B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).\r\n The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */\r\n\t\t\t\t\topts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elements.length : (elementIndex + 1) / elements.length), opts.duration * 0.75, 200);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to\r\n reduce the opts checking logic required inside the redirect. */\r\n\t\t\t\tVelocityStatic.Redirects[action].call(element, element, opts, elementIndex, elements.length, elements, promiseHandler && promiseHandler._resolver);\r\n\t\t\t});\r\n\r\n\t\t\t/* Since the animation logic resides within the redirect's own code, abort the remainder of this call.\r\n (The performance overhead up to this point is virtually non-existant.) */\r\n\t\t\t/* Note: The jQuery call chain is kept intact by returning the complete element set. */\r\n\t\t} else {\r\n\t\t\tconst abortError = \"Velocity: First argument (\" + action + \") was not a property map, a known action, or a registered redirect. Aborting.\";\r\n\r\n\t\t\tif (promiseHandler) {\r\n\t\t\t\tpromiseHandler._rejecter(new Error(abortError));\r\n\t\t\t} else if (window.console) {\r\n\t\t\t\tconsole.log(abortError);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"default\", defaultAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Finish all animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be finished, and if so we set the tweens to\r\n\t * the final value for it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeFinished(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (!(animation._flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t// Copied from tick.ts - ensure that the animation is completely\r\n\t\t\t\t// valid and run begin() before complete().\r\n\t\t\t\tconst options = animation.options;\r\n\r\n\t\t\t\t// The begin callback is fired once per call, not once per\r\n\t\t\t\t// element, and is passed the full raw DOM element set as both\r\n\t\t\t\t// its context and its first argument.\r\n\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\toptions._first = animation;\r\n\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\tcallBegin(animation);\r\n\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanimation._flags |= AnimationFlags.STARTED;\r\n\t\t\t}\r\n\t\t\tfor (const property in animation.tweens) {\r\n\t\t\t\tconst tween = animation.tweens[property],\r\n\t\t\t\t\tpattern = tween[Tween.PATTERN];\r\n\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\tif (pattern) {\r\n\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\tconst endValue = tween[Tween.END][i];\r\n\r\n\t\t\t\t\t\tcurrentValue += endValue == null ? pattern[i] : endValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tCSS.setPropertyValue(animation.element, property, currentValue);\r\n\t\t\t}\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the finish action is triggered, the elements' currently active call is\r\n\t * immediately finished. When an element is finished, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are finished. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t */\r\n\tfunction finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeFinished(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeFinished(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"finish\", finish], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a value from one or more running animations.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to map getters for the various AnimationFlags.\r\n\t */\r\n\tconst animationFlags: {[key: string]: number} = {\r\n\t\t\"isExpanded\": AnimationFlags.EXPANDED,\r\n\t\t\"isReady\": AnimationFlags.READY,\r\n\t\t\"isStarted\": AnimationFlags.STARTED,\r\n\t\t\"isStopped\": AnimationFlags.STOPPED,\r\n\t\t\"isPaused\": AnimationFlags.PAUSED,\r\n\t\t\"isSync\": AnimationFlags.SYNC,\r\n\t\t\"isReverse\": AnimationFlags.REVERSE\r\n\t};\r\n\r\n\t/**\r\n\t * Get or set an option or running AnimationCall data value. If there is no\r\n\t * value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t */\r\n\tfunction option(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst key = args[0],\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(queue, true);\r\n\t\tlet animations: AnimationCall[],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!key) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant key!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If we're chaining the return value from Velocity then we are only\r\n\t\t// interested in the values related to that call\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tanimations = elements.velocity.animations;\r\n\t\t} else {\r\n\t\t\tanimations = [];\r\n\r\n\t\t\tfor (let activeCall = State.first; activeCall; activeCall = activeCall._next) {\r\n\t\t\t\tif (elements.indexOf(activeCall.element) >= 0 && getValue(activeCall.queue, activeCall.options.queue) === queueName) {\r\n\t\t\t\t\tanimations.push(activeCall);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If we're dealing with multiple elements that are pointing at a\r\n\t\t\t// single running animation, then instead treat them as a single\r\n\t\t\t// animation.\r\n\t\t\tif (elements.length > 1 && animations.length > 1) {\r\n\t\t\t\tlet i = 1,\r\n\t\t\t\t\toptions = animations[0].options;\r\n\r\n\t\t\t\twhile (i < animations.length) {\r\n\t\t\t\t\tif (animations[i++].options !== options) {\r\n\t\t\t\t\t\toptions = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// TODO: this needs to check that they're actually a sync:true animation to merge the results, otherwise the individual values may be different\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tanimations = [animations[0]];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined) {\r\n\t\t\tconst result = [],\r\n\t\t\t\tflag = animationFlags[key];\r\n\r\n\t\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\t\tif (flag === undefined) {\r\n\t\t\t\t\t// A normal key to get.\r\n\t\t\t\t\tresult.push(getValue(animations[i][key], animations[i].options[key]));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// A flag that we're checking against.\r\n\t\t\t\t\tresult.push((animations[i]._flags & flag) === 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (elements.length === 1 && animations.length === 1) {\r\n\t\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t\t// single element, then return the value directly\r\n\t\t\t\treturn result[0];\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet isPercentComplete: boolean;\r\n\r\n\t\tswitch (key) {\r\n\t\t\tcase \"cache\":\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"begin\":\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delay\":\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"duration\":\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"fpsLimit\":\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"loop\":\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"percentComplete\":\r\n\t\t\t\tisPercentComplete = true;\r\n\t\t\t\tvalue = parseFloat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"repeat\":\r\n\t\t\tcase \"repeatAgain\":\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif (key[0] !== \"_\") {\r\n\t\t\t\t\tconst num = parseFloat(value);\r\n\r\n\t\t\t\t\tif (value == num) {\r\n\t\t\t\t\t\tvalue = num;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t// deliberate fallthrough\r\n\t\t\tcase \"queue\":\r\n\t\t\tcase \"promise\":\r\n\t\t\tcase \"promiseRejectEmpty\":\r\n\t\t\tcase \"easing\":\r\n\t\t\tcase \"started\":\r\n\t\t\t\tconsole.warn(\"VelocityJS: Trying to set a read-only key:\", key);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tif (value === undefined || value !== value) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set an invalid value:\", key, \"=\", value, \"(\" + args[1] + \")\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\tconst animation = animations[i];\r\n\r\n\t\t\tif (isPercentComplete) {\r\n\t\t\t\tanimation.timeStart = lastTick - (getValue(animation.duration, animation.options.duration, defaults.duration) * value);\r\n\t\t\t} else {\r\n\t\t\t\tanimation[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"option\", option], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Pause and resume animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be paused / resumed.\r\n\t */\r\n\tfunction checkAnimation(animation: AnimationCall, queueName: false | string, defaultQueue: false | string, isPaused: boolean) {\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (isPaused) {\r\n\t\t\t\tanimation._flags |= AnimationFlags.PAUSED;\r\n\t\t\t} else {\r\n\t\t\t\tanimation._flags &= ~AnimationFlags.PAUSED;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a\r\n\t * single element will cause any calls that contain tweens for that element to be paused/resumed\r\n\t * as well.\r\n\t */\r\n\tfunction pauseResume(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\tconst isPaused = action.indexOf(\"pause\") === 0,\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(args[0]),\r\n\t\t\tdefaultQueue = defaults.queue;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimation(animations[i], queueName, defaultQueue, isPaused);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall: AnimationCall = State.first;\r\n\r\n\t\t\twhile (activeCall) {\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimation(activeCall, queueName, defaultQueue, isPaused);\r\n\t\t\t\t}\r\n\t\t\t\tactiveCall = activeCall._next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"pause\", pauseResume], true);\r\n\tregisterAction([\"resume\", pauseResume], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tregisterAction([\"reverse\", function(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\t// TODO: Code needs to split out before here - but this is needed to prevent it being overridden\r\n\t\tthrow new SyntaxError(\"VelocityJS: The 'reverse' action is private.\");\r\n\t}], true)\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Stop animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be stopped, and if so then set the STOPPED\r\n\t * flag on it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeStopped(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tanimation._flags |= AnimationFlags.STOPPED;\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is\r\n\t * immediately stopped. When an element is stopped, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are stopped. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t * \r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its\r\n\t * behavior is intended to take effect *immediately*, regardless of the\r\n\t * element's current queue state.\r\n\t */\r\n\tfunction stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeStopped(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeStopped(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"stop\", stop], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function style(elements: VelocityResult, property: {[property: string]: string}): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string): string | string[];\r\n\texport function style(elements: VelocityResult, property: string, value: string): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string | {[property: string]: string}, value?: string) {\r\n\t\treturn styleAction([property, value], elements);\r\n\t}\r\n\r\n\t/**\r\n\t * Get or set a style of Nomralised property value on one or more elements.\r\n\t * If there is no value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t * \r\n\t * This can fail to set, and will reject the Promise if it does so.\r\n\t * \r\n\t * Velocity(elements, \"style\", \"property\", \"value\") => elements;\r\n\t * Velocity(elements, \"style\", {\"property\": \"value\", ...}) => elements;\r\n\t * Velocity(element, \"style\", \"property\") => \"value\";\r\n\t * Velocity(elements, \"style\", \"property\") => [\"value\", ...];\r\n\t */\r\n\tfunction styleAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst property = args[0],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!property) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant property!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined && !isPlainObject(property)) {\r\n\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t// single element, then return the value directly\r\n\t\t\tif (elements.length === 1) {\r\n\t\t\t\treturn CSS.getPropertyValue(elements[0], property);\r\n\t\t\t}\r\n\t\t\tconst result = [];\r\n\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tresult.push(CSS.getPropertyValue(elements[i], property));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet error: string;\r\n\r\n\t\tif (isPlainObject(property)) {\r\n\t\t\tfor (const propertyName in property) {\r\n\t\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\t\tconst value = property[propertyName];\r\n\r\n\t\t\t\t\tif (isString(value) || isNumber(value)) {\r\n\t\t\t\t\t\tCSS.setPropertyValue(elements[i], propertyName, property[propertyName]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\terror = (error ? error + \", \" : \"\") + \"Cannot set a property '\" + propertyName + \"' to an unknown type: \" + (typeof value);\r\n\t\t\t\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + propertyName + \"' to an unknown type:\", value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (isString(value) || isNumber(value)) {\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tCSS.setPropertyValue(elements[i], property, String(value));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\terror = \"Cannot set a property '\" + property + \"' to an unknown type: \" + (typeof value);\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + property + \"' to an unknown type:\", value);\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (error) {\r\n\t\t\t\tpromiseHandler._rejecter(error);\r\n\t\t\t} else if (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"style\", styleAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, propertyName: string, property: VelocityProperty, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties | string, property?: VelocityProperty | VelocityEasingType, easing?: VelocityEasingType) {\r\n\t\treturn tweenAction(arguments as any, elements);\r\n\t}\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tfunction tweenAction(args?: any[], elements?: HTMLorSVGElement[], promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tlet requireForcefeeding: boolean;\r\n\r\n\t\tif (!elements) {\r\n\t\t\tif (!args.length) {\r\n\t\t\t\tconsole.info(\"Velocity(, \\\"tween\\\", percentComplete, property, end | [end, , ], ) => value\\n\"\r\n\t\t\t\t\t+ \"Velocity(, \\\"tween\\\", percentComplete, {property: end | [end, , ], ...}, ) => {property: value, ...}\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telements = [document.body];\r\n\t\t\trequireForcefeeding = true;\r\n\t\t} else if (elements.length !== 1) {\r\n\t\t\t// TODO: Allow more than a single element to return an array of results\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween more than one element!\");\r\n\t\t}\r\n\t\tconst percentComplete: number = args[0],\r\n\t\t\tfakeAnimation = {\r\n\t\t\t\telements: elements,\r\n\t\t\t\telement: elements[0],\r\n\t\t\t\tqueue: false,\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tduration: 1000\r\n\t\t\t\t},\r\n\t\t\t\ttweens: null as {[property: string]: VelocityTween}\r\n\t\t\t},\r\n\t\t\tresult: {[property: string]: string} = {};\r\n\t\tlet properties: VelocityProperties = args[1],\r\n\t\t\tsingleResult: boolean,\r\n\t\t\teasing: VelocityEasingType = args[2],\r\n\t\t\tcount = 0;\r\n\r\n\t\tif (isString(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t[args[1]]: args[2]\r\n\t\t\t};\r\n\t\t\teasing = args[3];\r\n\t\t} else if (Array.isArray(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t\"tween\": args[1]\r\n\t\t\t} as any;\r\n\t\t\teasing = args[2];\r\n\t\t}\r\n\t\tif (!isNumber(percentComplete) || percentComplete < 0 || percentComplete > 1) {\r\n\t\t\tthrow new Error(\"VelocityJS: Must tween a percentage from 0 to 1!\");\r\n\t\t}\r\n\t\tif (!isPlainObject(properties)) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween an invalid property!\");\r\n\t\t}\r\n\t\tif (requireForcefeeding) {\r\n\t\t\tfor (const property in properties) {\r\n\t\t\t\tif (properties.hasOwnProperty(property) && (!Array.isArray(properties[property]) || properties[property].length < 2)) {\r\n\t\t\t\t\tthrow new Error(\"VelocityJS: When not supplying an element you must force-feed values: \" + property);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst activeEasing = validateEasing(getValue(easing, defaults.easing), 1000);\r\n\r\n\t\texpandProperties(fakeAnimation as AnimationCall, properties);\r\n\t\tfor (const property in fakeAnimation.tweens) {\r\n\t\t\t// For every element, iterate through each property.\r\n\t\t\tconst tween = fakeAnimation.tweens[property],\r\n\t\t\t\teasing = tween[Tween.EASING] || activeEasing,\r\n\t\t\t\tpattern = tween[Tween.PATTERN],\r\n\t\t\t\trounding = tween[Tween.ROUNDING];\r\n\t\t\tlet currentValue = \"\";\r\n\r\n\t\t\tcount++;\r\n\t\t\tif (pattern) {\r\n\t\t\t\tfor (let i = 0; i < pattern.length; i++) {\r\n\t\t\t\t\tconst startValue = tween[Tween.START][i];\r\n\r\n\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst result = easing(percentComplete, startValue as number, tween[Tween.END][i] as number, property)\r\n\r\n\t\t\t\t\t\tcurrentValue += rounding && rounding[i] ? Math.round(result) : result;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult[property] = currentValue;\r\n\t\t}\r\n\t\tif (singleResult && count === 1) {\r\n\t\t\tfor (const property in result) {\r\n\t\t\t\tif (result.hasOwnProperty(property)) {\r\n\t\t\t\t\treturn result[property];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tregisterAction([\"tween\", tweenAction], true);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Container for page-wide Velocity state data.\r\n\t */\r\n\texport namespace State {\r\n\t\texport let\r\n\t\t\t/**\r\n\t\t\t * Detect if this is a NodeJS or web browser\r\n\t\t\t */\r\n\t\t\tisClient = window && window === window.window,\r\n\t\t\t/**\r\n\t\t\t * Detect mobile devices to determine if mobileHA should be turned\r\n\t\t\t * on.\r\n\t\t\t */\r\n\t\t\tisMobile = isClient && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisAndroid = isClient && /Android/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisGingerbread = isClient && /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Chrome browser\r\n\t\t\t */\r\n\t\t\tisChrome = isClient && (window as any).chrome,\r\n\t\t\t/**\r\n\t\t\t * Firefox browser\r\n\t\t\t */\r\n\t\t\tisFirefox = isClient && /Firefox/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Create a cached element for re-use when checking for CSS property\r\n\t\t\t * prefixes.\r\n\t\t\t */\r\n\t\t\tprefixElement = isClient && document.createElement(\"div\"),\r\n\t\t\t/**\r\n\t\t\t * Retrieve the appropriate scroll anchor and property name for the\r\n\t\t\t * browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY\r\n\t\t\t */\r\n\t\t\twindowScrollAnchor = isClient && window.pageYOffset !== undefined,\r\n\t\t\t/**\r\n\t\t\t * Cache the anchor used for animating window scrolling.\r\n\t\t\t */\r\n\t\t\tscrollAnchor = windowScrollAnchor ? window : (!isClient || document.documentElement || document.body.parentNode || document.body),\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyLeft = windowScrollAnchor ? \"pageXOffset\" : \"scrollLeft\",\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyTop = windowScrollAnchor ? \"pageYOffset\" : \"scrollTop\",\r\n\t\t\t/**\r\n\t\t\t * The className we add / remove when animating.\r\n\t\t\t */\r\n\t\t\tclassName = CLASSNAME,\r\n\t\t\t/**\r\n\t\t\t * Keep track of whether our RAF tick is running.\r\n\t\t\t */\r\n\t\t\tisTicking = false,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tfirst: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tlast: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * First new animation - to shortcut starting them all up and push\r\n\t\t\t * any css reads to the start of the tick\r\n\t\t\t */\r\n\t\t\tfirstNew: AnimationCall\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * Cache every camelCase match to avoid repeating lookups.\r\n\t */\r\n\tconst cache: {[property: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Camelcase a property name into its JavaScript notation (e.g.\r\n\t * \"background-color\" ==> \"backgroundColor\"). Camelcasing is used to\r\n\t * normalize property names between and across calls.\r\n\t */\r\n\texport function camelCase(property: string): string {\r\n\t\tconst fixed = cache[property];\r\n\r\n\t\tif (fixed) {\r\n\t\t\treturn fixed;\r\n\t\t}\r\n\t\treturn cache[property] = property.replace(/-([a-z])/g, function(match: string, subMatch: string) {\r\n\t\t\treturn subMatch.toUpperCase();\r\n\t\t})\r\n\t}\r\n}","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * This is the list of color names -> rgb values. The object is in here so\r\n\t * that the actual name conversion can be in a separate file and not\r\n\t * included for custom builds.\r\n\t */\r\n\texport const ColorNames: {[name: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Convert a hex list to an rgba value. Designed to be used in replace.\r\n\t */\r\n\tfunction makeRGBA(ignore: any, r: string, g: string, b: string): string {\r\n\t\treturn \"rgba(\" + parseInt(r, 16) + \",\" + parseInt(g, 16) + \",\" + parseInt(b, 16) + \",1)\";\r\n\t}\r\n\r\n\tconst rxColor6 = /#([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})/gi,\r\n\t\trxColor3 = /#([a-f\\d])([a-f\\d])([a-f\\d])/gi,\r\n\t\trxColorName = /(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g,\r\n\t\trxRGB = /rgba?\\([^\\)]+\\)/gi,\r\n\t\trxSpaces = /\\s+/g;\r\n\r\n\t/**\r\n\t * Replace any css colour name with its rgba() value. It is possible to use\r\n\t * the name within an \"rgba(blue, 0.4)\" string this way.\r\n\t */\r\n\texport function fixColors(str: string): string {\r\n\t\treturn str\r\n\t\t\t.replace(rxColor6, makeRGBA)\r\n\t\t\t.replace(rxColor3, function($0, r, g, b) {\r\n\t\t\t\treturn makeRGBA($0, r + r, g + g, b + b);\r\n\t\t\t})\r\n\t\t\t.replace(rxColorName, function($0, $1, $2) {\r\n\t\t\t\tif (ColorNames[$2]) {\r\n\t\t\t\t\treturn ($1 ? $1 : \"rgba(\") + ColorNames[$2] + ($1 ? \"\" : \",1)\");\r\n\t\t\t\t}\r\n\t\t\t\treturn $0;\r\n\t\t\t})\r\n\t\t\t.replace(rxRGB, function($0) {\r\n\t\t\t\treturn $0.replace(rxSpaces, \"\");\r\n\t\t\t});\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t// Converting from hex as it makes for a smaller file.\r\n\t// TODO: When build system changes to webpack, make this one optional.\r\n\tconst colorValues = {\r\n\t\t\"aliceblue\": 0xf0f8ff,\r\n\t\t\"antiquewhite\": 0xfaebd7,\r\n\t\t\"aqua\": 0x00ffff,\r\n\t\t\"aquamarine\": 0x7fffd4,\r\n\t\t\"azure\": 0xf0ffff,\r\n\t\t\"beige\": 0xf5f5dc,\r\n\t\t\"bisque\": 0xffe4c4,\r\n\t\t\"black\": 0x000000,\r\n\t\t\"blanchedalmond\": 0xffebcd,\r\n\t\t\"blue\": 0x0000ff,\r\n\t\t\"blueviolet\": 0x8a2be2,\r\n\t\t\"brown\": 0xa52a2a,\r\n\t\t\"burlywood\": 0xdeb887,\r\n\t\t\"cadetblue\": 0x5f9ea0,\r\n\t\t\"chartreuse\": 0x7fff00,\r\n\t\t\"chocolate\": 0xd2691e,\r\n\t\t\"coral\": 0xff7f50,\r\n\t\t\"cornflowerblue\": 0x6495ed,\r\n\t\t\"cornsilk\": 0xfff8dc,\r\n\t\t\"crimson\": 0xdc143c,\r\n\t\t\"cyan\": 0x00ffff,\r\n\t\t\"darkblue\": 0x00008b,\r\n\t\t\"darkcyan\": 0x008b8b,\r\n\t\t\"darkgoldenrod\": 0xb8860b,\r\n\t\t\"darkgray\": 0xa9a9a9,\r\n\t\t\"darkgrey\": 0xa9a9a9,\r\n\t\t\"darkgreen\": 0x006400,\r\n\t\t\"darkkhaki\": 0xbdb76b,\r\n\t\t\"darkmagenta\": 0x8b008b,\r\n\t\t\"darkolivegreen\": 0x556b2f,\r\n\t\t\"darkorange\": 0xff8c00,\r\n\t\t\"darkorchid\": 0x9932cc,\r\n\t\t\"darkred\": 0x8b0000,\r\n\t\t\"darksalmon\": 0xe9967a,\r\n\t\t\"darkseagreen\": 0x8fbc8f,\r\n\t\t\"darkslateblue\": 0x483d8b,\r\n\t\t\"darkslategray\": 0x2f4f4f,\r\n\t\t\"darkslategrey\": 0x2f4f4f,\r\n\t\t\"darkturquoise\": 0x00ced1,\r\n\t\t\"darkviolet\": 0x9400d3,\r\n\t\t\"deeppink\": 0xff1493,\r\n\t\t\"deepskyblue\": 0x00bfff,\r\n\t\t\"dimgray\": 0x696969,\r\n\t\t\"dimgrey\": 0x696969,\r\n\t\t\"dodgerblue\": 0x1e90ff,\r\n\t\t\"firebrick\": 0xb22222,\r\n\t\t\"floralwhite\": 0xfffaf0,\r\n\t\t\"forestgreen\": 0x228b22,\r\n\t\t\"fuchsia\": 0xff00ff,\r\n\t\t\"gainsboro\": 0xdcdcdc,\r\n\t\t\"ghostwhite\": 0xf8f8ff,\r\n\t\t\"gold\": 0xffd700,\r\n\t\t\"goldenrod\": 0xdaa520,\r\n\t\t\"gray\": 0x808080,\r\n\t\t\"grey\": 0x808080,\r\n\t\t\"green\": 0x008000,\r\n\t\t\"greenyellow\": 0xadff2f,\r\n\t\t\"honeydew\": 0xf0fff0,\r\n\t\t\"hotpink\": 0xff69b4,\r\n\t\t\"indianred\": 0xcd5c5c,\r\n\t\t\"indigo\": 0x4b0082,\r\n\t\t\"ivory\": 0xfffff0,\r\n\t\t\"khaki\": 0xf0e68c,\r\n\t\t\"lavender\": 0xe6e6fa,\r\n\t\t\"lavenderblush\": 0xfff0f5,\r\n\t\t\"lawngreen\": 0x7cfc00,\r\n\t\t\"lemonchiffon\": 0xfffacd,\r\n\t\t\"lightblue\": 0xadd8e6,\r\n\t\t\"lightcoral\": 0xf08080,\r\n\t\t\"lightcyan\": 0xe0ffff,\r\n\t\t\"lightgoldenrodyellow\": 0xfafad2,\r\n\t\t\"lightgray\": 0xd3d3d3,\r\n\t\t\"lightgrey\": 0xd3d3d3,\r\n\t\t\"lightgreen\": 0x90ee90,\r\n\t\t\"lightpink\": 0xffb6c1,\r\n\t\t\"lightsalmon\": 0xffa07a,\r\n\t\t\"lightseagreen\": 0x20b2aa,\r\n\t\t\"lightskyblue\": 0x87cefa,\r\n\t\t\"lightslategray\": 0x778899,\r\n\t\t\"lightslategrey\": 0x778899,\r\n\t\t\"lightsteelblue\": 0xb0c4de,\r\n\t\t\"lightyellow\": 0xffffe0,\r\n\t\t\"lime\": 0x00ff00,\r\n\t\t\"limegreen\": 0x32cd32,\r\n\t\t\"linen\": 0xfaf0e6,\r\n\t\t\"magenta\": 0xff00ff,\r\n\t\t\"maroon\": 0x800000,\r\n\t\t\"mediumaquamarine\": 0x66cdaa,\r\n\t\t\"mediumblue\": 0x0000cd,\r\n\t\t\"mediumorchid\": 0xba55d3,\r\n\t\t\"mediumpurple\": 0x9370db,\r\n\t\t\"mediumseagreen\": 0x3cb371,\r\n\t\t\"mediumslateblue\": 0x7b68ee,\r\n\t\t\"mediumspringgreen\": 0x00fa9a,\r\n\t\t\"mediumturquoise\": 0x48d1cc,\r\n\t\t\"mediumvioletred\": 0xc71585,\r\n\t\t\"midnightblue\": 0x191970,\r\n\t\t\"mintcream\": 0xf5fffa,\r\n\t\t\"mistyrose\": 0xffe4e1,\r\n\t\t\"moccasin\": 0xffe4b5,\r\n\t\t\"navajowhite\": 0xffdead,\r\n\t\t\"navy\": 0x000080,\r\n\t\t\"oldlace\": 0xfdf5e6,\r\n\t\t\"olive\": 0x808000,\r\n\t\t\"olivedrab\": 0x6b8e23,\r\n\t\t\"orange\": 0xffa500,\r\n\t\t\"orangered\": 0xff4500,\r\n\t\t\"orchid\": 0xda70d6,\r\n\t\t\"palegoldenrod\": 0xeee8aa,\r\n\t\t\"palegreen\": 0x98fb98,\r\n\t\t\"paleturquoise\": 0xafeeee,\r\n\t\t\"palevioletred\": 0xdb7093,\r\n\t\t\"papayawhip\": 0xffefd5,\r\n\t\t\"peachpuff\": 0xffdab9,\r\n\t\t\"peru\": 0xcd853f,\r\n\t\t\"pink\": 0xffc0cb,\r\n\t\t\"plum\": 0xdda0dd,\r\n\t\t\"powderblue\": 0xb0e0e6,\r\n\t\t\"purple\": 0x800080,\r\n\t\t\"rebeccapurple\": 0x663399,\r\n\t\t\"red\": 0xff0000,\r\n\t\t\"rosybrown\": 0xbc8f8f,\r\n\t\t\"royalblue\": 0x4169e1,\r\n\t\t\"saddlebrown\": 0x8b4513,\r\n\t\t\"salmon\": 0xfa8072,\r\n\t\t\"sandybrown\": 0xf4a460,\r\n\t\t\"seagreen\": 0x2e8b57,\r\n\t\t\"seashell\": 0xfff5ee,\r\n\t\t\"sienna\": 0xa0522d,\r\n\t\t\"silver\": 0xc0c0c0,\r\n\t\t\"skyblue\": 0x87ceeb,\r\n\t\t\"slateblue\": 0x6a5acd,\r\n\t\t\"slategray\": 0x708090,\r\n\t\t\"slategrey\": 0x708090,\r\n\t\t\"snow\": 0xfffafa,\r\n\t\t\"springgreen\": 0x00ff7f,\r\n\t\t\"steelblue\": 0x4682b4,\r\n\t\t\"tan\": 0xd2b48c,\r\n\t\t\"teal\": 0x008080,\r\n\t\t\"thistle\": 0xd8bfd8,\r\n\t\t\"tomato\": 0xff6347,\r\n\t\t\"turquoise\": 0x40e0d0,\r\n\t\t\"violet\": 0xee82ee,\r\n\t\t\"wheat\": 0xf5deb3,\r\n\t\t\"white\": 0xffffff,\r\n\t\t\"whitesmoke\": 0xf5f5f5,\r\n\t\t\"yellow\": 0xffff00,\r\n\t\t\"yellowgreen\": 0x9acd32\r\n\t};\r\n\r\n\tfor (let name in colorValues) {\r\n\t\tif (colorValues.hasOwnProperty(name)) {\r\n\t\t\tlet color = colorValues[name];\r\n\r\n\t\t\tColorNames[name] = Math.floor(color / 65536) + \",\" + Math.floor(color / 256 % 256) + \",\" + (color % 256);\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t// TODO: This is still a complete mess\r\n\texport function computePropertyValue(element: HTMLorSVGElement, property: string): string {\r\n\t\tconst data = Data(element),\r\n\t\t\t// If computedStyle is cached, use it.\r\n\t\t\tcomputedStyle = data && data.computedStyle ? data.computedStyle : window.getComputedStyle(element, null);\r\n\t\tlet computedValue: string | number = 0;\r\n\r\n\t\tif (data && !data.computedStyle) {\r\n\t\t\tdata.computedStyle = computedStyle;\r\n\t\t}\r\n\t\tif (property === \"width\" || property === \"height\") {\r\n\t\t\t// Browsers do not return height and width values for elements\r\n\t\t\t// that are set to display:\"none\". Thus, we temporarily toggle\r\n\t\t\t// display to the element type's default value.\r\n\t\t\tconst toggleDisplay: boolean = getPropertyValue(element, \"display\") === \"none\";\r\n\r\n\t\t\t// When box-sizing isn't set to border-box, height and width\r\n\t\t\t// style values are incorrectly computed when an element's\r\n\t\t\t// scrollbars are visible (which expands the element's\r\n\t\t\t// dimensions). Thus, we defer to the more accurate\r\n\t\t\t// offsetHeight/Width property, which includes the total\r\n\t\t\t// dimensions for interior, border, padding, and scrollbar. We\r\n\t\t\t// subtract border and padding to get the sum of interior +\r\n\t\t\t// scrollbar.\r\n\t\t\t// TODO: offsetHeight does not exist on SVGElement\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"auto\");\r\n\t\t\t}\r\n\t\t\tcomputedValue = augmentDimension(element, property, true);\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"none\");\r\n\t\t\t}\r\n\t\t\treturn String(computedValue);\r\n\t\t}\r\n\r\n\t\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\r\n\t\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\r\n\t\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\r\n\t\t/* TODO: There is a borderColor normalisation in legacy/ - figure out where this is needed... */\r\n\t\t//\t\tif (property === \"borderColor\") {\r\n\t\t//\t\t\tproperty = \"borderTopColor\";\r\n\t\t//\t\t}\r\n\r\n\t\tcomputedValue = computedStyle[property];\r\n\t\t/* Fall back to the property's style value (if defined) when computedValue returns nothing,\r\n\t\t which can happen when the element hasn't been painted. */\r\n\t\tif (!computedValue) {\r\n\t\t\tcomputedValue = element.style[property];\r\n\t\t}\r\n\t\t/* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\r\n\t\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\r\n\t\t effect as being set to 0, so no conversion is necessary.) */\r\n\t\t/* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\r\n\t\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\r\n\t\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\r\n\t\tif (computedValue === \"auto\") {\r\n\t\t\tswitch (property) {\r\n\t\t\t\tcase \"top\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tlet topLeft = true;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\tconst position = getPropertyValue(element, \"position\"); /* GET */\r\n\r\n\t\t\t\t\tif (position === \"fixed\" || (topLeft && position === \"absolute\")) {\r\n\t\t\t\t\t\t// Note: this has no pixel unit on its returned values,\r\n\t\t\t\t\t\t// we re-add it here to conform with\r\n\t\t\t\t\t\t// computePropertyValue's behavior.\r\n\t\t\t\t\t\tcomputedValue = element.getBoundingClientRect[property] + \"px\"; /* GET */\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t// Deliberate fallthrough!\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcomputedValue = \"0px\";\r\n\t\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn computedValue ? String(computedValue) : \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get a property value. This will grab via the cache if it exists, then\r\n\t * via any normalisations, then it will check the css values directly.\r\n\t */\r\n\texport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, skipNormalisation?: boolean, skipCache?: boolean): string {\r\n\t\tconst data = Data(element);\r\n\t\tlet propertyValue: string;\r\n\r\n\t\tif (NoCacheNormalizations.has(propertyName)) {\r\n\t\t\tskipCache = true;\r\n\t\t}\r\n\t\tif (!skipCache && data && data.cache[propertyName] != null) {\r\n\t\t\tpropertyValue = data.cache[propertyName];\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t\t}\r\n\t\t\treturn propertyValue;\r\n\t\t} else {\r\n\t\t\tlet types = data.types,\r\n\t\t\t\tbest: VelocityNormalizationsFn;\r\n\r\n\t\t\tfor (let index = 0; types; types >>= 1, index++) {\r\n\t\t\t\tif (types & 1) {\r\n\t\t\t\t\tbest = Normalizations[index][propertyName] || best;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (best) {\r\n\t\t\t\tpropertyValue = best(element);\r\n\t\t\t} else {\r\n\t\t\t\t// Note: Retrieving the value of a CSS property cannot simply be\r\n\t\t\t\t// performed by checking an element's style attribute (which\r\n\t\t\t\t// only reflects user-defined values). Instead, the browser must\r\n\t\t\t\t// be queried for a property's *computed* value. You can read\r\n\t\t\t\t// more about getComputedStyle here:\r\n\t\t\t\t// https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle\r\n\t\t\t\tpropertyValue = computePropertyValue(element, propertyName);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (debug >= 2) {\r\n\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t}\r\n\t\tif (data) {\r\n\t\t\tdata.cache[propertyName] = propertyValue;\r\n\t\t}\r\n\t\treturn propertyValue;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * All possible units in CSS. Used to recognise units when parsing tweens.\r\n\t */\r\n\tconst Units = [\r\n\t\t\"%\", // relative\r\n\t\t\"em\", \"ex\", \"ch\", \"rem\", // font relative\r\n\t\t\"vw\", \"vh\", \"vmin\", \"vmax\", // viewport relative\r\n\t\t\"cm\", \"mm\", \"Q\", \"in\", \"pc\", \"pt\", \"px\", // absolute lengths\r\n\t\t\"deg\", \"grad\", \"rad\", \"turn\", // angles\r\n\t\t\"s\", \"ms\" // time\r\n\t];\r\n\r\n\t/**\r\n\t * Get the current unit for this property. Only used when parsing tweens\r\n\t * to check if the unit is changing between the start and end values.\r\n\t */\r\n\texport function getUnit(property: string, start?: number): string {\r\n\t\tstart = start || 0;\r\n\t\tif (property[start] && property[start] !== \" \") {\r\n\t\t\tfor (let i = 0, units = Units; i < units.length; i++) {\r\n\t\t\t\tconst unit = units[i];\r\n\t\t\t\tlet j = 0;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif (j >= unit.length) {\r\n\t\t\t\t\t\treturn unit;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unit[j] !== property[start + j]) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (++j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Regular Expressions - cached as they can be expensive to create.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\texport const RegEx = {\r\n\t\tisHex: /^#([A-f\\d]{3}){1,2}$/i,\r\n\t\t/* Unwrap a property value's surrounding text, e.g. \"rgba(4, 3, 2, 1)\" ==> \"4, 3, 2, 1\" and \"rect(4px 3px 2px 1px)\" ==> \"4px 3px 2px 1px\". */\r\n\t\tvalueUnwrap: /^[A-z]+\\((.*)\\)$/i,\r\n\t\twrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,\r\n\t\t/* Split a multi-value property into an array of subvalues, e.g. \"rgba(4, 3, 2, 1) 4px 3px 2px 1px\" ==> [ \"rgba(4, 3, 2, 1)\", \"4px\", \"3px\", \"2px\", \"1px\" ]. */\r\n\t\tvalueSplit: /([A-z]+\\(.+\\))|(([A-z0-9#-.]+?)(?=\\s|$))/ig\r\n\t};\r\n}","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * The singular setPropertyValue, which routes the logic for all\r\n\t * normalizations, hooks, and standard CSS properties.\r\n\t */\r\n\texport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any) {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (isString(propertyValue)\r\n\t\t\t&& propertyValue[0] === \"c\"\r\n\t\t\t&& propertyValue[1] === \"a\"\r\n\t\t\t&& propertyValue[2] === \"l\"\r\n\t\t\t&& propertyValue[3] === \"c\"\r\n\t\t\t&& propertyValue[4] === \"(\"\r\n\t\t\t&& propertyValue[5] === \"0\") {\r\n\t\t\t// Make sure we un-calc unit changing values - try not to trigger\r\n\t\t\t// this code any more often than we have to since it's expensive\r\n\t\t\tpropertyValue = propertyValue.replace(/^calc\\(0[^\\d]* \\+ ([^\\(\\)]+)\\)$/, \"$1\");\r\n\t\t}\r\n\t\tif (data && data.cache[propertyName] !== propertyValue) {\r\n\t\t\t// By setting it to undefined we force a true \"get\" later\r\n\t\t\tdata.cache[propertyName] = propertyValue || undefined;\r\n\t\t\tlet types = data.types,\r\n\t\t\t\tbest: VelocityNormalizationsFn;\r\n\r\n\t\t\tfor (let index = 0; types; types >>= 1, index++) {\r\n\t\t\t\tif (types & 1) {\r\n\t\t\t\t\tbest = Normalizations[index][propertyName] || best;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!best || !best(element, propertyValue)) {\r\n\t\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t\t}\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Set \" + propertyName + \": \" + propertyValue, element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport const Easings: {[name: string]: VelocityEasingFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register a easing. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerEasing\", \"name\", VelocityEasingFn);\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerEasing(args?: [string, VelocityEasingFn]) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Easings[name]) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override 'registerEasing' callback\", name);\r\n\t\t} else {\r\n\t\t\tEasings[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\t/* Basic (same as jQuery) easings. */\r\n\tregisterEasing([\"linear\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"swing\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (0.5 - Math.cos(percentComplete * Math.PI) / 2) * (endValue - startValue);\r\n\t}]);\r\n\r\n\t/* Bonus \"spring\" easing, which is a less exaggerated version of easeInOutElastic. */\r\n\tregisterEasing([\"spring\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (1 - (Math.cos(percentComplete * 4.5 * Math.PI) * Math.exp(-percentComplete * 6))) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Fix to a range of 0 <= num <= 1.\r\n\t */\r\n\tfunction fixRange(num: number) {\r\n\t\treturn Math.min(Math.max(num, 0), 1);\r\n\t}\r\n\r\n\tfunction A(aA1, aA2) {\r\n\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction B(aA1, aA2) {\r\n\t\treturn 3.0 * aA2 - 6.0 * aA1;\r\n\t}\r\n\r\n\tfunction C(aA1) {\r\n\t\treturn 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction calcBezier(aT, aA1, aA2) {\r\n\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n\t}\r\n\r\n\tfunction getSlope(aT, aA1, aA2) {\r\n\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n\t}\r\n\r\n\texport function generateBezier(mX1: number, mY1: number, mX2: number, mY2: number): VelocityEasingFn {\r\n\t\tconst NEWTON_ITERATIONS = 4,\r\n\t\t\tNEWTON_MIN_SLOPE = 0.001,\r\n\t\t\tSUBDIVISION_PRECISION = 0.0000001,\r\n\t\t\tSUBDIVISION_MAX_ITERATIONS = 10,\r\n\t\t\tkSplineTableSize = 11,\r\n\t\t\tkSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\r\n\t\t\tfloat32ArraySupported = \"Float32Array\" in window;\r\n\r\n\t\t/* Must contain four arguments. */\r\n\t\tif (arguments.length !== 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/* Arguments must be numbers. */\r\n\t\tfor (let i = 0; i < 4; ++i) {\r\n\t\t\tif (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* X values must be in the [0, 1] range. */\r\n\t\tmX1 = fixRange(mX1);\r\n\t\tmX2 = fixRange(mX2);\r\n\r\n\t\tconst mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n\r\n\t\tfunction newtonRaphsonIterate(aX, aGuessT) {\r\n\t\t\tfor (let i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n\t\t\t\tconst currentSlope = getSlope(aGuessT, mX1, mX2);\r\n\r\n\t\t\t\tif (currentSlope === 0.0) {\r\n\t\t\t\t\treturn aGuessT;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n\t\t\t\taGuessT -= currentX / currentSlope;\r\n\t\t\t}\r\n\r\n\t\t\treturn aGuessT;\r\n\t\t}\r\n\r\n\t\tfunction calcSampleValues() {\r\n\t\t\tfor (let i = 0; i < kSplineTableSize; ++i) {\r\n\t\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction binarySubdivide(aX, aA, aB) {\r\n\t\t\tlet currentX, currentT, i = 0;\r\n\r\n\t\t\tdo {\r\n\t\t\t\tcurrentT = aA + (aB - aA) / 2.0;\r\n\t\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\t\t\t\tif (currentX > 0.0) {\r\n\t\t\t\t\taB = currentT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taA = currentT;\r\n\t\t\t\t}\r\n\t\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n\t\t\treturn currentT;\r\n\t\t}\r\n\r\n\t\tfunction getTForX(aX) {\r\n\t\t\tlet intervalStart = 0.0,\r\n\t\t\t\tcurrentSample = 1,\r\n\t\t\t\tlastSample = kSplineTableSize - 1;\r\n\r\n\t\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n\t\t\t\tintervalStart += kSampleStepSize;\r\n\t\t\t}\r\n\r\n\t\t\t--currentSample;\r\n\r\n\t\t\tconst dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\r\n\t\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\r\n\t\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n\t\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\r\n\t\t\t\treturn newtonRaphsonIterate(aX, guessForT);\r\n\t\t\t} else if (initialSlope === 0.0) {\r\n\t\t\t\treturn guessForT;\r\n\t\t\t} else {\r\n\t\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet _precomputed = false;\r\n\r\n\t\tfunction precompute() {\r\n\t\t\t_precomputed = true;\r\n\t\t\tif (mX1 !== mY1 || mX2 !== mY2) {\r\n\t\t\t\tcalcSampleValues();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst f = function(percentComplete: number, startValue: number, endValue: number, property?: string) {\r\n\t\t\tif (!_precomputed) {\r\n\t\t\t\tprecompute();\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tif (mX1 === mY1 && mX2 === mY2) {\r\n\t\t\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t\t\t}\r\n\t\t\treturn startValue + calcBezier(getTForX(percentComplete), mY1, mY2) * (endValue - startValue);\r\n\t\t};\r\n\r\n\t\t(f as any).getControlPoints = function() {\r\n\t\t\treturn [{x: mX1, y: mY1}, {x: mX2, y: mY2}];\r\n\t\t};\r\n\r\n\t\tconst str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\r\n\t\tf.toString = function() {\r\n\t\t\treturn str;\r\n\t\t};\r\n\r\n\t\treturn f;\r\n\t}\r\n\r\n\t/* Common easings */\r\n\tconst easeIn = generateBezier(0.42, 0.0, 1.00, 1.0),\r\n\t\teaseOut = generateBezier(0.00, 0.0, 0.58, 1.0),\r\n\t\teaseInOut = generateBezier(0.42, 0.0, 0.58, 1.0);\r\n\r\n\tregisterEasing([\"ease\", generateBezier(0.25, 0.1, 0.25, 1.0)]);\r\n\tregisterEasing([\"easeIn\", easeIn]);\r\n\tregisterEasing([\"ease-in\", easeIn]);\r\n\tregisterEasing([\"easeOut\", easeOut]);\r\n\tregisterEasing([\"ease-out\", easeOut]);\r\n\tregisterEasing([\"easeInOut\", easeInOut]);\r\n\tregisterEasing([\"ease-in-out\", easeInOut]);\r\n\tregisterEasing([\"easeInSine\", generateBezier(0.47, 0, 0.745, 0.715)]);\r\n\tregisterEasing([\"easeOutSine\", generateBezier(0.39, 0.575, 0.565, 1)]);\r\n\tregisterEasing([\"easeInOutSine\", generateBezier(0.445, 0.05, 0.55, 0.95)]);\r\n\tregisterEasing([\"easeInQuad\", generateBezier(0.55, 0.085, 0.68, 0.53)]);\r\n\tregisterEasing([\"easeOutQuad\", generateBezier(0.25, 0.46, 0.45, 0.94)]);\r\n\tregisterEasing([\"easeInOutQuad\", generateBezier(0.455, 0.03, 0.515, 0.955)]);\r\n\tregisterEasing([\"easeInCubic\", generateBezier(0.55, 0.055, 0.675, 0.19)]);\r\n\tregisterEasing([\"easeOutCubic\", generateBezier(0.215, 0.61, 0.355, 1)]);\r\n\tregisterEasing([\"easeInOutCubic\", generateBezier(0.645, 0.045, 0.355, 1)]);\r\n\tregisterEasing([\"easeInQuart\", generateBezier(0.895, 0.03, 0.685, 0.22)]);\r\n\tregisterEasing([\"easeOutQuart\", generateBezier(0.165, 0.84, 0.44, 1)]);\r\n\tregisterEasing([\"easeInOutQuart\", generateBezier(0.77, 0, 0.175, 1)]);\r\n\tregisterEasing([\"easeInQuint\", generateBezier(0.755, 0.05, 0.855, 0.06)]);\r\n\tregisterEasing([\"easeOutQuint\", generateBezier(0.23, 1, 0.32, 1)]);\r\n\tregisterEasing([\"easeInOutQuint\", generateBezier(0.86, 0, 0.07, 1)]);\r\n\tregisterEasing([\"easeInExpo\", generateBezier(0.95, 0.05, 0.795, 0.035)]);\r\n\tregisterEasing([\"easeOutExpo\", generateBezier(0.19, 1, 0.22, 1)]);\r\n\tregisterEasing([\"easeInOutExpo\", generateBezier(1, 0, 0, 1)]);\r\n\tregisterEasing([\"easeInCirc\", generateBezier(0.6, 0.04, 0.98, 0.335)]);\r\n\tregisterEasing([\"easeOutCirc\", generateBezier(0.075, 0.82, 0.165, 1)]);\r\n\tregisterEasing([\"easeInOutCirc\", generateBezier(0.785, 0.135, 0.15, 0.86)]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bounce easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tfunction easeOutBounce(percentComplete: number): number {\r\n\t\tif (percentComplete < 1 / 2.75) {\r\n\t\t\treturn (7.5625 * percentComplete * percentComplete);\r\n\t\t}\r\n\t\tif (percentComplete < 2 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 1.5 / 2.75) * percentComplete + 0.75);\r\n\t\t}\r\n\t\tif (percentComplete < 2.5 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 2.25 / 2.75) * percentComplete + 0.9375);\r\n\t\t}\r\n\t\treturn (7.5625 * (percentComplete -= 2.625 / 2.75) * percentComplete + 0.984375);\r\n\t};\r\n\r\n\tfunction easeInBounce(percentComplete: number): number {\r\n\t\treturn 1 - easeOutBounce(1 - percentComplete);\r\n\t};\r\n\r\n\tregisterEasing([\"easeInBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeInBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeOutBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeInOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn (percentComplete < 0.5 ? easeInBounce(percentComplete * 2) * .5 : easeOutBounce(percentComplete * 2 - 1) * 0.5 + 0.5) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Elastic easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst pi2 = Math.PI * 2;\r\n\r\n\texport function registerElasticIn(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn -(amplitude * Math.pow(2, 10 * (percentComplete -= 1)) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period)) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticInOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tconst s = period / pi2 * Math.asin(1 / amplitude);\r\n\r\n\t\t\tpercentComplete = percentComplete * 2 - 1;\r\n\t\t\tif (percentComplete < 0) {\r\n\t\t\t\treturn -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period));\r\n\t\t\t}\r\n\t\t\treturn amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period) * 0.5 + 1;\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterElasticIn(\"easeInElastic\", 1, 0.3);\r\n\tregisterElasticOut(\"easeOutElastic\", 1, 0.3);\r\n\tregisterElasticInOut(\"easeInOutElastic\", 1, 0.3 * 1.5);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\r\n\tinterface springState {\r\n\t\tx: number;\r\n\t\tv: number;\r\n\t\ttension: number;\r\n\t\tfriction: number;\r\n\t};\r\n\r\n\tinterface springDelta {\r\n\t\tdx: number;\r\n\t\tdv: number;\r\n\t};\r\n\r\n\t/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\r\n\t then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\r\n\tfunction springAccelerationForState(state: springState) {\r\n\t\treturn (-state.tension * state.x) - (state.friction * state.v);\r\n\t}\r\n\r\n\tfunction springEvaluateStateWithDerivative(initialState: springState, dt: number, derivative: springDelta): springDelta {\r\n\t\tconst state = {\r\n\t\t\tx: initialState.x + derivative.dx * dt,\r\n\t\t\tv: initialState.v + derivative.dv * dt,\r\n\t\t\ttension: initialState.tension,\r\n\t\t\tfriction: initialState.friction\r\n\t\t};\r\n\r\n\t\treturn {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t};\r\n\t}\r\n\r\n\tfunction springIntegrateState(state: springState, dt: number) {\r\n\t\tconst a = {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t},\r\n\t\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\r\n\t\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\r\n\t\t\td = springEvaluateStateWithDerivative(state, dt, c),\r\n\t\t\tdxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\r\n\t\t\tdvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\r\n\r\n\t\tstate.x = state.x + dxdt * dt;\r\n\t\tstate.v = state.v + dvdt * dt;\r\n\r\n\t\treturn state;\r\n\t}\r\n\r\n\texport function generateSpringRK4(tension: number, friction: number): number;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration: number): VelocityEasingFn;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration?: number): any {\r\n\t\tlet initState: springState = {\r\n\t\t\tx: -1,\r\n\t\t\tv: 0,\r\n\t\t\ttension: parseFloat(tension as any) || 500,\r\n\t\t\tfriction: parseFloat(friction as any) || 20\r\n\t\t},\r\n\t\t\tpath = [0],\r\n\t\t\ttime_lapsed = 0,\r\n\t\t\ttolerance = 1 / 10000,\r\n\t\t\tDT = 16 / 1000,\r\n\t\t\thave_duration = duration != null, // deliberate \"==\", as undefined == null != 0\r\n\t\t\tdt: number,\r\n\t\t\tlast_state: springState;\r\n\r\n\t\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\r\n\t\tif (have_duration) {\r\n\t\t\t/* Run the simulation without a duration. */\r\n\t\t\ttime_lapsed = generateSpringRK4(initState.tension, initState.friction);\r\n\t\t\t/* Compute the adjusted time delta. */\r\n\t\t\tdt = (time_lapsed as number) / duration * DT;\r\n\t\t} else {\r\n\t\t\tdt = DT;\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\t/* Next/step function .*/\r\n\t\t\tlast_state = springIntegrateState(last_state || initState, dt);\r\n\t\t\t/* Store the position. */\r\n\t\t\tpath.push(1 + last_state.x);\r\n\t\t\ttime_lapsed += 16;\r\n\t\t\t/* If the change threshold is reached, break. */\r\n\t\t\tif (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\r\n\t\t computed path and returns a snapshot of the position according to a given percentComplete. */\r\n\t\treturn !have_duration ? time_lapsed : function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + path[(percentComplete * (path.length - 1)) | 0] * (endValue - startValue);\r\n\t\t};\r\n\t};\r\n};\r\n","///\n/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details\n * \n * Step easing generator.\n */\n\nnamespace VelocityStatic.Easing {\n\tconst cache: {[steps: number]: VelocityEasingFn} = {};\n\n\texport function generateStep(steps): VelocityEasingFn {\n\t\tconst fn = cache[steps];\n\n\t\tif (fn) {\n\t\t\treturn fn;\n\t\t}\n\t\treturn cache[steps] = function(percentComplete: number, startValue: number, endValue: number) {\n\t\t\tif (percentComplete === 0) {\n\t\t\t\treturn startValue;\n\t\t\t}\n\t\t\tif (percentComplete === 1) {\n\t\t\t\treturn endValue;\n\t\t\t}\n\t\t\treturn startValue + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\n\t\t};\n\t}\n};\n","///\n/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n * \n * Easings to act on strings, either set at the start or at the end depending on\n * need.\n */\n\nnamespace VelocityStatic.Easing {\n\t/**\n\t * Easing function that sets to the specified value immediately after the\n\t * animation starts.\n\t */\n\tregisterEasing([\"at-start\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 0\n\t\t\t? startValue\n\t\t\t: endValue;\n\t} as any]);\n\n\t/**\n\t * Easing function that sets to the specified value while the animation is\n\t * running.\n\t */\n\tregisterEasing([\"during\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 0 || percentComplete === 1\n\t\t\t? startValue\n\t\t\t: endValue;\n\t} as any]);\n\n\t/**\n\t * Easing function that sets to the specified value when the animation ends.\n\t */\n\tregisterEasing([\"at-end\", function(percentComplete: number, startValue: any, endValue: any): any {\n\t\treturn percentComplete === 1\n\t\t\t? endValue\n\t\t\t: startValue;\n\t} as any]);\n};\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Normalisations are used when getting or setting a (normally css compound\r\n * properties) value that can have a different order in different browsers.\r\n * \r\n * It can also be used to extend and create specific properties that otherwise\r\n * don't exist (such as for scrolling, or inner/outer dimensions).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Unlike \"actions\", normalizations can always be replaced by users.\r\n\t */\r\n\texport const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = [];\r\n\r\n\t/**\r\n\t * Any normalisations that should never be cached are listed here.\r\n\t * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has\r\n\t */\r\n\texport const NoCacheNormalizations = new Set();\r\n\r\n\t/**\r\n\t * Used to define a constructor.\r\n\t */\r\n\tinterface ClassConstructor {\r\n\t\tnew(): Object;\r\n\t}\r\n\r\n\t/**\r\n\t * An array of classes used for the per-class normalizations. This\r\n\t * translates into a bitwise enum for quick cross-reference, and so that\r\n\t * the element doesn't need multiple instanceof calls every\r\n\t * frame.\r\n\t */\r\n\texport const constructors: ClassConstructor[] = [];\r\n\r\n\t/**\r\n\t * Used to register a normalization. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerNormalization\", Element, \"name\", VelocityNormalizationsFn[, false]);\r\n\t * \r\n\t * The fourth argument can be an explicit false, which prevents\r\n\t * the property from being cached. Please note that this can be dangerous\r\n\t * for performance!\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1],\r\n\t\t\tcallback = args[2];\r\n\r\n\t\tif (isString(constructor) || !(constructor instanceof Object)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' constructor to an invalid value:\", constructor);\r\n\t\t} else if (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:\", name, callback);\r\n\t\t} else {\r\n\t\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tindex = constructors.push(constructor) - 1;\r\n\t\t\t\tNormalizations[index] = Object.create(null);\r\n\t\t\t}\r\n\t\t\tNormalizations[index][name] = callback;\r\n\t\t\tif (args[3] === false) {\r\n\t\t\t\tNoCacheNormalizations.add(name);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerNormalization\", registerNormalization as any]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set an attribute.\r\n\t */\r\n\tfunction getAttribute(name: string) {\r\n\t\treturn function(element: Element, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.getAttribute(name);\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst base = document.createElement(\"div\"),\r\n\t\trxSubtype = /^SVG(.*)Element$/,\r\n\t\trxElement = /Element$/;\r\n\r\n\tObject.getOwnPropertyNames(window).forEach(function(globals) {\r\n\t\tconst subtype = rxSubtype.exec(globals);\r\n\r\n\t\tif (subtype) {\r\n\t\t\tconst element = document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()),\r\n\t\t\t\tconstructor = element.constructor;\r\n\r\n\t\t\tfor (let attribute in element) {\r\n\t\t\t\tconst value = element[attribute];\r\n\r\n\t\t\t\tif (isString(attribute)\r\n\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\r\n\t\t\t\t\t&& attribute !== attribute.toUpperCase()\r\n\t\t\t\t\t&& !rxElement.test(attribute)\r\n\t\t\t\t\t&& !(attribute in base)\r\n\t\t\t\t\t&& !isFunction(value)) {\r\n\t\t\t\t\t// TODO: Should this all be set on the generic SVGElement, it would save space and time, but not as powerful\r\n\t\t\t\t\tregisterNormalization([constructor as any, attribute, getAttribute(attribute)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set the width or height.\r\n\t */\r\n\tfunction getDimension(name: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\t// Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn (element as SVGGraphicsElement).getBBox()[name] + \"px\";\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn \"0px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([SVGElement, \"width\", getDimension(\"width\")]);\r\n\tregisterNormalization([SVGElement, \"height\", getDimension(\"height\")]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Figure out the dimensions for this width / height based on the\r\n\t * potential borders and whether we care about them.\r\n\t */\r\n\texport function augmentDimension(element: HTMLorSVGElement, name: string, wantInner: boolean): number {\r\n\t\tconst isBorderBox = CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\";\r\n\r\n\t\tif (isBorderBox === wantInner) {\r\n\t\t\t// in box-sizing mode, the CSS width / height accessors already\r\n\t\t\t// give the outerWidth / outerHeight.\r\n\t\t\tconst sides = name === \"width\" ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"],\r\n\t\t\t\tfields = [\"padding\" + sides[0], \"padding\" + sides[1], \"border\" + sides[0] + \"Width\", \"border\" + sides[1] + \"Width\"];\r\n\t\t\tlet i: number,\r\n\t\t\t\tvalue: number,\r\n\t\t\t\taugment = 0;\r\n\r\n\t\t\tfor (i = 0; i < fields.length; i++) {\r\n\t\t\t\tvalue = parseFloat(CSS.getPropertyValue(element, fields[i]) as string);\r\n\t\t\t\tif (!isNaN(value)) {\r\n\t\t\t\t\taugment += value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn wantInner ? -augment : augment;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Get/set the inner/outer dimension.\r\n\t */\r\n\tfunction getDimension(name, wantInner: boolean) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn augmentDimension(element, name, wantInner) + \"px\";\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, name, (parseFloat(propertyValue) - augmentDimension(element, name, wantInner)) + \"px\");\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"innerWidth\", getDimension(\"width\", true)]);\r\n\tregisterNormalization([Element, \"innerHeight\", getDimension(\"height\", true)]);\r\n\tregisterNormalization([Element, \"outerWidth\", getDimension(\"width\", false)]);\r\n\tregisterNormalization([Element, \"outerHeight\", getDimension(\"height\", false)]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport const inlineRx = /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|let|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i,\r\n\t\tlistItemRx = /^(li)$/i,\r\n\t\ttableRowRx = /^(tr)$/i,\r\n\t\ttableRx = /^(table)$/i,\r\n\t\ttableRowGroupRx = /^(tbody)$/i;\r\n\r\n\t/**\r\n\t * Display has an extra value of \"auto\" that works out the correct value\r\n\t * based on the type of element.\r\n\t */\r\n\tfunction display(element: HTMLorSVGElement): string;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tconst style = element.style;\r\n\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn CSS.computePropertyValue(element, \"display\");\r\n\t\t}\r\n\t\tif (propertyValue === \"auto\") {\r\n\t\t\tconst nodeName = element && element.nodeName,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (inlineRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"inline\";\r\n\t\t\t} else if (listItemRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"list-item\";\r\n\t\t\t} else if (tableRowRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row\";\r\n\t\t\t} else if (tableRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table\";\r\n\t\t\t} else if (tableRowGroupRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row-group\";\r\n\t\t\t} else {\r\n\t\t\t\t// Default to \"block\" when no match is found.\r\n\t\t\t\tpropertyValue = \"block\";\r\n\t\t\t}\r\n\t\t\t// IMPORTANT: We need to do this as getPropertyValue bypasses the\r\n\t\t\t// Normalisation when it exists in the cache.\r\n\t\t\tdata.cache[\"display\"] = propertyValue;\r\n\t\t}\r\n\t\tstyle.display = propertyValue;\r\n\t\treturn true;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"display\", display]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tfunction genericReordering(element: HTMLorSVGElement): string;\r\n\tfunction genericReordering(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction genericReordering(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\tpropertyValue = CSS.getPropertyValue(element, \"textShadow\");\r\n\t\t\tconst split = propertyValue.split(/\\s/g),\r\n\t\t\t\tfirstPart = split[0];\r\n\t\t\tlet newValue = \"\";\r\n\r\n\t\t\tif (CSS.ColorNames[firstPart]) {\r\n\t\t\t\tsplit.shift();\r\n\t\t\t\tsplit.push(firstPart);\r\n\t\t\t\tnewValue = split.join(\" \");\r\n\t\t\t} else if (firstPart.match(/^#|^hsl|^rgb|-gradient/)) {\r\n\t\t\t\tconst matchedString = propertyValue.match(/(hsl.*\\)|#[\\da-fA-F]+|rgb.*\\)|.*gradient.*\\))\\s/g)[0];\r\n\r\n\t\t\t\tnewValue = propertyValue.replace(matchedString, \"\") + \" \" + matchedString.trim();\r\n\t\t\t} else {\r\n\t\t\t\tnewValue = propertyValue;\r\n\t\t\t}\r\n\t\t\treturn newValue;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"textShadow\", genericReordering]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction clientWidth(element: HTMLorSVGElement): string;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientWidth + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction scrollWidth(element: HTMLorSVGElement): string;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollWidth + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction clientHeight(element: HTMLorSVGElement): string;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientHeight + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction scrollHeight(element: HTMLorSVGElement): string;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollHeight + \"px\";\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll an element (vertical).\r\n\t */\r\n\tfunction scrollTop(element: HTMLorSVGElement): string;\r\n\tfunction scrollTop(element: HTMLorSVGElement, propertyValue: string): boolean;\r\n\tfunction scrollTop(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\tif (propertyValue == null) {\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"clientWidth\", false, true);\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"scrollWidth\", false, true);\r\n\t\t\t//\t\t\tgetPropertyValue(element, \"scrollLeft\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"clientHeight\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"scrollHeight\", false, true);\r\n\t\t\tCSS.getPropertyValue(element, \"scrollTop\", false, true);\r\n\t\t\treturn element.scrollTop + \"px\";\r\n\t\t}\r\n\t\tconsole.log(\"setScrollTop\", propertyValue)\r\n\t\tconst value = parseFloat(propertyValue),\r\n\t\t\tunit = propertyValue.replace(String(value), \"\");\r\n\r\n\t\tswitch (unit) {\r\n\t\t\tcase \"\":\r\n\t\t\tcase \"px\":\r\n\t\t\t\telement.scrollTop = value;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"%\":\r\n\t\t\t\tlet clientHeight = parseFloat(CSS.getPropertyValue(element, \"clientHeight\")),\r\n\t\t\t\t\tscrollHeight = parseFloat(CSS.getPropertyValue(element, \"scrollHeight\"));\r\n\r\n\t\t\t\tconsole.log(\"setScrollTop percent\", scrollHeight, clientHeight, value, Math.max(0, scrollHeight - clientHeight) * value / 100)\r\n\t\t\t\telement.scrollTop = Math.max(0, scrollHeight - clientHeight) * value / 100;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tregisterNormalization([HTMLElement, \"scrollTop\", scrollTop, false]);\r\n\tregisterNormalization([HTMLElement, \"scrollWidth\", scrollWidth]);\r\n\tregisterNormalization([HTMLElement, \"clientWidth\", clientWidth]);\r\n\tregisterNormalization([HTMLElement, \"scrollHeight\", scrollHeight]);\r\n\tregisterNormalization([HTMLElement, \"clientHeight\", clientHeight]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get the vendor prefixed\r\n\t * real name for a propery.\r\n\t */\r\n\tfunction vendorPrefix(property: string, unprefixed: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | boolean {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.style[unprefixed];\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, property, propertyValue);\r\n\t\t\treturn true;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst vendors = [/^webkit[A-Z]/, /^moz[A-Z]/, /^ms[A-Z]/, /^o[A-Z]/],\r\n\t\tprefixElement = State.prefixElement;\r\n\r\n\tfor (const property in prefixElement.style) {\r\n\t\tfor (let i = 0; i < vendors.length; i++) {\r\n\t\t\tif (vendors[i].test(property)) {\r\n\t\t\t\tlet unprefixed = property.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\r\n\r\n\t\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\r\n\t\t\t\t\tregisterNormalization([Element, unprefixed, vendorPrefix(property, unprefixed)]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Call Completion\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Call the complete method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callComplete(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.complete as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Complete an animation. This might involve restarting (for loop or repeat\r\n\t * options). Once it is finished we also check for any callbacks or Promises\r\n\t * that need updating.\r\n\t */\r\n\texport function completeCall(activeCall: AnimationCall) {\r\n\t\t//\t\tconsole.log(\"complete\", activeCall)\r\n\t\t// TODO: Check if it's not been completed already\r\n\r\n\t\tconst options = activeCall.options,\r\n\t\t\tqueue = getValue(activeCall.queue, options.queue),\r\n\t\t\tisLoop = getValue(activeCall.loop, options.loop, defaults.loop),\r\n\t\t\tisRepeat = getValue(activeCall.repeat, options.repeat, defaults.repeat),\r\n\t\t\tisStopped = activeCall._flags & AnimationFlags.STOPPED;\r\n\r\n\t\tif (!isStopped && (isLoop || isRepeat)) {\r\n\r\n\t\t\t////////////////////\r\n\t\t\t// Option: Loop //\r\n\t\t\t// Option: Repeat //\r\n\t\t\t////////////////////\r\n\r\n\t\t\tif (isRepeat && isRepeat !== true) {\r\n\t\t\t\tactiveCall.repeat = isRepeat - 1;\r\n\t\t\t} else if (isLoop && isLoop !== true) {\r\n\t\t\t\tactiveCall.loop = isLoop - 1;\r\n\t\t\t\tactiveCall.repeat = getValue(activeCall.repeatAgain, options.repeatAgain, defaults.repeatAgain);\r\n\t\t\t}\r\n\t\t\tif (isLoop) {\r\n\t\t\t\tactiveCall._flags ^= AnimationFlags.REVERSE;\r\n\t\t\t}\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// Can't be called when stopped so no need for an extra check.\r\n\t\t\t\tData(activeCall.element).lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t}\r\n\t\t\tactiveCall.timeStart = activeCall.ellapsedTime = activeCall.percentComplete = 0;\r\n\t\t\tactiveCall._flags &= ~AnimationFlags.STARTED;\r\n\t\t} else {\r\n\t\t\tconst element = activeCall.element,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (!--data.count && !isStopped) {\r\n\r\n\t\t\t\t////////////////////////\r\n\t\t\t\t// Feature: Classname //\r\n\t\t\t\t////////////////////////\r\n\r\n\t\t\t\tremoveClass(element, State.className);\r\n\t\t\t}\r\n\r\n\t\t\t//////////////////////\r\n\t\t\t// Option: Complete //\r\n\t\t\t//////////////////////\r\n\r\n\t\t\t// If this is the last animation in this list then we can check for\r\n\t\t\t// and complete calls or Promises.\r\n\t\t\t// TODO: When deleting an element we need to adjust these values.\r\n\t\t\tif (options && ++options._completed === options._total) {\r\n\t\t\t\tif (!isStopped && options.complete) {\r\n\t\t\t\t\t// We don't call the complete if the animation is stopped,\r\n\t\t\t\t\t// and we clear the key to prevent it being called again.\r\n\t\t\t\t\tcallComplete(activeCall);\r\n\t\t\t\t\toptions.complete = null;\r\n\t\t\t\t}\r\n\t\t\t\tconst resolver = options._resolver;\r\n\r\n\t\t\t\tif (resolver) {\r\n\t\t\t\t\t// Fulfil the Promise\r\n\t\t\t\t\tresolver(activeCall.elements as any);\r\n\t\t\t\t\tdelete options._resolver;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t///////////////////\r\n\t\t\t// Option: Queue //\r\n\t\t\t///////////////////\r\n\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// We only do clever things with queues...\r\n\t\t\t\tif (!isStopped) {\r\n\t\t\t\t\t// If we're not stopping an animation, we need to remember\r\n\t\t\t\t\t// what time it finished so that the next animation in\r\n\t\t\t\t\t// sequence gets the correct start time.\r\n\t\t\t\t\tdata.lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t\t}\r\n\t\t\t\t// Start the next animation in sequence, or delete the queue if\r\n\t\t\t\t// this was the last one.\r\n\t\t\t\tdequeue(element, queue);\r\n\t\t\t}\r\n\t\t\t// Cleanup any pointers, and remember the last animation etc.\r\n\t\t\tfreeAnimationCall(activeCall);\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface Element {\r\n\tvelocityData: ElementData;\r\n}\r\n\r\n/**\r\n * Get (and create) the internal data store for an element.\r\n */\r\nfunction Data(element: HTMLorSVGElement): ElementData {\r\n\t// Use a string member so Uglify doesn't mangle it.\r\n\tconst data = element[\"velocityData\"];\r\n\r\n\tif (data) {\r\n\t\treturn data;\r\n\t}\r\n\tlet types = 0;\r\n\r\n\tfor (let index = 0, constructors = VelocityStatic.constructors; index < constructors.length; index++) {\r\n\t\tif (element instanceof constructors[index]) {\r\n\t\t\ttypes |= 1 << index;\r\n\t\t}\r\n\t}\r\n\t// Do it this way so it errors on incorrect data.\r\n\tlet newData: ElementData = {\r\n\t\ttypes: types,\r\n\t\tcount: 0,\r\n\t\tcomputedStyle: null,\r\n\t\tcache: Object.create(null),\r\n\t\tqueueList: Object.create(null),\r\n\t\tlastAnimationList: Object.create(null),\r\n\t\tlastFinishList: Object.create(null)\r\n\t};\r\n\tObject.defineProperty(element, \"velocityData\", {\r\n\t\tvalue: newData\r\n\t});\r\n\treturn newData;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\r\n\t */\r\n\texport let debug: boolean | 1 | 2 = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity option defaults, which can be overriden by the user.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t// NOTE: Add the variable here, then add the default state in \"reset\" below.\r\n\tlet _cache: boolean,\r\n\t\t_begin: VelocityCallback,\r\n\t\t_complete: VelocityCallback,\r\n\t\t_delay: number,\r\n\t\t_duration: number,\r\n\t\t_easing: VelocityEasingType,\r\n\t\t_fpsLimit: number,\r\n\t\t_loop: number | true,\r\n\t\t_minFrameTime: number,\r\n\t\t_promise: boolean,\r\n\t\t_promiseRejectEmpty: boolean,\r\n\t\t_queue: string | false,\r\n\t\t_repeat: number | true,\r\n\t\t_speed: number,\r\n\t\t_sync: boolean;\r\n\r\n\texport const defaults: StrictVelocityOptions & {reset?: () => void} = {\r\n\t\tmobileHA: true\r\n\t};\r\n\r\n\t// IMPORTANT: Make sure any new defaults get added to the actions/set.ts list\r\n\tObject.defineProperties(defaults, {\r\n\t\treset: {\r\n\t\t\tenumerable: true,\r\n\t\t\tvalue: function() {\r\n\t\t\t\t_cache = DEFAULT_CACHE;\r\n\t\t\t\t_begin = undefined;\r\n\t\t\t\t_complete = undefined;\r\n\t\t\t\t_delay = DEFAULT_DELAY;\r\n\t\t\t\t_duration = DEFAULT_DURATION;\r\n\t\t\t\t_easing = validateEasing(DEFAULT_EASING, DEFAULT_DURATION);\r\n\t\t\t\t_fpsLimit = DEFAULT_FPSLIMIT;\r\n\t\t\t\t_loop = DEFAULT_LOOP;\r\n\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / DEFAULT_FPSLIMIT;\r\n\t\t\t\t_promise = DEFAULT_PROMISE;\r\n\t\t\t\t_promiseRejectEmpty = DEFAULT_PROMISE_REJECT_EMPTY;\r\n\t\t\t\t_queue = DEFAULT_QUEUE;\r\n\t\t\t\t_repeat = DEFAULT_REPEAT;\r\n\t\t\t\t_speed = DEFAULT_SPEED;\r\n\t\t\t\t_sync = DEFAULT_SYNC;\r\n\t\t\t}\r\n\t\t},\r\n\t\tcache: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _cache;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_cache = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tbegin: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _begin;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_begin = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomplete: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _complete;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_complete = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdelay: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _delay;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_delay = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tduration: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _duration;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_duration = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\teasing: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityEasingType {\r\n\t\t\t\treturn _easing;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityEasingType) {\r\n\t\t\t\tvalue = validateEasing(value, _duration);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_easing = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfpsLimit: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _fpsLimit;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | false) {\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_fpsLimit = value;\r\n\t\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tloop: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _loop;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_loop = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tminFrameTime: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _minFrameTime;\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromise: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promise;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromise(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promise = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromiseRejectEmpty: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promiseRejectEmpty;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromiseRejectEmpty(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promiseRejectEmpty = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tqueue: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): string | false {\r\n\t\t\t\treturn _queue;\r\n\t\t\t},\r\n\t\t\tset: function(value: string | false) {\r\n\t\t\t\tvalue = validateQueue(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_queue = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepeat: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _repeat;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_repeat = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tspeed: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number {\r\n\t\t\t\treturn _speed;\r\n\t\t\t},\r\n\t\t\tset: function(value: number) {\r\n\t\t\t\tvalue = validateSpeed(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_speed = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsync: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _sync;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateSync(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_sync = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tdefaults.reset();\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity-wide animation time remapping for testing purposes.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * In mock mode, all animations are forced to complete immediately upon the\r\n\t * next rAF tick. If there are further animations queued then they will each\r\n\t * take one single frame in turn. Loops and repeats will be disabled while\r\n\t * mock = true.\r\n\t */\r\n\texport let mock: boolean = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\r\n\t * object must either be treatable as an array - with a .length\r\n\t * property, and each member a Node, or a Node directly.\r\n\t * \r\n\t * \r\n\t * By default Velocity will try to patch window,\r\n\t * jQuery, Zepto, and several classes that return\r\n\t * Nodes or lists of Nodes.\r\n\t * \r\n\t * @public\r\n\t */\r\n\texport function patch(proto: any, global?: boolean) {\r\n\t\ttry {\r\n\t\t\tdefineProperty(proto, (global ? \"V\" : \"v\") + \"elocity\", VelocityFn);\r\n\t\t} catch (e) {\r\n\t\t\tconsole.warn(\"VelocityJS: Error when trying to add prototype.\", e);\r\n\t\t}\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * AnimationCall queue\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Simple queue management. Un-named queue is directly within the element data,\r\n\t * named queue is within an object within it.\r\n\t */\r\n\tfunction animate(animation: AnimationCall) {\r\n\t\tconst prev = State.last;\r\n\r\n\t\tanimation._prev = prev;\r\n\t\tanimation._next = undefined;\r\n\t\tif (prev) {\r\n\t\t\tprev._next = animation;\r\n\t\t} else {\r\n\t\t\tState.first = animation;\r\n\t\t}\r\n\t\tState.last = animation;\r\n\t\tif (!State.firstNew) {\r\n\t\t\tState.firstNew = animation;\r\n\t\t}\r\n\t\tconst element = animation.element,\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (queue !== false) {\r\n\t\t\t// Store the last animation added so we can use it for the\r\n\t\t\t// beginning of the next one.\r\n\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t}\r\n\t\tif (!data.count++) {\r\n\r\n\t\t\t////////////////////////\r\n\t\t\t// Feature: Classname //\r\n\t\t\t////////////////////////\r\n\r\n\t\t\taddClass(element, State.className);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add an item to an animation queue.\r\n\t */\r\n\texport function queue(element: HTMLorSVGElement, animation: AnimationCall, queue?: string | false): void {\r\n\t\tif (queue === false) {\r\n\t\t\tanimate(animation);\r\n\t\t} else {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element);\r\n\t\t\tlet last = data.queueList[queue];\r\n\r\n\t\t\tif (!last) {\r\n\t\t\t\tif (last === null) {\r\n\t\t\t\t\tdata.queueList[queue] = animation;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdata.queueList[queue] = null;\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile (last._next) {\r\n\t\t\t\t\tlast = last._next;\r\n\t\t\t\t}\r\n\t\t\t\tlast._next = animation;\r\n\t\t\t\tanimation._prev = last;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Start the next animation on this element's queue (named or default).\r\n\t *\r\n\t * @returns the next animation that is starting.\r\n\t */\r\n\texport function dequeue(element: HTMLorSVGElement, queue?: string | boolean, skip?: boolean): AnimationCall {\r\n\t\tif (queue !== false) {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element),\r\n\t\t\t\tanimation = data.queueList[queue];\r\n\r\n\t\t\tif (animation) {\r\n\t\t\t\tdata.queueList[queue] = animation._next || null;\r\n\t\t\t\tif (!skip) {\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else if (animation === null) {\r\n\t\t\t\tdelete data.queueList[queue];\r\n\t\t\t}\r\n\t\t\treturn animation;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove an animation from the active animation list. If it has a queue set\r\n\t * then remember it as the last animation for that queue, and free the one\r\n\t * that was previously there. If the animation list is completely empty then\r\n\t * mark us as finished.\r\n\t */\r\n\texport function freeAnimationCall(animation: AnimationCall): void {\r\n\t\tconst next = animation._next,\r\n\t\t\tprev = animation._prev,\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (State.firstNew === animation) {\r\n\t\t\tState.firstNew = next;\r\n\t\t}\r\n\t\tif (State.first === animation) {\r\n\t\t\tState.first = next;\r\n\t\t} else if (prev) {\r\n\t\t\tprev._next = next;\r\n\t\t}\r\n\t\tif (State.last === animation) {\r\n\t\t\tState.last = prev;\r\n\t\t} else if (next) {\r\n\t\t\tnext._prev = prev;\r\n\t\t}\r\n\t\tif (queue) {\r\n\t\t\tconst data = Data(animation.element);\r\n\r\n\t\t\tif (data) {\r\n\t\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t\t\tanimation._next = animation._prev = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */\r\n\texport let Redirects = {/* Manually registered by the user. */};\r\n\r\n\t/***********************\r\n\t Packaged Redirects\r\n\t ***********************/\r\n\r\n\t/* slideUp, slideDown */\r\n\t[\"Down\", \"Up\"].forEach(function(direction) {\r\n\t\tRedirects[\"slide\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tbegin = opts.begin,\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tinlineValues = {},\r\n\t\t\t\tcomputedValues = {\r\n\t\t\t\t\theight: \"\",\r\n\t\t\t\t\tmarginTop: \"\",\r\n\t\t\t\t\tmarginBottom: \"\",\r\n\t\t\t\t\tpaddingTop: \"\",\r\n\t\t\t\t\tpaddingBottom: \"\"\r\n\t\t\t\t};\r\n\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\tlet isInline = inlineRx.test(element.nodeName.toLowerCase());\r\n\r\n\t\t\t\t/* Show the element before slideDown begins and hide the element after slideUp completes. */\r\n\t\t\t\t/* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */\r\n\t\t\t\topts.display = (direction === \"Down\" ? (isInline ? \"inline-block\" : \"block\") : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\topts.begin = function() {\r\n\t\t\t\t/* If the user passed in a begin callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === 0 && begin) {\r\n\t\t\t\t\tbegin.call(elements, elements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Cache the elements' original vertical dimensional property values so that we can animate back to them. */\r\n\t\t\t\tfor (let property in computedValues) {\r\n\t\t\t\t\tif (!computedValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinlineValues[property] = element.style[property];\r\n\r\n\t\t\t\t\t/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,\r\n\t\t\t\t\t use forcefeeding to start from computed values and animate down to 0. */\r\n\t\t\t\t\tlet propertyValue = CSS.getPropertyValue(element, property);\r\n\t\t\t\t\tcomputedValues[property] = (direction === \"Down\") ? [propertyValue, 0] : [0, propertyValue];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Force vertical overflow content to clip so that sliding works as expected. */\r\n\t\t\t\t(inlineValues as any).overflow = element.style.overflow;\r\n\t\t\t\telement.style.overflow = \"hidden\";\r\n\t\t\t};\r\n\r\n\t\t\topts.complete = function() {\r\n\t\t\t\t/* Reset element to its pre-slide inline values once its slide animation is complete. */\r\n\t\t\t\tfor (let property in inlineValues) {\r\n\t\t\t\t\tif (inlineValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\telement.style[property] = inlineValues[property];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the user passed in a complete callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === elementsSize - 1) {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\tresolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t(VelocityFn as any)(element, computedValues, opts);\r\n\t\t};\r\n\t});\r\n\r\n\t/* fadeIn, fadeOut */\r\n\t[\"In\", \"Out\"].forEach(function(direction) {\r\n\t\tRedirects[\"fade\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], promiseData) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tpropertiesMap = {\r\n\t\t\t\t\topacity: (direction === \"In\") ? 1 : 0\r\n\t\t\t\t};\r\n\r\n\t\t\t/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering\r\n\t\t\t callbacks by firing them only when the final element has been reached. */\r\n\t\t\tif (elementsIndex !== 0) {\r\n\t\t\t\topts.begin = null;\r\n\t\t\t}\r\n\t\t\tif (elementsIndex !== elementsSize - 1) {\r\n\t\t\t\topts.complete = null;\r\n\t\t\t} else {\r\n\t\t\t\topts.complete = function() {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t/* If a display was passed in, use it. Otherwise, default to \"none\" for fadeOut or the element-specific default for fadeIn. */\r\n\t\t\t/* Note: We allow users to pass in \"null\" to skip display setting altogether. */\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\topts.display = (direction === \"In\" ? \"auto\" : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\t(VelocityFn as any)(this, propertiesMap, opts);\r\n\t\t};\r\n\t});\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Effect Registration\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */\r\n\tfunction animateParentHeight(elements: HTMLorSVGElement | HTMLorSVGElement[], direction, totalDuration, stagger) {\r\n\t\tlet totalHeightDelta = 0,\r\n\t\t\tparentNode: HTMLorSVGElement;\r\n\r\n\t\t/* Sum the total height (including padding and margin) of all targeted elements. */\r\n\t\t((elements as HTMLorSVGElement).nodeType ? [elements as HTMLorSVGElement] : elements as HTMLorSVGElement[]).forEach(function(element: HTMLorSVGElement, i) {\r\n\t\t\tif (stagger) {\r\n\t\t\t\t/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */\r\n\t\t\t\ttotalDuration += i * stagger;\r\n\t\t\t}\r\n\r\n\t\t\tparentNode = element.parentNode as HTMLorSVGElement;\r\n\r\n\t\t\tlet propertiesToSum = [\"height\", \"paddingTop\", \"paddingBottom\", \"marginTop\", \"marginBottom\"];\r\n\r\n\t\t\t/* If box-sizing is border-box, the height already includes padding and margin */\r\n\t\t\tif (CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\") {\r\n\t\t\t\tpropertiesToSum = [\"height\"];\r\n\t\t\t}\r\n\r\n\t\t\tpropertiesToSum.forEach(function(property) {\r\n\t\t\t\ttotalHeightDelta += parseFloat(CSS.getPropertyValue(element, property) as string);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */\r\n\t\t// TODO: Get this typesafe again\r\n\t\t(VelocityFn as any)(\r\n\t\t\tparentNode,\r\n\t\t\t{height: (direction === \"In\" ? \"+\" : \"-\") + \"=\" + totalHeightDelta},\r\n\t\t\t{queue: false, easing: \"ease-in-out\", duration: totalDuration * (direction === \"In\" ? 0.6 : 1)}\r\n\t\t);\r\n\t}\r\n\r\n\t/* Note: RegisterUI is a legacy name. */\r\n\texport function RegisterEffect(effectName: string, properties): Velocity {\r\n\r\n\t\t/* Register a custom redirect for each effect. */\r\n\t\tRedirects[effectName] = function(element, redirectOptions, elementsIndex, elementsSize, elements, resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void, loop) {\r\n\t\t\tlet finalElement = (elementsIndex === elementsSize - 1),\r\n\t\t\t\ttotalDuration = 0;\r\n\r\n\t\t\tloop = loop || properties.loop;\r\n\t\t\tif (typeof properties.defaultDuration === \"function\") {\r\n\t\t\t\tproperties.defaultDuration = properties.defaultDuration.call(elements, elements);\r\n\t\t\t} else {\r\n\t\t\t\tproperties.defaultDuration = parseFloat(properties.defaultDuration);\r\n\t\t\t}\r\n\r\n\t\t\t/* Get the total duration used, so we can share it out with everything that doesn't have a duration */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet durationPercentage = properties.calls[callIndex][1];\r\n\t\t\t\tif (typeof durationPercentage === \"number\") {\r\n\t\t\t\t\ttotalDuration += durationPercentage;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet shareDuration = totalDuration >= 1 ? 0 : properties.calls.length ? (1 - totalDuration) / properties.calls.length : 1;\r\n\r\n\t\t\t/* Iterate through each effect's call array. */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet call = properties.calls[callIndex],\r\n\t\t\t\t\tpropertyMap = call[0],\r\n\t\t\t\t\tredirectDuration = 1000,\r\n\t\t\t\t\tdurationPercentage = call[1],\r\n\t\t\t\t\tcallOptions = call[2] || {},\r\n\t\t\t\t\topts: VelocityOptions = {};\r\n\r\n\t\t\t\tif (redirectOptions.duration !== undefined) {\r\n\t\t\t\t\tredirectDuration = redirectOptions.duration;\r\n\t\t\t\t} else if (properties.defaultDuration !== undefined) {\r\n\t\t\t\t\tredirectDuration = properties.defaultDuration;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Assign the whitelisted per-call options. */\r\n\t\t\t\topts.duration = redirectDuration * (typeof durationPercentage === \"number\" ? durationPercentage : shareDuration);\r\n\t\t\t\topts.queue = redirectOptions.queue || \"\";\r\n\t\t\t\topts.easing = callOptions.easing || \"ease\";\r\n\t\t\t\topts.delay = parseFloat(callOptions.delay) || 0;\r\n\t\t\t\topts.loop = !properties.loop && callOptions.loop;\r\n\t\t\t\topts.cache = callOptions.cache || true;\r\n\r\n\t\t\t\t/* Special processing for the first effect call. */\r\n\t\t\t\tif (callIndex === 0) {\r\n\t\t\t\t\t/* If a delay was passed into the redirect, combine it with the first call's delay. */\r\n\t\t\t\t\topts.delay += (parseFloat(redirectOptions.delay) || 0);\r\n\r\n\t\t\t\t\tif (elementsIndex === 0) {\r\n\t\t\t\t\t\topts.begin = function() {\r\n\t\t\t\t\t\t\t/* Only trigger a begin callback on the first effect call with the first element in the set. */\r\n\t\t\t\t\t\t\tif (redirectOptions.begin) {\r\n\t\t\t\t\t\t\t\tredirectOptions.begin.call(elements, elements);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tlet direction = effectName.match(/(In|Out)$/);\r\n\r\n\t\t\t\t\t\t\t/* Make \"in\" transitioning elements invisible immediately so that there's no FOUC between now\r\n\t\t\t\t\t\t\t and the first RAF tick. */\r\n\t\t\t\t\t\t\tif ((direction && direction[0] === \"In\") && propertyMap.opacity !== undefined) {\r\n\t\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"opacity\", 0);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Only trigger animateParentHeight() if we're using an In/Out transition. */\r\n\t\t\t\t\t\t\tif (redirectOptions.animateParentHeight && direction) {\r\n\t\t\t\t\t\t\t\tanimateParentHeight(elements, direction[0], redirectDuration + (opts.delay as number), redirectOptions.stagger);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If the user isn't overriding the display option, default to \"auto\" for \"In\"-suffixed transitions. */\r\n\t\t\t\t\t//\t\t\t\t\tif (redirectOptions.display !== null) {\r\n\t\t\t\t\t//\t\t\t\t\t\tif (redirectOptions.display !== undefined && redirectOptions.display !== \"none\") {\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = redirectOptions.display;\r\n\t\t\t\t\t//\t\t\t\t\t\t} else if (/In$/.test(effectName)) {\r\n\t\t\t\t\t//\t\t\t\t\t\t\t/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */\r\n\t\t\t\t\t//\t\t\t\t\t\t\tlet defaultDisplay = CSS.Values.getDisplayType(element);\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = (defaultDisplay === \"inline\") ? \"inline-block\" : defaultDisplay;\r\n\t\t\t\t\t//\t\t\t\t\t\t}\r\n\t\t\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility && redirectOptions.visibility !== \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Special processing for the last effect call. */\r\n\t\t\t\tif (callIndex === properties.calls.length - 1) {\r\n\t\t\t\t\t/* Append promise resolving onto the user's redirect callback. */\r\n\t\t\t\t\tlet injectFinalCallbacks = function() {\r\n\t\t\t\t\t\tif ((redirectOptions.display === undefined || redirectOptions.display === \"none\") && /Out$/.test(effectName)) {\r\n\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"display\", \"none\");\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (redirectOptions.complete) {\r\n\t\t\t\t\t\t\tredirectOptions.complete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\t\tresolver(elements || element);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\tRedirects[effectName](element, redirectOptions, elementsIndex, elementsSize, elements, resolver, loop === true ? true : Math.max(0, loop - 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (properties.reset) {\r\n\t\t\t\t\t\t\tfor (let resetProperty in properties.reset) {\r\n\t\t\t\t\t\t\t\tif (!properties.reset.hasOwnProperty(resetProperty)) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlet resetValue = properties.reset[resetProperty];\r\n\r\n\t\t\t\t\t\t\t\t/* Format each non-array value in the reset property map to [ value, value ] so that changes apply\r\n\t\t\t\t\t\t\t\t immediately and DOM querying is avoided (via forcefeeding). */\r\n\t\t\t\t\t\t\t\t/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */\r\n\t\t\t\t\t\t\t\t// TODO: Fix this\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === \"string\" || typeof resetValue === \"number\")) {\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tproperties.reset[resetProperty] = [properties.reset[resetProperty], properties.reset[resetProperty]];\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */\r\n\t\t\t\t\t\t\tlet resetOptions: VelocityOptions = {duration: 0, queue: false};\r\n\r\n\t\t\t\t\t\t\t/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */\r\n\t\t\t\t\t\t\tif (finalElement) {\r\n\t\t\t\t\t\t\t\tresetOptions.complete = injectFinalCallbacks;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tVelocityFn(element, properties.reset, resetOptions);\r\n\t\t\t\t\t\t\t/* Only trigger the user's complete callback on the last effect call with the last element in the set. */\r\n\t\t\t\t\t\t} else if (finalElement) {\r\n\t\t\t\t\t\t\tinjectFinalCallbacks();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility === \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVelocityFn(element, propertyMap, opts);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Return the Velocity object so that RegisterUI calls can be chained. */\r\n\t\treturn VelocityFn as any;\r\n\t};\r\n};","/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Sequence Running\n */\n\nnamespace VelocityStatic {\n\t/* Note: Sequence calls must use Velocity's single-object arguments syntax. */\n\texport function RunSequence(originalSequence): void {\n\t\tlet sequence = _deepCopyObject([], originalSequence);\n\n\t\tif (sequence.length > 1) {\n\t\t\tsequence.reverse().forEach(function(currentCall, i) {\n\t\t\t\tlet nextCall = sequence[i + 1];\n\n\t\t\t\tif (nextCall) {\n\t\t\t\t\t/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered\n\t\t\t\t\t in the previous call's begin callback. Otherwise, chained calls are normally triggered\n\t\t\t\t\t in the previous call's complete callback. */\n\t\t\t\t\tlet currentCallOptions = currentCall.o || currentCall.options,\n\t\t\t\t\t\tnextCallOptions = nextCall.o || nextCall.options;\n\n\t\t\t\t\tlet timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? \"begin\" : \"complete\",\n\t\t\t\t\t\tcallbackOriginal = nextCallOptions && nextCallOptions[timing],\n\t\t\t\t\t\toptions = {};\n\n\t\t\t\t\toptions[timing] = function() {\n\t\t\t\t\t\tlet nextCallElements = nextCall.e || nextCall.elements;\n\t\t\t\t\t\tlet elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;\n\n\t\t\t\t\t\tif (callbackOriginal) {\n\t\t\t\t\t\t\tcallbackOriginal.call(elements, elements);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tVelocityFn(currentCall);\n\t\t\t\t\t};\n\n\t\t\t\t\tif (nextCall.o) {\n\t\t\t\t\t\tnextCall.o = {...nextCallOptions, ...options};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnextCall.options = {...nextCallOptions, ...options};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsequence.reverse();\n\t\t}\n\n\t\tVelocityFn(sequence[0]);\n\t};\n};\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tick\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Call the begin method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\texport function callBegin(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.begin as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Call the progress method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callProgress(activeCall: AnimationCall, timeCurrent: number) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements,\r\n\t\t\t\tpercentComplete = activeCall.percentComplete,\r\n\t\t\t\toptions = activeCall.options,\r\n\t\t\t\ttweenValue = activeCall.tween;\r\n\r\n\t\t\t(activeCall.options.progress as VelocityProgress).call(elements,\r\n\t\t\t\telements,\r\n\t\t\t\tpercentComplete,\r\n\t\t\t\tMath.max(0, activeCall.timeStart + (activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaults.duration) - timeCurrent),\r\n\t\t\t\ttweenValue !== undefined ? tweenValue : String(percentComplete * 100),\r\n\t\t\t\tactiveCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tlet firstProgress: AnimationCall,\r\n\t\tfirstComplete: AnimationCall;\r\n\r\n\tfunction asyncCallbacks() {\r\n\t\tlet activeCall: AnimationCall,\r\n\t\t\tnextCall: AnimationCall;\r\n\t\t// Callbacks and complete that might read the DOM again.\r\n\r\n\t\t// Progress callback\r\n\t\tfor (activeCall = firstProgress; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextProgress;\r\n\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\tcallProgress(activeCall, lastTick);\r\n\t\t}\r\n\t\t// Complete animations, including complete callback or looping\r\n\t\tfor (activeCall = firstComplete; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextComplete;\r\n\t\t\t/* If this call has finished tweening, pass it to complete() to handle call cleanup. */\r\n\t\t\tcompleteCall(activeCall);\r\n\t\t}\r\n\t}\r\n\r\n\t/**************\r\n\t Timing\r\n\t **************/\r\n\r\n\tconst FRAME_TIME = 1000 / 60,\r\n\t\t/**\r\n\t\t* Shim for window.performance in case it doesn't exist\r\n\t\t*/\r\n\t\tperformance = (function() {\r\n\t\t\tconst perf = window.performance || {} as Performance;\r\n\r\n\t\t\tif (typeof perf.now !== \"function\") {\r\n\t\t\t\tconst nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : _now();\r\n\r\n\t\t\t\tperf.now = function() {\r\n\t\t\t\t\treturn _now() - nowOffset;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn perf;\r\n\t\t})(),\r\n\t\t/**\r\n\t\t * Proxy function for when rAF is not available - try to be as accurate\r\n\t\t * as possible with the setTimeout calls, however they are far less\r\n\t\t * accurate than rAF can be - so try not to use normally (unless the tab\r\n\t\t * is in the background).\r\n\t\t */\r\n\t\trAFProxy = function(callback: FrameRequestCallback) {\r\n\t\t\tconsole.log(\"rAFProxy\", Math.max(0, FRAME_TIME - (performance.now() - lastTick)), performance.now(), lastTick, FRAME_TIME)\r\n\t\t\treturn setTimeout(function() {\r\n\t\t\t\tcallback(performance.now());\r\n\t\t\t}, Math.max(0, FRAME_TIME - (performance.now() - lastTick)));\r\n\t\t},\r\n\t\t/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */\r\n\t\trAFShim = window.requestAnimationFrame || rAFProxy;\r\n\t/**\r\n\t * The ticker function being used, either rAF, or a function that\r\n\t * emulates it.\r\n\t */\r\n\tlet ticker: (callback: FrameRequestCallback) => number = document.hidden ? rAFProxy : rAFShim;\r\n\t/**\r\n\t * The time that the last animation frame ran at. Set from tick(), and used\r\n\t * for missing rAF (ie, when not in focus etc).\r\n\t */\r\n\texport let lastTick: number = 0;\r\n\r\n\t/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.\r\n\t To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile\r\n\t devices to avoid wasting battery power on inactive tabs. */\r\n\t/* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */\r\n\tif (!State.isMobile && document.hidden !== undefined) {\r\n\t\tdocument.addEventListener(\"visibilitychange\", function updateTicker(event?: Event) {\r\n\t\t\tlet hidden = document.hidden;\r\n\r\n\t\t\tticker = hidden ? rAFProxy : rAFShim;\r\n\t\t\tif (event) {\r\n\t\t\t\tsetTimeout(tick, 2000);\r\n\t\t\t}\r\n\t\t\ttick();\r\n\t\t});\r\n\t}\r\n\r\n\tlet ticking: boolean;\r\n\r\n\t/**\r\n\t * Called on every tick, preferably through rAF. This is reponsible for\r\n\t * initialising any new animations, then starting any that need starting.\r\n\t * Finally it will expand any tweens and set the properties relating to\r\n\t * them. If there are any callbacks relating to the animations then they\r\n\t * will attempt to call at the end (with the exception of \"begin\").\r\n\t */\r\n\texport function tick(timestamp?: number | boolean) {\r\n\t\tif (ticking) {\r\n\t\t\t// Should never happen - but if we've swapped back from hidden to\r\n\t\t\t// visibile then we want to make sure\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tticking = true;\r\n\t\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\r\n\t\t We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever\r\n\t\t the browser's next tick sync time occurs, which results in the first elements subjected to Velocity\r\n\t\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\r\n\t\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\r\n\t\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\r\n\t\tif (timestamp) {\r\n\t\t\t/* We normally use RAF's high resolution timestamp but as it can be significantly offset when the browser is\r\n\t\t\t under high stress we give the option for choppiness over allowing the browser to drop huge chunks of frames.\r\n\t\t\t We use performance.now() and shim it if it doesn't exist for when the tab is hidden. */\r\n\t\t\tconst timeCurrent = timestamp && timestamp !== true ? timestamp : performance.now(),\r\n\t\t\t\tdeltaTime = lastTick ? timeCurrent - lastTick : FRAME_TIME,\r\n\t\t\t\tdefaultSpeed = defaults.speed,\r\n\t\t\t\tdefaultEasing = defaults.easing,\r\n\t\t\t\tdefaultDuration = defaults.duration;\r\n\t\t\tlet activeCall: AnimationCall,\r\n\t\t\t\tnextCall: AnimationCall,\r\n\t\t\t\tlastProgress: AnimationCall,\r\n\t\t\t\tlastComplete: AnimationCall;\r\n\r\n\t\t\tfirstProgress = null;\r\n\t\t\tfirstComplete = null;\r\n\t\t\tif (deltaTime >= defaults.minFrameTime || !lastTick) {\r\n\t\t\t\tlastTick = timeCurrent;\r\n\r\n\t\t\t\t/********************\r\n\t\t\t\t Call Iteration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\t// Expand any tweens that might need it.\r\n\t\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t\t}\r\n\t\t\t\t// Iterate through each active call.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = activeCall._next) {\r\n\t\t\t\t\tconst element = activeCall.element;\r\n\t\t\t\t\tlet data: ElementData;\r\n\r\n\t\t\t\t\t// Check to see if this element has been deleted midway\r\n\t\t\t\t\t// through the animation. If it's gone then end this\r\n\t\t\t\t\t// animation.\r\n\t\t\t\t\tif (!element.parentNode || !(data = Data(element))) {\r\n\t\t\t\t\t\t// TODO: Remove safely - decrease count, delete data, remove from arrays\r\n\t\t\t\t\t\tfreeAnimationCall(activeCall);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tconst options = activeCall.options,\r\n\t\t\t\t\t\tflags = activeCall._flags;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// If this is the first time that this call has been\r\n\t\t\t\t\t// processed by tick() then we assign timeStart now so that\r\n\t\t\t\t\t// it's value is as close to the real animation start time\r\n\t\t\t\t\t// as possible.\r\n\t\t\t\t\tif (!timeStart) {\r\n\t\t\t\t\t\tconst queue = activeCall.queue != null ? activeCall.queue : options.queue;\r\n\r\n\t\t\t\t\t\ttimeStart = timeCurrent - deltaTime;\r\n\t\t\t\t\t\tif (queue !== false) {\r\n\t\t\t\t\t\t\ttimeStart = Math.max(timeStart, data.lastFinishList[queue] || 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If this animation is paused then skip processing unless\r\n\t\t\t\t\t// it has been set to resume.\r\n\t\t\t\t\tif (flags & AnimationFlags.PAUSED) {\r\n\t\t\t\t\t\t// Update the time start to accomodate the paused\r\n\t\t\t\t\t\t// completion amount.\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Check if this animation is ready - if it's synced then it\r\n\t\t\t\t\t// needs to wait for all other animations in the sync\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY)) {\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.READY;\r\n\t\t\t\t\t\toptions._ready++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Need to split the loop, as ready sync animations must all get\r\n\t\t\t\t// the same start time.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = nextCall) {\r\n\t\t\t\t\tconst flags = activeCall._flags;\r\n\r\n\t\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY) || (flags & AnimationFlags.PAUSED)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst options = activeCall.options;\r\n\r\n\t\t\t\t\tif ((flags & AnimationFlags.SYNC) && options._ready < options._total) {\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst speed = activeCall.speed != null ? activeCall.speed : options.speed != null ? options.speed : defaultSpeed;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tif (!(flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t\t\tconst delay = activeCall.delay != null ? activeCall.delay : options.delay;\r\n\r\n\t\t\t\t\t\t// Make sure anything we've delayed doesn't start\r\n\t\t\t\t\t\t// animating yet, there might still be an active delay\r\n\t\t\t\t\t\t// after something has been un-paused\r\n\t\t\t\t\t\tif (delay) {\r\n\t\t\t\t\t\t\tif (timeStart + (delay / speed) > timeCurrent) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tactiveCall.timeStart = timeStart += delay / (delay > 0 ? speed : 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.STARTED;\r\n\t\t\t\t\t\t// The begin callback is fired once per call, not once\r\n\t\t\t\t\t\t// per element, and is passed the full raw DOM element\r\n\t\t\t\t\t\t// set as both its context and its first argument.\r\n\t\t\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\t\t\toptions._first = activeCall;\r\n\t\t\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\t\t\tcallBegin(activeCall);\r\n\t\t\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (speed !== 1) {\r\n\t\t\t\t\t\t// On the first frame we may have a shorter delta\r\n\t\t\t\t\t\tconst delta = Math.min(deltaTime, timeCurrent - timeStart);\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart += delta * (1 - speed);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options._first === activeCall && options.progress) {\r\n\t\t\t\t\t\tactiveCall._nextProgress = undefined;\r\n\t\t\t\t\t\tif (lastProgress) {\r\n\t\t\t\t\t\t\tlastProgress._nextProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst activeEasing = activeCall.easing != null ? activeCall.easing : options.easing != null ? options.easing : defaultEasing,\r\n\t\t\t\t\t\tmillisecondsEllapsed = activeCall.ellapsedTime = timeCurrent - timeStart,\r\n\t\t\t\t\t\tduration = activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaultDuration,\r\n\t\t\t\t\t\tpercentComplete = activeCall.percentComplete = mock ? 1 : Math.min(millisecondsEllapsed / duration, 1),\r\n\t\t\t\t\t\ttweens = activeCall.tweens,\r\n\t\t\t\t\t\treverse = flags & AnimationFlags.REVERSE;\r\n\r\n\t\t\t\t\tif (percentComplete === 1) {\r\n\t\t\t\t\t\tactiveCall._nextComplete = undefined;\r\n\t\t\t\t\t\tif (lastComplete) {\r\n\t\t\t\t\t\t\tlastComplete._nextComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const property in tweens) {\r\n\t\t\t\t\t\t// For every element, iterate through each property.\r\n\t\t\t\t\t\tconst tween = tweens[property],\r\n\t\t\t\t\t\t\teasing = tween[Tween.EASING] || activeEasing,\r\n\t\t\t\t\t\t\tpattern = tween[Tween.PATTERN],\r\n\t\t\t\t\t\t\trounding = tween[Tween.ROUNDING];\r\n\t\t\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\t\t\tconst startValue = tween[Tween.START][i];\r\n\r\n\t\t\t\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// All easings must deal with numbers except for\r\n\t\t\t\t\t\t\t\t\t// our internal ones\r\n\t\t\t\t\t\t\t\t\tconst result = easing(reverse ? 1 - percentComplete : percentComplete, startValue as number, tween[Tween.END][i] as number, property)\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue += rounding && rounding[i] ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (property !== \"tween\") {\r\n\t\t\t\t\t\t\t\t// TODO: To solve an IE<=8 positioning bug, the unit type must be dropped when setting a property value of 0 - add normalisations to legacy\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(activeCall.element, property, currentValue);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Skip the fake 'tween' property as that is only\r\n\t\t\t\t\t\t\t\t// passed into the progress callback.\r\n\t\t\t\t\t\t\t\tactiveCall.tween = currentValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.warn(\"VelocityJS: Missing pattern:\", property, JSON.stringify(tween[property]))\r\n\t\t\t\t\t\t\tdelete tweens[property];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (firstProgress || firstComplete) {\r\n\t\t\t\t\tsetTimeout(asyncCallbacks, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (State.first) {\r\n\t\t\tState.isTicking = true;\r\n\t\t\tticker(tick);\r\n\t\t} else {\r\n\t\t\tState.isTicking = false;\r\n\t\t\tlastTick = 0;\r\n\t\t}\r\n\t\tticking = false;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Use rAF high resolution timestamp when available.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let timestamp: boolean = true;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tweens\r\n */\r\n\r\nconst enum Tween {\r\n\tEND,\r\n\tEASING,\r\n\tSTART,\r\n\tPATTERN,\r\n\tROUNDING,\r\n\tlength\r\n};\r\n\r\nnamespace VelocityStatic {\r\n\tlet commands = new Map string>();\r\n\r\n\tcommands.set(\"function\", function(value: any, element: HTMLorSVGElement, elements: HTMLorSVGElement[], elementArrayIndex: number) {\r\n\t\treturn (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length);\r\n\t})\r\n\tcommands.set(\"number\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn value + (element instanceof HTMLElement ? getUnitType(propertyName) : \"\");\r\n\t});\r\n\tcommands.set(\"string\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn CSS.fixColors(value);\r\n\t});\r\n\tcommands.set(\"undefined\", function(value, element, elements, elementArrayIndex, propertyName) {\r\n\t\treturn CSS.fixColors(CSS.getPropertyValue(element, propertyName) || \"\");\r\n\t});\r\n\r\n\tconst\r\n\t\t/**\r\n\t\t * Properties that take \"deg\" as the default numeric suffix.\r\n\t\t */\r\n\t\tdegree = [\r\n\t\t\t// \"azimuth\" // Deprecated\r\n\t\t],\r\n\t\t/**\r\n\t\t * Properties that take no default numeric suffix.\r\n\t\t */\r\n\t\tunitless = [\r\n\t\t\t\"borderImageSlice\",\r\n\t\t\t\"columnCount\",\r\n\t\t\t\"counterIncrement\",\r\n\t\t\t\"counterReset\",\r\n\t\t\t\"flex\",\r\n\t\t\t\"flexGrow\",\r\n\t\t\t\"flexShrink\",\r\n\t\t\t\"floodOpacity\",\r\n\t\t\t\"fontSizeAdjust\",\r\n\t\t\t\"fontWeight\",\r\n\t\t\t\"lineHeight\",\r\n\t\t\t\"opacity\",\r\n\t\t\t\"order\",\r\n\t\t\t\"orphans\",\r\n\t\t\t\"shapeImageThreshold\",\r\n\t\t\t\"tabSize\",\r\n\t\t\t\"widows\",\r\n\t\t\t\"zIndex\"\r\n\t\t];\r\n\r\n\t/**\r\n\t * Retrieve a property's default unit type. Used for assigning a unit\r\n\t * type when one is not supplied by the user. These are only valid for\r\n\t * HTMLElement style properties.\r\n\t */\r\n\tfunction getUnitType(property: string): string {\r\n\t\tif (_inArray(degree, property)) {\r\n\t\t\treturn \"deg\";\r\n\t\t}\r\n\t\tif (_inArray(unitless, property)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\treturn \"px\";\r\n\t}\r\n\r\n\t/**\r\n\t * Expand a VelocityProperty argument into a valid sparse Tween array. This\r\n\t * pre-allocates the array as it is then the correct size and slightly\r\n\t * faster to access.\r\n\t */\r\n\texport function expandProperties(animation: AnimationCall, properties: VelocityProperties) {\r\n\t\tconst tweens = animation.tweens = Object.create(null),\r\n\t\t\telements = animation.elements,\r\n\t\t\telement = animation.element,\r\n\t\t\telementArrayIndex = elements.indexOf(element),\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = getValue(animation.queue, animation.options.queue),\r\n\t\t\tduration = getValue(animation.options.duration, defaults.duration);\r\n\r\n\t\tfor (const property in properties) {\r\n\t\t\tconst propertyName = CSS.camelCase(property);\r\n\t\t\tlet valueData = properties[property],\r\n\t\t\t\ttypes = data.types,\r\n\t\t\t\tfound: boolean = propertyName === \"tween\";\r\n\r\n\t\t\tfor (let index = 0; types && !found; types >>= 1, index++) {\r\n\t\t\t\tfound = !!(types & 1 && Normalizations[index][propertyName]);\r\n\t\t\t}\r\n\t\t\tif (!found\r\n\t\t\t\t&& (!State.prefixElement\r\n\t\t\t\t\t|| !isString(State.prefixElement.style[propertyName]))) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to a lack of browser support.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (valueData == null) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to no value supplied.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tconst tween: VelocityTween = tweens[propertyName] = new Array(Tween.length) as any;\r\n\t\t\tlet endValue: string,\r\n\t\t\t\tstartValue: string;\r\n\r\n\t\t\tif (isFunction(valueData)) {\r\n\t\t\t\t// If we have a function as the main argument then resolve\r\n\t\t\t\t// it first, in case it returns an array that needs to be\r\n\t\t\t\t// split.\r\n\t\t\t\tvalueData = (valueData as VelocityPropertyFn).call(element, elementArrayIndex, elements.length, elements);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(valueData)) {\r\n\t\t\t\t// valueData is an array in the form of\r\n\t\t\t\t// [ endValue, [, easing] [, startValue] ]\r\n\t\t\t\tconst arr1 = valueData[1],\r\n\t\t\t\t\tarr2 = valueData[2];\r\n\r\n\t\t\t\tendValue = valueData[0] as any;\r\n\t\t\t\tif ((isString(arr1) && (/^[\\d-]/.test(arr1) || CSS.RegEx.isHex.test(arr1))) || isFunction(arr1) || isNumber(arr1)) {\r\n\t\t\t\t\tstartValue = arr1 as any;\r\n\t\t\t\t} else if ((isString(arr1) && Easing.Easings[arr1]) || Array.isArray(arr1)) {\r\n\t\t\t\t\ttween[Tween.EASING] = arr1 as any;\r\n\t\t\t\t\tstartValue = arr2 as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartValue = arr1 || arr2 as any;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tendValue = valueData as any;\r\n\t\t\t}\r\n\t\t\ttween[Tween.END] = commands.get(typeof endValue)(endValue, element, elements, elementArrayIndex, propertyName) as any;\r\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\r\n\t\t\t\ttween[Tween.START] = commands.get(typeof startValue)(startValue, element, elements, elementArrayIndex, propertyName) as any;\r\n\t\t\t}\r\n\t\t\texplodeTween(propertyName, tween, duration, !!startValue);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Convert a string-based tween with start and end strings, into a pattern\r\n\t * based tween with arrays.\r\n\t */\r\n\tfunction explodeTween(propertyName: string, tween: VelocityTween, duration: number, isForcefeed?: boolean) {\r\n\t\tconst endValue: string = tween[Tween.END] as any as string;\r\n\t\tlet startValue: string = tween[Tween.START] as any as string;\r\n\r\n\t\tif (!isString(endValue) || !isString(startValue)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet runAgain = false; // Can only be set once if the Start value doesn't match the End value and it's not forcefed\r\n\t\tdo {\r\n\t\t\trunAgain = false;\r\n\t\t\tconst arrayStart: (string | number)[] = tween[Tween.START] = [null],\r\n\t\t\t\tarrayEnd: (string | number)[] = tween[Tween.END] = [null],\r\n\t\t\t\tpattern: (string | number)[] = tween[Tween.PATTERN] = [\"\"];\r\n\t\t\tlet easing = tween[Tween.EASING] as any,\r\n\t\t\t\trounding: boolean[],\r\n\t\t\t\tindexStart = 0, // index in startValue\r\n\t\t\t\tindexEnd = 0, // index in endValue\r\n\t\t\t\tinCalc = 0, // Keep track of being inside a \"calc()\" so we don't duplicate it\r\n\t\t\t\tinRGB = 0, // Keep track of being inside an RGB as we can't use fractional values\r\n\t\t\t\tinRGBA = 0, // Keep track of being inside an RGBA as we must pass fractional for the alpha channel\r\n\t\t\t\tisStringValue: boolean;\r\n\r\n\t\t\t// TODO: Relative Values\r\n\r\n\t\t\t/* Operator logic must be performed last since it requires unit-normalized start and end values. */\r\n\t\t\t/* Note: Relative *percent values* do not behave how most people think; while one would expect \"+=50%\"\r\n\t\t\t to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:\r\n\t\t\t 50 points is added on top of the current % value. */\r\n\t\t\t//\t\t\t\t\tswitch (operator as any as string) {\r\n\t\t\t//\t\t\t\t\t\tcase \"+\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue + endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"-\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue - endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"*\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue * endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"/\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue / endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t// TODO: Leading from a calc value\r\n\t\t\twhile (indexStart < startValue.length && indexEnd < endValue.length) {\r\n\t\t\t\tlet charStart = startValue[indexStart],\r\n\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\r\n\t\t\t\t// If they're both numbers, then parse them as a whole\r\n\t\t\t\tif (TWEEN_NUMBER_REGEX.test(charStart) && TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\tlet tempStart = charStart, // temporary character buffer\r\n\t\t\t\t\t\ttempEnd = charEnd, // temporary character buffer\r\n\t\t\t\t\t\tdotStart = \".\", // Make sure we can only ever match a single dot in a decimal\r\n\t\t\t\t\t\tdotEnd = \".\"; // Make sure we can only ever match a single dot in a decimal\r\n\r\n\t\t\t\t\twhile (++indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart];\r\n\t\t\t\t\t\tif (charStart === dotStart) {\r\n\t\t\t\t\t\t\tdotStart = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempStart += charStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (++indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\t\t\t\t\t\tif (charEnd === dotEnd) {\r\n\t\t\t\t\t\t\tdotEnd = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempEnd += charEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet unitStart = CSS.getUnit(startValue, indexStart), // temporary unit type\r\n\t\t\t\t\t\tunitEnd = CSS.getUnit(endValue, indexEnd); // temporary unit type\r\n\r\n\t\t\t\t\tindexStart += unitStart.length;\r\n\t\t\t\t\tindexEnd += unitEnd.length;\r\n\t\t\t\t\tif (unitEnd.length === 0) {\r\n\t\t\t\t\t\t// This order as it's most common for the user supplied\r\n\t\t\t\t\t\t// value to be a number.\r\n\t\t\t\t\t\tunitEnd = unitStart;\r\n\t\t\t\t\t} else if (unitStart.length === 0) {\r\n\t\t\t\t\t\tunitStart = unitEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unitStart === unitEnd) {\r\n\t\t\t\t\t\t// Same units\r\n\t\t\t\t\t\tif (tempStart === tempEnd) {\r\n\t\t\t\t\t\t\t// Same numbers, so just copy over\r\n\t\t\t\t\t\t\tpattern[pattern.length - 1] += tempStart + unitStart;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (inRGB) {\r\n\t\t\t\t\t\t\t\tif (!rounding) {\r\n\t\t\t\t\t\t\t\t\trounding = tween[Tween.ROUNDING] = [];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trounding[arrayStart.length] = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tpattern.push(0, unitStart);\r\n\t\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart), null);\r\n\t\t\t\t\t\t\tarrayEnd.push(parseFloat(tempEnd), null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Different units, so put into a \"calc(from + to)\" and\r\n\t\t\t\t\t\t// animate each side to/from zero. setPropertyValue will\r\n\t\t\t\t\t\t// look out for the final \"calc(0 + \" prefix and remove\r\n\t\t\t\t\t\t// it from the value when it finds it.\r\n\t\t\t\t\t\tpattern[pattern.length - 1] += inCalc ? \"+ (\" : \"calc(\";\r\n\t\t\t\t\t\tpattern.push(0, unitStart + \" + \", 0, unitEnd + \")\");\r\n\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart) || 0, null, 0, null);\r\n\t\t\t\t\t\tarrayEnd.push(0, null, parseFloat(tempEnd) || 0, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart === charEnd) {\r\n\t\t\t\t\tpattern[pattern.length - 1] += charStart;\r\n\t\t\t\t\tindexStart++;\r\n\t\t\t\t\tindexEnd++;\r\n\t\t\t\t\t// Keep track of being inside a calc()\r\n\t\t\t\t\tif (inCalc === 0 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc === 1 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inCalc === 2 && charStart === \"l\"\r\n\t\t\t\t\t\t|| inCalc === 3 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tinCalc++;\r\n\t\t\t\t\t} else if ((inCalc && inCalc < 5)\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \")\" && --inCalc < 5) {\r\n\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Keep track of being inside an rgb() / rgba()\r\n\t\t\t\t\t// The opacity must not be rounded.\r\n\t\t\t\t\tif (inRGB === 0 && charStart === \"r\"\r\n\t\t\t\t\t\t|| inRGB === 1 && charStart === \"g\"\r\n\t\t\t\t\t\t|| inRGB === 2 && charStart === \"b\"\r\n\t\t\t\t\t\t|| inRGB === 3 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inRGB >= 3 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (inRGB === 3 && charStart === \"a\") {\r\n\t\t\t\t\t\t\tinRGBA = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinRGB++;\r\n\t\t\t\t\t} else if (inRGBA && charStart === \",\") {\r\n\t\t\t\t\t\tif (++inRGBA > 3) {\r\n\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ((inRGBA && inRGB < (inRGBA ? 5 : 4))\r\n\t\t\t\t\t\t|| inRGB >= (inRGBA ? 4 : 3) && charStart === \")\" && --inRGB < (inRGBA ? 5 : 4)) {\r\n\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart || charEnd) {\r\n\t\t\t\t\t// Different letters, so we're going to push them into start\r\n\t\t\t\t\t// and end until the next word\r\n\t\t\t\t\tisStringValue = true;\r\n\t\t\t\t\tif (!isString(arrayStart[arrayStart.length - 1])) {\r\n\t\t\t\t\t\tif (pattern.length === 1 && !pattern[0]) {\r\n\t\t\t\t\t\t\tarrayStart[0] = arrayEnd[0] = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(\"\");\r\n\t\t\t\t\t\t\tarrayStart.push(\"\");\r\n\t\t\t\t\t\t\tarrayEnd.push(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart++];\r\n\t\t\t\t\t\tif (charStart === \" \") {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayStart[arrayStart.length - 1] += charStart;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd++];\r\n\t\t\t\t\t\tif (charEnd === \" \") {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayEnd[arrayEnd.length - 1] += charEnd;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isForcefeed && (indexStart === startValue.length) !== (indexEnd === endValue.length)) {\r\n\t\t\t\t\t// This little piece will take a startValue, split out the\r\n\t\t\t\t\t// various numbers in it, then copy the endValue into the\r\n\t\t\t\t\t// startValue while replacing the numbers in it to match the\r\n\t\t\t\t\t// original start numbers as a repeating sequence.\r\n\t\t\t\t\t// Finally this function will run again with the new\r\n\t\t\t\t\t// startValue and a now matching pattern.\r\n\t\t\t\t\tlet startNumbers = startValue.match(/\\d\\.?\\d*/g) || [\"0\"],\r\n\t\t\t\t\t\tcount = startNumbers.length,\r\n\t\t\t\t\t\tindex = 0;\r\n\r\n\t\t\t\t\tstartValue = endValue.replace(/\\d+\\.?\\d*/g, function() {\r\n\t\t\t\t\t\treturn startNumbers[index++ % count];\r\n\t\t\t\t\t});\r\n\t\t\t\t\trunAgain = isForcefeed = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!runAgain) {\r\n\t\t\t\t// TODO: These two would be slightly better to not add the array indices in the first place\r\n\t\t\t\tif (pattern[0] === \"\" && arrayEnd[0] == null) {\r\n\t\t\t\t\tpattern.shift();\r\n\t\t\t\t\tarrayStart.shift();\r\n\t\t\t\t\tarrayEnd.shift();\r\n\t\t\t\t}\r\n\t\t\t\tif (pattern[pattern.length] === \"\" && arrayEnd[arrayEnd.length] == null) {\r\n\t\t\t\t\tpattern.pop();\r\n\t\t\t\t\tarrayStart.pop();\r\n\t\t\t\t\tarrayEnd.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif (indexStart < startValue.length || indexEnd < endValue.length) {\r\n\t\t\t\t\t// NOTE: We should never be able to reach this code unless a\r\n\t\t\t\t\t// bad forcefed value is supplied.\r\n\t\t\t\t\tconsole.error(\"Velocity: Trying to pattern match mis-matched strings \" + propertyName + \":[\\\"\" + endValue + \"\\\", \\\"\" + startValue + \"\\\"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Velocity: Pattern found:\", pattern, \" -> \", arrayStart, arrayEnd, \"[\" + startValue + \",\" + endValue + \"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (propertyName === \"display\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"none\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (propertyName === \"visibility\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"hidden\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (isStringValue\r\n\t\t\t\t\t&& easing !== \"at-start\" && easing !== \"during\" && easing !== \"at-end\"\r\n\t\t\t\t\t&& easing !== Easing.Easings[\"at-Start\"] && easing !== Easing.Easings[\"during\"] && easing !== Easing.Easings[\"at-end\"]) {\r\n\t\t\t\t\tconsole.warn(\"Velocity: String easings must use one of 'at-start', 'during' or 'at-end': {\" + propertyName + \": [\\\"\" + endValue + \"\\\", \" + easing + \", \\\"\" + startValue + \"\\\"]}\");\r\n\t\t\t\t\teasing = \"at-start\";\r\n\t\t\t\t}\r\n\t\t\t\ttween[Tween.EASING] = validateEasing(easing, duration);\r\n\t\t\t}\r\n\t\t\t// This can only run a second time once - if going from automatic startValue to \"fixed\" pattern from endValue with startValue numbers\r\n\t\t} while (runAgain);\r\n\t}\r\n\r\n\t/**\r\n\t * Expand all queued animations that haven't gone yet\r\n\t *\r\n\t * This will automatically expand the properties map for any recently added\r\n\t * animations so that the start and end values are correct.\r\n\t */\r\n\texport function validateTweens(activeCall: AnimationCall) {\r\n\t\t// This might be called on an already-ready animation\r\n\t\tif (State.firstNew === activeCall) {\r\n\t\t\tState.firstNew = activeCall._next;\r\n\t\t}\r\n\t\t// Check if we're actually already ready\r\n\t\tif (activeCall._flags & AnimationFlags.EXPANDED) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet element = activeCall.element,\r\n\t\t\ttweens = activeCall.tweens,\r\n\t\t\tduration = getValue(activeCall.options.duration, defaults.duration);\r\n\r\n\t\tfor (const propertyName in tweens) {\r\n\t\t\tconst tween = tweens[propertyName];\r\n\r\n\t\t\tif (tween[Tween.START] == null) {\r\n\t\t\t\t// Get the start value as it's not been passed in\r\n\t\t\t\tconst startValue = CSS.getPropertyValue(activeCall.element, propertyName);\r\n\r\n\t\t\t\tif (isString(startValue)) {\r\n\t\t\t\t\ttween[Tween.START] = CSS.fixColors(startValue) as any;\r\n\t\t\t\t\texplodeTween(propertyName, tween, duration);\r\n\t\t\t\t} else if (!Array.isArray(startValue)) {\r\n\t\t\t\t\tconsole.warn(\"bad type\", tween, propertyName, startValue)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (debug) {\r\n\t\t\t\tconsole.log(\"tweensContainer (\" + propertyName + \"): \" + JSON.stringify(tween), element);\r\n\t\t\t}\r\n\t\t}\r\n\t\tactiveCall._flags |= AnimationFlags.EXPANDED;\r\n\t}\r\n}\r\n","/*\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Validation functions used for various types of data that can be supplied.\n * All errors are reported in the non-minified version for development. If a\n * validation fails then it should return undefined.\n */\n\n/**\n * Parse a duration value and return an ms number. Optionally return a\n * default value if the number is not valid.\n */\nfunction parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tif (isNumber(duration)) {\n\t\treturn duration;\n\t}\n\n\tif (isString(duration)) {\n\t\treturn Duration[duration.toLowerCase()] || parseFloat(duration.replace(\"ms\", \"\").replace(\"s\", \"000\"));\n\t}\n\n\treturn def == null ? undefined : parseDuration(def);\n}\n\n/**\n * Validate a cache option.\n * @private\n */\nfunction validateCache(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'cache' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a begin option.\n * @private\n */\nfunction validateBegin(value: VelocityCallback): VelocityCallback {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'begin' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a complete option.\n * @private\n */\nfunction validateComplete(value: VelocityCallback, noError?: true): VelocityCallback {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'complete' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a delay option.\n * @private\n */\nfunction validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed)) {\n\t\treturn parsed;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'delay' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a duration option.\n * @private\n */\nfunction validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed) && parsed >= 0) {\n\t\treturn parsed;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'duration' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a easing option.\n * @private\n */\nfunction validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\n\tconst Easing = VelocityStatic.Easing;\n\n\tif (isString(value)) {\n\t\t// Named easing\n\t\treturn Easing.Easings[value];\n\t}\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 1) {\n\t\t\t// Steps\n\t\t\treturn Easing.generateStep(value[0]);\n\t\t}\n\t\tif (value.length === 2) {\n\t\t\t// springRK4 must be passed the animation's duration.\n\t\t\t// Note: If the springRK4 array contains non-numbers,\n\t\t\t// generateSpringRK4() returns an easing function generated with\n\t\t\t// default tension and friction values.\n\t\t\treturn Easing.generateSpringRK4(value[0], value[1], duration);\n\t\t}\n\t\tif (value.length === 4) {\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\n\t\t\t// returns undefined.\n\t\t\treturn Easing.generateBezier.apply(null, value) || false;\n\t\t}\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'easing' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a fpsLimit option.\n * @private\n */\nfunction validateFpsLimit(value: number | false): number {\n\tif (value === false) {\n\t\treturn 0;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn Math.min(parsed, 60);\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'fpsLimit' to an invalid value:\", value);\n\t}\n}\n\n\n/**\n * Validate a loop option.\n * @private\n */\nfunction validateLoop(value: number | boolean): number | true {\n\tif (value === false) {\n\t\treturn 0;\n\t} else if (value === true) {\n\t\treturn true;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn parsed;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'loop' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a progress option.\n * @private\n */\nfunction validateProgress(value: VelocityProgress): VelocityProgress {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a promise option.\n * @private\n */\nfunction validatePromise(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promise' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a promiseRejectEmpty option.\n * @private\n */\nfunction validatePromiseRejectEmpty(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a queue option.\n * @private\n */\nfunction validateQueue(value: string | false, noError?: true): string | false {\n\tif (value === false || isString(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'queue' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a repeat option.\n * @private\n */\nfunction validateRepeat(value: number | boolean): number | true {\n\tif (value === false) {\n\t\treturn 0;\n\t} else if (value === true) {\n\t\treturn true;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn parsed;\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(\"VelocityJS: Trying to set 'repeat' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a speed option.\n * @private\n */\nfunction validateSpeed(value: number): number {\n\tif (isNumber(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'speed' to an invalid value:\", value);\n\t}\n}\n\n/**\n * Validate a sync option.\n * @private\n */\nfunction validateSync(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(\"VelocityJS: Trying to set 'sync' to an invalid value:\", value);\n\t}\n}\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Velocity version (should grab from package.json during build).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let version = VERSION;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Core \"Velocity\" function.\r\n */\r\n\r\ninterface Document {\r\n\tdocumentMode: any; // IE\r\n}\r\n\r\n/**\r\n * The main Velocity function. Acts as a gateway to everything else.\r\n */\r\nfunction VelocityFn(options: VelocityObjectArgs): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, options?: VelocityOptions): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements | void, ...__args: any[]): VelocityResult {\r\n\tconst\r\n\t\t/**\r\n\t\t * A shortcut to the default options.\r\n\t\t */\r\n\t\tdefaults = VelocityStatic.defaults,\r\n\t\t/**\r\n\t\t * Shortcut to arguments for file size.\r\n\t\t */\r\n\t\t_arguments = arguments,\r\n\t\t/**\r\n\t\t * Cache of the first argument - this is used often enough to be saved.\r\n\t\t */\r\n\t\targs0 = _arguments[0] as VelocityObjectArgs,\r\n\t\t/**\r\n\t\t * To allow for expressive CoffeeScript code, Velocity supports an\r\n\t\t * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\r\n\t\t * \"p\"), and \"options\" (or \"o\") objects are defined on a container\r\n\t\t * object that's passed in as Velocity's sole argument.\r\n\t\t *\r\n\t\t * Note: Some browsers automatically populate arguments with a\r\n\t\t * \"properties\" object. We detect it by checking for its default\r\n\t\t * \"names\" property.\r\n\t\t */\r\n\t\t// TODO: Confirm which browsers - if <=IE8 the we can drop completely\r\n\t\tsyntacticSugar = isPlainObject(args0) && (args0.p || ((isPlainObject(args0.properties) && !(args0.properties as any).names) || isString(args0.properties)));\r\n\tlet\r\n\t\t/**\r\n\t\t * When Velocity is called via the utility function (Velocity()),\r\n\t\t * elements are explicitly passed in as the first parameter. Thus,\r\n\t\t * argument positioning varies.\r\n\t\t */\r\n\t\targumentIndex: number = 0,\r\n\t\t/**\r\n\t\t * The list of elements, extended with Promise and Velocity.\r\n\t\t */\r\n\t\telements: VelocityResult,\r\n\t\t/**\r\n\t\t * The properties being animated. This can be a string, in which case it\r\n\t\t * is either a function for these elements, or it is a \"named\" animation\r\n\t\t * sequence to use instead. Named sequences start with either \"callout.\"\r\n\t\t * or \"transition.\". When used as a callout the values will be reset\r\n\t\t * after finishing. When used as a transtition then there is no special\r\n\t\t * handling after finishing.\r\n\t\t */\r\n\t\tpropertiesMap: string | VelocityProperties,\r\n\t\t/**\r\n\t\t * Options supplied, this will be mapped and validated into\r\n\t\t * options.\r\n\t\t */\r\n\t\toptionsMap: VelocityOptions,\r\n\t\t/**\r\n\t\t * If called via a chain then this contains the last calls\r\n\t\t * animations. If this does not have a value then any access to the\r\n\t\t * element's animations needs to be to the currently-running ones.\r\n\t\t */\r\n\t\tanimations: AnimationCall[],\r\n\t\t/**\r\n\t\t * The promise that is returned.\r\n\t\t */\r\n\t\tpromise: Promise,\r\n\t\t// Used when the animation is finished\r\n\t\tresolver: (value?: VelocityResult) => void,\r\n\t\t// Used when there was an issue with one or more of the Velocity arguments\r\n\t\trejecter: (reason: any) => void;\r\n\r\n\t//console.log(\"Velocity\", _arguments)\r\n\t// First get the elements, and the animations connected to the last call if\r\n\t// this is chained.\r\n\t// TODO: Clean this up a bit\r\n\t// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\r\n\tif (isNode(this)) {\r\n\t\t// This is from a chain such as document.getElementById(\"\").velocity(...)\r\n\t\telements = [this as HTMLorSVGElement] as VelocityResult;\r\n\t} else if (isWrapped(this)) {\r\n\t\t// This might be a chain from something else, but if chained from a\r\n\t\t// previous Velocity() call then grab the animations it's related to.\r\n\t\telements = Object.assign([], this as HTMLorSVGElement[]) as VelocityResult;\r\n\t\tif (isVelocityResult(this)) {\r\n\t\t\tanimations = (this as VelocityResult).velocity.animations;\r\n\t\t}\r\n\t} else if (syntacticSugar) {\r\n\t\telements = Object.assign([], args0.elements || args0.e) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isNode(args0)) {\r\n\t\telements = Object.assign([], [args0]) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isWrapped(args0)) {\r\n\t\telements = Object.assign([], args0) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t}\r\n\t// Allow elements to be chained.\r\n\tif (elements) {\r\n\t\tdefineProperty(elements, \"velocity\", VelocityFn.bind(elements));\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t// Next get the propertiesMap and options.\r\n\tif (syntacticSugar) {\r\n\t\tpropertiesMap = getValue(args0.properties, args0.p);\r\n\t} else {\r\n\t\t// TODO: Should be possible to call Velocity(\"pauseAll\") - currently not possible\r\n\t\tpropertiesMap = _arguments[argumentIndex++] as string | VelocityProperties;\r\n\t}\r\n\t// Get any options map passed in as arguments first, expand any direct\r\n\t// options if possible.\r\n\tconst isAction = isString(propertiesMap),\r\n\t\topts = syntacticSugar ? getValue(args0.options, args0.o) : _arguments[argumentIndex];\r\n\r\n\tif (isPlainObject(opts)) {\r\n\t\toptionsMap = opts;\r\n\t}\r\n\t// Create the promise if supported and wanted.\r\n\tif (Promise && getValue(optionsMap && optionsMap.promise, defaults.promise)) {\r\n\t\tpromise = new Promise(function(_resolve, _reject) {\r\n\t\t\trejecter = _reject;\r\n\t\t\t// IMPORTANT:\r\n\t\t\t// If a resolver tries to run on a Promise then it will wait until\r\n\t\t\t// that Promise resolves - but in this case we're running on our own\r\n\t\t\t// Promise, so need to make sure it's not seen as one. Setting these\r\n\t\t\t// values to undefined for the duration of the resolve.\r\n\t\t\t// Due to being an async call, they should be back to \"normal\"\r\n\t\t\t// before the .then() function gets called.\r\n\t\t\tresolver = function(args: VelocityResult) {\r\n\t\t\t\tif (isVelocityResult(args)) {\r\n\t\t\t\t\tconst _then = args && args.then;\r\n\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = undefined; // Preserving enumeration etc\r\n\t\t\t\t\t}\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = _then;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t\tif (elements) {\r\n\t\t\tdefineProperty(elements, \"then\", promise.then.bind(promise));\r\n\t\t\tdefineProperty(elements, \"catch\", promise.catch.bind(promise));\r\n\t\t\tif ((promise as any).finally) {\r\n\t\t\t\t// Semi-standard\r\n\t\t\t\tdefineProperty(elements, \"finally\", (promise as any).finally.bind(promise));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tconst promiseRejectEmpty: boolean = getValue(optionsMap && optionsMap.promiseRejectEmpty, defaults.promiseRejectEmpty);\r\n\r\n\tif (promise) {\r\n\t\tif (!elements && !isAction) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No elements supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t} else if (!propertiesMap) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No properties supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((!elements && !isAction) || !propertiesMap) {\r\n\t\treturn promise as any;\r\n\t}\r\n\r\n\t// TODO: exception for the special \"reverse\" property\r\n\t// NOTE: Can't use isAction here due to type inference - there are callbacks\r\n\t// between so the type isn't considered safe.\r\n\tif (isString(propertiesMap)) {\r\n\t\tconst args: any[] = [],\r\n\t\t\tpromiseHandler: VelocityPromise = promise && {\r\n\t\t\t\t_promise: promise,\r\n\t\t\t\t_resolver: resolver,\r\n\t\t\t\t_rejecter: rejecter\r\n\t\t\t};\r\n\r\n\t\twhile (argumentIndex < _arguments.length) {\r\n\t\t\targs.push(_arguments[argumentIndex++]);\r\n\t\t}\r\n\r\n\t\t// Velocity's behavior is categorized into \"actions\". If a string is\r\n\t\t// passed in instead of a propertiesMap then that will call a function\r\n\t\t// to do something special to the animation linked.\r\n\t\t// There is one special case - \"reverse\" - which is handled differently,\r\n\t\t// by being stored on the animation and then expanded when the animation\r\n\t\t// starts.\r\n\t\tconst action = propertiesMap.replace(/\\..*$/, \"\"),\r\n\t\t\tcallback = VelocityStatic.Actions[action] || VelocityStatic.Actions[\"default\"];\r\n\r\n\t\tif (callback) {\r\n\t\t\tconst result = callback(args, elements, promiseHandler, propertiesMap);\r\n\r\n\t\t\tif (result !== undefined) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"VelocityJS: Unknown action:\", propertiesMap);\r\n\t\t}\r\n\t} else if (isPlainObject(propertiesMap)) {\r\n\t\t/**\r\n\t\t * The options for this set of animations.\r\n\t\t */\r\n\t\tconst options: StrictVelocityOptions = {};\r\n\t\tlet isSync = defaults.sync;\r\n\r\n\t\t// Private options first - set as non-enumerable, and starting with an\r\n\t\t// underscore so we can filter them out.\r\n\t\tif (promise) {\r\n\t\t\tdefineProperty(options, \"_promise\", promise);\r\n\t\t\tdefineProperty(options, \"_rejecter\", rejecter);\r\n\t\t\tdefineProperty(options, \"_resolver\", resolver);\r\n\t\t}\r\n\t\tdefineProperty(options, \"_ready\", 0);\r\n\t\tdefineProperty(options, \"_started\", 0);\r\n\t\tdefineProperty(options, \"_completed\", 0);\r\n\t\tdefineProperty(options, \"_total\", 0);\r\n\r\n\t\t// Now check the optionsMap\r\n\t\tif (isPlainObject(optionsMap)) {\r\n\t\t\toptions.duration = getValue(validateDuration(optionsMap.duration), defaults.duration);\r\n\t\t\toptions.delay = getValue(validateDelay(optionsMap.delay), defaults.delay);\r\n\t\t\t// Need the extra fallback here in case it supplies an invalid\r\n\t\t\t// easing that we need to overrride with the default.\r\n\t\t\toptions.easing = validateEasing(getValue(optionsMap.easing, defaults.easing), options.duration) || validateEasing(defaults.easing, options.duration);\r\n\t\t\toptions.loop = getValue(validateLoop(optionsMap.loop), defaults.loop);\r\n\t\t\toptions.repeat = options.repeatAgain = getValue(validateRepeat(optionsMap.repeat), defaults.repeat);\r\n\t\t\tif (optionsMap.speed != null) {\r\n\t\t\t\toptions.speed = getValue(validateSpeed(optionsMap.speed), 1);\r\n\t\t\t}\r\n\t\t\tif (isBoolean(optionsMap.promise)) {\r\n\t\t\t\toptions.promise = optionsMap.promise;\r\n\t\t\t}\r\n\t\t\toptions.queue = getValue(validateQueue(optionsMap.queue), defaults.queue);\r\n\t\t\tif (optionsMap.mobileHA && !VelocityStatic.State.isGingerbread) {\r\n\t\t\t\t/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)\r\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\r\n\t\t\t\t/* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */\r\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */\r\n\t\t\t\toptions.mobileHA = true;\r\n\t\t\t}\r\n\t\t\tif (optionsMap.display != null) {\r\n\t\t\t\t(propertiesMap as VelocityProperties).display = optionsMap.display as string;\r\n\t\t\t\tconsole.error(\"Deprecated 'options.display' used, this is now a property:\", optionsMap.display);\r\n\t\t\t}\r\n\t\t\tif (optionsMap.visibility != null) {\r\n\t\t\t\t(propertiesMap as VelocityProperties).visibility = optionsMap.visibility as string;\r\n\t\t\t\tconsole.error(\"Deprecated 'options.visibility' used, this is now a property:\", optionsMap.visibility);\r\n\t\t\t}\r\n\t\t\t// TODO: Allow functional options for different options per element\r\n\t\t\tconst optionsBegin = validateBegin(optionsMap.begin),\r\n\t\t\t\toptionsComplete = validateComplete(optionsMap.complete),\r\n\t\t\t\toptionsProgress = validateProgress(optionsMap.progress),\r\n\t\t\t\toptionsSync = validateSync(optionsMap.sync);\r\n\r\n\t\t\tif (optionsBegin != null) {\r\n\t\t\t\toptions.begin = optionsBegin;\r\n\t\t\t}\r\n\t\t\tif (optionsComplete != null) {\r\n\t\t\t\toptions.complete = optionsComplete;\r\n\t\t\t}\r\n\t\t\tif (optionsProgress != null) {\r\n\t\t\t\toptions.progress = optionsProgress;\r\n\t\t\t}\r\n\t\t\tif (optionsSync != null) {\r\n\t\t\t\tisSync = optionsSync;\r\n\t\t\t}\r\n\t\t} else if (!syntacticSugar) {\r\n\t\t\t// Expand any direct options if possible.\r\n\t\t\tconst duration = validateDuration(_arguments[argumentIndex], true);\r\n\t\t\tlet offset = 0;\r\n\r\n\t\t\tif (duration !== undefined) {\r\n\t\t\t\toffset++;\r\n\t\t\t\toptions.duration = duration;\r\n\t\t\t}\r\n\t\t\tif (!isFunction(_arguments[argumentIndex + offset])) {\r\n\t\t\t\t// Despite coming before Complete, we can't pass a fn easing\r\n\t\t\t\tconst easing = validateEasing(_arguments[argumentIndex + offset], getValue(options && validateDuration(options.duration), defaults.duration) as number, true);\r\n\r\n\t\t\t\tif (easing !== undefined) {\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t\toptions.easing = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconst complete = validateComplete(_arguments[argumentIndex + offset], true);\r\n\r\n\t\t\tif (complete !== undefined) {\r\n\t\t\t\toptions.complete = complete;\r\n\t\t\t}\r\n\t\t\toptions.loop = defaults.loop;\r\n\t\t\toptions.repeat = options.repeatAgain = defaults.repeat;\r\n\t\t}\r\n\r\n\t\t/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.\r\n\t\t In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */\r\n\t\t/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,\r\n\t\t the call array is pushed to VelocityStatic.State.calls for live processing by the requestAnimationFrame tick. */\r\n\r\n\t\tconst rootAnimation: AnimationCall = {\r\n\t\t\t_prev: undefined,\r\n\t\t\t_next: undefined,\r\n\t\t\t_flags: isSync ? AnimationFlags.SYNC : 0,\r\n\t\t\toptions: options,\r\n\t\t\tpercentComplete: 0,\r\n\t\t\t//element: element,\r\n\t\t\telements: elements,\r\n\t\t\tellapsedTime: 0,\r\n\t\t\ttimeStart: 0\r\n\t\t};\r\n\r\n\t\tanimations = [];\r\n\t\tfor (let index = 0; index < elements.length; index++) {\r\n\t\t\tconst element = elements[index];\r\n\r\n\t\t\tif (isNode(element)) {\r\n\t\t\t\tconst tweens = Object.create(null),\r\n\t\t\t\t\tanimation: AnimationCall = Object.assign({\r\n\t\t\t\t\t\telement: element,\r\n\t\t\t\t\t\ttweens: tweens\r\n\t\t\t\t\t}, rootAnimation);\r\n\r\n\t\t\t\toptions._total++;\r\n\t\t\t\tanimations.push(animation);\r\n\t\t\t\tVelocityStatic.expandProperties(animation, propertiesMap);\r\n\t\t\t\tVelocityStatic.queue(element, animation, getValue(animation.queue, options.queue));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (VelocityStatic.State.isTicking === false) {\r\n\t\t\t// If the animation tick isn't running, start it. (Velocity shuts it\r\n\t\t\t// off when there are no active calls to process.)\r\n\t\t\tVelocityStatic.tick();\r\n\t\t}\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t/***************\r\n\t Chaining\r\n\t ***************/\r\n\r\n\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\r\n\treturn elements || promise as any;\r\n};\r\n\r\n\r\n/***************\r\n Summary\r\n ***************/\r\n\r\n/*\r\n - CSS: CSS stack that works independently from the rest of Velocity.\r\n - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.\r\n - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options.\r\n - Queueing: The logic that runs once the call has reached its point of execution in the element's queue stack.\r\n Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed).\r\n - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.\r\n - completeCall(): Handles the cleanup process for each Velocity call.\r\n */\r\n\r\n/*********************\r\n Helper Functions\r\n *********************/\r\n\r\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\r\nvar IE = (function() {\r\n\tif (document.documentMode) {\r\n\t\treturn document.documentMode;\r\n\t} else {\r\n\t\tfor (let i = 7; i > 4; i--) {\r\n\t\t\tlet div = document.createElement(\"div\");\r\n\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\r\n\t\t\t\tdiv = null;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n})();\r\n\r\n/******************\r\n Unsupported\r\n ******************/\r\n\r\nif (IE <= 8) {\r\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\r\n}\r\n\r\n/******************\r\n Frameworks\r\n ******************/\r\n\r\ninterface Window {\r\n\tjQuery: {fn?: any};\r\n\tZepto: {fn?: any};\r\n\tVelocity: any;\r\n}\r\n\r\nif (window === this) {\r\n\t/*\r\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\r\n\t * wrapped elements to be subjected to plugin calls. If either framework is\r\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\r\n\t * animate() method. Velocity also registers itself onto a global container\r\n\t * (window.jQuery || window.Zepto || window) so that certain features are\r\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\r\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\r\n\t * elements.\r\n\t */\r\n\tconst patch = VelocityStatic.patch,\r\n\t\tjQuery = window.jQuery,\r\n\t\tZepto = window.Zepto;\r\n\r\n\tpatch(window, true);\r\n\tpatch(Element && Element.prototype);\r\n\tpatch(NodeList && NodeList.prototype);\r\n\tpatch(HTMLCollection && HTMLCollection.prototype);\r\n\r\n\tpatch(jQuery, true);\r\n\tpatch(jQuery && jQuery.fn);\r\n\r\n\tpatch(Zepto, true);\r\n\tpatch(Zepto && Zepto.fn);\r\n}\r\n\r\n/******************\r\n Known Issues\r\n ******************/\r\n\r\n/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.\r\n Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties\r\n will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */\r\n","///\r\n///\r\n///\r\n///\r\n///\r\n///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Merge the VelocityStatic namespace onto the Velocity function for external\r\n * use. This is done as a read-only way. Any attempt to change these values will\r\n * be allowed.\r\n */\r\nfor (const key in VelocityStatic) {\r\n\tObject.defineProperty(VelocityFn, key, {\r\n\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\tget: function() {\r\n\t\t\treturn VelocityStatic[key];\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// console.log(\"Velocity keys\", Object.keys(VelocityStatic));\r\n"]} \ No newline at end of file diff --git a/velocity.min.js b/velocity.min.js index b7f1ef67..42cb8126 100644 --- a/velocity.min.js +++ b/velocity.min.js @@ -1,2 +1,2 @@ -/*! velocity-animate v2.0.0 (Thursday 1st February 2018, 11:00:33 AM) */ +/*! velocity-animate v2.0.0 (Thursday 1st February 2018, 12:11:49 PM) */ !function(e,t){"function"==typeof define&&define.amd?define("Velocity",[],function(){return e.Velocity=t()}):"object"==typeof module&&module.exports?module.exports=t():e.Velocity=t()}(this,function(){function e(e){return!0===e||!1===e}function t(e){return"number"==typeof e}function n(e){return!isNaN(+e)}function r(e){return"string"==typeof e}function i(e){return"[object Function]"===Object.prototype.toString.call(e)}function a(e){return!(!e||!e.nodeType)}function o(e){return e&&t(e.length)&&i(e.velocity)}function l(e){return e&&e!==window&&t(e.length)&&!r(e)&&!i(e)&&!a(e)&&(0===e.length||a(e[0]))}function s(e){if(!e||"object"!=typeof e||e.nodeType||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return!t||t.hasOwnProperty("constructor")&&t.constructor===Object}function u(e,t,n){e&&Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n})}function c(e){for(var t=[],n=1;n=0)return n}function w(e,t,n){var a=R.Easing;if(r(e))return a.Easings[e];if(i(e))return e;if(Array.isArray(e)){if(1===e.length)return a.generateStep(e[0]);if(2===e.length)return a.generateSpringRK4(e[0],e[1],t);if(4===e.length)return a.generateBezier.apply(null,e)||!1}}function E(e){if(!1===e)return 0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?Math.min(t,60):void 0}function x(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function C(e,t){if(!1===e||r(e))return e}function N(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function A(e){if(t(e))return e}function _(t){if(e(t))return t}function O(){for(var t=[],n=0;n=0?a.replace(/^.*\./,""):void 0,c="false"!==u&&C(u),f=n[1];if(!s)return null;if(o(r)&&r.velocity.animations)l=r.velocity.animations;else{l=[];for(var g=e.State.first;g;g=g._next)r.indexOf(g.element)>=0&&d(g.queue,g.options.queue)===c&&l.push(g);if(r.length>1&&l.length>1){for(var p=1,v=l[0].options;p=0?a.replace(/^.*\./,""):void 0)&&C(n[0]),u=e.defaults.queue;if(o(r)&&r.velocity.animations)for(var c=0,d=r.velocity.animations;c1)throw Error("VelocityJS: Must tween a percentage from 0 to 1!");if(!s(p))throw Error("VelocityJS: Cannot tween an invalid property!");if(l)for(var h in p)if(p.hasOwnProperty(h)&&(!Array.isArray(p[h])||p[h].length<2))throw Error("VelocityJS: When not supplying an element you must force-feed values: "+h);var y=w(d(v,e.defaults.easing),1e3);e.expandProperties(f,p);for(var h in f.tweens){var b=f.tweens[h],S=b[1]||y,E=b[3],x=b[4],C="";if(m++,E)for(var N=0;N>=1,c++)1&s&&(u=e.Normalizations[c][r]||u);return o=u?u(t):n(t,r),l&&(l.cache[r]=o),o}t.computePropertyValue=n,t.getPropertyValue=r}(e.CSS||(e.CSS={}))}(R||(R={}));!function(e){!function(t){var n=["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"];(e.CSS||(e.CSS={})).getUnit=function(e,t){if(t=t||0,e[t]&&" "!==e[t])for(var r=0,i=n;r=a.length)return a;if(a[o]!==e[t+o])break}while(++o)}return""}}()}(R||(R={}));!function(e){(e.CSS||(e.CSS={})).RegEx={isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi}}(R||(R={}));!function(e){!function(t){(e.CSS||(e.CSS={})).setPropertyValue=function(t,n,i){var a=p(t);if(r(i)&&"c"===i[0]&&"a"===i[1]&&"l"===i[2]&&"c"===i[3]&&"("===i[4]&&"0"===i[5]&&(i=i.replace(/^calc\(0[^\d]* \+ ([^\(\)]+)\)$/,"$1")),a&&a.cache[n]!==i){a.cache[n]=i||void 0;for(var o=a.types,l=void 0,s=0;o;o>>=1,s++)1&o&&(l=e.Normalizations[s][n]||l);l&&l(t,i)||(t.style[n]=i)}}}()}(R||(R={}));!function(e){!function(e){function t(t){var n=t[0],a=t[1];r(n)&&i(a)&&(e.Easings[n]||(e.Easings[n]=a))}e.Easings=Object.create(null),e.registerEasing=t,t(["linear",function(e,t,n){return t+e*(n-t)}]),t(["swing",function(e,t,n){return t+(.5-Math.cos(e*Math.PI)/2)*(n-t)}]),t(["spring",function(e,t,n){return t+(1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e))*(n-t)}])}(e.Easing||(e.Easing={}))}(R||(R={}));!function(e){!function(e){function t(e){return Math.min(Math.max(e,0),1)}function n(e,t){return 1-3*t+3*e}function r(e,t){return 3*t-6*e}function i(e){return 3*e}function a(e,t,a){return((n(t,a)*e+r(t,a))*e+i(t))*e}function o(e,t,a){return 3*n(t,a)*e*e+2*r(t,a)*e+i(t)}function l(e,n,r,i){function l(t){for(var n=0,i=1,l=g-1;i!==l&&h[i]<=t;++i)n+=p;var s=n+(t-h[--i])/(h[i+1]-h[i])*p,v=o(s,e,r);return v>=c?function(t,n){for(var i=0;i0?i=l:n=l}while(Math.abs(o)>f&&++s1e-4&&Math.abs(o.v)>1e-4;);return c?function(e,t,n){return 0===e?t:1===e?n:t+s[e*(s.length-1)|0]*(n-t)}:u}(e.Easing||(e.Easing={})).generateSpringRK4=a}()}(R||(R={}));!function(e){!function(t){var n={};(e.Easing||(e.Easing={})).generateStep=function(e){var t=n[e];return t||(n[e]=function(t,n,r){return 0===t?n:1===t?r:n+Math.round(t*e)*(1/e)*(r-n)})}}()}(R||(R={}));!function(e){!function(e){e.registerEasing(["at-start",function(e,t,n){return 0===e?t:n}]),e.registerEasing(["during",function(e,t,n){return 0===e||1===e?t:n}]),e.registerEasing(["at-end",function(e,t,n){return 1===e?n:t}])}(e.Easing||(e.Easing={}))}(R||(R={}));!function(e){function t(t){var n=t[0],a=t[1],o=t[2];if(!r(n)&&n instanceof Object)if(r(a))if(i(o)){var l=e.constructors.indexOf(n);l<0&&(l=e.constructors.push(n)-1,e.Normalizations[l]=Object.create(null)),e.Normalizations[l][a]=o,!1===t[3]&&e.NoCacheNormalizations.add(a)}else;else;else;}e.Normalizations=[],e.NoCacheNormalizations=new Set,e.constructors=[],e.registerNormalization=t,e.registerAction(["registerNormalization",t])}(R||(R={}));!function(e){!function(t){function n(e){return function(t,n){return void 0===n?t.getAttribute(e):(t.setAttribute(e,n),!0)}}var a=document.createElement("div"),o=/^SVG(.*)Element$/,l=/Element$/;Object.getOwnPropertyNames(window).forEach(function(t){var s=o.exec(t);if(s){var u=document.createElementNS("http://www.w3.org/2000/svg",(s[1]||"svg").toLowerCase()),c=u.constructor;for(var f in u){var d=u[f];!r(f)||"o"===f[0]&&"n"===f[1]||f===f.toUpperCase()||l.test(f)||f in a||i(d)||e.registerNormalization([c,f,n(f)])}}})}(e.CSS||(e.CSS={}))}(R||(R={}));!function(e){!function(t){function n(e){return function(t,n){if(void 0===n)try{return t.getBBox()[e]+"px"}catch(e){return"0px"}return t.setAttribute(e,n),!0}}e.registerNormalization([SVGElement,"width",n("width")]),e.registerNormalization([SVGElement,"height",n("height")])}(e.CSS||(e.CSS={}))}(R||(R={}));!function(e){function t(t,n,r){if("border-box"===(""+e.CSS.getPropertyValue(t,"boxSizing")).toLowerCase()===r){var i="width"===n?["Left","Right"]:["Top","Bottom"],a=["padding"+i[0],"padding"+i[1],"border"+i[0]+"Width","border"+i[1]+"Width"],o=void 0,l=void 0,s=0;for(o=0;o=1?0:n.calls.length?(1-f)/n.calls.length:1,v=function(f){var d=n.calls[f],g=d[0],v=1e3,m=d[1],h=d[2]||{},y={};if(void 0!==i.duration?v=i.duration:void 0!==n.defaultDuration&&(v=n.defaultDuration),y.duration=v*("number"==typeof m?m:p),y.queue=i.queue||"",y.easing=h.easing||"ease",y.delay=parseFloat(h.delay)||0,y.loop=!n.loop&&h.loop,y.cache=h.cache||!0,0===f&&(y.delay+=parseFloat(i.delay)||0,0===a&&(y.begin=function(){i.begin&&i.begin.call(l,l);var n=t.match(/(In|Out)$/);n&&"In"===n[0]&&void 0!==g.opacity&&(l.nodeType?[l]:l).forEach(function(t){e.CSS.setPropertyValue(t,"opacity",0)}),i.animateParentHeight&&n&&function(t,n,r,i){var a,o=0;(t.nodeType?[t]:t).forEach(function(t,n){i&&(r+=n*i),a=t.parentNode;var l=["height","paddingTop","paddingBottom","marginTop","marginBottom"];"border-box"===(""+e.CSS.getPropertyValue(t,"boxSizing")).toLowerCase()&&(l=["height"]),l.forEach(function(n){o+=parseFloat(e.CSS.getPropertyValue(t,n))})}),O(a,{height:("In"===n?"+":"-")+"="+o},{queue:!1,easing:"ease-in-out",duration:r*("In"===n?.6:1)})}(l,n[0],v+y.delay,i.stagger)}),i.visibility&&"hidden"!==i.visibility&&(y.visibility=i.visibility)),f===n.calls.length-1){var b=function(){void 0!==i.display&&"none"!==i.display||!/Out$/.test(t)||(l.nodeType?[l]:l).forEach(function(t){e.CSS.setPropertyValue(t,"display","none")}),i.complete&&i.complete.call(l,l),s&&s(l||r)};y.complete=function(){if(u&&e.Redirects[t](r,i,a,o,l,s,!0===u||Math.max(0,u-1)),n.reset){for(var f in n.reset)n.reset.hasOwnProperty(f);var d={duration:0,queue:!1};c&&(d.complete=b),O(r,n.reset,d)}else c&&b()},"hidden"===i.visibility&&(y.visibility=i.visibility)}O(r,g,y)};for(d=0;d1&&(t.reverse().forEach(function(e,n){var r=t[n+1];if(r){var i=e.o||e.options,a=r.o||r.options,o=i&&!1===i.sequenceQueue?"begin":"complete",l=a&&a[o],s={};s[o]=function(){var t=r.e||r.elements,n=t.nodeType?[t]:t;l&&l.call(n,n),O(e)},r.o?r.o=k({},a,s):r.options=k({},a,s)}}),t.reverse()),O(t[0])}}();!function(e){function t(e){try{var t=e.elements;e.options.begin.call(t,t,e)}catch(e){setTimeout(function(){throw e},1)}}function n(t,n){try{var r=t.elements,i=t.percentComplete,a=t.options,o=t.tween;t.options.progress.call(r,r,i,Math.max(0,t.timeStart+(null!=t.duration?t.duration:null!=a.duration?a.duration:e.defaults.duration)-n),void 0!==o?o:100*i+"",t)}catch(e){setTimeout(function(){throw e},1)}}function r(){var t,r;for(t=a;t;t=r)r=t._nextProgress,n(t,e.lastTick);for(t=o;t;t=r)r=t._nextComplete,e.completeCall(t)}function i(n){if(!d){if(d=!0,n){var u=n&&!0!==n?n:s.now(),c=e.lastTick?u-e.lastTick:l,g=e.defaults.speed,v=e.defaults.easing,m=e.defaults.duration,h=void 0,y=void 0,b=void 0,S=void 0;if(a=null,o=null,c>=e.defaults.minFrameTime||!e.lastTick){for(e.lastTick=u;h=e.State.firstNew;)e.validateTweens(h);for(h=e.State.first;h&&h!==e.State.firstNew;h=h._next){var w=h.element,E=void 0;if(w.parentNode&&(E=p(w))){var x=h.options,C=h._flags;if(!(_=h.timeStart)){var N=null!=h.queue?h.queue:x.queue;_=u-c,!1!==N&&(_=Math.max(_,E.lastFinishList[N]||0)),h.timeStart=_}16&C?h.timeStart+=c:2&C||(h._flags|=2,x._ready++)}else e.freeAnimationCall(h)}for(h=e.State.first;h&&h!==e.State.firstNew;h=y){if(y=h._next,2&(C=h._flags)&&!(16&C)){x=h.options;if(32&C&&x._readyu)continue;h.timeStart=_+=O/(O>0?A:1)}h._flags|=4,0==x._started++&&(x._first=h,x.begin&&(t(h),x.begin=void 0))}if(1!==A){var k=Math.min(c,u-_);h.timeStart=_+=k*(1-A)}x._first===h&&x.progress&&(h._nextProgress=void 0,b?b._nextProgress=b=h:a=b=h);var T=null!=h.easing?h.easing:null!=x.easing?x.easing:v,P=h.ellapsedTime=u-_,q=h.percentComplete=e.mock?1:Math.min(P/(null!=h.duration?h.duration:null!=x.duration?x.duration:m),1),M=h.tweens,j=64&C;1===q&&(h._nextComplete=void 0,S?S._nextComplete=S=h:o=S=h);for(var I in M){var R=M[I],V=R[1]||T,z=R[3],L=R[4],F="",H=0;if(z){for(;H=4&&"("===t?h++:(h&&h<5||h>=4&&")"===t&&--h<5)&&(h=0),0===y&&"r"===t||1===y&&"g"===t||2===y&&"b"===t||3===y&&"a"===t||y>=3&&"("===t?(3===y&&"a"===t&&(b=1),y++):b&&","===t?++b>3&&(y=b=0):(b&&y<(b?5:4)||y>=(b?4:3)&&")"===t&&--y<(b?5:4))&&(y=b=0);else if(t||a){for(S=!0,r(c[c.length-1])||(1!==d.length||d[0]?(d.push(""),c.push(""),f.push("")):c[0]=f[0]="");v>=1,E++)w=!!(1&S&&e.Normalizations[E][y]);if((w||e.State.prefixElement&&r(e.State.prefixElement.style[y]))&&null!=b){var x=s[y]=Array(5),C=void 0,N=void 0;if(i(b)&&(b=b.call(c,f,u.length,u)),Array.isArray(b)){var A=b[1],_=b[2];C=b[0],r(A)&&(/^[\d-]/.test(A)||e.CSS.RegEx.isHex.test(A))||i(A)||t(A)?N=A:r(A)&&e.Easing.Easings[A]||Array.isArray(A)?(x[1]=A,N=_):N=A||_}else C=b;x[0]=o.get(typeof C)(C,c,u,f,y),null==N&&!1!==v&&void 0!==g.queueList[v]||(x[2]=o.get(typeof N)(N,c,u,f,y)),a(y,x,m,!!N)}}},e.validateTweens=function(t){if(e.State.firstNew===t&&(e.State.firstNew=t._next),!(1&t._flags)){var n=t.tweens,i=d(t.options.duration,e.defaults.duration);for(var o in n){var l=n[o];if(null==l[2]){var s=e.CSS.getPropertyValue(t.element,o);r(s)?(l[2]=e.CSS.fixColors(s),a(o,l,i)):Array.isArray(s)}}t._flags|=1}}}(R||(R={}));var R;(R||(R={})).version="2.0.0";if(function(){if(document.documentMode)return document.documentMode;for(var e=7;e>4;e--){var t=document.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]>=0,get:function(){return R[e]}})};for(var H in R)F(H);return O}); \ No newline at end of file diff --git a/velocity.ui.min.js b/velocity.ui.min.js index d41c23ea..f545721d 100644 --- a/velocity.ui.min.js +++ b/velocity.ui.min.js @@ -1,2 +1,2 @@ -/*! velocity-animate v2.0.0 (Thursday 1st February 2018, 11:00:33 AM) */ +/*! velocity-animate v2.0.0 (Thursday 1st February 2018, 12:11:49 PM) */ !function(t){"use strict";"function"==typeof require&&"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(["velocity"],t):t()}(function(t){"use strict";return function(a,r){var e=t||(this||a).Velocity;if(e){var n={"callout.bounce":{defaultDuration:550,calls:[[{translateY:-30},.25],[{translateY:0},.125],[{translateY:-15},.125],[{translateY:0},.25]]},"callout.shake":{defaultDuration:800,calls:[[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:0}]]},"callout.flash":{defaultDuration:1100,calls:[[{opacity:[0,"easeInOutQuad",1]}],[{opacity:[1,"easeInOutQuad"]}],[{opacity:[0,"easeInOutQuad"]}],[{opacity:[1,"easeInOutQuad"]}]]},"callout.pulse":{defaultDuration:825,calls:[[{scaleX:1.1,scaleY:1.1},.5,{easing:"easeInExpo"}],[{scaleX:1,scaleY:1},.5]]},"callout.swing":{defaultDuration:950,calls:[[{rotateZ:15}],[{rotateZ:-10}],[{rotateZ:5}],[{rotateZ:-5}],[{rotateZ:0}]]},"callout.tada":{defaultDuration:1e3,calls:[[{scaleX:.9,scaleY:.9,rotateZ:-3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:-3},.1],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],[{scaleX:1,scaleY:1,rotateZ:0},.2]]},"transition.fadeIn":{defaultDuration:500,calls:[[{opacity:[1,0]}]]},"transition.fadeOut":{defaultDuration:500,calls:[[{opacity:[0,1]}]]},"transition.flipXIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateY:[0,-55]}]],reset:{transformPerspective:0}},"transition.flipXOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateY:55}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipYIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateX:[0,-45]}]],reset:{transformPerspective:0}},"transition.flipYOut":{defaultDuration:800,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateX:25}]],reset:{transformPerspective:0,rotateX:0}},"transition.flipBounceXIn":{defaultDuration:900,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateY:[-10,90]},.5],[{opacity:.8,rotateY:10},.25],[{opacity:1,rotateY:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceXOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateY:-10}],[{opacity:0,rotateY:90}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipBounceYIn":{defaultDuration:850,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateX:[-10,90]},.5],[{opacity:.8,rotateX:10},.25],[{opacity:1,rotateX:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceYOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateX:-15}],[{opacity:0,rotateX:90}]],reset:{transformPerspective:0,rotateX:0}},"transition.swoopIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["100%","50%"],transformOriginY:["100%","100%"],scaleX:[1,0],scaleY:[1,0],translateX:[0,-700],translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%"}},"transition.swoopOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformOriginX:["50%","100%"],transformOriginY:["100%","100%"],scaleX:0,scaleY:0,translateX:-700,translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%",scaleX:1,scaleY:1,translateX:0}},"transition.whirlIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,0],scaleY:[1,0],rotateY:[0,160]},1,{easing:"easeInOutSine"}]]},"transition.whirlOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInOutQuint",1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:0,scaleY:0,rotateY:160},1,{easing:"swing"}]],reset:{scaleX:1,scaleY:1,rotateY:0}},"transition.shrinkIn":{defaultDuration:750,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,1.5],scaleY:[1,1.5],translateZ:0}]]},"transition.shrinkOut":{defaultDuration:600,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:1.3,scaleY:1.3,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.expandIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,.625],scaleY:[1,.625],translateZ:0}]]},"transition.expandOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:.5,scaleY:.5,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.bounceIn":{defaultDuration:800,calls:[[{opacity:[1,0],scaleX:[1.05,.3],scaleY:[1.05,.3]},.35],[{scaleX:.9,scaleY:.9,translateZ:0},.2],[{scaleX:1,scaleY:1},.45]]},"transition.bounceOut":{defaultDuration:800,calls:[[{scaleX:.95,scaleY:.95},.35],[{scaleX:1.1,scaleY:1.1,translateZ:0},.35],[{opacity:[0,1],scaleX:.3,scaleY:.3},.3]],reset:{scaleX:1,scaleY:1}},"transition.bounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[-30,1e3]},.6,{easing:"easeOutCirc"}],[{translateY:10},.2],[{translateY:0},.2]]},"transition.bounceUpOut":{defaultDuration:1e3,calls:[[{translateY:20},.2],[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.bounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[30,-1e3]},.6,{easing:"easeOutCirc"}],[{translateY:-10},.2],[{translateY:0},.2]]},"transition.bounceDownOut":{defaultDuration:1e3,calls:[[{translateY:-20},.2],[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.bounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[30,-1250]},.6,{easing:"easeOutCirc"}],[{translateX:-10},.2],[{translateX:0},.2]]},"transition.bounceLeftOut":{defaultDuration:750,calls:[[{translateX:30},.2],[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.bounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[-30,1250]},.6,{easing:"easeOutCirc"}],[{translateX:10},.2],[{translateX:0},.2]]},"transition.bounceRightOut":{defaultDuration:750,calls:[[{translateX:-30},.2],[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}},"transition.slideUpIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,20],translateZ:0}]]},"transition.slideUpOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:-20,translateZ:0}]],reset:{translateY:0}},"transition.slideDownIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,-20],translateZ:0}]]},"transition.slideDownOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:20,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,-20],translateZ:0}]]},"transition.slideLeftOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:-20,translateZ:0}]],reset:{translateX:0}},"transition.slideRightIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,20],translateZ:0}]]},"transition.slideRightOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:20,translateZ:0}]],reset:{translateX:0}},"transition.slideUpBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,75],translateZ:0}]]},"transition.slideUpBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:-75,translateZ:0}]],reset:{translateY:0}},"transition.slideDownBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,-75],translateZ:0}]]},"transition.slideDownBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:75,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,-75],translateZ:0}]]},"transition.slideLeftBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:-75,translateZ:0}]],reset:{translateX:0}},"transition.slideRightBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,75],translateZ:0}]]},"transition.slideRightBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:75,translateZ:0}]],reset:{translateX:0}},"transition.perspectiveUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveUpOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveDownOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveLeftIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveLeftOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}},"transition.perspectiveRightIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveRightOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}}};for(var s in n)n.hasOwnProperty(s)&&e.RegisterEffect(s,n[s])}}(window)}); \ No newline at end of file