forked from julianshapiro/velocity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
velocity.js.map
1 lines (1 loc) · 282 KB
/
velocity.js.map
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/setPropertyValue.ts","../src/Velocity/easing/easings.ts","../src/Velocity/easing/back.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/scroll.ts","../src/Velocity/normalizations/style.ts","../src/Velocity/normalizations/tween.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","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","createEmptyObject","create","defineProperty","name","value","configurable","writable","_now","Date","now","getTime","_inArray","array","i","sanitizeElements","elements","getValue","args","_args","arguments","_arg","undefined","addClass","element","className","Element","classList","add","removeClass","remove","replace","RegExp","VelocityStatic","Actions","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","end","CSS","setPropertyValue","fn","completeCall","finish","validateQueue","defaults","finishAll","animations","activeCall","State","first","nextCall","firstNew","_next","then","animationFlags","isExpanded","isReady","isStarted","isStopped","isPaused","isSync","isReverse","option","key","indexOf","push","result","flag","isPercentComplete","validateCache","validateBegin","validateComplete","validateDelay","validateDuration","validateFpsLimit","validateLoop","validateRepeat","num","timeStart","lastTick","checkAnimation","pauseResume","SyntaxError","checkAnimationShouldBeStopped","stop","style","styleAction","fixColors","getPropertyValue","error","propertyName","value_1","String","tween","percentComplete","properties","easing","tweenAction","requireForcefeeding","info","document","body","fakeAnimation","singleResult","count","_a","Array","isArray","activeEasing","validateEasing","expandProperties","tween_2","easing_1","startValue","start","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","$","letter","toUpperCase","ColorNames","makeRGBA","ignore","r","g","b","parseInt","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","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","skipCache","propertyValue","NoCacheNormalizations","has","getNormalization","debug","Units","getUnit","units","unit","j","Easing","Easings","registerEasing","cos","PI","exp","registerBackIn","amount","pow","registerBackOut","registerBackInOut","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","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","MaxType","Normalizations","NormalizationUnits","Set","constructors","registerNormalization","index","nextArg","hasNormalization","getNormalizationUnit","types","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","globals","subtype","exec","createElementNS","toLowerCase","attribute","e","getDimension","getBBox","wantInner","isBorderBox","sides","fields","augment","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","clientWidth","scrollWidth","clientHeight","scrollHeight","scroll","direction","client","scroll_1","HTMLElement","rxAddPx","getSetPrefixed","unprefixed","getSetStyle","rxVendors","addUnit","getSetTween","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","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","match","visibility","injectFinalCallbacks_1","resetProperty","resetValue","resetOptions","_deepCopyObject","target","sources","_i","TypeError","to","source","shift","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","rxHex","commands","Map","elementArrayIndex","valueData","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","lastAnimation","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;0RAUA;IAAMA,mBAAkB,WAAW,kBAAkB,SAAS,SAAS;;;;;GAKvE,KAAMC,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,IAAMC,iBAAiB;;AACvB,IAAMC,gBAAgB;;AACtB,IAAMC,eAAe;;AACrB,IAAMC,qBAAqB;;AAE3B,IAAMC,YAAY;;AAElB,IAAMC;IACLC,MAAQnB;IACRoB,QAAUnB;IACVoB,MAAQnB;;;;;;;;;GClCT,UAAAoB,UAAmBC;IAClB,OAAOA,aAAa,QAAQA,aAAa;;;AAG1C,SAAAC,SAAkBD;IACjB,cAAcA,aAAa;;;;;;;GAQ5B,UAAAE,mBAA4BF;IAC3B,QAAQG,MAAMC,OAAOJ;;;AAGtB,SAAAK,SAAkBL;IACjB,cAAcA,aAAa;;;AAG5B,SAAAM,WAAoBN;IACnB,OAAOO,OAAOC,UAAUC,SAASC,KAAKV,cAAc;;;AAGrD,SAAAW,OAAgBX;IACf,UAAUA,YAAYA,SAASY;;;AAGhC,SAAAC,iBAA0Bb;IACzB,OAAOA,YAAYC,SAASD,SAASc,WAAWR,WAAYN,SAA4Be;;;AAGzF,SAAAC,qBAA8BC,QAAgBC;IAC7C,OAAOX,OAAOC,UAAUQ,qBAAqBN,KAAKO,QAAQC;;;;gDAM3D,UAAAC,UAAmBnB;IAClB,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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 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 * Creates an empty object without any prototype chain.\r\n */\r\nfunction createEmptyObject() {\r\n\treturn Object.create(null);\r\n}\r\n\r\n/**\r\n * The <strong><code>defineProperty()</code></strong> 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 * 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<T>(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<T>(...args: T[]): T;\r\nfunction getValue<T>(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} = createEmptyObject();\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:<br/>\r\n\t * <code>Velocity(\"registerAction\", \"name\", VelocityActionFn);</code>\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","///<reference path=\"actions.ts\" />\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<HTMLorSVGElement[]>} 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","///<reference path=\"actions.ts\" />\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.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.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, tween.fn);\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","///<reference path=\"actions.ts\" />\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","///<reference path=\"actions.ts\" />\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","///<reference path=\"actions.ts\" />\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","///<reference path=\"actions.ts\" />\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","///<reference path=\"actions.ts\" />\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.fixColors(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.fixColors(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","///<reference path=\"actions.ts\" />\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(<element>, \\\"tween\\\", percentComplete, property, end | [end, <easing>, <start>], <easing>) => value\\n\"\r\n\t\t\t\t\t+ \"Velocity(<element>, \\\"tween\\\", percentComplete, {property: end | [end, <easing>, <start>], ...}, <easing>) => {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.easing || activeEasing,\r\n\t\t\t\tpattern = tween.pattern;\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.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.end[i] as number, property)\r\n\r\n\t\t\t\t\t\tcurrentValue += pattern[i] === true ? 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","///<reference path=\"../state.ts\" />\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} = createEmptyObject();\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, ($: string, letter: string) => letter.toUpperCase());\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 * 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} = createEmptyObject();\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 = /rgb(a?)\\(([^\\)]+)\\)/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, $1, $2: string) {\r\n\t\t\t\treturn \"rgba(\" + $2.replace(rxSpaces, \"\") + ($1 ? \"\" : \",1\") + \")\";\r\n\t\t\t});\r\n\t}\r\n}\r\n","///<reference path=\"fixColors.ts\" />\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\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.\r\n\t */\r\n\texport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, fn?: VelocityNormalizationsFn, 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} else {\r\n\t\t\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tpropertyValue = fn(element);\r\n\t\t\t\tif (data) {\r\n\t\t\t\t\tdata.cache[propertyName] = propertyValue;\r\n\t\t\t\t}\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\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\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * The singular setPropertyValue, which routes the logic for all\r\n\t * normalizations.\r\n\t */\r\n\texport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any, fn?: VelocityNormalizationsFn) {\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&& propertyValue[5] === \" \") {\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\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tfn(element, 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\ninterface VelocityEasingsType {\r\n\t\"linear\": true;\r\n\t\"swing\": true;\r\n\t\"spring\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport const Easings: {[name: string]: VelocityEasingFn} = createEmptyObject();\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:<br/>\r\n\t * <code>Velocity(\"registerEasing\", \"name\", VelocityEasingFn);</code>\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\tregisterAction([\"registerEasing\", registerEasing], true);\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","///<reference path=\"easings.ts\" />\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 * Back easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInBack\": true;\r\n\t\"easeOutBack\": true;\r\n\t\"easeInOutBack\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport function registerBackIn(name: string, amount: 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 Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackOut(name: string, amount: 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 (Math.pow(--percentComplete, 2) * ((amount + 1) * percentComplete + amount) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackInOut(name: string, amount: number) {\r\n\t\tamount *= 1.525;\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 ((percentComplete *= 2) < 1\r\n\t\t\t\t? (Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount))\r\n\t\t\t\t: (Math.pow(percentComplete -= 2, 2) * ((amount + 1) * percentComplete + amount) + 2)\r\n\t\t\t) * 0.5 * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterBackIn(\"easeInBack\", 1.7);\r\n\tregisterBackOut(\"easeOutBack\", 1.7);\r\n\tregisterBackInOut(\"easeInOutBack\", 1.7);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///<reference path=\"easings.ts\" />\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\ninterface VelocityEasingsType {\r\n\t\"ease\": true;\r\n\t\"easeIn\": true;\r\n\t\"ease-in\": true;\r\n\t\"easeOut\": true;\r\n\t\"ease-out\": true;\r\n\t\"easeInOut\": true;\r\n\t\"ease-in-out\": true;\r\n\t\"easeInSine\": true;\r\n\t\"easeOutSine\": true;\r\n\t\"easeInOutSine\": true;\r\n\t\"easeInQuad\": true;\r\n\t\"easeOutQuad\": true;\r\n\t\"easeInOutQuad\": true;\r\n\t\"easeInCubic\": true;\r\n\t\"easeOutCubic\": true;\r\n\t\"easeInOutCubic\": true;\r\n\t\"easeInQuart\": true;\r\n\t\"easeOutQuart\": true;\r\n\t\"easeInOutQuart\": true;\r\n\t\"easeInQuint\": true;\r\n\t\"easeOutQuint\": true;\r\n\t\"easeInOutQuint\": true;\r\n\t\"easeInExpo\": true;\r\n\t\"easeOutExpo\": true;\r\n\t\"easeInOutExpo\": true;\r\n\t\"easeInCirc\": true;\r\n\t\"easeOutCirc\": true;\r\n\t\"easeInOutCirc\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Fix to a range of <code>0 <= num <= 1</code>.\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","///<reference path=\"easings.ts\" />\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\ninterface VelocityEasingsType {\r\n\t\"easeInBounce\": true;\r\n\t\"easeOutBounce\": true;\r\n\t\"easeInOutBounce\": true;\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\r\n\t\t\t? easeInBounce(percentComplete * 2) * .5\r\n\t\t\t: easeOutBounce(percentComplete * 2 - 1) * 0.5 + 0.5\r\n\t\t) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///<reference path=\"easings.ts\" />\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\ninterface VelocityEasingsType {\r\n\t\"easeInElastic\": true;\r\n\t\"easeOutElastic\": true;\r\n\t\"easeInOutElastic\": true;\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\treturn (percentComplete < 0\r\n\t\t\t\t? -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period))\r\n\t\t\t\t: amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period) * 0.5 + 1\r\n\t\t\t) * (endValue - startValue);\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","///<reference path=\"easings.ts\" />\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","///<reference path=\"easings.ts\" />\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 * Step easing generator.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst cache: {[steps: number]: VelocityEasingFn} = {};\r\n\r\n\texport function generateStep(steps): VelocityEasingFn {\r\n\t\tconst fn = cache[steps];\r\n\r\n\t\tif (fn) {\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t\treturn cache[steps] = 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 + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\r\n\t\t};\r\n\t}\r\n};\r\n","///<reference path=\"easings.ts\" />\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 * Easings to act on strings, either set at the start or at the end depending on\r\n * need.\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"at-start\": true;\r\n\t\"during\": true;\r\n\t\"at-end\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Easing function that sets to the specified value immediately after the\r\n\t * animation starts.\r\n\t */\r\n\tregisterEasing([\"at-start\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value while the animation is\r\n\t * running.\r\n\t */\r\n\tregisterEasing([\"during\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0 || percentComplete === 1\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value when the animation ends.\r\n\t */\r\n\tregisterEasing([\"at-end\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 1\r\n\t\t\t? endValue\r\n\t\t\t: startValue;\r\n\t} as any]);\r\n};\r\n","///<reference path=\"../actions/_all.d.ts\" />\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 * The highest type index for finding the best normalization for a property.\r\n\t */\r\n\texport let MaxType: number = -1;\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 * Store a cross-reference to units to be added to specific normalization\r\n\t * functions if the user supplies a unit-less number.\r\n\t * \r\n\t * This is pretty much confined to adding \"px\" to several css properties.\r\n\t */\r\n\texport const NormalizationUnits: {[unit: string]: VelocityNormalizationsFn[]} = createEmptyObject();\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<string>();\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 <code>instanceof</code> 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:<br/>\r\n\t * <code>Velocity(\"registerNormalization\", Element, \"name\", VelocityNormalizationsFn[, false]);</code>\r\n\t * \r\n\t * The fourth argument can be an explicit <code>false</code>, 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] | [ClassConstructor, string, VelocityNormalizationsFn, string] | [ClassConstructor, string, VelocityNormalizationsFn, string, 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\t\t\t\tnextArg = 3;\r\n\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tMaxType = index = constructors.push(constructor) - 1;\r\n\t\t\t\tNormalizations[index] = createEmptyObject();\r\n\t\t\t}\r\n\t\t\tNormalizations[index][name] = callback;\r\n\t\t\tif (isString(args[nextArg])) {\r\n\t\t\t\tlet unit = args[nextArg++] as string,\r\n\t\t\t\t\tunits = NormalizationUnits[unit];\r\n\r\n\t\t\t\tif (!units) {\r\n\t\t\t\t\tunits = NormalizationUnits[unit] = [];\r\n\t\t\t\t}\r\n\t\t\t\tunits.push(callback);\r\n\t\t\t}\r\n\t\t\tif (args[nextArg] === 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\t/**\r\n\t * Used to check if a normalisation exists on a specific class.\r\n\t */\r\n\texport function hasNormalization(args?: [ClassConstructor, string]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1];\r\n\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\treturn !!Normalizations[index][name];\r\n\t}\r\n\r\n\t/**\r\n\t * Get the unit to add to a unitless number based on the normalization used.\r\n\t */\r\n\texport function getNormalizationUnit(fn: VelocityNormalizationsFn) {\r\n\t\tfor (let unit in NormalizationUnits) {\r\n\t\t\tif (_inArray(NormalizationUnits[unit], fn)) {\r\n\t\t\t\treturn unit;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get the normalization for an element and propertyName combination. This\r\n\t * value should be cached at asking time, as it may change if the user adds\r\n\t * more normalizations.\r\n\t */\r\n\texport function getNormalization(element: HTMLorSVGElement, propertyName: string) {\r\n\t\tconst data = Data(element);\r\n\t\tlet fn: VelocityNormalizationsFn;\r\n\r\n\t\tfor (let index = MaxType, types = data.types; !fn && index >= 0; index--) {\r\n\t\t\tif (types & (1 << index)) {\r\n\t\t\t\tfn = Normalizations[index][propertyName];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fn;\r\n\t}\r\n\r\n\tregisterAction([\"registerNormalization\", registerNormalization]);\r\n\tregisterAction([\"hasNormalization\", hasNormalization]);\r\n}\r\n","///<reference path=\"../normalizations.ts\" />\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 | void {\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} 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 && subtype[1] !== \"SVG\") { // Don't do SVGSVGElement.\r\n\t\t\ttry {\r\n\t\t\t\tconst element = subtype[1] ? document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()) : document.createElement(\"svg\"),\r\n\t\t\t\t\tconstructor = element.constructor;\r\n\r\n\t\t\t\tfor (let attribute in element) {\r\n\t\t\t\t\tconst value = element[attribute];\r\n\r\n\t\t\t\t\tif (isString(attribute)\r\n\t\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\r\n\t\t\t\t\t\t&& attribute !== attribute.toUpperCase()\r\n\t\t\t\t\t\t&& !rxElement.test(attribute)\r\n\t\t\t\t\t\t&& !(attribute in base)\r\n\t\t\t\t\t\t&& !isFunction(value)) {\r\n\t\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\t\tregisterNormalization([constructor as any, attribute, getAttribute(attribute)]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole.error(\"VelocityJS: Error when trying to identify SVG attributes on \" + globals + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n","///<reference path=\"../normalizations.ts\" />\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 | void {\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} 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","///<reference path=\"normalizations.ts\" />\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: \"width\" | \"height\", 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: \"width\" | \"height\", wantInner: boolean) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\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} 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","///<reference path=\"normalizations.ts\" />\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): void;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue?: string): string | void {\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}\r\n\r\n\tregisterNormalization([Element, \"display\", display]);\r\n}\r\n","///<reference path=\"normalizations.ts\" />\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): void;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientWidth + \"px\";\r\n\t\t}\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): void;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollWidth + \"px\";\r\n\t\t}\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): void;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientHeight + \"px\";\r\n\t\t}\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): void;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollHeight + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll an element.\r\n\t */\r\n\tfunction scroll(direction: \"Height\", end: \"Top\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Width\", end: \"Left\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Height\" | \"Width\", end: \"Top\" | \"Left\"): VelocityNormalizationsFn {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue == null) {\r\n\t\t\t\t// Make sure we have these values cached.\r\n\t\t\t\tCSS.getPropertyValue(element, \"client\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + end, null, true);\r\n\t\t\t\treturn element[\"scroll\" + end] + \"px\";\r\n\t\t\t}\r\n\t\t\t//\t\tconsole.log(\"setScrollTop\", propertyValue)\r\n\t\t\tconst value = parseFloat(propertyValue),\r\n\t\t\t\tunit = propertyValue.replace(String(value), \"\");\r\n\r\n\t\t\tswitch (unit) {\r\n\t\t\t\tcase \"\":\r\n\t\t\t\tcase \"px\":\r\n\t\t\t\t\telement[\"scroll\" + end] = value;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"%\":\r\n\t\t\t\t\tlet client = parseFloat(CSS.getPropertyValue(element, \"client\" + direction)),\r\n\t\t\t\t\t\tscroll = parseFloat(CSS.getPropertyValue(element, \"scroll\" + direction));\r\n\r\n\t\t\t\t\t//\t\t\t\tconsole.log(\"setScrollTop percent\", scrollHeight, clientHeight, value, Math.max(0, scrollHeight - clientHeight) * value / 100)\r\n\t\t\t\t\telement[\"scroll\" + end] = Math.max(0, scroll - client) * value / 100;\r\n\t\t\t}\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([HTMLElement, \"scroll\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollTop\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollLeft\", scroll(\"Width\", \"Left\"), 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","///<reference path=\"normalizations.ts\" />\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 * This handles all CSS style properties. With browser prefixed properties it\r\n * will register a version that handles setting (and getting) both the prefixed\r\n * and non-prefixed version.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * An RegExp pattern for the following list of css words using\r\n\t * http://kemio.com.ar/tools/lst-trie-re.php to generate:\r\n\t * \r\n\t * blockSize\r\n\t * borderBottomLeftRadius\r\n\t * borderBottomRightRadius\r\n\t * borderBottomWidth\r\n\t * borderImageOutset\r\n\t * borderImageWidth\r\n\t * borderLeftWidth\r\n\t * borderRadius\r\n\t * borderRightWidth\r\n\t * borderSpacing\r\n\t * borderTopLeftRadius\r\n\t * borderTopRightRadius\r\n\t * borderTopWidth\r\n\t * borderWidth\r\n\t * bottom\r\n\t * columnGap\r\n\t * columnRuleWidth\r\n\t * columnWidth\r\n\t * flexBasis\r\n\t * fontSize\r\n\t * gridColumnGap\r\n\t * gridGap\r\n\t * gridRowGap\r\n\t * height\r\n\t * inlineSize\r\n\t * left\r\n\t * letterSpacing\r\n\t * margin\r\n\t * marginBottom\r\n\t * marginLeft\r\n\t * marginRight\r\n\t * marginTop\r\n\t * maxBlockSize\r\n\t * maxHeight\r\n\t * maxInlineSize\r\n\t * maxWidth\r\n\t * minBlockSize\r\n\t * minHeight\r\n\t * minInlineSize\r\n\t * minWidth\r\n\t * objectPosition\r\n\t * outlineOffset\r\n\t * outlineWidth\r\n\t * padding\r\n\t * paddingBottom\r\n\t * paddingLeft\r\n\t * paddingRight\r\n\t * paddingTop\r\n\t * perspective\r\n\t * right\r\n\t * shapeMargin\r\n\t * strokeDashoffset\r\n\t * strokeWidth\r\n\t * textIndent\r\n\t * top\r\n\t * transformOrigin\r\n\t * width\r\n\t * wordSpacing\r\n\t */\r\n\tconst rxAddPx = /^(b(lockSize|o(rder(Bottom(LeftRadius|RightRadius|Width)|Image(Outset|Width)|LeftWidth|R(adius|ightWidth)|Spacing|Top(LeftRadius|RightRadius|Width)|Width)|ttom))|column(Gap|RuleWidth|Width)|f(lexBasis|ontSize)|grid(ColumnGap|Gap|RowGap)|height|inlineSize|le(ft|tterSpacing)|m(a(rgin(Bottom|Left|Right|Top)|x(BlockSize|Height|InlineSize|Width))|in(BlockSize|Height|InlineSize|Width))|o(bjectPosition|utline(Offset|Width))|p(adding(Bottom|Left|Right|Top)|erspective)|right|s(hapeMargin|troke(Dashoffset|Width))|t(extIndent|op|ransformOrigin)|w(idth|ordSpacing))$/;\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a prefixed style\r\n\t * property.\r\n\t */\r\n\tfunction getSetPrefixed(propertyName: string, unprefixed: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName) || CSS.computePropertyValue(element, unprefixed);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = element.style[unprefixed] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a style property.\r\n\t */\r\n\tfunction getSetStyle(propertyName: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\t/**\r\n\t * Vendor prefixes. Chrome / Safari, Firefox, IE / Edge, Opera.\r\n\t */\r\n\tconst rxVendors = /^(webkit|moz|ms|o)[A-Z]/,\r\n\t\tprefixElement = State.prefixElement;\r\n\r\n\tfor (const propertyName in prefixElement.style) {\r\n\t\tif (rxVendors.test(propertyName)) {\r\n\t\t\tlet unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\r\n\r\n\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\r\n\t\t\t\tlet addUnit = rxAddPx.test(unprefixed) ? \"px\" : undefined;\r\n\r\n\t\t\t\tregisterNormalization([Element, unprefixed, getSetPrefixed(propertyName, unprefixed), addUnit]);\r\n\t\t\t}\r\n\t\t} else if (!hasNormalization([Element, propertyName])) {\r\n\t\t\tlet addUnit = rxAddPx.test(propertyName) ? \"px\" : undefined;\r\n\r\n\t\t\tregisterNormalization([Element, propertyName, getSetStyle(propertyName), addUnit]);\r\n\t\t}\r\n\t}\r\n}\r\n","///<reference path=\"normalizations.ts\" />\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 * A fake normalization used to allow the \"tween\" property easy access.\r\n\t */\r\n\tfunction getSetTween(element: HTMLorSVGElement, propertyValue?: string) {\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"tween\", getSetTween]);\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: createEmptyObject(),\r\n\t\tqueueList: createEmptyObject(),\r\n\t\tlastAnimationList: createEmptyObject(),\r\n\t\tlastFinishList: createEmptyObject()\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 * <code>mock = true</code>.\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 <code>.length</code>\r\n\t * property, and each member a Node, or a Node directly.\r\n\t * \r\n\t * By default Velocity will try to patch <code>window</code>,\r\n\t * <code>jQuery</code>, <code>Zepto</code>, 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","///<reference path=\"data.ts\" />\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\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\tconst data = Data(element);\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 (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\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\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};","/*\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 * Sequence Running\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<T, U>(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\nnamespace VelocityStatic {\r\n\t/* Note: Sequence calls must use Velocity's single-object arguments syntax. */\r\n\texport function RunSequence(originalSequence): void {\r\n\t\tlet sequence = _deepCopyObject([], originalSequence);\r\n\r\n\t\tif (sequence.length > 1) {\r\n\t\t\tsequence.reverse().forEach(function(currentCall, i) {\r\n\t\t\t\tlet nextCall = sequence[i + 1];\r\n\r\n\t\t\t\tif (nextCall) {\r\n\t\t\t\t\t/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered\r\n\t\t\t\t\t in the previous call's begin callback. Otherwise, chained calls are normally triggered\r\n\t\t\t\t\t in the previous call's complete callback. */\r\n\t\t\t\t\tlet currentCallOptions = currentCall.o || currentCall.options,\r\n\t\t\t\t\t\tnextCallOptions = nextCall.o || nextCall.options;\r\n\r\n\t\t\t\t\tlet timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? \"begin\" : \"complete\",\r\n\t\t\t\t\t\tcallbackOriginal = nextCallOptions && nextCallOptions[timing],\r\n\t\t\t\t\t\toptions = {};\r\n\r\n\t\t\t\t\toptions[timing] = function() {\r\n\t\t\t\t\t\tlet nextCallElements = nextCall.e || nextCall.elements;\r\n\t\t\t\t\t\tlet elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;\r\n\r\n\t\t\t\t\t\tif (callbackOriginal) {\r\n\t\t\t\t\t\t\tcallbackOriginal.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tVelocityFn(currentCall);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (nextCall.o) {\r\n\t\t\t\t\t\tnextCall.o = {...nextCallOptions, ...options};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnextCall.options = {...nextCallOptions, ...options};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsequence.reverse();\r\n\t\t}\r\n\r\n\t\tVelocityFn(sequence[0]);\r\n\t};\r\n};\r\n","///<reference path=\"state.ts\" />\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.easing || activeEasing,\r\n\t\t\t\t\t\t\tpattern = tween.pattern;\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.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.end[i] as number, property)\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i] === true ? 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, tween.fn);\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\nnamespace VelocityStatic {\r\n\tconst rxHex = /^#([A-f\\d]{3}){1,2}$/i;\r\n\tlet commands = new Map<string, (value: any, element: HTMLorSVGElement, elements: HTMLorSVGElement[], elementArrayIndex: number, propertyName: string, tween: VelocityTween) => string>();\r\n\r\n\tcommands.set(\"function\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\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, tween) {\r\n\t\treturn value + getNormalizationUnit(tween.fn);\r\n\t});\r\n\tcommands.set(\"string\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(value);\r\n\t});\r\n\tcommands.set(\"undefined\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(CSS.getPropertyValue(element, propertyName, tween.fn) || \"\");\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 = createEmptyObject(),\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\tfn = getNormalization(element, propertyName);\r\n\r\n\t\t\tif (!fn && propertyName !== \"tween\") {\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] = createEmptyObject() as any;\r\n\t\t\tlet endValue: string,\r\n\t\t\t\tstartValue: string;\r\n\r\n\t\t\ttween.fn = fn;\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) || rxHex.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.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.end = commands.get(typeof endValue)(endValue, element, elements, elementArrayIndex, propertyName, tween) as any;\r\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\r\n\t\t\t\ttween.start = commands.get(typeof startValue)(startValue, element, elements, elementArrayIndex, propertyName, tween) 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.end as any as string;\r\n\t\tlet startValue: string = 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.start = [null],\r\n\t\t\t\tarrayEnd: (string | number)[] = tween.end = [null],\r\n\t\t\t\tpattern: (string | boolean)[] = tween.pattern = [\"\"];\r\n\t\t\tlet easing = tween.easing as any,\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\tpattern.push(inRGB ? true : false, 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(false, unitStart + \" + \", false, 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 === \" \" || TWEEN_NUMBER_REGEX.test(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 === \" \" || TWEEN_NUMBER_REGEX.test(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.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.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.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","/*\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 * Validation functions used for various types of data that can be supplied.\r\n * All errors are reported in the non-minified version for development. If a\r\n * validation fails then it should return <code>undefined</code>.\r\n */\r\n\r\n/**\r\n * Parse a duration value and return an ms number. Optionally return a\r\n * default value if the number is not valid.\r\n */\r\nfunction parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tif (isNumber(duration)) {\r\n\t\treturn duration;\r\n\t}\r\n\tif (isString(duration)) {\r\n\t\treturn Duration[duration.toLowerCase()] || parseFloat(duration.replace(\"ms\", \"\").replace(\"s\", \"000\"));\r\n\t}\r\n\treturn def == null ? undefined : parseDuration(def);\r\n}\r\n\r\n/**\r\n * Validate a <code>cache</code> option.\r\n * @private\r\n */\r\nfunction validateCache(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'cache' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>begin</code> option.\r\n * @private\r\n */\r\nfunction validateBegin(value: VelocityCallback): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'begin' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>complete</code> option.\r\n * @private\r\n */\r\nfunction validateComplete(value: VelocityCallback, noError?: true): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'complete' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>delay</code> option.\r\n * @private\r\n */\r\nfunction validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed)) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'delay' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>duration</code> option.\r\n * @private\r\n */\r\nfunction validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'duration' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>easing</code> option.\r\n * @private\r\n */\r\nfunction validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\r\n\tconst Easing = VelocityStatic.Easing;\r\n\r\n\tif (isString(value)) {\r\n\t\t// Named easing\r\n\t\treturn Easing.Easings[value];\r\n\t}\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (Array.isArray(value)) {\r\n\t\tif (value.length === 1) {\r\n\t\t\t// Steps\r\n\t\t\treturn Easing.generateStep(value[0]);\r\n\t\t}\r\n\t\tif (value.length === 2) {\r\n\t\t\t// springRK4 must be passed the animation's duration.\r\n\t\t\t// Note: If the springRK4 array contains non-numbers,\r\n\t\t\t// generateSpringRK4() returns an easing function generated with\r\n\t\t\t// default tension and friction values.\r\n\t\t\treturn Easing.generateSpringRK4(value[0], value[1], duration);\r\n\t\t}\r\n\t\tif (value.length === 4) {\r\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\r\n\t\t\t// returns undefined.\r\n\t\t\treturn Easing.generateBezier.apply(null, value) || false;\r\n\t\t}\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'easing' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>fpsLimit</code> option.\r\n * @private\r\n */\r\nfunction validateFpsLimit(value: number | false): number {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn Math.min(parsed, 60);\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'fpsLimit' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Validate a <code>loop</code> option.\r\n * @private\r\n */\r\nfunction validateLoop(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'loop' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>progress</code> option.\r\n * @private\r\n */\r\nfunction validateProgress(value: VelocityProgress): VelocityProgress {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>promise</code> option.\r\n * @private\r\n */\r\nfunction validatePromise(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promise' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>promiseRejectEmpty</code> option.\r\n * @private\r\n */\r\nfunction validatePromiseRejectEmpty(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>queue</code> option.\r\n * @private\r\n */\r\nfunction validateQueue(value: string | false, noError?: true): string | false {\r\n\tif (value === false || isString(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'queue' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>repeat</code> option.\r\n * @private\r\n */\r\nfunction validateRepeat(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'repeat' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>speed</code> option.\r\n * @private\r\n */\r\nfunction validateSpeed(value: number): number {\r\n\tif (isNumber(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'speed' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a <code>sync</code> option.\r\n * @private\r\n */\r\nfunction validateSync(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'sync' to an invalid value:\", value);\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 * Velocity version (should grab from package.json during build).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let version = \"2.0.2\";\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 * <code>options</code>.\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 <b>last</b> 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<VelocityResult>,\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 isReverse = propertiesMap === \"reverse\",\r\n\t\tisAction = !isReverse && 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 <code>undefined</code> 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 <code>.then()</code> 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// 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 (isAction) {\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 as string).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 as string);\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) || isReverse) {\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 (!isReverse) {\r\n\t\t\t\tif (optionsMap.display != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).display = optionsMap.display as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.display' used, this is now a property:\", optionsMap.display);\r\n\t\t\t\t}\r\n\t\t\t\tif (optionsMap.visibility != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).visibility = optionsMap.visibility as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.visibility' used, this is now a property:\", optionsMap.visibility);\r\n\t\t\t\t}\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\tif (isReverse && options.queue === false) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot reverse a queue:false animation.\");\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\t\t\tlet flags = 0;\r\n\r\n\t\t\tif (isNode(element)) { // TODO: This needs to check for valid animation targets, not just Elements\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\tconst lastAnimation = Data(element).lastAnimationList[options.queue as string];\r\n\r\n\t\t\t\t\tpropertiesMap = lastAnimation && lastAnimation.tweens;\r\n\t\t\t\t\tif (!propertiesMap) {\r\n\t\t\t\t\t\tconsole.error(\"VelocityJS: Attempting to reverse an animation on an element with no previous animation:\", element);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tflags |= AnimationFlags.REVERSE & ~(lastAnimation._flags & AnimationFlags.REVERSE);\r\n\t\t\t\t}\r\n\t\t\t\tconst tweens = createEmptyObject(),\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\tanimation._flags |= flags;\r\n\t\t\t\tanimations.push(animation);\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\t// In this case we're using the previous animation, so\r\n\t\t\t\t\t// it will be expanded correctly when that one runs.\r\n\t\t\t\t\tanimation.tweens = propertiesMap as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tVelocityStatic.expandProperties(animation, propertiesMap);\r\n\t\t\t\t}\r\n\t\t\t\tVelocityStatic.queue(element, animation, 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 = \"<!--[if IE \" + i + \"]><span></span><![endif]-->\";\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","///<reference path=\"../index.d.ts\" />\r\n///<reference path=\"constants.ts\" />\r\n///<reference path=\"types.ts\" />\r\n///<reference path=\"utility.ts\" />\r\n///<reference path=\"Velocity/_all.d.ts\" />\r\n///<reference path=\"core.ts\" />\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\tlet value = VelocityStatic[key];\r\n\r\n\tif (isString(value) || isNumber(value) || isBoolean(value)) {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t},\r\n\t\t\tset: function(value?: any) {\r\n\t\t\t\tVelocityStatic[key] = value;\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// console.log(\"Velocity keys\", Object.keys(VelocityStatic));\r\n"]}