http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/985298bd/node_modules/@angular/animations/esm2015/browser.js.map
----------------------------------------------------------------------
diff --git a/node_modules/@angular/animations/esm2015/browser.js.map 
b/node_modules/@angular/animations/esm2015/browser.js.map
new file mode 100644
index 0000000..6470106
--- /dev/null
+++ b/node_modules/@angular/animations/esm2015/browser.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser.js","sources":["../../../packages/animations/browser/src/render/shared.js","../../../packages/animations/browser/src/render/animation_driver.js","../../../packages/animations/browser/src/util.js","../../../packages/animations/browser/src/dsl/animation_transition_expr.js","../../../packages/animations/browser/src/dsl/animation_ast_builder.js","../../../packages/animations/browser/src/dsl/animation_timeline_instruction.js","../../../packages/animations/browser/src/dsl/element_instruction_map.js","../../../packages/animations/browser/src/dsl/animation_timeline_builder.js","../../../packages/animations/browser/src/dsl/animation.js","../../../packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.js","../../../packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.js","../../../packages/animations/browser/src/dsl/animation_transition_instruction.js","../../../packages/animations/browser/src/dsl/anim
 
ation_transition_factory.js","../../../packages/animations/browser/src/dsl/animation_trigger.js","../../../packages/animations/browser/src/render/timeline_animation_engine.js","../../../packages/animations/browser/src/render/transition_animation_engine.js","../../../packages/animations/browser/src/render/animation_engine_next.js","../../../packages/animations/browser/src/render/web_animations/web_animations_player.js","../../../packages/animations/browser/src/render/web_animations/web_animations_driver.js","../../../packages/animations/browser/src/private_export.js","../../../packages/animations/browser/src/browser.js","../../../packages/animations/browser/public_api.js","../../../packages/animations/browser/browser.js"],"sourcesContent":["/**\n
 * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n 
*/\nimport { AUTO_STYLE, NoopAnimationPlayer, ɵAnimationGroupPlayer, 
ɵPRE_STYLE as PRE_STYLE } from '@angular/animations';\n/**\n * @param {?} 
players\n * @return
  {?}\n */\nexport function optimizeGroupPlayer(players) {\n    switch 
(players.length) {\n        case 0:\n            return new 
NoopAnimationPlayer();\n        case 1:\n            return players[0];\n       
 default:\n            return new ɵAnimationGroupPlayer(players);\n    
}\n}\n/**\n * @param {?} driver\n * @param {?} normalizer\n * @param {?} 
element\n * @param {?} keyframes\n * @param {?=} preStyles\n * @param {?=} 
postStyles\n * @return {?}\n */\nexport function normalizeKeyframes(driver, 
normalizer, element, keyframes, preStyles = {}, postStyles = {}) {\n    const 
/** @type {?} */ errors = [];\n    const /** @type {?} */ normalizedKeyframes = 
[];\n    let /** @type {?} */ previousOffset = -1;\n    let /** @type {?} */ 
previousKeyframe = null;\n    keyframes.forEach(kf => {\n        const /** 
@type {?} */ offset = /** @type {?} */ (kf['offset']);\n        const /** @type 
{?} */ isSameOffset = offset == previousOffset;\n        const /** @type {?} */ 
normalizedKeyframe = 
 (isSameOffset && previousKeyframe) || {};\n        
Object.keys(kf).forEach(prop => {\n            let /** @type {?} */ 
normalizedProp = prop;\n            let /** @type {?} */ normalizedValue = 
kf[prop];\n            if (prop !== 'offset') {\n                normalizedProp 
= normalizer.normalizePropertyName(normalizedProp, errors);\n                
switch (normalizedValue) {\n                    case PRE_STYLE:\n               
         normalizedValue = preStyles[prop];\n                        break;\n   
                 case AUTO_STYLE:\n                        normalizedValue = 
postStyles[prop];\n                        break;\n                    
default:\n                        normalizedValue =\n                           
 normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, 
errors);\n                        break;\n                }\n            }\n    
        normalizedKeyframe[normalizedProp] = normalizedValue;\n        });\n    
    if (!isSameOffset) {\n 
            normalizedKeyframes.push(normalizedKeyframe);\n        }\n        
previousKeyframe = normalizedKeyframe;\n        previousOffset = offset;\n    
});\n    if (errors.length) {\n        const /** @type {?} */ LINE_START = '\\n 
- ';\n        throw new Error(`Unable to animate due to the following 
errors:${LINE_START}${errors.join(LINE_START)}`);\n    }\n    return 
normalizedKeyframes;\n}\n/**\n * @param {?} player\n * @param {?} eventName\n * 
@param {?} event\n * @param {?} callback\n * @return {?}\n */\nexport function 
listenOnPlayer(player, eventName, event, callback) {\n    switch (eventName) 
{\n        case 'start':\n            player.onStart(() => callback(event && 
copyAnimationEvent(event, 'start', player.totalTime)));\n            break;\n   
     case 'done':\n            player.onDone(() => callback(event && 
copyAnimationEvent(event, 'done', player.totalTime)));\n            break;\n    
    case 'destroy':\n            player.onDestroy(() => callback(event && 
copyAni
 mationEvent(event, 'destroy', player.totalTime)));\n            break;\n    
}\n}\n/**\n * @param {?} e\n * @param {?=} phaseName\n * @param {?=} 
totalTime\n * @return {?}\n */\nexport function copyAnimationEvent(e, 
phaseName, totalTime) {\n    const /** @type {?} */ event = 
makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName 
|| e.phaseName, totalTime == undefined ? e.totalTime : totalTime);\n    const 
/** @type {?} */ data = (/** @type {?} */ (e))['_data'];\n    if (data != null) 
{\n        (/** @type {?} */ (event))['_data'] = data;\n    }\n    return 
event;\n}\n/**\n * @param {?} element\n * @param {?} triggerName\n * @param {?} 
fromState\n * @param {?} toState\n * @param {?=} phaseName\n * @param {?=} 
totalTime\n * @return {?}\n */\nexport function makeAnimationEvent(element, 
triggerName, fromState, toState, phaseName = '', totalTime = 0) {\n    return { 
element, triggerName, fromState, toState, phaseName, totalTime };\n}\n/**\n * 
@param {?} map\n * @pa
 ram {?} key\n * @param {?} defaultValue\n * @return {?}\n */\nexport function 
getOrSetAsInMap(map, key, defaultValue) {\n    let /** @type {?} */ value;\n    
if (map instanceof Map) {\n        value = map.get(key);\n        if (!value) 
{\n            map.set(key, value = defaultValue);\n        }\n    }\n    else 
{\n        value = map[key];\n        if (!value) {\n            value = 
map[key] = defaultValue;\n        }\n    }\n    return value;\n}\n/**\n * 
@param {?} command\n * @return {?}\n */\nexport function 
parseTimelineCommand(command) {\n    const /** @type {?} */ separatorPos = 
command.indexOf(':');\n    const /** @type {?} */ id = command.substring(1, 
separatorPos);\n    const /** @type {?} */ action = command.substr(separatorPos 
+ 1);\n    return [id, action];\n}\nlet /** @type {?} */ _contains = (elm1, 
elm2) => false;\nconst ɵ0 = _contains;\nlet /** @type {?} */ _matches = 
(element, selector) => false;\nconst ɵ1 = _matches;\nlet /** @type {?} */ 
_query = (element, sele
 ctor, multi) => {\n    return [];\n};\nconst ɵ2 = _query;\nif (typeof Element 
!= 'undefined') {\n    // this is well supported in all browsers\n    _contains 
= (elm1, elm2) => { return /** @type {?} */ (elm1.contains(elm2)); };\n    if 
(Element.prototype.matches) {\n        _matches = (element, selector) => 
element.matches(selector);\n    }\n    else {\n        const /** @type {?} */ 
proto = /** @type {?} */ (Element.prototype);\n        const /** @type {?} */ 
fn = proto.matchesSelector || proto.mozMatchesSelector || 
proto.msMatchesSelector ||\n            proto.oMatchesSelector || 
proto.webkitMatchesSelector;\n        if (fn) {\n            _matches = 
(element, selector) => fn.apply(element, [selector]);\n        }\n    }\n    
_query = (element, selector, multi) => {\n        let /** @type {?} */ results 
= [];\n        if (multi) {\n            
results.push(...element.querySelectorAll(selector));\n        }\n        else 
{\n            const /** @type {?} */ elm = element.querySel
 ector(selector);\n            if (elm) {\n                results.push(elm);\n 
           }\n        }\n        return results;\n    };\n}\n/**\n * @param {?} 
prop\n * @return {?}\n */\nfunction containsVendorPrefix(prop) {\n    // Webkit 
is the only real popular vendor prefix nowadays\n    // cc: 
http://shouldiprefix.com/\n    return prop.substring(1, 6) == 'ebkit'; // 
webkit or Webkit\n}\nlet /** @type {?} */ _CACHED_BODY = null;\nlet /** @type 
{?} */ _IS_WEBKIT = false;\n/**\n * @param {?} prop\n * @return {?}\n 
*/\nexport function validateStyleProperty(prop) {\n    if (!_CACHED_BODY) {\n   
     _CACHED_BODY = getBodyNode() || {};\n        _IS_WEBKIT = /** @type {?} */ 
((_CACHED_BODY)).style ? ('WebkitAppearance' in /** @type {?} */ 
((_CACHED_BODY)).style) : false;\n    }\n    let /** @type {?} */ result = 
true;\n    if (/** @type {?} */ ((_CACHED_BODY)).style && 
!containsVendorPrefix(prop)) {\n        result = prop in /** @type {?} */ 
((_CACHED_BODY)).style;\n        if (!result
  && _IS_WEBKIT) {\n            const /** @type {?} */ camelProp = 'Webkit' + 
prop.charAt(0).toUpperCase() + prop.substr(1);\n            result = camelProp 
in /** @type {?} */ ((_CACHED_BODY)).style;\n        }\n    }\n    return 
result;\n}\n/**\n * @return {?}\n */\nexport function getBodyNode() {\n    if 
(typeof document != 'undefined') {\n        return document.body;\n    }\n    
return null;\n}\nexport const /** @type {?} */ matchesElement = 
_matches;\nexport const /** @type {?} */ containsElement = _contains;\nexport 
const /** @type {?} */ invokeQuery = _query;\nexport { ɵ0, ɵ1, ɵ2 };\n//# 
sourceMappingURL=shared.js.map","/**\n * @fileoverview added by tsickle\n * 
@suppress {checkTypes} checked by tsc\n */\nimport { NoopAnimationPlayer } from 
'@angular/animations';\nimport { containsElement, invokeQuery, matchesElement, 
validateStyleProperty } from './shared';\n/**\n * \\@experimental\n */\nexport 
class NoopAnimationDriver {\n    /**\n     * @param {?} prop\n     * @return {
 ?}\n     */\n    validateStyleProperty(prop) { return 
validateStyleProperty(prop); }\n    /**\n     * @param {?} element\n     * 
@param {?} selector\n     * @return {?}\n     */\n    matchesElement(element, 
selector) {\n        return matchesElement(element, selector);\n    }\n    
/**\n     * @param {?} elm1\n     * @param {?} elm2\n     * @return {?}\n     
*/\n    containsElement(elm1, elm2) { return containsElement(elm1, elm2); }\n   
 /**\n     * @param {?} element\n     * @param {?} selector\n     * @param {?} 
multi\n     * @return {?}\n     */\n    query(element, selector, multi) {\n     
   return invokeQuery(element, selector, multi);\n    }\n    /**\n     * @param 
{?} element\n     * @param {?} prop\n     * @param {?=} defaultValue\n     * 
@return {?}\n     */\n    computeStyle(element, prop, defaultValue) {\n        
return defaultValue || '';\n    }\n    /**\n     * @param {?} element\n     * 
@param {?} keyframes\n     * @param {?} duration\n     * @param {?} delay\n     
* @p
 aram {?} easing\n     * @param {?=} previousPlayers\n     * @return {?}\n     
*/\n    animate(element, keyframes, duration, delay, easing, previousPlayers = 
[]) {\n        return new NoopAnimationPlayer();\n    }\n}\n/**\n * 
\\@experimental\n * @abstract\n */\nexport class AnimationDriver 
{\n}\nAnimationDriver.NOOP = new NoopAnimationDriver();\nfunction 
AnimationDriver_tsickle_Closure_declarations() {\n    /** @type {?} */\n    
AnimationDriver.NOOP;\n    /**\n     * @abstract\n     * @param {?} prop\n     
* @return {?}\n     */\n    AnimationDriver.prototype.validateStyleProperty = 
function (prop) { };\n    /**\n     * @abstract\n     * @param {?} element\n    
 * @param {?} selector\n     * @return {?}\n     */\n    
AnimationDriver.prototype.matchesElement = function (element, selector) { };\n  
  /**\n     * @abstract\n     * @param {?} elm1\n     * @param {?} elm2\n     * 
@return {?}\n     */\n    AnimationDriver.prototype.containsElement = function 
(elm1, elm2) { };\n    /**\n    
  * @abstract\n     * @param {?} element\n     * @param {?} selector\n     * 
@param {?} multi\n     * @return {?}\n     */\n    
AnimationDriver.prototype.query = function (element, selector, multi) { };\n    
/**\n     * @abstract\n     * @param {?} element\n     * @param {?} prop\n     
* @param {?=} defaultValue\n     * @return {?}\n     */\n    
AnimationDriver.prototype.computeStyle = function (element, prop, defaultValue) 
{ };\n    /**\n     * @abstract\n     * @param {?} element\n     * @param {?} 
keyframes\n     * @param {?} duration\n     * @param {?} delay\n     * @param 
{?=} easing\n     * @param {?=} previousPlayers\n     * @return {?}\n     */\n  
  AnimationDriver.prototype.animate = function (element, keyframes, duration, 
delay, easing, previousPlayers) { };\n}\n//# 
sourceMappingURL=animation_driver.js.map","/**\n * @fileoverview added by 
tsickle\n * @suppress {checkTypes} checked by tsc\n */\nimport { sequence } 
from '@angular/animations';\nexport const /** @type {?} */ ON
 E_SECOND = 1000;\nexport const /** @type {?} */ SUBSTITUTION_EXPR_START = 
'{{';\nexport const /** @type {?} */ SUBSTITUTION_EXPR_END = '}}';\nexport 
const /** @type {?} */ ENTER_CLASSNAME = 'ng-enter';\nexport const /** @type 
{?} */ LEAVE_CLASSNAME = 'ng-leave';\nexport const /** @type {?} */ 
ENTER_SELECTOR = '.ng-enter';\nexport const /** @type {?} */ LEAVE_SELECTOR = 
'.ng-leave';\nexport const /** @type {?} */ NG_TRIGGER_CLASSNAME = 
'ng-trigger';\nexport const /** @type {?} */ NG_TRIGGER_SELECTOR = 
'.ng-trigger';\nexport const /** @type {?} */ NG_ANIMATING_CLASSNAME = 
'ng-animating';\nexport const /** @type {?} */ NG_ANIMATING_SELECTOR = 
'.ng-animating';\n/**\n * @param {?} value\n * @return {?}\n */\nexport 
function resolveTimingValue(value) {\n    if (typeof value == 'number')\n       
 return value;\n    const /** @type {?} */ matches = (/** @type {?} */ 
(value)).match(/^(-?[\\.\\d]+)(m?s)/);\n    if (!matches || matches.length < 
2)\n        return 0;\n    return _convertTimeVal
 ueToMS(parseFloat(matches[1]), matches[2]);\n}\n/**\n * @param {?} value\n * 
@param {?} unit\n * @return {?}\n */\nfunction _convertTimeValueToMS(value, 
unit) {\n    switch (unit) {\n        case 's':\n            return value * 
ONE_SECOND;\n        default:\n            // ms or something else\n            
return value;\n    }\n}\n/**\n * @param {?} timings\n * @param {?} errors\n * 
@param {?=} allowNegativeValues\n * @return {?}\n */\nexport function 
resolveTiming(timings, errors, allowNegativeValues) {\n    return 
timings.hasOwnProperty('duration') ? /** @type {?} */ (timings) :\n        
parseTimeExpression(/** @type {?} */ (timings), errors, 
allowNegativeValues);\n}\n/**\n * @param {?} exp\n * @param {?} errors\n * 
@param {?=} allowNegativeValues\n * @return {?}\n */\nfunction 
parseTimeExpression(exp, errors, allowNegativeValues) {\n    const /** @type 
{?} */ regex = 
/^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n
    let /** @type {?} */ dur
 ation;\n    let /** @type {?} */ delay = 0;\n    let /** @type {?} */ easing = 
'';\n    if (typeof exp === 'string') {\n        const /** @type {?} */ matches 
= exp.match(regex);\n        if (matches === null) {\n            
errors.push(`The provided timing value \"${exp}\" is invalid.`);\n            
return { duration: 0, delay: 0, easing: '' };\n        }\n        duration = 
_convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n        const /** 
@type {?} */ delayMatch = matches[3];\n        if (delayMatch != null) {\n      
      delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), 
matches[4]);\n        }\n        const /** @type {?} */ easingVal = 
matches[5];\n        if (easingVal) {\n            easing = easingVal;\n        
}\n    }\n    else {\n        duration = /** @type {?} */ (exp);\n    }\n    if 
(!allowNegativeValues) {\n        let /** @type {?} */ containsErrors = 
false;\n        let /** @type {?} */ startIndex = errors.length;\n        if 
(duration 
 < 0) {\n            errors.push(`Duration values below 0 are not allowed for 
this animation step.`);\n            containsErrors = true;\n        }\n        
if (delay < 0) {\n            errors.push(`Delay values below 0 are not allowed 
for this animation step.`);\n            containsErrors = true;\n        }\n    
    if (containsErrors) {\n            errors.splice(startIndex, 0, `The 
provided timing value \"${exp}\" is invalid.`);\n        }\n    }\n    return { 
duration, delay, easing };\n}\n/**\n * @param {?} obj\n * @param {?=} 
destination\n * @return {?}\n */\nexport function copyObj(obj, destination = 
{}) {\n    Object.keys(obj).forEach(prop => { destination[prop] = obj[prop]; 
});\n    return destination;\n}\n/**\n * @param {?} styles\n * @return {?}\n 
*/\nexport function normalizeStyles(styles) {\n    const /** @type {?} */ 
normalizedStyles = {};\n    if (Array.isArray(styles)) {\n        
styles.forEach(data => copyStyles(data, false, normalizedStyles));\n    }\n    
else {\
 n        copyStyles(styles, false, normalizedStyles);\n    }\n    return 
normalizedStyles;\n}\n/**\n * @param {?} styles\n * @param {?} readPrototype\n 
* @param {?=} destination\n * @return {?}\n */\nexport function 
copyStyles(styles, readPrototype, destination = {}) {\n    if (readPrototype) 
{\n        // we make use of a for-in loop so that the\n        // 
prototypically inherited properties are\n        // revealed from the backFill 
map\n        for (let /** @type {?} */ prop in styles) {\n            
destination[prop] = styles[prop];\n        }\n    }\n    else {\n        
copyObj(styles, destination);\n    }\n    return destination;\n}\n/**\n * 
@param {?} element\n * @param {?} styles\n * @return {?}\n */\nexport function 
setStyles(element, styles) {\n    if (element['style']) {\n        
Object.keys(styles).forEach(prop => {\n            const /** @type {?} */ 
camelProp = dashCaseToCamelCase(prop);\n            element.style[camelProp] = 
styles[prop];\n        });\n    }\n}\n/**
 \n * @param {?} element\n * @param {?} styles\n * @return {?}\n */\nexport 
function eraseStyles(element, styles) {\n    if (element['style']) {\n        
Object.keys(styles).forEach(prop => {\n            const /** @type {?} */ 
camelProp = dashCaseToCamelCase(prop);\n            element.style[camelProp] = 
'';\n        });\n    }\n}\n/**\n * @param {?} steps\n * @return {?}\n 
*/\nexport function normalizeAnimationEntry(steps) {\n    if 
(Array.isArray(steps)) {\n        if (steps.length == 1)\n            return 
steps[0];\n        return sequence(steps);\n    }\n    return /** @type {?} */ 
(steps);\n}\n/**\n * @param {?} value\n * @param {?} options\n * @param {?} 
errors\n * @return {?}\n */\nexport function validateStyleParams(value, 
options, errors) {\n    const /** @type {?} */ params = options.params || {};\n 
   const /** @type {?} */ matches = extractStyleParams(value);\n    if 
(matches.length) {\n        matches.forEach(varName => {\n            if 
(!params.hasOwnProperty(varName
 )) {\n                errors.push(`Unable to resolve the local animation param 
${varName} in the given list of values`);\n            }\n        });\n    
}\n}\nconst /** @type {?} */ PARAM_REGEX = new 
RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 
'g');\n/**\n * @param {?} value\n * @return {?}\n */\nexport function 
extractStyleParams(value) {\n    let /** @type {?} */ params = [];\n    if 
(typeof value === 'string') {\n        const /** @type {?} */ val = 
value.toString();\n        let /** @type {?} */ match;\n        while (match = 
PARAM_REGEX.exec(val)) {\n            params.push(/** @type {?} */ 
(match[1]));\n        }\n        PARAM_REGEX.lastIndex = 0;\n    }\n    return 
params;\n}\n/**\n * @param {?} value\n * @param {?} params\n * @param {?} 
errors\n * @return {?}\n */\nexport function interpolateParams(value, params, 
errors) {\n    const /** @type {?} */ original = value.toString();\n    const 
/** @type {?} */ str = original.replace(PARAM_REGE
 X, (_, varName) => {\n        let /** @type {?} */ localVal = 
params[varName];\n        // this means that the value was never overidden by 
the data passed in by the user\n        if (!params.hasOwnProperty(varName)) 
{\n            errors.push(`Please provide a value for the animation param 
${varName}`);\n            localVal = '';\n        }\n        return 
localVal.toString();\n    });\n    // we do this to assert that numeric values 
stay as they are\n    return str == original ? value : str;\n}\n/**\n * @param 
{?} iterator\n * @return {?}\n */\nexport function iteratorToArray(iterator) 
{\n    const /** @type {?} */ arr = [];\n    let /** @type {?} */ item = 
iterator.next();\n    while (!item.done) {\n        arr.push(item.value);\n     
   item = iterator.next();\n    }\n    return arr;\n}\n/**\n * @param {?} 
source\n * @param {?} destination\n * @return {?}\n */\nexport function 
mergeAnimationOptions(source, destination) {\n    if (source.params) {\n        
const /** @type {?} */
  p0 = source.params;\n        if (!destination.params) {\n            
destination.params = {};\n        }\n        const /** @type {?} */ p1 = 
destination.params;\n        Object.keys(p0).forEach(param => {\n            if 
(!p1.hasOwnProperty(param)) {\n                p1[param] = p0[param];\n         
   }\n        });\n    }\n    return destination;\n}\nconst /** @type {?} */ 
DASH_CASE_REGEXP = /-+([a-z0-9])/g;\n/**\n * @param {?} input\n * @return {?}\n 
*/\nexport function dashCaseToCamelCase(input) {\n    return 
input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase());\n}\n/**\n * 
@param {?} duration\n * @param {?} delay\n * @return {?}\n */\nexport function 
allowPreviousPlayerStylesMerge(duration, delay) {\n    return duration === 0 || 
delay === 0;\n}\n/**\n * @param {?} visitor\n * @param {?} node\n * @param {?} 
context\n * @return {?}\n */\nexport function visitDslNode(visitor, node, 
context) {\n    switch (node.type) {\n        case 7 /* Trigger */:\n           
 return v
 isitor.visitTrigger(node, context);\n        case 0 /* State */:\n            
return visitor.visitState(node, context);\n        case 1 /* Transition */:\n   
         return visitor.visitTransition(node, context);\n        case 2 /* 
Sequence */:\n            return visitor.visitSequence(node, context);\n        
case 3 /* Group */:\n            return visitor.visitGroup(node, context);\n    
    case 4 /* Animate */:\n            return visitor.visitAnimate(node, 
context);\n        case 5 /* Keyframes */:\n            return 
visitor.visitKeyframes(node, context);\n        case 6 /* Style */:\n           
 return visitor.visitStyle(node, context);\n        case 8 /* Reference */:\n   
         return visitor.visitReference(node, context);\n        case 9 /* 
AnimateChild */:\n            return visitor.visitAnimateChild(node, 
context);\n        case 10 /* AnimateRef */:\n            return 
visitor.visitAnimateRef(node, context);\n        case 11 /* Query */:\n         
   return visitor.vi
 sitQuery(node, context);\n        case 12 /* Stagger */:\n            return 
visitor.visitStagger(node, context);\n        default:\n            throw new 
Error(`Unable to resolve animation metadata node #${node.type}`);\n    
}\n}\n//# sourceMappingURL=util.js.map","/**\n * @fileoverview added by 
tsickle\n * @suppress {checkTypes} checked by tsc\n */\n/**\n * @license\n * 
Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is 
governed by an MIT-style license that can be\n * found in the LICENSE file at 
https://angular.io/license\n */\nexport const /** @type {?} */ ANY_STATE = 
'*';\n/**\n * @param {?} transitionValue\n * @param {?} errors\n * @return 
{?}\n */\nexport function parseTransitionExpr(transitionValue, errors) {\n    
const /** @type {?} */ expressions = [];\n    if (typeof transitionValue == 
'string') {\n        (/** @type {?} */ (transitionValue))\n            
.split(/\\s*,\\s*/)\n            .forEach(str => parseInnerTransitionStr(str, 
expressions, 
 errors));\n    }\n    else {\n        expressions.push(/** @type {?} */ 
(transitionValue));\n    }\n    return expressions;\n}\n/**\n * @param {?} 
eventStr\n * @param {?} expressions\n * @param {?} errors\n * @return {?}\n 
*/\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n    if 
(eventStr[0] == ':') {\n        const /** @type {?} */ result = 
parseAnimationAlias(eventStr, errors);\n        if (typeof result == 
'function') {\n            expressions.push(result);\n            return;\n     
   }\n        eventStr = /** @type {?} */ (result);\n    }\n    const /** @type 
{?} */ match = 
eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n    if (match 
== null || match.length < 4) {\n        errors.push(`The provided transition 
expression \"${eventStr}\" is not supported`);\n        return expressions;\n   
 }\n    const /** @type {?} */ fromState = match[1];\n    const /** @type {?} 
*/ separator = match[2];\n    const /** @type {?} */ toState = match[3];\
 n    expressions.push(makeLambdaFromStates(fromState, toState));\n    const 
/** @type {?} */ isFullAnyStateExpr = fromState == ANY_STATE && toState == 
ANY_STATE;\n    if (separator[0] == '<' && !isFullAnyStateExpr) {\n        
expressions.push(makeLambdaFromStates(toState, fromState));\n    }\n}\n/**\n * 
@param {?} alias\n * @param {?} errors\n * @return {?}\n */\nfunction 
parseAnimationAlias(alias, errors) {\n    switch (alias) {\n        case 
':enter':\n            return 'void => *';\n        case ':leave':\n            
return '* => void';\n        case ':increment':\n            return (fromState, 
toState) => parseFloat(toState) > parseFloat(fromState);\n        case 
':decrement':\n            return (fromState, toState) => parseFloat(toState) < 
parseFloat(fromState);\n        default:\n            errors.push(`The 
transition alias value \"${alias}\" is not supported`);\n            return '* 
=> *';\n    }\n}\n// DO NOT REFACTOR ... keep the follow set instantiations\n// 
with the
  values intact (closure compiler for some reason\n// removes follow-up lines 
that add the values outside of\n// the constructor...\nconst /** @type {?} */ 
TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nconst /** @type {?} */ 
FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\n/**\n * @param {?} lhs\n * 
@param {?} rhs\n * @return {?}\n */\nfunction makeLambdaFromStates(lhs, rhs) 
{\n    const /** @type {?} */ LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) 
|| FALSE_BOOLEAN_VALUES.has(lhs);\n    const /** @type {?} */ RHS_MATCH_BOOLEAN 
= TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n    return 
(fromState, toState) => {\n        let /** @type {?} */ lhsMatch = lhs == 
ANY_STATE || lhs == fromState;\n        let /** @type {?} */ rhsMatch = rhs == 
ANY_STATE || rhs == toState;\n        if (!lhsMatch && LHS_MATCH_BOOLEAN && 
typeof fromState === 'boolean') {\n            lhsMatch = fromState ? 
TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n        }\n      
  if
  (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n          
  rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : 
FALSE_BOOLEAN_VALUES.has(rhs);\n        }\n        return lhsMatch && 
rhsMatch;\n    };\n}\n//# 
sourceMappingURL=animation_transition_expr.js.map","/**\n * @fileoverview added 
by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nimport { AUTO_STYLE, 
style } from '@angular/animations';\nimport { getOrSetAsInMap } from 
'../render/shared';\nimport { NG_ANIMATING_SELECTOR, NG_TRIGGER_SELECTOR, 
SUBSTITUTION_EXPR_START, copyObj, extractStyleParams, iteratorToArray, 
normalizeAnimationEntry, resolveTiming, validateStyleParams, visitDslNode } 
from '../util';\nimport { parseTransitionExpr } from 
'./animation_transition_expr';\nconst /** @type {?} */ SELF_TOKEN = 
':self';\nconst /** @type {?} */ SELF_TOKEN_REGEX = new 
RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n/**\n * @param {?} driver\n * @param 
{?} metadata\n * @param {?} errors\n * @return {?}\n */\nexport
  function buildAnimationAst(driver, metadata, errors) {\n    return new 
AnimationAstBuilderVisitor(driver).build(metadata, errors);\n}\nconst /** @type 
{?} */ ROOT_SELECTOR = '';\nexport class AnimationAstBuilderVisitor {\n    
/**\n     * @param {?} _driver\n     */\n    constructor(_driver) {\n        
this._driver = _driver;\n    }\n    /**\n     * @param {?} metadata\n     * 
@param {?} errors\n     * @return {?}\n     */\n    build(metadata, errors) {\n 
       const /** @type {?} */ context = new 
AnimationAstBuilderContext(errors);\n        
this._resetContextStyleTimingState(context);\n        return /** @type {?} */ 
(visitDslNode(this, normalizeAnimationEntry(metadata), context));\n    }\n    
/**\n     * @param {?} context\n     * @return {?}\n     */\n    
_resetContextStyleTimingState(context) {\n        context.currentQuerySelector 
= ROOT_SELECTOR;\n        context.collectedStyles = {};\n        
context.collectedStyles[ROOT_SELECTOR] = {};\n        context.currentTime = 
0;\n   
  }\n    /**\n     * @param {?} metadata\n     * @param {?} context\n     * 
@return {?}\n     */\n    visitTrigger(metadata, context) {\n        let /** 
@type {?} */ queryCount = context.queryCount = 0;\n        let /** @type {?} */ 
depCount = context.depCount = 0;\n        const /** @type {?} */ states = [];\n 
       const /** @type {?} */ transitions = [];\n        if 
(metadata.name.charAt(0) == '@') {\n            context.errors.push('animation 
triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', 
[...]))');\n        }\n        metadata.definitions.forEach(def => {\n          
  this._resetContextStyleTimingState(context);\n            if (def.type == 0 
/* State */) {\n                const /** @type {?} */ stateDef = /** @type {?} 
*/ (def);\n                const /** @type {?} */ name = stateDef.name;\n       
         name.split(/\\s*,\\s*/).forEach(n => {\n                    
stateDef.name = n;\n                    states.push(this.visitState(stateDef, 
context));
 \n                });\n                stateDef.name = name;\n            }\n  
          else if (def.type == 1 /* Transition */) {\n                const /** 
@type {?} */ transition = this.visitTransition(/** @type {?} */ (def), 
context);\n                queryCount += transition.queryCount;\n               
 depCount += transition.depCount;\n                
transitions.push(transition);\n            }\n            else {\n              
  context.errors.push('only state() and transition() definitions can sit inside 
of a trigger()');\n            }\n        });\n        return {\n            
type: 7 /* Trigger */,\n            name: metadata.name, states, transitions, 
queryCount, depCount,\n            options: null\n        };\n    }\n    /**\n  
   * @param {?} metadata\n     * @param {?} context\n     * @return {?}\n     
*/\n    visitState(metadata, context) {\n        const /** @type {?} */ 
styleAst = this.visitStyle(metadata.styles, context);\n        const /** @type 
{?} */ astPa
 rams = (metadata.options && metadata.options.params) || null;\n        if 
(styleAst.containsDynamicStyles) {\n            const /** @type {?} */ 
missingSubs = new Set();\n            const /** @type {?} */ params = astParams 
|| {};\n            styleAst.styles.forEach(value => {\n                if 
(isObject(value)) {\n                    const /** @type {?} */ stylesObj = /** 
@type {?} */ (value);\n                    Object.keys(stylesObj).forEach(prop 
=> {\n                        extractStyleParams(stylesObj[prop]).forEach(sub 
=> {\n                            if (!params.hasOwnProperty(sub)) {\n          
                      missingSubs.add(sub);\n                            }\n    
                    });\n                    });\n                }\n           
 });\n            if (missingSubs.size) {\n                const /** @type {?} 
*/ missingSubsArr = iteratorToArray(missingSubs.values());\n                
context.errors.push(`state(\"${metadata.name}\", ...) must define
  default values for all the following style substitutions: 
${missingSubsArr.join(', ')}`);\n            }\n        }\n        return {\n   
         type: 0 /* State */,\n            name: metadata.name,\n            
style: styleAst,\n            options: astParams ? { params: astParams } : 
null\n        };\n    }\n    /**\n     * @param {?} metadata\n     * @param {?} 
context\n     * @return {?}\n     */\n    visitTransition(metadata, context) 
{\n        context.queryCount = 0;\n        context.depCount = 0;\n        
const /** @type {?} */ animation = visitDslNode(this, 
normalizeAnimationEntry(metadata.animation), context);\n        const /** @type 
{?} */ matchers = parseTransitionExpr(metadata.expr, context.errors);\n        
return {\n            type: 1 /* Transition */,\n            matchers,\n        
    animation,\n            queryCount: context.queryCount,\n            
depCount: context.depCount,\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n 
    }\n    /**\n     * @param {?} metadata\n     * @param {?} context\n     * 
@return {?}\n     */\n    visitSequence(metadata, context) {\n        return 
{\n            type: 2 /* Sequence */,\n            steps: metadata.steps.map(s 
=> visitDslNode(this, s, context)),\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitGroup(metadata, context) {\n        const /** @type {?} */ currentTime = 
context.currentTime;\n        let /** @type {?} */ furthestTime = 0;\n        
const /** @type {?} */ steps = metadata.steps.map(step => {\n            
context.currentTime = currentTime;\n            const /** @type {?} */ innerAst 
= visitDslNode(this, step, context);\n            furthestTime = 
Math.max(furthestTime, context.currentTime);\n            return innerAst;\n    
    });\n        context.currentTime = furthestTime;\n        return {\n        
    type: 
 3 /* Group */,\n            steps,\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitAnimate(metadata, context) {\n        const /** @type {?} */ timingAst = 
constructTimingAst(metadata.timings, context.errors);\n        
context.currentAnimateTimings = timingAst;\n        let /** @type {?} */ 
styleAst;\n        let /** @type {?} */ styleMetadata = metadata.styles ? 
metadata.styles : style({});\n        if (styleMetadata.type == 5 /* Keyframes 
*/) {\n            styleAst = this.visitKeyframes(/** @type {?} */ 
(styleMetadata), context);\n        }\n        else {\n            let /** 
@type {?} */ styleMetadata = /** @type {?} */ (metadata.styles);\n            
let /** @type {?} */ isEmpty = false;\n            if (!styleMetadata) {\n      
          isEmpty = true;\n                const /** @type {?} */ newStyleData 
= {};\n                if (timing
 Ast.easing) {\n                    newStyleData['easing'] = 
timingAst.easing;\n                }\n                styleMetadata = 
style(newStyleData);\n            }\n            context.currentTime += 
timingAst.duration + timingAst.delay;\n            const /** @type {?} */ 
_styleAst = this.visitStyle(styleMetadata, context);\n            
_styleAst.isEmptyStep = isEmpty;\n            styleAst = _styleAst;\n        
}\n        context.currentAnimateTimings = null;\n        return {\n            
type: 4 /* Animate */,\n            timings: timingAst,\n            style: 
styleAst,\n            options: null\n        };\n    }\n    /**\n     * @param 
{?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n    
visitStyle(metadata, context) {\n        const /** @type {?} */ ast = 
this._makeStyleAst(metadata, context);\n        this._validateStyleAst(ast, 
context);\n        return ast;\n    }\n    /**\n     * @param {?} metadata\n    
 * @param {?} context\n     * @return {?}\
 n     */\n    _makeStyleAst(metadata, context) {\n        const /** @type {?} 
*/ styles = [];\n        if (Array.isArray(metadata.styles)) {\n            
(/** @type {?} */ (metadata.styles)).forEach(styleTuple => {\n                
if (typeof styleTuple == 'string') {\n                    if (styleTuple == 
AUTO_STYLE) {\n                        styles.push(/** @type {?} */ 
(styleTuple));\n                    }\n                    else {\n             
           context.errors.push(`The provided style string value ${styleTuple} 
is not allowed.`);\n                    }\n                }\n                
else {\n                    styles.push(/** @type {?} */ (styleTuple));\n       
         }\n            });\n        }\n        else {\n            
styles.push(metadata.styles);\n        }\n        let /** @type {?} */ 
containsDynamicStyles = false;\n        let /** @type {?} */ collectedEasing = 
null;\n        styles.forEach(styleData => {\n            if 
(isObject(styleData)) {\n 
                const /** @type {?} */ styleMap = /** @type {?} */ 
(styleData);\n                const /** @type {?} */ easing = 
styleMap['easing'];\n                if (easing) {\n                    
collectedEasing = /** @type {?} */ (easing);\n                    delete 
styleMap['easing'];\n                }\n                if 
(!containsDynamicStyles) {\n                    for (let /** @type {?} */ prop 
in styleMap) {\n                        const /** @type {?} */ value = 
styleMap[prop];\n                        if 
(value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n                    
        containsDynamicStyles = true;\n                            break;\n     
                   }\n                    }\n                }\n            }\n 
       });\n        return {\n            type: 6 /* Style */,\n            
styles,\n            easing: collectedEasing,\n            offset: 
metadata.offset, containsDynamicStyles,\n            options: null\n        
};\n    }\n 
    /**\n     * @param {?} ast\n     * @param {?} context\n     * @return {?}\n 
    */\n    _validateStyleAst(ast, context) {\n        const /** @type {?} */ 
timings = context.currentAnimateTimings;\n        let /** @type {?} */ endTime 
= context.currentTime;\n        let /** @type {?} */ startTime = 
context.currentTime;\n        if (timings && startTime > 0) {\n            
startTime -= timings.duration + timings.delay;\n        }\n        
ast.styles.forEach(tuple => {\n            if (typeof tuple == 'string')\n      
          return;\n            Object.keys(tuple).forEach(prop => {\n           
     if (!this._driver.validateStyleProperty(prop)) {\n                    
context.errors.push(`The provided animation property \"${prop}\" is not a 
supported CSS property for animations`);\n                    return;\n         
       }\n                const /** @type {?} */ collectedStyles = 
context.collectedStyles[/** @type {?} */ ((context.currentQuerySelector))];\n   
             const
  /** @type {?} */ collectedEntry = collectedStyles[prop];\n                let 
/** @type {?} */ updateCollectedStyle = true;\n                if 
(collectedEntry) {\n                    if (startTime != endTime && startTime 
>= collectedEntry.startTime &&\n                        endTime <= 
collectedEntry.endTime) {\n                        context.errors.push(`The CSS 
property \"${prop}\" that exists between the times of 
\"${collectedEntry.startTime}ms\" and \"${collectedEntry.endTime}ms\" is also 
being animated in a parallel animation between the times of \"${startTime}ms\" 
and \"${endTime}ms\"`);\n                        updateCollectedStyle = 
false;\n                    }\n                    // we always choose the 
smaller start time value since we\n                    // want to have a record 
of the entire animation window where\n                    // the style property 
is being animated in between\n                    startTime = 
collectedEntry.startTime;\n                }\n 
                if (updateCollectedStyle) {\n                    
collectedStyles[prop] = { startTime, endTime };\n                }\n            
    if (context.options) {\n                    
validateStyleParams(tuple[prop], context.options, context.errors);\n            
    }\n            });\n        });\n    }\n    /**\n     * @param {?} 
metadata\n     * @param {?} context\n     * @return {?}\n     */\n    
visitKeyframes(metadata, context) {\n        const /** @type {?} */ ast = { 
type: 5 /* Keyframes */, styles: [], options: null };\n        if 
(!context.currentAnimateTimings) {\n            
context.errors.push(`keyframes() must be placed inside of a call to 
animate()`);\n            return ast;\n        }\n        const /** @type {?} 
*/ MAX_KEYFRAME_OFFSET = 1;\n        let /** @type {?} */ 
totalKeyframesWithOffsets = 0;\n        const /** @type {?} */ offsets = [];\n  
      let /** @type {?} */ offsetsOutOfOrder = false;\n        let /** @type 
{?} */ keyframesOutOfRange = fals
 e;\n        let /** @type {?} */ previousOffset = 0;\n        const /** @type 
{?} */ keyframes = metadata.steps.map(styles => {\n            const /** @type 
{?} */ style = this._makeStyleAst(styles, context);\n            let /** @type 
{?} */ offsetVal = style.offset != null ? style.offset : 
consumeOffset(style.styles);\n            let /** @type {?} */ offset = 0;\n    
        if (offsetVal != null) {\n                
totalKeyframesWithOffsets++;\n                offset = style.offset = 
offsetVal;\n            }\n            keyframesOutOfRange = 
keyframesOutOfRange || offset < 0 || offset > 1;\n            offsetsOutOfOrder 
= offsetsOutOfOrder || offset < previousOffset;\n            previousOffset = 
offset;\n            offsets.push(offset);\n            return style;\n        
});\n        if (keyframesOutOfRange) {\n            
context.errors.push(`Please ensure that all keyframe offsets are between 0 and 
1`);\n        }\n        if (offsetsOutOfOrder) {\n            context.err
 ors.push(`Please ensure that all keyframe offsets are in order`);\n        }\n 
       const /** @type {?} */ length = metadata.steps.length;\n        let /** 
@type {?} */ generatedOffset = 0;\n        if (totalKeyframesWithOffsets > 0 && 
totalKeyframesWithOffsets < length) {\n            context.errors.push(`Not all 
style() steps within the declared keyframes() contain offsets`);\n        }\n   
     else if (totalKeyframesWithOffsets == 0) {\n            generatedOffset = 
MAX_KEYFRAME_OFFSET / (length - 1);\n        }\n        const /** @type {?} */ 
limit = length - 1;\n        const /** @type {?} */ currentTime = 
context.currentTime;\n        const /** @type {?} */ currentAnimateTimings = 
/** @type {?} */ ((context.currentAnimateTimings));\n        const /** @type 
{?} */ animateDuration = currentAnimateTimings.duration;\n        
keyframes.forEach((kf, i) => {\n            const /** @type {?} */ offset = 
generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n 
            const /** @type {?} */ durationUpToThisFrame = offset * 
animateDuration;\n            context.currentTime = currentTime + 
currentAnimateTimings.delay + durationUpToThisFrame;\n            
currentAnimateTimings.duration = durationUpToThisFrame;\n            
this._validateStyleAst(kf, context);\n            kf.offset = offset;\n         
   ast.styles.push(kf);\n        });\n        return ast;\n    }\n    /**\n     
* @param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n 
   visitReference(metadata, context) {\n        return {\n            type: 8 
/* Reference */,\n            animation: visitDslNode(this, 
normalizeAnimationEntry(metadata.animation), context),\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitAnimateChild(metadata, context) {\n        context.depCount++;\n        
return {\n            type: 9 /* Ani
 mateChild */,\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitAnimateRef(metadata, context) {\n        return {\n            type: 10 
/* AnimateRef */,\n            animation: 
this.visitReference(metadata.animation, context),\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitQuery(metadata, context) {\n        const /** @type {?} */ parentSelector 
= /** @type {?} */ ((context.currentQuerySelector));\n        const /** @type 
{?} */ options = /** @type {?} */ ((metadata.options || {}));\n        
context.queryCount++;\n        context.currentQuery = metadata;\n        const 
[selector, includeSelf] = normalizeSelector(metadata.selector);\n        
context.currentQuerySelector =\n            parentSelector.length ? 
 (parentSelector + ' ' + selector) : selector;\n        
getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n   
     const /** @type {?} */ animation = visitDslNode(this, 
normalizeAnimationEntry(metadata.animation), context);\n        
context.currentQuery = null;\n        context.currentQuerySelector = 
parentSelector;\n        return {\n            type: 11 /* Query */,\n          
  selector,\n            limit: options.limit || 0,\n            optional: 
!!options.optional, includeSelf, animation,\n            originalSelector: 
metadata.selector,\n            options: 
normalizeAnimationOptions(metadata.options)\n        };\n    }\n    /**\n     * 
@param {?} metadata\n     * @param {?} context\n     * @return {?}\n     */\n   
 visitStagger(metadata, context) {\n        if (!context.currentQuery) {\n      
      context.errors.push(`stagger() can only be used inside of query()`);\n    
    }\n        const /** @type {?} */ timings = metadata.timings === 'full' ?\n
             { duration: 0, delay: 0, easing: 'full' } :\n            
resolveTiming(metadata.timings, context.errors, true);\n        return {\n      
      type: 12 /* Stagger */,\n            animation: visitDslNode(this, 
normalizeAnimationEntry(metadata.animation), context), timings,\n            
options: null\n        };\n    }\n}\nfunction 
AnimationAstBuilderVisitor_tsickle_Closure_declarations() {\n    /** @type {?} 
*/\n    AnimationAstBuilderVisitor.prototype._driver;\n}\n/**\n * @param {?} 
selector\n * @return {?}\n */\nfunction normalizeSelector(selector) {\n    
const /** @type {?} */ hasAmpersand = selector.split(/\\s*,\\s*/).find(token => 
token == SELF_TOKEN) ? true : false;\n    if (hasAmpersand) {\n        selector 
= selector.replace(SELF_TOKEN_REGEX, '');\n    }\n    // the :enter and :leave 
selectors are filled in at runtime during timeline building\n    selector = 
selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n        .replace(/@\\w+/g, 
match => NG_TRIGGER_SELECTOR + 
 '-' + match.substr(1))\n        .replace(/:animating/g, 
NG_ANIMATING_SELECTOR);\n    return [selector, hasAmpersand];\n}\n/**\n * 
@param {?} obj\n * @return {?}\n */\nfunction normalizeParams(obj) {\n    
return obj ? copyObj(obj) : null;\n}\nexport class AnimationAstBuilderContext 
{\n    /**\n     * @param {?} errors\n     */\n    constructor(errors) {\n      
  this.errors = errors;\n        this.queryCount = 0;\n        this.depCount = 
0;\n        this.currentTransition = null;\n        this.currentQuery = null;\n 
       this.currentQuerySelector = null;\n        this.currentAnimateTimings = 
null;\n        this.currentTime = 0;\n        this.collectedStyles = {};\n      
  this.options = null;\n    }\n}\nfunction 
AnimationAstBuilderContext_tsickle_Closure_declarations() {\n    /** @type {?} 
*/\n    AnimationAstBuilderContext.prototype.queryCount;\n    /** @type {?} 
*/\n    AnimationAstBuilderContext.prototype.depCount;\n    /** @type {?} */\n  
  AnimationAstBuilderContext.prototype.
 currentTransition;\n    /** @type {?} */\n    
AnimationAstBuilderContext.prototype.currentQuery;\n    /** @type {?} */\n    
AnimationAstBuilderContext.prototype.currentQuerySelector;\n    /** @type {?} 
*/\n    AnimationAstBuilderContext.prototype.currentAnimateTimings;\n    /** 
@type {?} */\n    AnimationAstBuilderContext.prototype.currentTime;\n    /** 
@type {?} */\n    AnimationAstBuilderContext.prototype.collectedStyles;\n    
/** @type {?} */\n    AnimationAstBuilderContext.prototype.options;\n    /** 
@type {?} */\n    AnimationAstBuilderContext.prototype.errors;\n}\n/**\n * 
@param {?} styles\n * @return {?}\n */\nfunction consumeOffset(styles) {\n    
if (typeof styles == 'string')\n        return null;\n    let /** @type {?} */ 
offset = null;\n    if (Array.isArray(styles)) {\n        
styles.forEach(styleTuple => {\n            if (isObject(styleTuple) && 
styleTuple.hasOwnProperty('offset')) {\n                const /** @type {?} */ 
obj = /** @type {?} */ (styleTuple);\n        
         offset = parseFloat(/** @type {?} */ (obj['offset']));\n               
 delete obj['offset'];\n            }\n        });\n    }\n    else if 
(isObject(styles) && styles.hasOwnProperty('offset')) {\n        const /** 
@type {?} */ obj = /** @type {?} */ (styles);\n        offset = parseFloat(/** 
@type {?} */ (obj['offset']));\n        delete obj['offset'];\n    }\n    
return offset;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction 
isObject(value) {\n    return !Array.isArray(value) && typeof value == 
'object';\n}\n/**\n * @param {?} value\n * @param {?} errors\n * @return {?}\n 
*/\nfunction constructTimingAst(value, errors) {\n    let /** @type {?} */ 
timings = null;\n    if (value.hasOwnProperty('duration')) {\n        timings = 
/** @type {?} */ (value);\n    }\n    else if (typeof value == 'number') {\n    
    const /** @type {?} */ duration = resolveTiming(/** @type {?} */ (value), 
errors).duration;\n        return makeTimingAst(/** @type {?} */ (duration), 0, 
'
 ');\n    }\n    const /** @type {?} */ strValue = /** @type {?} */ (value);\n  
  const /** @type {?} */ isDynamic = strValue.split(/\\s+/).some(v => 
v.charAt(0) == '{' && v.charAt(1) == '{');\n    if (isDynamic) {\n        const 
/** @type {?} */ ast = /** @type {?} */ (makeTimingAst(0, 0, ''));\n        
ast.dynamic = true;\n        ast.strValue = strValue;\n        return /** @type 
{?} */ (ast);\n    }\n    timings = timings || resolveTiming(strValue, 
errors);\n    return makeTimingAst(timings.duration, timings.delay, 
timings.easing);\n}\n/**\n * @param {?} options\n * @return {?}\n */\nfunction 
normalizeAnimationOptions(options) {\n    if (options) {\n        options = 
copyObj(options);\n        if (options['params']) {\n            
options['params'] = /** @type {?} */ ((normalizeParams(options['params'])));\n  
      }\n    }\n    else {\n        options = {};\n    }\n    return 
options;\n}\n/**\n * @param {?} duration\n * @param {?} delay\n * @param {?} 
easing\n * @return {?}\n */
 \nfunction makeTimingAst(duration, delay, easing) {\n    return { duration, 
delay, easing };\n}\n//# sourceMappingURL=animation_ast_builder.js.map","/**\n 
* @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n 
*/\n/**\n * @record\n */\nexport function AnimationTimelineInstruction() { 
}\nfunction AnimationTimelineInstruction_tsickle_Closure_declarations() {\n    
/** @type {?} */\n    AnimationTimelineInstruction.prototype.element;\n    /** 
@type {?} */\n    AnimationTimelineInstruction.prototype.keyframes;\n    /** 
@type {?} */\n    AnimationTimelineInstruction.prototype.preStyleProps;\n    
/** @type {?} */\n    AnimationTimelineInstruction.prototype.postStyleProps;\n  
  /** @type {?} */\n    AnimationTimelineInstruction.prototype.duration;\n    
/** @type {?} */\n    AnimationTimelineInstruction.prototype.delay;\n    /** 
@type {?} */\n    AnimationTimelineInstruction.prototype.totalTime;\n    /** 
@type {?} */\n    AnimationTimelineInstruction.prototype.easing;\n
     /** @type {?|undefined} */\n    
AnimationTimelineInstruction.prototype.stretchStartingKeyframe;\n    /** @type 
{?} */\n    AnimationTimelineInstruction.prototype.subTimeline;\n}\n/**\n * 
@param {?} element\n * @param {?} keyframes\n * @param {?} preStyleProps\n * 
@param {?} postStyleProps\n * @param {?} duration\n * @param {?} delay\n * 
@param {?=} easing\n * @param {?=} subTimeline\n * @return {?}\n */\nexport 
function createTimelineInstruction(element, keyframes, preStyleProps, 
postStyleProps, duration, delay, easing = null, subTimeline = false) {\n    
return {\n        type: 1 /* TimelineAnimation */,\n        element,\n        
keyframes,\n        preStyleProps,\n        postStyleProps,\n        
duration,\n        delay,\n        totalTime: duration + delay, easing, 
subTimeline\n    };\n}\n//# 
sourceMappingURL=animation_timeline_instruction.js.map","/**\n * @fileoverview 
added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nexport class 
ElementInstructionMap {\n   
  constructor() {\n        this._map = new Map();\n    }\n    /**\n     * 
@param {?} element\n     * @return {?}\n     */\n    consume(element) {\n       
 let /** @type {?} */ instructions = this._map.get(element);\n        if 
(instructions) {\n            this._map.delete(element);\n        }\n        
else {\n            instructions = [];\n        }\n        return 
instructions;\n    }\n    /**\n     * @param {?} element\n     * @param {?} 
instructions\n     * @return {?}\n     */\n    append(element, instructions) 
{\n        let /** @type {?} */ existingInstructions = 
this._map.get(element);\n        if (!existingInstructions) {\n            
this._map.set(element, existingInstructions = []);\n        }\n        
existingInstructions.push(...instructions);\n    }\n    /**\n     * @param {?} 
element\n     * @return {?}\n     */\n    has(element) { return 
this._map.has(element); }\n    /**\n     * @return {?}\n     */\n    clear() { 
this._map.clear(); }\n}\nfunction ElementInstruction
 Map_tsickle_Closure_declarations() {\n    /** @type {?} */\n    
ElementInstructionMap.prototype._map;\n}\n//# 
sourceMappingURL=element_instruction_map.js.map","/**\n * @fileoverview added 
by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nimport { AUTO_STYLE, 
ɵPRE_STYLE as PRE_STYLE } from '@angular/animations';\nimport { copyObj, 
copyStyles, interpolateParams, iteratorToArray, resolveTiming, 
resolveTimingValue, visitDslNode } from '../util';\nimport { 
createTimelineInstruction } from './animation_timeline_instruction';\nimport { 
ElementInstructionMap } from './element_instruction_map';\nconst /** @type {?} 
*/ ONE_FRAME_IN_MILLISECONDS = 1;\nconst /** @type {?} */ ENTER_TOKEN = 
':enter';\nconst /** @type {?} */ ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 
'g');\nconst /** @type {?} */ LEAVE_TOKEN = ':leave';\nconst /** @type {?} */ 
LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n/**\n * @param {?} driver\n 
* @param {?} rootElement\n * @param {?} ast\n * @param {?} enterCl
 assName\n * @param {?} leaveClassName\n * @param {?=} startingStyles\n * 
@param {?=} finalStyles\n * @param {?=} options\n * @param {?=} 
subInstructions\n * @param {?=} errors\n * @return {?}\n */\nexport function 
buildAnimationTimelines(driver, rootElement, ast, enterClassName, 
leaveClassName, startingStyles = {}, finalStyles = {}, options, 
subInstructions, errors = []) {\n    return new 
AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, 
enterClassName, leaveClassName, startingStyles, finalStyles, options, 
subInstructions, errors);\n}\nexport class AnimationTimelineBuilderVisitor {\n  
  /**\n     * @param {?} driver\n     * @param {?} rootElement\n     * @param 
{?} ast\n     * @param {?} enterClassName\n     * @param {?} leaveClassName\n   
  * @param {?} startingStyles\n     * @param {?} finalStyles\n     * @param {?} 
options\n     * @param {?=} subInstructions\n     * @param {?=} errors\n     * 
@return {?}\n     */\n    buildKeyframes(driver, rootElement, a
 st, enterClassName, leaveClassName, startingStyles, finalStyles, options, 
subInstructions, errors = []) {\n        subInstructions = subInstructions || 
new ElementInstructionMap();\n        const /** @type {?} */ context = new 
AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, 
leaveClassName, errors, []);\n        context.options = options;\n        
context.currentTimeline.setStyles([startingStyles], null, context.errors, 
options);\n        visitDslNode(this, ast, context);\n        // this checks to 
see if an actual animation happened\n        const /** @type {?} */ timelines = 
context.timelines.filter(timeline => timeline.containsAnimation());\n        if 
(timelines.length && Object.keys(finalStyles).length) {\n            const /** 
@type {?} */ tl = timelines[timelines.length - 1];\n            if 
(!tl.allowOnlyTimelineStyles()) {\n                tl.setStyles([finalStyles], 
null, context.errors, options);\n            }\n        }\n        return time
 lines.length ? timelines.map(timeline => timeline.buildKeyframes()) :\n        
    [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n    
}\n    /**\n     * @param {?} ast\n     * @param {?} context\n     * @return 
{?}\n     */\n    visitTrigger(ast, context) {\n        // these values are not 
visited in this AST\n    }\n    /**\n     * @param {?} ast\n     * @param {?} 
context\n     * @return {?}\n     */\n    visitState(ast, context) {\n        
// these values are not visited in this AST\n    }\n    /**\n     * @param {?} 
ast\n     * @param {?} context\n     * @return {?}\n     */\n    
visitTransition(ast, context) {\n        // these values are not visited in 
this AST\n    }\n    /**\n     * @param {?} ast\n     * @param {?} context\n    
 * @return {?}\n     */\n    visitAnimateChild(ast, context) {\n        const 
/** @type {?} */ elementInstructions = 
context.subInstructions.consume(context.element);\n        if 
(elementInstructions) {\n            const /**
  @type {?} */ innerContext = context.createSubContext(ast.options);\n          
  const /** @type {?} */ startTime = context.currentTimeline.currentTime;\n     
       const /** @type {?} */ endTime = 
this._visitSubInstructions(elementInstructions, innerContext, /** @type {?} */ 
(innerContext.options));\n            if (startTime != endTime) {\n             
   // we do this on the upper context because we created a sub context for\n    
            // the sub child animations\n                
context.transformIntoNewTimeline(endTime);\n            }\n        }\n        
context.previousNode = ast;\n    }\n    /**\n     * @param {?} ast\n     * 
@param {?} context\n     * @return {?}\n     */\n    visitAnimateRef(ast, 
context) {\n        const /** @type {?} */ innerContext = 
context.createSubContext(ast.options);\n        
innerContext.transformIntoNewTimeline();\n        
this.visitReference(ast.animation, innerContext);\n        
context.transformIntoNewTimeline(innerContext.currentTimelin
 e.currentTime);\n        context.previousNode = ast;\n    }\n    /**\n     * 
@param {?} instructions\n     * @param {?} context\n     * @param {?} options\n 
    * @return {?}\n     */\n    _visitSubInstructions(instructions, context, 
options) {\n        const /** @type {?} */ startTime = 
context.currentTimeline.currentTime;\n        let /** @type {?} */ furthestTime 
= startTime;\n        // this is a special-case for when a user wants to skip a 
sub\n        // animation from being fired entirely.\n        const /** @type 
{?} */ duration = options.duration != null ? 
resolveTimingValue(options.duration) : null;\n        const /** @type {?} */ 
delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n     
   if (duration !== 0) {\n            instructions.forEach(instruction => {\n   
             const /** @type {?} */ instructionTimings = 
context.appendInstructionToTimeline(instruction, duration, delay);\n            
    furthestTime =\n                    Math.max(fu
 rthestTime, instructionTimings.duration + instructionTimings.delay);\n         
   });\n        }\n        return furthestTime;\n    }\n    /**\n     * @param 
{?} ast\n     * @param {?} context\n     * @return {?}\n     */\n    
visitReference(ast, context) {\n        context.updateOptions(ast.options, 
true);\n        visitDslNode(this, ast.animation, context);\n        
context.previousNode = ast;\n    }\n    /**\n     * @param {?} ast\n     * 
@param {?} context\n     * @return {?}\n     */\n    visitSequence(ast, 
context) {\n        const /** @type {?} */ subContextCount = 
context.subContextCount;\n        let /** @type {?} */ ctx = context;\n        
const /** @type {?} */ options = ast.options;\n        if (options && 
(options.params || options.delay)) {\n            ctx = 
context.createSubContext(options);\n            
ctx.transformIntoNewTimeline();\n            if (options.delay != null) {\n     
           if (ctx.previousNode.type == 6 /* Style */) {\n                    
ctx.cur
 rentTimeline.snapshotCurrentStyles();\n                    ctx.previousNode = 
DEFAULT_NOOP_PREVIOUS_NODE;\n                }\n                const /** @type 
{?} */ delay = resolveTimingValue(options.delay);\n                
ctx.delayNextStep(delay);\n            }\n        }\n        if 
(ast.steps.length) {\n            ast.steps.forEach(s => visitDslNode(this, s, 
ctx));\n            // this is here just incase the inner steps only contain or 
end with a style() call\n            
ctx.currentTimeline.applyStylesToKeyframe();\n            // this means that 
some animation function within the sequence\n            // ended up creating a 
sub timeline (which means the current\n            // timeline cannot overlap 
with the contents of the sequence)\n            if (ctx.subContextCount > 
subContextCount) {\n                ctx.transformIntoNewTimeline();\n           
 }\n        }\n        context.previousNode = ast;\n    }\n    /**\n     * 
@param {?} ast\n     * @param {?} context\n     
 * @return {?}\n     */\n    visitGroup(ast, context) {\n        const /** 
@type {?} */ innerTimelines = [];\n        let /** @type {?} */ furthestTime = 
context.currentTimeline.currentTime;\n        const /** @type {?} */ delay = 
ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n 
       ast.steps.forEach(s => {\n            const /** @type {?} */ 
innerContext = context.createSubContext(ast.options);\n            if (delay) 
{\n                innerContext.delayNextStep(delay);\n            }\n          
  visitDslNode(this, s, innerContext);\n            furthestTime = 
Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n            
innerTimelines.push(innerContext.currentTimeline);\n        });\n        // 
this operation is run after the AST loop because otherwise\n        // if the 
parent timeline's collected styles were updated then\n        // it would pass 
in invalid data into the new-to-be forked items\n        
innerTimelines.forEach(ti
 meline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n   
     context.transformIntoNewTimeline(furthestTime);\n        
context.previousNode = ast;\n    }\n    /**\n     * @param {?} ast\n     * 
@param {?} context\n     * @return {?}\n     */\n    _visitTiming(ast, context) 
{\n        if ((/** @type {?} */ (ast)).dynamic) {\n            const /** @type 
{?} */ strValue = (/** @type {?} */ (ast)).strValue;\n            const /** 
@type {?} */ timingValue = context.params ? interpolateParams(strValue, 
context.params, context.errors) : strValue;\n            return 
resolveTiming(timingValue, context.errors);\n        }\n        else {\n        
    return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n  
      }\n    }\n    /**\n     * @param {?} ast\n     * @param {?} context\n     
* @return {?}\n     */\n    visitAnimate(ast, context) {\n        const /** 
@type {?} */ timings = context.currentAnimateTimings = 
this._visitTiming(ast.timings, context
 );\n        const /** @type {?} */ timeline = context.currentTimeline;\n       
 if (timings.delay) {\n            context.incrementTime(timings.delay);\n      
      timeline.snapshotCurrentStyles();\n        }\n        const /** @type {?} 
*/ style = ast.style;\n        if (style.type == 5 /* Keyframes */) {\n         
   this.visitKeyframes(style, context);\n        }\n        else {\n            
context.incrementTime(timings.duration);\n            this.visitStyle(/** @type 
{?} */ (style), context);\n            timeline.applyStylesToKeyframe();\n      
  }\n        context.currentAnimateTimings = null;\n        
context.previousNode = ast;\n    }\n    /**\n     * @param {?} ast\n     * 
@param {?} context\n     * @return {?}\n     */\n    visitStyle(ast, context) 
{\n        const /** @type {?} */ timeline = context.currentTimeline;\n        
const /** @type {?} */ timings = /** @type {?} */ 
((context.currentAnimateTimings));\n        // this is a special case for when 
a style() call\n 
        // directly follows  an animate() call (but not inside of an animate() 
call)\n        if (!timings && timeline.getCurrentStyleProperties().length) {\n 
           timeline.forwardFrame();\n        }\n        const /** @type {?} */ 
easing = (timings && timings.easing) || ast.easing;\n        if 
(ast.isEmptyStep) {\n            timeline.applyEmptyStep(easing);\n        }\n  
      else {\n            timeline.setStyles(ast.styles, easing, 
context.errors, context.options);\n        }\n        context.previousNode = 
ast;\n    }\n    /**\n     * @param {?} ast\n     * @param {?} context\n     * 
@return {?}\n     */\n    visitKeyframes(ast, context) {\n        const /** 
@type {?} */ currentAnimateTimings = /** @type {?} */ 
((context.currentAnimateTimings));\n        const /** @type {?} */ startTime = 
(/** @type {?} */ ((context.currentTimeline))).duration;\n        const /** 
@type {?} */ duration = currentAnimateTimings.duration;\n        const /** 
@type {?} */ innerContext = context
 .createSubContext();\n        const /** @type {?} */ innerTimeline = 
innerContext.currentTimeline;\n        innerTimeline.easing = 
currentAnimateTimings.easing;\n        ast.styles.forEach(step => {\n           
 const /** @type {?} */ offset = step.offset || 0;\n            
innerTimeline.forwardTime(offset * duration);\n            
innerTimeline.setStyles(step.styles, step.easing, context.errors, 
context.options);\n            innerTimeline.applyStylesToKeyframe();\n        
});\n        // this will ensure that the parent timeline gets all the styles 
from\n        // the child even if the new timeline below is not used\n        
context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n        
// we do this because the window between this timeline and the sub timeline\n   
     // should ensure that the styles within are exactly the same as they were 
before\n        context.transformIntoNewTimeline(startTime + duration);\n       
 context.previousNode = ast;\n    }\n    /**
 \n     * @param {?} ast\n     * @param {?} context\n     * @return {?}\n     
*/\n    visitQuery(ast, context) {\n        // in the event that the first step 
before this is a style step we need\n        // to ensure the styles are 
applied before the children are animated\n        const /** @type {?} */ 
startTime = context.currentTimeline.currentTime;\n        const /** @type {?} 
*/ options = /** @type {?} */ ((ast.options || {}));\n        const /** @type 
{?} */ delay = options.delay ? resolveTimingValue(options.delay) : 0;\n        
if (delay && (context.previousNode.type === 6 /* Style */ ||\n            
(startTime == 0 && 
context.currentTimeline.getCurrentStyleProperties().length))) {\n            
context.currentTimeline.snapshotCurrentStyles();\n            
context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n        }\n        let /** 
@type {?} */ furthestTime = startTime;\n        const /** @type {?} */ elms = 
context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast
 .includeSelf, options.optional ? true : false, context.errors);\n        
context.currentQueryTotal = elms.length;\n        let /** @type {?} */ 
sameElementTimeline = null;\n        elms.forEach((element, i) => {\n           
 context.currentQueryIndex = i;\n            const /** @type {?} */ 
innerContext = context.createSubContext(ast.options, element);\n            if 
(delay) {\n                innerContext.delayNextStep(delay);\n            }\n  
          if (element === context.element) {\n                
sameElementTimeline = innerContext.currentTimeline;\n            }\n            
visitDslNode(this, ast.animation, innerContext);\n            // this is here 
just incase the inner steps only contain or end\n            // with a style() 
call (which is here to signal that this is a preparatory\n            // call 
to style an element before it is animated again)\n            
innerContext.currentTimeline.applyStylesToKeyframe();\n            const /** 
@type {?} */ endTime = innerCo
 ntext.currentTimeline.currentTime;\n            furthestTime = 
Math.max(furthestTime, endTime);\n        });\n        
context.currentQueryIndex = 0;\n        context.currentQueryTotal = 0;\n        
context.transformIntoNewTimeline(furthestTime);\n        if 
(sameElementTimeline) {\n            
context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n    
        context.currentTimeline.snapshotCurrentStyles();\n        }\n        
context.previousNode = ast;\n    }\n    /**\n     * @param {?} ast\n     * 
@param {?} context\n     * @return {?}\n     */\n    visitStagger(ast, context) 
{\n        const /** @type {?} */ parentContext = /** @type {?} */ 
((context.parentContext));\n        const /** @type {?} */ tl = 
context.currentTimeline;\n        const /** @type {?} */ timings = 
ast.timings;\n        const /** @type {?} */ duration = 
Math.abs(timings.duration);\n        const /** @type {?} */ maxTime = duration 
* (context.currentQueryTotal - 1);\n        let /** @type
  {?} */ delay = duration * context.currentQueryIndex;\n        let /** @type 
{?} */ staggerTransformer = timings.duration < 0 ? 'reverse' : 
timings.easing;\n        switch (staggerTransformer) {\n            case 
'reverse':\n                delay = maxTime - delay;\n                break;\n  
          case 'full':\n                delay = 
parentContext.currentStaggerTime;\n                break;\n        }\n        
const /** @type {?} */ timeline = context.currentTimeline;\n        if (delay) 
{\n            timeline.delayNextStep(delay);\n        }\n        const /** 
@type {?} */ startingTime = timeline.currentTime;\n        visitDslNode(this, 
ast.animation, context);\n        context.previousNode = ast;\n        // time 
= duration + delay\n        // the reason why this computation is so complex is 
because\n        // the inner timeline may either have a delay value or a 
stretched\n        // keyframe depending on if a subtimeline is not used or is 
used.\n        parentContext.curr
 entStaggerTime =\n            (tl.currentTime - startingTime) + (tl.startTime 
- parentContext.currentTimeline.startTime);\n    }\n}\nconst /** @type {?} */ 
DEFAULT_NOOP_PREVIOUS_NODE = /** @type {?} */ ({});\nexport class 
AnimationTimelineContext {\n    /**\n     * @param {?} _driver\n     * @param 
{?} element\n     * @param {?} subInstructions\n     * @param {?} 
_enterClassName\n     * @param {?} _leaveClassName\n     * @param {?} errors\n  
   * @param {?} timelines\n     * @param {?=} initialTimeline\n     */\n    
constructor(_driver, element, subInstructions, _enterClassName, 
_leaveClassName, errors, timelines, initialTimeline) {\n        this._driver = 
_driver;\n        this.element = element;\n        this.subInstructions = 
subInstructions;\n        this._enterClassName = _enterClassName;\n        
this._leaveClassName = _leaveClassName;\n        this.errors = errors;\n        
this.timelines = timelines;\n        this.parentContext = null;\n        
this.currentAnimateTimings = n
 ull;\n        this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n        
this.subContextCount = 0;\n        this.options = {};\n        
this.currentQueryIndex = 0;\n        this.currentQueryTotal = 0;\n        
this.currentStaggerTime = 0;\n        this.currentTimeline = initialTimeline || 
new TimelineBuilder(this._driver, element, 0);\n        
timelines.push(this.currentTimeline);\n    }\n    /**\n     * @return {?}\n     
*/\n    get params() { return this.options.params; }\n    /**\n     * @param 
{?} options\n     * @param {?=} skipIfExists\n     * @return {?}\n     */\n    
updateOptions(options, skipIfExists) {\n        if (!options)\n            
return;\n        const /** @type {?} */ newOptions = /** @type {?} */ 
(options);\n        let /** @type {?} */ optionsToUpdate = this.options;\n      
  // NOTE: this will get patched up when other animation methods support 
duration overrides\n        if (newOptions.duration != null) {\n            
(/** @type {?} */ (optionsToUpdate)).durati
 on = resolveTimingValue(newOptions.duration);\n        }\n        if 
(newOptions.delay != null) {\n            optionsToUpdate.delay = 
resolveTimingValue(newOptions.delay);\n        }\n        const /** @type {?} 
*/ newParams = newOptions.params;\n        if (newParams) {\n            let 
/** @type {?} */ paramsToUpdate = /** @type {?} */ 
((optionsToUpdate.params));\n            if (!paramsToUpdate) {\n               
 paramsToUpdate = this.options.params = {};\n            }\n            
Object.keys(newParams).forEach(name => {\n                if (!skipIfExists || 
!paramsToUpdate.hasOwnProperty(name)) {\n                    
paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, 
this.errors);\n                }\n            });\n        }\n    }\n    /**\n  
   * @return {?}\n     */\n    _copyOptions() {\n        const /** @type {?} */ 
options = {};\n        if (this.options) {\n            const /** @type {?} */ 
oldParams = this.options.params;\n            if (o
 ldParams) {\n                const /** @type {?} */ params = options['params'] 
= {};\n                Object.keys(oldParams).forEach(name => { params[name] = 
oldParams[name]; });\n            }\n        }\n        return options;\n    
}\n    /**\n     * @param {?=} options\n     * @param {?=} element\n     * 
@param {?=} newTime\n     * @return {?}\n     */\n    createSubContext(options 
= null, element, newTime) {\n        const /** @type {?} */ target = element || 
this.element;\n        const /** @type {?} */ context = new 
AnimationTimelineContext(this._driver, target, this.subInstructions, 
this._enterClassName, this._leaveClassName, this.errors, this.timelines, 
this.currentTimeline.fork(target, newTime || 0));\n        context.previousNode 
= this.previousNode;\n        context.currentAnimateTimings = 
this.currentAnimateTimings;\n        context.options = this._copyOptions();\n   
     context.updateOptions(options);\n        context.currentQueryIndex = 
this.currentQueryIndex;\n     
    context.currentQueryTotal = this.currentQueryTotal;\n        
context.parentContext = this;\n        this.subContextCount++;\n        return 
context;\n    }\n    /**\n     * @param {?=} newTime\n     * @return {?}\n     
*/\n    transformIntoNewTimeline(newTime) {\n        this.previousNode = 
DEFAULT_NOOP_PREVIOUS_NODE;\n        this.currentTimeline = 
this.currentTimeline.fork(this.element, newTime);\n        
this.timelines.push(this.currentTimeline);\n        return 
this.currentTimeline;\n    }\n    /**\n     * @param {?} instruction\n     * 
@param {?} duration\n     * @param {?} delay\n     * @return {?}\n     */\n    
appendInstructionToTimeline(instruction, duration, delay) {\n        const /** 
@type {?} */ updatedTimings = {\n            duration: duration != null ? 
duration : instruction.duration,\n            delay: 
this.currentTimeline.currentTime + (delay != null ? delay : 0) + 
instruction.delay,\n            easing: ''\n        };\n        const /** @type 
{?} */ builder = 
 new SubTimelineBuilder(this._driver, instruction.element, 
instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, 
updatedTimings, instruction.stretchStartingKeyframe);\n        
this.timelines.push(builder);\n        return updatedTimings;\n    }\n    /**\n 
    * @param {?} time\n     * @return {?}\n     */\n    incrementTime(time) {\n 
       this.currentTimeline.forwardTime(this.currentTimeline.duration + 
time);\n    }\n    /**\n     * @param {?} delay\n     * @return {?}\n     */\n  
  delayNextStep(delay) {\n        // negative delays are not yet supported\n    
    if (delay > 0) {\n            this.currentTimeline.delayNextStep(delay);\n  
      }\n    }\n    /**\n     * @param {?} selector\n     * @param {?} 
originalSelector\n     * @param {?} limit\n     * @param {?} includeSelf\n     
* @param {?} optional\n     * @param {?} errors\n     * @return {?}\n     */\n  
  invokeQuery(selector, originalSelector, limit, includeSelf, optional, errors) 
{\n        let /
 ** @type {?} */ results = [];\n        if (includeSelf) {\n            
results.push(this.element);\n        }\n        if (selector.length > 0) {\n    
        // if :self is only used then the selector is empty\n            
selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n   
         selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + 
this._leaveClassName);\n            const /** @type {?} */ multi = limit != 
1;\n            let /** @type {?} */ elements = 
this._driver.query(this.element, selector, multi);\n            if (limit !== 
0) {\n                elements = limit < 0 ? elements.slice(elements.length + 
limit, elements.length) :\n                    elements.slice(0, limit);\n      
      }\n            results.push(...elements);\n        }\n        if 
(!optional && results.length == 0) {\n            
errors.push(`\\`query(\"${originalSelector}\")\\` returned zero elements. (Use 
\\`query(\"${originalSelector}\", { optional: true })\\` if you wish to
  allow this.)`);\n        }\n        return results;\n    }\n}\nfunction 
AnimationTimelineContext_tsickle_Closure_declarations() {\n    /** @type {?} 
*/\n    AnimationTimelineContext.prototype.parentContext;\n    /** @type {?} 
*/\n    AnimationTimelineContext.prototype.currentTimeline;\n    /** @type {?} 
*/\n    AnimationTimelineContext.prototype.currentAnimateTimings;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.previousNode;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.subContextCount;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.options;\n    /** @type 
{?} */\n    AnimationTimelineContext.prototype.currentQueryIndex;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.currentQueryTotal;\n    
/** @type {?} */\n    AnimationTimelineContext.prototype.currentStaggerTime;\n  
  /** @type {?} */\n    AnimationTimelineContext.prototype._driver;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.element;\n    /** @typ
 e {?} */\n    AnimationTimelineContext.prototype.subInstructions;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype._enterClassName;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype._leaveClassName;\n    /** 
@type {?} */\n    AnimationTimelineContext.prototype.errors;\n    /** @type {?} 
*/\n    AnimationTimelineContext.prototype.timelines;\n}\nexport class 
TimelineBuilder {\n    /**\n     * @param {?} _driver\n     * @param {?} 
element\n     * @param {?} startTime\n     * @param {?=} 
_elementTimelineStylesLookup\n     */\n    constructor(_driver, element, 
startTime, _elementTimelineStylesLookup) {\n        this._driver = _driver;\n   
     this.element = element;\n        this.startTime = startTime;\n        
this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n        
this.duration = 0;\n        this._previousKeyframe = {};\n        
this._currentKeyframe = {};\n        this._keyframes = new Map();\n        
this._styleSummary = {};\n        this.
 _pendingStyles = {};\n        this._backFill = {};\n        
this._currentEmptyStepKeyframe = null;\n        if 
(!this._elementTimelineStylesLookup) {\n            
this._elementTimelineStylesLookup = new Map();\n        }\n        
this._localTimelineStyles = Object.create(this._backFill, {});\n        
this._globalTimelineStyles = /** @type {?} */ 
((this._elementTimelineStylesLookup.get(element)));\n        if 
(!this._globalTimelineStyles) {\n            this._globalTimelineStyles = 
this._localTimelineStyles;\n            
this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n    
    }\n        this._loadKeyframe();\n    }\n    /**\n     * @return {?}\n     
*/\n    containsAnimation() {\n        switch (this._keyframes.size) {\n        
    case 0:\n                return false;\n            case 1:\n               
 return this.getCurrentStyleProperties().length > 0;\n            default:\n    
            return true;\n        }\n    }\n    /**\n     * @return {?}\
 n     */\n    getCurrentStyleProperties() { return 
Object.keys(this._currentKeyframe); }\n    /**\n     * @return {?}\n     */\n   
 get currentTime() { return this.startTime + this.duration; }\n    /**\n     * 
@param {?} delay\n     * @return {?}\n     */\n    delayNextStep(delay) {\n     
   // in the event that a style() step is placed right before a stagger()\n     
   // and that style() step is the very first style() value in the animation\n  
      // then we need to make a copy of the keyframe [0, copy, 1] so that the 
delay\n        // properly applies the style() values to work with the 
stagger...\n        const /** @type {?} */ hasPreStyleStep = 
this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n        
if (this.duration || hasPreStyleStep) {\n            
this.forwardTime(this.currentTime + delay);\n            if (hasPreStyleStep) 
{\n                this.snapshotCurrentStyles();\n            }\n        }\n    
    else {\n            this.startTime += delay
 ;\n        }\n    }\n    /**\n     * @param {?} element\n     * @param {?=} 
currentTime\n     * @return {?}\n     */\n    fork(element, currentTime) {\n    
    this.applyStylesToKeyframe();\n        return new 
TimelineBuilder(this._driver, element, currentTime || this.currentTime, 
this._elementTimelineStylesLookup);\n    }\n    /**\n     * @return {?}\n     
*/\n    _loadKeyframe() {\n        if (this._currentKeyframe) {\n            
this._previousKeyframe = this._currentKeyframe;\n        }\n        
this._currentKeyframe = /** @type {?} */ 
((this._keyframes.get(this.duration)));\n        if (!this._currentKeyframe) 
{\n            this._currentKeyframe = Object.create(this._backFill, {});\n     
       this._keyframes.set(this.duration, this._currentKeyframe);\n        }\n  
  }\n    /**\n     * @return {?}\n     */\n    forwardFrame() {\n        
this.duration += ONE_FRAME_IN_MILLISECONDS;\n        this._loadKeyframe();\n    
}\n    /**\n     * @param {?} time\n     * @return {?}\n     
 */\n    forwardTime(time) {\n        this.applyStylesToKeyframe();\n        
this.duration = time;\n        this._loadKeyframe();\n    }\n    /**\n     * 
@param {?} prop\n     * @param {?} value\n     * @return {?}\n     */\n    
_updateStyle(prop, value) {\n        this._localTimelineStyles[prop] = value;\n 
       this._globalTimelineStyles[prop] = value;\n        
this._styleSummary[prop] = { time: this.currentTime, value };\n    }\n    /**\n 
    * @return {?}\n     */\n    allowOnlyTimelineStyles() { return 
this._currentEmptyStepKeyframe !== this._currentKeyframe; }\n    /**\n     * 
@param {?} easing\n     * @return {?}\n     */\n    applyEmptyStep(easing) {\n  
      if (easing) {\n            this._previousKeyframe['easing'] = easing;\n   
     }\n        // special case for animate(duration):\n        // all missing 
styles are filled with a `*` value then\n        // if any destination styles 
are filled in later on the same\n        // keyframe then they will override 
the overridde
 n styles\n        // We use `_globalTimelineStyles` here because there may 
be\n        // styles in previous keyframes that are not present in this 
timeline\n        Object.keys(this._globalTimelineStyles).forEach(prop => {\n   
         this._backFill[prop] = this._globalTimelineStyles[prop] || 
AUTO_STYLE;\n            this._currentKeyframe[prop] = AUTO_STYLE;\n        
});\n        this._currentEmptyStepKeyframe = this._currentKeyframe;\n    }\n   
 /**\n     * @param {?} input\n     * @param {?} easing\n     * @param {?} 
errors\n     * @param {?=} options\n     * @return {?}\n     */\n    
setStyles(input, easing, errors, options) {\n        if (easing) {\n            
this._previousKeyframe['easing'] = easing;\n        }\n        const /** @type 
{?} */ params = (options && options.params) || {};\n        const /** @type {?} 
*/ styles = flattenStyles(input, this._globalTimelineStyles);\n        
Object.keys(styles).forEach(prop => {\n            const /** @type {?} */ val = 
interpolate
 Params(styles[prop], params, errors);\n            this._pendingStyles[prop] = 
val;\n            if (!this._localTimelineStyles.hasOwnProperty(prop)) {\n      
          this._backFill[prop] = 
this._globalTimelineStyles.hasOwnProperty(prop) ?\n                    
this._globalTimelineStyles[prop] :\n                    AUTO_STYLE;\n           
 }\n            this._updateStyle(prop, val);\n        });\n    }\n    /**\n    
 * @return {?}\n     */\n    applyStylesToKeyframe() {\n        const /** @type 
{?} */ styles = this._pendingStyles;\n        const /** @type {?} */ props = 
Object.keys(styles);\n        if (props.length == 0)\n            return;\n     
   this._pendingStyles = {};\n        props.forEach(prop => {\n            
const /** @type {?} */ val = styles[prop];\n            
this._currentKeyframe[prop] = val;\n        });\n        
Object.keys(this._localTimelineStyles).forEach(prop => {\n            if 
(!this._currentKeyframe.hasOwnProperty(prop)) {\n                this._curre
 ntKeyframe[prop] = this._localTimelineStyles[prop];\n            }\n        
});\n    }\n    /**\n     * @return {?}\n     */\n    snapshotCurrentStyles() 
{\n        Object.keys(this._localTimelineStyles).forEach(prop => {\n           
 const /** @type {?} */ val = this._localTimelineStyles[prop];\n            
this._pendingStyles[prop] = val;\n            this._updateStyle(prop, val);\n   
     });\n    }\n    /**\n     * @return {?}\n     */\n    getFinalKeyframe() { 
return this._keyframes.get(this.duration); }\n    /**\n     * @return {?}\n     
*/\n    get properties() {\n        const /** @type {?} */ properties = [];\n   
     for (let /** @type {?} */ prop in this._currentKeyframe) {\n            
properties.push(prop);\n        }\n        return properties;\n    }\n    /**\n 
    * @param {?} timeline\n     * @return {?}\n     */\n    
mergeTimelineCollectedStyles(timeline) {\n        
Object.keys(timeline._styleSummary).forEach(prop => {\n            const /** 
@type {?} */ details0 =
  this._styleSummary[prop];\n            const /** @type {?} */ details1 = 
timeline._styleSummary[prop];\n            if (!details0 || details1.time > 
details0.time) {\n                this._updateStyle(prop, details1.value);\n    
        }\n        });\n    }\n    /**\n     * @return {?}\n     */\n    
buildKeyframes() {\n        this.applyStylesToKeyframe();\n        const /** 
@type {?} */ preStyleProps = new Set();\n        const /** @type {?} */ 
postStyleProps = new Set();\n        const /** @type {?} */ isEmpty = 
this._keyframes.size === 1 && this.duration === 0;\n        let /** @type {?} 
*/ finalKeyframes = [];\n        this._keyframes.forEach((keyframe, time) => 
{\n            const /** @type {?} */ finalKeyframe = copyStyles(keyframe, 
true);\n            Object.keys(finalKeyframe).forEach(prop => {\n              
  const /** @type {?} */ value = finalKeyframe[prop];\n                if 
(value == PRE_STYLE) {\n                    preStyleProps.add(prop);\n          
      }\n  
               else if (value == AUTO_STYLE) {\n                    
postStyleProps.add(prop);\n                }\n            });\n            if 
(!isEmpty) {\n                finalKeyframe['offset'] = time / this.duration;\n 
           }\n            finalKeyframes.push(finalKeyframe);\n        });\n    
    const /** @type {?} */ preProps = preStyleProps.size ? 
iteratorToArray(preStyleProps.values()) : [];\n        const /** @type {?} */ 
postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : 
[];\n        // special case for a 0-second animation (which is designed just 
to place styles onscreen)\n        if (isEmpty) {\n            const /** @type 
{?} */ kf0 = finalKeyframes[0];\n            const /** @type {?} */ kf1 = 
copyObj(kf0);\n            kf0['offset'] = 0;\n            kf1['offset'] = 1;\n 
           finalKeyframes = [kf0, kf1];\n        }\n        return 
createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, 
this.duration, this.sta
 rtTime, this.easing, false);\n    }\n}\nfunction 
TimelineBuilder_tsickle_Closure_declarations() {\n    /** @type {?} */\n    
TimelineBuilder.prototype.duration;\n    /** @type {?} */\n    
TimelineBuilder.prototype.easing;\n    /** @type {?} */\n    
TimelineBuilder.prototype._previousKeyframe;\n    /** @type {?} *

<TRUNCATED>

Reply via email to