@angular/platform-server
Version:
Angular - library for using Angular in Node.js
88 lines • 157 kB
JavaScript
/**
* @license Angular v5.0.0-rc.8
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?factory(exports,require("@angular/core"),require("@angular/platform-browser"),require("@angular/animations"),require("@angular/common"),require("rxjs/observable/of"),require("rxjs/operator/concatMap"),require("rxjs/operator/filter"),require("rxjs/operator/map"),require("rxjs/Observable"),require("@angular/http"),require("@angular/platform-browser-dynamic"),require("@angular/platform-browser/animations"),require("rxjs/Subject"),require("url"),require("@angular/compiler"),require("rxjs/operator/first"),require("rxjs/operator/toPromise")):"function"==typeof define&&define.amd?define("@angular/platform-server",["exports","@angular/core","@angular/platform-browser","@angular/animations","@angular/common","rxjs/observable/of","rxjs/operator/concatMap","rxjs/operator/filter","rxjs/operator/map","rxjs/Observable","@angular/http","@angular/platform-browser-dynamic","@angular/platform-browser/animations","rxjs/Subject","url","@angular/compiler","rxjs/operator/first","rxjs/operator/toPromise"],factory):factory((global.ng=global.ng||{},global.ng.platformServer={}),global.ng.core,global.ng.platformBrowser,global.ng.animations,global.ng.common,global.rxjs_observable_of,global.rxjs_operator_concatMap,global.Rx.Observable.prototype,global.rxjs_operator_map,global.Rx,global.ng.http,global.ng.platformBrowserDynamic,global._angular_platformBrowser_animations,global.Rx,global.url,global.ng.compiler,global.Rx.Observable.prototype,global.Rx.Observable.prototype)}(this,function(exports,_angular_core,_angular_platformBrowser,_angular_animations,_angular_common,rxjs_observable_of,rxjs_operator_concatMap,rxjs_operator_filter,rxjs_operator_map,rxjs_Observable,_angular_http,_angular_platformBrowserDynamic,_angular_platformBrowser_animations,rxjs_Subject,url,_angular_compiler,rxjs_operator_first,rxjs_operator_toPromise){"use strict";function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}function __extends$1(d,b){function __(){this.constructor=d}extendStatics$1(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}/**
* @license Angular v4.3.6
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function optimizeGroupPlayer(players){switch(players.length){case 0:return new _angular_animations.NoopAnimationPlayer;case 1:return players[0];default:return new _angular_animations.ɵAnimationGroupPlayer(players)}}function normalizeKeyframes(driver,normalizer,element,keyframes,preStyles,postStyles){void 0===preStyles&&(preStyles={}),void 0===postStyles&&(postStyles={});var errors=[],normalizedKeyframes=[],previousOffset=-1,previousKeyframe=null;if(keyframes.forEach(function(kf){var offset=kf.offset,isSameOffset=offset==previousOffset,normalizedKeyframe=isSameOffset&&previousKeyframe||{};Object.keys(kf).forEach(function(prop){var normalizedProp=prop,normalizedValue=kf[prop];if("offset"!==prop)switch(normalizedProp=normalizer.normalizePropertyName(normalizedProp,errors),normalizedValue){case _angular_animations.ɵPRE_STYLE:normalizedValue=preStyles[prop];break;case _angular_animations.AUTO_STYLE:normalizedValue=postStyles[prop];break;default:normalizedValue=normalizer.normalizeStyleValue(prop,normalizedProp,normalizedValue,errors)}normalizedKeyframe[normalizedProp]=normalizedValue}),isSameOffset||normalizedKeyframes.push(normalizedKeyframe),previousKeyframe=normalizedKeyframe,previousOffset=offset}),errors.length){throw new Error("Unable to animate due to the following errors:\n - "+errors.join("\n - "))}return normalizedKeyframes}function listenOnPlayer(player,eventName,event,callback){switch(eventName){case"start":player.onStart(function(){return callback(event&©AnimationEvent(event,"start",player.totalTime))});break;case"done":player.onDone(function(){return callback(event&©AnimationEvent(event,"done",player.totalTime))});break;case"destroy":player.onDestroy(function(){return callback(event&©AnimationEvent(event,"destroy",player.totalTime))})}}function copyAnimationEvent(e,phaseName,totalTime){var event=makeAnimationEvent(e.element,e.triggerName,e.fromState,e.toState,phaseName||e.phaseName,void 0==totalTime?e.totalTime:totalTime),data=e._data;return null!=data&&(event._data=data),event}function makeAnimationEvent(element,triggerName,fromState,toState,phaseName,totalTime){return void 0===phaseName&&(phaseName=""),void 0===totalTime&&(totalTime=0),{element:element,triggerName:triggerName,fromState:fromState,toState:toState,phaseName:phaseName,totalTime:totalTime}}function getOrSetAsInMap(map$$1,key,defaultValue){var value;return map$$1 instanceof Map?(value=map$$1.get(key))||map$$1.set(key,value=defaultValue):(value=map$$1[key])||(value=map$$1[key]=defaultValue),value}function parseTimelineCommand(command){var separatorPos=command.indexOf(":");return[command.substring(1,separatorPos),command.substr(separatorPos+1)]}function resolveTimingValue(value){if("number"==typeof value)return value;var matches=value.match(/^(-?[\.\d]+)(m?s)/);return!matches||matches.length<2?0:_convertTimeValueToMS(parseFloat(matches[1]),matches[2])}function _convertTimeValueToMS(value,unit){switch(unit){case"s":return value*ONE_SECOND;default:return value}}function resolveTiming(timings,errors,allowNegativeValues){return timings.hasOwnProperty("duration")?timings:parseTimeExpression(timings,errors,allowNegativeValues)}function parseTimeExpression(exp,errors,allowNegativeValues){var duration,regex=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,delay=0,easing="";if("string"==typeof exp){var matches=exp.match(regex);if(null===matches)return errors.push('The provided timing value "'+exp+'" is invalid.'),{duration:0,delay:0,easing:""};duration=_convertTimeValueToMS(parseFloat(matches[1]),matches[2]);var delayMatch=matches[3];null!=delayMatch&&(delay=_convertTimeValueToMS(Math.floor(parseFloat(delayMatch)),matches[4]));var easingVal=matches[5];easingVal&&(easing=easingVal)}else duration=exp;if(!allowNegativeValues){var containsErrors=!1,startIndex=errors.length;duration<0&&(errors.push("Duration values below 0 are not allowed for this animation step."),containsErrors=!0),delay<0&&(errors.push("Delay values below 0 are not allowed for this animation step."),containsErrors=!0),containsErrors&&errors.splice(startIndex,0,'The provided timing value "'+exp+'" is invalid.')}return{duration:duration,delay:delay,easing:easing}}function copyObj(obj,destination){return void 0===destination&&(destination={}),Object.keys(obj).forEach(function(prop){destination[prop]=obj[prop]}),destination}function copyStyles(styles,readPrototype,destination){if(void 0===destination&&(destination={}),readPrototype)for(var prop in styles)destination[prop]=styles[prop];else copyObj(styles,destination);return destination}function setStyles(element,styles){element.style&&Object.keys(styles).forEach(function(prop){var camelProp=dashCaseToCamelCase(prop);element.style[camelProp]=styles[prop]})}function eraseStyles(element,styles){element.style&&Object.keys(styles).forEach(function(prop){var camelProp=dashCaseToCamelCase(prop);element.style[camelProp]=""})}function normalizeAnimationEntry(steps){return Array.isArray(steps)?1==steps.length?steps[0]:_angular_animations.sequence(steps):steps}function validateStyleParams(value,options,errors){var params=options.params||{},matches=extractStyleParams(value);matches.length&&matches.forEach(function(varName){params.hasOwnProperty(varName)||errors.push("Unable to resolve the local animation param "+varName+" in the given list of values")})}function extractStyleParams(value){var params=[];if("string"==typeof value){for(var val=value.toString(),match=void 0;match=PARAM_REGEX.exec(val);)params.push(match[1]);PARAM_REGEX.lastIndex=0}return params}function interpolateParams(value,params,errors){var original=value.toString(),str=original.replace(PARAM_REGEX,function(_,varName){var localVal=params[varName];return params.hasOwnProperty(varName)||(errors.push("Please provide a value for the animation param "+varName),localVal=""),localVal.toString()});return str==original?value:str}function iteratorToArray(iterator){for(var arr=[],item=iterator.next();!item.done;)arr.push(item.value),item=iterator.next();return arr}function dashCaseToCamelCase(input){return input.replace(DASH_CASE_REGEXP,function(){for(var m=[],_i=0;_i<arguments.length;_i++)m[_i]=arguments[_i];return m[1].toUpperCase()})}function allowPreviousPlayerStylesMerge(duration,delay){return 0===duration||0===delay}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function visitAnimationNode(visitor,node,context){switch(node.type){case 7:return visitor.visitTrigger(node,context);case 0:return visitor.visitState(node,context);case 1:return visitor.visitTransition(node,context);case 2:return visitor.visitSequence(node,context);case 3:return visitor.visitGroup(node,context);case 4:return visitor.visitAnimate(node,context);case 5:return visitor.visitKeyframes(node,context);case 6:return visitor.visitStyle(node,context);case 8:return visitor.visitReference(node,context);case 9:return visitor.visitAnimateChild(node,context);case 10:return visitor.visitAnimateRef(node,context);case 11:return visitor.visitQuery(node,context);case 12:return visitor.visitStagger(node,context);default:throw new Error("Unable to resolve animation metadata node #"+node.type)}}function parseTransitionExpr(transitionValue,errors){var expressions=[];return"string"==typeof transitionValue?transitionValue.split(/\s*,\s*/).forEach(function(str){return parseInnerTransitionStr(str,expressions,errors)}):expressions.push(transitionValue),expressions}function parseInnerTransitionStr(eventStr,expressions,errors){":"==eventStr[0]&&(eventStr=parseAnimationAlias(eventStr,errors));var match=eventStr.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==match||match.length<4)return errors.push('The provided transition expression "'+eventStr+'" is not supported'),expressions;var fromState=match[1],separator=match[2],toState=match[3];expressions.push(makeLambdaFromStates(fromState,toState));var isFullAnyStateExpr=fromState==ANY_STATE&&toState==ANY_STATE;"<"!=separator[0]||isFullAnyStateExpr||expressions.push(makeLambdaFromStates(toState,fromState))}function parseAnimationAlias(alias,errors){switch(alias){case":enter":return"void => *";case":leave":return"* => void";default:return errors.push('The transition alias value "'+alias+'" is not supported'),"* => *"}}function makeLambdaFromStates(lhs,rhs){return function(fromState,toState){var lhsMatch=lhs==ANY_STATE||lhs==fromState,rhsMatch=rhs==ANY_STATE||rhs==toState;return lhsMatch||"boolean"!=typeof fromState||(lhsMatch=fromState?"true"===lhs:"false"===lhs),rhsMatch||"boolean"!=typeof toState||(rhsMatch=toState?"true"===rhs:"false"===rhs),lhsMatch&&rhsMatch}}function buildAnimationAst(metadata,errors){return(new AnimationAstBuilderVisitor).build(metadata,errors)}function normalizeSelector(selector){var hasAmpersand=!!selector.split(/\s*,\s*/).find(function(token){return token==SELF_TOKEN});return hasAmpersand&&(selector=selector.replace(SELF_TOKEN_REGEX,"")),selector=selector.replace(ENTER_TOKEN_REGEX,ENTER_SELECTOR).replace(LEAVE_TOKEN_REGEX,LEAVE_SELECTOR).replace(/@\*/g,NG_TRIGGER_SELECTOR).replace(/@\w+/g,function(match){return NG_TRIGGER_SELECTOR+"-"+match.substr(1)}).replace(/:animating/g,NG_ANIMATING_SELECTOR),[selector,hasAmpersand]}function normalizeParams(obj){return obj?copyObj(obj):null}function consumeOffset(styles){if("string"==typeof styles)return null;var offset=null;if(Array.isArray(styles))styles.forEach(function(styleTuple){if(isObject(styleTuple)&&styleTuple.hasOwnProperty("offset")){var obj=styleTuple;offset=parseFloat(obj.offset),delete obj.offset}});else if(isObject(styles)&&styles.hasOwnProperty("offset")){var obj=styles;offset=parseFloat(obj.offset),delete obj.offset}return offset}function isObject(value){return!Array.isArray(value)&&"object"==typeof value}function constructTimingAst(value,errors){var timings=null;if(value.hasOwnProperty("duration"))timings=value;else if("number"==typeof value){resolveTiming(value,errors).duration;return new TimingAst(value,0,"")}var strValue=value;return strValue.split(/\s+/).some(function(v){return"{"==v.charAt(0)&&"{"==v.charAt(1)})?new DynamicTimingAst(strValue):(timings=timings||resolveTiming(strValue,errors),new TimingAst(timings.duration,timings.delay,timings.easing))}function normalizeAnimationOptions(options){return options?(options=copyObj(options),options.params&&(options.params=normalizeParams(options.params))):options={},options}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function createTimelineInstruction(element,keyframes,preStyleProps,postStyleProps,duration,delay,easing,subTimeline){return void 0===easing&&(easing=null),void 0===subTimeline&&(subTimeline=!1),{type:1,element:element,keyframes:keyframes,preStyleProps:preStyleProps,postStyleProps:postStyleProps,duration:duration,delay:delay,totalTime:duration+delay,easing:easing,subTimeline:subTimeline}}function buildAnimationTimelines(driver,rootElement,ast,startingStyles,finalStyles,options,subInstructions,errors){return void 0===startingStyles&&(startingStyles={}),void 0===finalStyles&&(finalStyles={}),void 0===errors&&(errors=[]),(new AnimationTimelineBuilderVisitor).buildKeyframes(driver,rootElement,ast,startingStyles,finalStyles,options,subInstructions,errors)}function roundOffset(offset,decimalPoints){void 0===decimalPoints&&(decimalPoints=3);var mult=Math.pow(10,decimalPoints-1);return Math.round(offset*mult)/mult}function flattenStyles(input,allStyles){var allProperties,styles={};return input.forEach(function(token){"*"===token?(allProperties=allProperties||Object.keys(allStyles),allProperties.forEach(function(prop){styles[prop]=_angular_animations.AUTO_STYLE})):copyStyles(token,!1,styles)}),styles}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function createTransitionInstruction(element,triggerName,fromState,toState,isRemovalTransition,fromStyles,toStyles,timelines,queriedElements,preStyleProps,postStyleProps,errors){return{type:0,element:element,triggerName:triggerName,isRemovalTransition:isRemovalTransition,fromState:fromState,fromStyles:fromStyles,toState:toState,toStyles:toStyles,timelines:timelines,queriedElements:queriedElements,preStyleProps:preStyleProps,postStyleProps:postStyleProps,errors:errors}}function oneOrMoreTransitionsMatch(matchFns,currentState,nextState){return matchFns.some(function(fn){return fn(currentState,nextState)})}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function buildTrigger(name,ast){return new AnimationTrigger(name,ast)}function createFallbackTransition(triggerName,states){var matchers=[function(fromState,toState){return!0}],animation=new SequenceAst([]),transition=new TransitionAst(matchers,animation);return new AnimationTransitionFactory(triggerName,transition,states)}function balanceProperties(obj,key1,key2){obj.hasOwnProperty(key1)?obj.hasOwnProperty(key2)||(obj[key2]=obj[key1]):obj.hasOwnProperty(key2)&&(obj[key1]=obj[key2])}function deleteOrUnsetInMap(map$$1,key,value){var currentValues;if(map$$1 instanceof Map){if(currentValues=map$$1.get(key)){if(currentValues.length){var index=currentValues.indexOf(value);currentValues.splice(index,1)}0==currentValues.length&&map$$1.delete(key)}}else if(currentValues=map$$1[key]){if(currentValues.length){var index=currentValues.indexOf(value);currentValues.splice(index,1)}0==currentValues.length&&delete map$$1[key]}return currentValues}function normalizeTriggerValue(value){switch(typeof value){case"boolean":return value?"1":"0";default:return null!=value?value.toString():null}}function isElementNode(node){return node&&1===node.nodeType}function isTriggerEventValid(eventName){return"start"==eventName||"done"==eventName}function cloakElement(element,value){var oldValue=element.style.display;return element.style.display=null!=value?value:"none",oldValue}function cloakAndComputeStyles(driver,elements,elementPropsMap,defaultStyle){var cloakVals=elements.map(function(element){return cloakElement(element)}),valuesMap=new Map,failedElements=[];return elementPropsMap.forEach(function(props,element){var styles={};props.forEach(function(prop){var value=styles[prop]=driver.computeStyle(element,prop,defaultStyle);value&&0!=value.length||(element[REMOVAL_FLAG]=NULL_REMOVED_QUERIED_STATE,failedElements.push(element))}),valuesMap.set(element,styles)}),elements.forEach(function(element,i){return cloakElement(element,cloakVals[i])}),[valuesMap,failedElements]}function createIsRootFilterFn(nodes){var isRoot,nodeSet=new Set(nodes),knownRootContainer=new Set;return isRoot=function(node){return!node||!nodeSet.has(node.parentNode)&&(!!knownRootContainer.has(node.parentNode)||!!isRoot(node.parentNode)&&(knownRootContainer.add(node),!0))}}function containsClass(element,className){if(element.classList)return element.classList.contains(className);var classes=element[CLASSES_CACHE_KEY];return classes&&classes[className]}function addClass(element,className){if(element.classList)element.classList.add(className);else{var classes=element[CLASSES_CACHE_KEY];classes||(classes=element[CLASSES_CACHE_KEY]={}),classes[className]=!0}}function removeClass(element,className){if(element.classList)element.classList.remove(className);else{var classes=element[CLASSES_CACHE_KEY];classes&&delete classes[className]}}function getBodyNode(){return"undefined"!=typeof document?document.body:null}function removeNodesAfterAnimationDone(engine,element,players){optimizeGroupPlayer(players).onDone(function(){return engine.processLeaveNode(element)})}function flattenGroupPlayers(players){var finalPlayers=[];return _flattenGroupPlayersRecur(players,finalPlayers),finalPlayers}function _flattenGroupPlayersRecur(players,finalPlayers){for(var i=0;i<players.length;i++){var player=players[i];player instanceof _angular_animations.ɵAnimationGroupPlayer?_flattenGroupPlayersRecur(player.players,finalPlayers):finalPlayers.push(player)}}function objEquals(a,b){var k1=Object.keys(a),k2=Object.keys(b);if(k1.length!=k2.length)return!1;for(var i=0;i<k1.length;i++){var prop=k1[i];if(!b.hasOwnProperty(prop)||a[prop]!==b[prop])return!1}return!0}function replacePostStylesAsPre(element,allPreStyleElements,allPostStyleElements){var postEntry=allPostStyleElements.get(element);if(!postEntry)return!1;var preEntry=allPreStyleElements.get(element);return preEntry?postEntry.forEach(function(data){return preEntry.add(data)}):allPreStyleElements.set(element,postEntry),allPostStyleElements.delete(element),!0}function _computeStyle(element,prop){return window.getComputedStyle(element)[prop]}function paramParser(rawParams,codec){var map$$1=new Map;if(rawParams.length>0){rawParams.split("&").forEach(function(param){var eqIdx=param.indexOf("="),_a=-1==eqIdx?[codec.decodeKey(param),""]:[codec.decodeKey(param.slice(0,eqIdx)),codec.decodeValue(param.slice(eqIdx+1))],key=_a[0],val=_a[1],list=map$$1.get(key)||[];list.push(val),map$$1.set(key,list)})}return map$$1}function standardEncoding(v){return encodeURIComponent(v).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function mightHaveBody(method){switch(method){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function isArrayBuffer(value){return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer}function isBlob(value){return"undefined"!=typeof Blob&&value instanceof Blob}function isFormData(value){return"undefined"!=typeof FormData&&value instanceof FormData}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function addBody(options,body){return{body:body,headers:options.headers,observe:options.observe,params:options.params,reportProgress:options.reportProgress,responseType:options.responseType,withCredentials:options.withCredentials}}function getResponseUrl(xhr){return"responseURL"in xhr&&xhr.responseURL?xhr.responseURL:/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())?xhr.getResponseHeader("X-Request-URL"):null}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function interceptingHandler(backend,interceptors){return void 0===interceptors&&(interceptors=[]),interceptors?interceptors.reduceRight(function(next,interceptor){return new HttpInterceptorHandler(next,interceptor)},backend):backend}function _notImplemented(methodName){return new Error("This method is not implemented in DominoAdapter: "+methodName)}function parseDocument(html,url$$1){return void 0===url$$1&&(url$$1="/"),domino.createWindow(html,url$$1).document}function serializeDocument(doc){return doc.serialize()}function validateRequestUrl(url$$1){if(!isAbsoluteUrl.test(url$$1))throw new Error("URLs requested via Http on the server must be absolute. URL: "+url$$1)}function httpFactory(xhrBackend,options){var macroBackend=new ZoneMacroTaskBackend(xhrBackend);return new _angular_http.Http(macroBackend,options)}function zoneWrappedInterceptingHandler(backend,interceptors){var realBackend=interceptingHandler(backend,interceptors);return new ZoneClientBackend(realBackend)}function parseUrl(urlStr){var parsedUrl=url.parse(urlStr);return{pathname:parsedUrl.pathname||"",search:parsedUrl.search||"",hash:parsedUrl.hash||""}}function scheduleMicroTask(fn){Zone.current.scheduleMicroTask("scheduleMicrotask",fn)}function checkNoSyntheticProp(name,nameKind){if(name.charCodeAt(0)===AT_CHARCODE)throw new Error("Found the synthetic "+nameKind+" "+name+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}function initDominoAdapter(injector){return function(){DominoAdapter.makeCurrent()}}function instantiateServerRendererFactory(renderer,engine,zone){return new _angular_platformBrowser_animations.ɵAnimationRendererFactory(renderer,engine,zone)}function _document(injector){var config=injector.get(INITIAL_CONFIG,null);return config&&config.document?parseDocument(config.document,config.url):_angular_platformBrowser.ɵgetDOM().createHtmlDocument()}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function serializeTransferStateFactory(doc,appId,transferStore){return function(){var script=doc.createElement("script");script.id=appId+"-state",script.setAttribute("type","application/json"),script.textContent=_angular_platformBrowser.ɵescapeHtml(transferStore.toJson()),doc.body.appendChild(script)}}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function _getPlatform(platformFactory,options){var extraProviders=options.extraProviders?options.extraProviders:[];return platformFactory([{provide:INITIAL_CONFIG,useValue:{document:options.document,url:options.url}},extraProviders])}function _render(platform,moduleRefPromise){return moduleRefPromise.then(function(moduleRef){if(!moduleRef.injector.get(_angular_platformBrowser.ɵTRANSITION_ID,null))throw new Error("renderModule[Factory]() requires the use of BrowserModule.withServerTransition() to ensure\nthe server-rendered app can be properly bootstrapped into a client app.");var applicationRef=moduleRef.injector.get(_angular_core.ApplicationRef);return rxjs_operator_toPromise.toPromise.call(rxjs_operator_first.first.call(rxjs_operator_filter.filter.call(applicationRef.isStable,function(isStable){return isStable}))).then(function(){var platformState=platform.injector.get(PlatformState),callbacks=moduleRef.injector.get(BEFORE_APP_SERIALIZED,null);if(callbacks)for(var _i=0,callbacks_1=callbacks;_i<callbacks_1.length;_i++){var callback=callbacks_1[_i];try{callback()}catch(e){console.warn("Ignoring BEFORE_APP_SERIALIZED Exception: ",e)}}var output=platformState.renderToString();return platform.destroy(),output})})}function renderModule(module,options){var platform=_getPlatform(platformDynamicServer,options);return _render(platform,platform.bootstrapModule(module))}function renderModuleFactory(moduleFactory,options){var platform=_getPlatform(platformServer,options);return _render(platform,platform.bootstrapModuleFactory(moduleFactory))}var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p])},_contains=function(elm1,elm2){return!1},_matches=function(element,selector){return!1},_query=function(element,selector,multi){return[]};if("undefined"!=typeof Element){if(_contains=function(elm1,elm2){return elm1.contains(elm2)},Element.prototype.matches)_matches=function(element,selector){return element.matches(selector)};else{var proto=Element.prototype,fn_1=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector;fn_1&&(_matches=function(element,selector){return fn_1.apply(element,[selector])})}_query=function(element,selector,multi){var results=[];if(multi)results.push.apply(results,element.querySelectorAll(selector));else{var elm=element.querySelector(selector);elm&&results.push(elm)}return results}}var matchesElement=_matches,containsElement=_contains,invokeQuery=_query,NoopAnimationDriver=function(){function NoopAnimationDriver(){}return NoopAnimationDriver.prototype.matchesElement=function(element,selector){return matchesElement(element,selector)},NoopAnimationDriver.prototype.containsElement=function(elm1,elm2){return containsElement(elm1,elm2)},NoopAnimationDriver.prototype.query=function(element,selector,multi){return invokeQuery(element,selector,multi)},NoopAnimationDriver.prototype.computeStyle=function(element,prop,defaultValue){return defaultValue||""},NoopAnimationDriver.prototype.animate=function(element,keyframes,duration,delay,easing,previousPlayers){return void 0===previousPlayers&&(previousPlayers=[]),new _angular_animations.NoopAnimationPlayer},NoopAnimationDriver}();((function(){function AnimationDriver(){}return AnimationDriver})()).NOOP=new NoopAnimationDriver;/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var ONE_SECOND=1e3,ENTER_SELECTOR=".ng-enter",LEAVE_SELECTOR=".ng-leave",NG_TRIGGER_SELECTOR=".ng-trigger",NG_ANIMATING_SELECTOR=".ng-animating",PARAM_REGEX=new RegExp("{{\\s*(.+?)\\s*}}","g"),DASH_CASE_REGEXP=/-+([a-z0-9])/g,EMPTY_ANIMATION_OPTIONS={},Ast=function(){function Ast(){this.options=EMPTY_ANIMATION_OPTIONS}return Ast.prototype.visit=function(ast,context){},Object.defineProperty(Ast.prototype,"params",{get:function(){return this.options.params||null},enumerable:!0,configurable:!0}),Ast}(),TriggerAst=function(_super){function TriggerAst(name,states,transitions){var _this=_super.call(this)||this;return _this.name=name,_this.states=states,_this.transitions=transitions,_this.queryCount=0,_this.depCount=0,_this}return __extends$1(TriggerAst,_super),TriggerAst.prototype.visit=function(visitor,context){return visitor.visitTrigger(this,context)},TriggerAst}(Ast),StateAst=function(_super){function StateAst(name,style$$1){var _this=_super.call(this)||this;return _this.name=name,_this.style=style$$1,_this}return __extends$1(StateAst,_super),StateAst.prototype.visit=function(visitor,context){return visitor.visitState(this,context)},StateAst}(Ast),TransitionAst=function(_super){function TransitionAst(matchers,animation){var _this=_super.call(this)||this;return _this.matchers=matchers,_this.animation=animation,_this.queryCount=0,_this.depCount=0,_this}return __extends$1(TransitionAst,_super),TransitionAst.prototype.visit=function(visitor,context){return visitor.visitTransition(this,context)},TransitionAst}(Ast),SequenceAst=function(_super){function SequenceAst(steps){var _this=_super.call(this)||this;return _this.steps=steps,_this}return __extends$1(SequenceAst,_super),SequenceAst.prototype.visit=function(visitor,context){return visitor.visitSequence(this,context)},SequenceAst}(Ast),GroupAst=function(_super){function GroupAst(steps){var _this=_super.call(this)||this;return _this.steps=steps,_this}return __extends$1(GroupAst,_super),GroupAst.prototype.visit=function(visitor,context){return visitor.visitGroup(this,context)},GroupAst}(Ast),AnimateAst=function(_super){function AnimateAst(timings,style$$1){var _this=_super.call(this)||this;return _this.timings=timings,_this.style=style$$1,_this}return __extends$1(AnimateAst,_super),AnimateAst.prototype.visit=function(visitor,context){return visitor.visitAnimate(this,context)},AnimateAst}(Ast),StyleAst=function(_super){function StyleAst(styles,easing,offset){var _this=_super.call(this)||this;return _this.styles=styles,_this.easing=easing,_this.offset=offset,_this.isEmptyStep=!1,_this.containsDynamicStyles=!1,_this}return __extends$1(StyleAst,_super),StyleAst.prototype.visit=function(visitor,context){return visitor.visitStyle(this,context)},StyleAst}(Ast),KeyframesAst=function(_super){function KeyframesAst(styles){var _this=_super.call(this)||this;return _this.styles=styles,_this}return __extends$1(KeyframesAst,_super),KeyframesAst.prototype.visit=function(visitor,context){return visitor.visitKeyframes(this,context)},KeyframesAst}(Ast),ReferenceAst=function(_super){function ReferenceAst(animation){var _this=_super.call(this)||this;return _this.animation=animation,_this}return __extends$1(ReferenceAst,_super),ReferenceAst.prototype.visit=function(visitor,context){return visitor.visitReference(this,context)},ReferenceAst}(Ast),AnimateChildAst=function(_super){function AnimateChildAst(){return _super.call(this)||this}return __extends$1(AnimateChildAst,_super),AnimateChildAst.prototype.visit=function(visitor,context){return visitor.visitAnimateChild(this,context)},AnimateChildAst}(Ast),AnimateRefAst=function(_super){function AnimateRefAst(animation){var _this=_super.call(this)||this;return _this.animation=animation,_this}return __extends$1(AnimateRefAst,_super),AnimateRefAst.prototype.visit=function(visitor,context){return visitor.visitAnimateRef(this,context)},AnimateRefAst}(Ast),QueryAst=function(_super){function QueryAst(selector,limit,optional,includeSelf,animation){var _this=_super.call(this)||this;return _this.selector=selector,_this.limit=limit,_this.optional=optional,_this.includeSelf=includeSelf,_this.animation=animation,_this}return __extends$1(QueryAst,_super),QueryAst.prototype.visit=function(visitor,context){return visitor.visitQuery(this,context)},QueryAst}(Ast),StaggerAst=function(_super){function StaggerAst(timings,animation){var _this=_super.call(this)||this;return _this.timings=timings,_this.animation=animation,_this}return __extends$1(StaggerAst,_super),StaggerAst.prototype.visit=function(visitor,context){return visitor.visitStagger(this,context)},StaggerAst}(Ast),TimingAst=function(_super){function TimingAst(duration,delay,easing){void 0===delay&&(delay=0),void 0===easing&&(easing=null);var _this=_super.call(this)||this;return _this.duration=duration,_this.delay=delay,_this.easing=easing,_this}return __extends$1(TimingAst,_super),TimingAst.prototype.visit=function(visitor,context){return visitor.visitTiming(this,context)},TimingAst}(Ast),DynamicTimingAst=function(_super){function DynamicTimingAst(value){var _this=_super.call(this,0,0,"")||this;return _this.value=value,_this}return __extends$1(DynamicTimingAst,_super),DynamicTimingAst.prototype.visit=function(visitor,context){return visitor.visitTiming(this,context)},DynamicTimingAst}(TimingAst),ANY_STATE="*",SELF_TOKEN=":self",SELF_TOKEN_REGEX=new RegExp("s*"+SELF_TOKEN+"s*,?","g"),LEAVE_TOKEN_REGEX=new RegExp(":leave","g"),ENTER_TOKEN_REGEX=new RegExp(":enter","g"),AnimationAstBuilderVisitor=function(){function AnimationAstBuilderVisitor(){}return AnimationAstBuilderVisitor.prototype.build=function(metadata,errors){var context=new AnimationAstBuilderContext(errors);return this._resetContextStyleTimingState(context),visitAnimationNode(this,normalizeAnimationEntry(metadata),context)},AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState=function(context){context.currentQuerySelector="",context.collectedStyles={},context.collectedStyles[""]={},context.currentTime=0},AnimationAstBuilderVisitor.prototype.visitTrigger=function(metadata,context){var _this=this,queryCount=context.queryCount=0,depCount=context.depCount=0,states=[],transitions=[];metadata.definitions.forEach(function(def){if(_this._resetContextStyleTimingState(context),0==def.type){var stateDef_1=def,name=stateDef_1.name;name.split(/\s*,\s*/).forEach(function(n){stateDef_1.name=n,states.push(_this.visitState(stateDef_1,context))}),stateDef_1.name=name}else if(1==def.type){var transition=_this.visitTransition(def,context);queryCount+=transition.queryCount,depCount+=transition.depCount,transitions.push(transition)}else context.errors.push("only state() and transition() definitions can sit inside of a trigger()")});var ast=new TriggerAst(metadata.name,states,transitions);return ast.options=normalizeAnimationOptions(metadata.options),ast.queryCount=queryCount,ast.depCount=depCount,ast},AnimationAstBuilderVisitor.prototype.visitState=function(metadata,context){var styleAst=this.visitStyle(metadata.styles,context),astParams=metadata.options&&metadata.options.params||null;if(styleAst.containsDynamicStyles){var missingSubs_1=new Set,params_1=astParams||{};if(styleAst.styles.forEach(function(value){if(isObject(value)){var stylesObj_1=value;Object.keys(stylesObj_1).forEach(function(prop){extractStyleParams(stylesObj_1[prop]).forEach(function(sub){params_1.hasOwnProperty(sub)||missingSubs_1.add(sub)})})}}),missingSubs_1.size){var missingSubsArr=iteratorToArray(missingSubs_1.values());context.errors.push('state("'+metadata.name+'", ...) must define default values for all the following style substitutions: '+missingSubsArr.join(", "))}}var stateAst=new StateAst(metadata.name,styleAst);return astParams&&(stateAst.options={params:astParams}),stateAst},AnimationAstBuilderVisitor.prototype.visitTransition=function(metadata,context){context.queryCount=0,context.depCount=0;var entry=visitAnimationNode(this,normalizeAnimationEntry(metadata.animation),context),matchers=parseTransitionExpr(metadata.expr,context.errors),ast=new TransitionAst(matchers,entry);return ast.options=normalizeAnimationOptions(metadata.options),ast.queryCount=context.queryCount,ast.depCount=context.depCount,ast},AnimationAstBuilderVisitor.prototype.visitSequence=function(metadata,context){var _this=this,ast=new SequenceAst(metadata.steps.map(function(s){return visitAnimationNode(_this,s,context)}));return ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitGroup=function(metadata,context){var _this=this,currentTime=context.currentTime,furthestTime=0,steps=metadata.steps.map(function(step){context.currentTime=currentTime;var innerAst=visitAnimationNode(_this,step,context);return furthestTime=Math.max(furthestTime,context.currentTime),innerAst});context.currentTime=furthestTime;var ast=new GroupAst(steps);return ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitAnimate=function(metadata,context){var timingAst=constructTimingAst(metadata.timings,context.errors);context.currentAnimateTimings=timingAst;var styles,styleMetadata=metadata.styles?metadata.styles:_angular_animations.style({});if(5==styleMetadata.type)styles=this.visitKeyframes(styleMetadata,context);else{var styleMetadata_1=metadata.styles,isEmpty=!1;if(!styleMetadata_1){isEmpty=!0;var newStyleData={};timingAst.easing&&(newStyleData.easing=timingAst.easing),styleMetadata_1=_angular_animations.style(newStyleData)}context.currentTime+=timingAst.duration+timingAst.delay;var styleAst=this.visitStyle(styleMetadata_1,context);styleAst.isEmptyStep=isEmpty,styles=styleAst}return context.currentAnimateTimings=null,new AnimateAst(timingAst,styles)},AnimationAstBuilderVisitor.prototype.visitStyle=function(metadata,context){var ast=this._makeStyleAst(metadata,context);return this._validateStyleAst(ast,context),ast},AnimationAstBuilderVisitor.prototype._makeStyleAst=function(metadata,context){var styles=[];Array.isArray(metadata.styles)?metadata.styles.forEach(function(styleTuple){"string"==typeof styleTuple?styleTuple==_angular_animations.AUTO_STYLE?styles.push(styleTuple):context.errors.push("The provided style string value "+styleTuple+" is not allowed."):styles.push(styleTuple)}):styles.push(metadata.styles);var containsDynamicStyles=!1,collectedEasing=null;styles.forEach(function(styleData){if(isObject(styleData)){var styleMap=styleData,easing=styleMap.easing;if(easing&&(collectedEasing=easing,delete styleMap.easing),!containsDynamicStyles)for(var prop in styleMap){var value=styleMap[prop];if(value.toString().indexOf("{{")>=0){containsDynamicStyles=!0;break}}}});var ast=new StyleAst(styles,collectedEasing,metadata.offset);return ast.containsDynamicStyles=containsDynamicStyles,ast},AnimationAstBuilderVisitor.prototype._validateStyleAst=function(ast,context){var timings=context.currentAnimateTimings,endTime=context.currentTime,startTime=context.currentTime;timings&&startTime>0&&(startTime-=timings.duration+timings.delay),ast.styles.forEach(function(tuple){"string"!=typeof tuple&&Object.keys(tuple).forEach(function(prop){var collectedStyles=context.collectedStyles[context.currentQuerySelector],collectedEntry=collectedStyles[prop],updateCollectedStyle=!0;collectedEntry&&(startTime!=endTime&&startTime>=collectedEntry.startTime&&endTime<=collectedEntry.endTime&&(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"'),updateCollectedStyle=!1),startTime=collectedEntry.startTime),updateCollectedStyle&&(collectedStyles[prop]={startTime:startTime,endTime:endTime}),context.options&&validateStyleParams(tuple[prop],context.options,context.errors)})})},AnimationAstBuilderVisitor.prototype.visitKeyframes=function(metadata,context){var _this=this;if(!context.currentAnimateTimings)return context.errors.push("keyframes() must be placed inside of a call to animate()"),new KeyframesAst([]);var totalKeyframesWithOffsets=0,offsets=[],offsetsOutOfOrder=!1,keyframesOutOfRange=!1,previousOffset=0,keyframes=metadata.steps.map(function(styles){var style$$1=_this._makeStyleAst(styles,context),offsetVal=null!=style$$1.offset?style$$1.offset:consumeOffset(style$$1.styles),offset=0;return null!=offsetVal&&(totalKeyframesWithOffsets++,offset=style$$1.offset=offsetVal),keyframesOutOfRange=keyframesOutOfRange||offset<0||offset>1,offsetsOutOfOrder=offsetsOutOfOrder||offset<previousOffset,previousOffset=offset,offsets.push(offset),style$$1});keyframesOutOfRange&&context.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),offsetsOutOfOrder&&context.errors.push("Please ensure that all keyframe offsets are in order");var length=metadata.steps.length,generatedOffset=0;totalKeyframesWithOffsets>0&&totalKeyframesWithOffsets<length?context.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==totalKeyframesWithOffsets&&(generatedOffset=1/(length-1));var limit=length-1,currentTime=context.currentTime,currentAnimateTimings=context.currentAnimateTimings,animateDuration=currentAnimateTimings.duration;return keyframes.forEach(function(kf,i){var offset=generatedOffset>0?i==limit?1:generatedOffset*i:offsets[i],durationUpToThisFrame=offset*animateDuration;context.currentTime=currentTime+currentAnimateTimings.delay+durationUpToThisFrame,currentAnimateTimings.duration=durationUpToThisFrame,_this._validateStyleAst(kf,context),kf.offset=offset}),new KeyframesAst(keyframes)},AnimationAstBuilderVisitor.prototype.visitReference=function(metadata,context){var entry=visitAnimationNode(this,normalizeAnimationEntry(metadata.animation),context),ast=new ReferenceAst(entry);return ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitAnimateChild=function(metadata,context){context.depCount++;var ast=new AnimateChildAst;return ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitAnimateRef=function(metadata,context){var animation=this.visitReference(metadata.animation,context),ast=new AnimateRefAst(animation);return ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitQuery=function(metadata,context){var parentSelector=context.currentQuerySelector,options=metadata.options||{};context.queryCount++,context.currentQuery=metadata;var _a=normalizeSelector(metadata.selector),selector=_a[0],includeSelf=_a[1];context.currentQuerySelector=parentSelector.length?parentSelector+" "+selector:selector,getOrSetAsInMap(context.collectedStyles,context.currentQuerySelector,{});var entry=visitAnimationNode(this,normalizeAnimationEntry(metadata.animation),context);context.currentQuery=null,context.currentQuerySelector=parentSelector;var ast=new QueryAst(selector,options.limit||0,!!options.optional,includeSelf,entry);return ast.originalSelector=metadata.selector,ast.options=normalizeAnimationOptions(metadata.options),ast},AnimationAstBuilderVisitor.prototype.visitStagger=function(metadata,context){context.currentQuery||context.errors.push("stagger() can only be used inside of query()");var timings="full"===metadata.timings?{duration:0,delay:0,easing:"full"}:resolveTiming(metadata.timings,context.errors,!0),animation=visitAnimationNode(this,normalizeAnimationEntry(metadata.animation),context);return new StaggerAst(timings,animation)},AnimationAstBuilderVisitor}(),AnimationAstBuilderContext=function(){function AnimationAstBuilderContext(errors){this.errors=errors,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}return AnimationAstBuilderContext}(),ElementInstructionMap=function(){function ElementInstructionMap(){this._map=new Map}return ElementInstructionMap.prototype.consume=function(element){var instructions=this._map.get(element);return instructions?this._map.delete(element):instructions=[],instructions},ElementInstructionMap.prototype.append=function(element,instructions){var existingInstructions=this._map.get(element);existingInstructions||this._map.set(element,existingInstructions=[]),existingInstructions.push.apply(existingInstructions,instructions)},ElementInstructionMap.prototype.has=function(element){return this._map.has(element)},ElementInstructionMap.prototype.clear=function(){this._map.clear()},ElementInstructionMap}(),AnimationTimelineBuilderVisitor=function(){function AnimationTimelineBuilderVisitor(){}return AnimationTimelineBuilderVisitor.prototype.buildKeyframes=function(driver,rootElement,ast,startingStyles,finalStyles,options,subInstructions,errors){void 0===errors&&(errors=[]),subInstructions=subInstructions||new ElementInstructionMap;var context=new AnimationTimelineContext(driver,rootElement,subInstructions,errors,[]);context.options=options,context.currentTimeline.setStyles([startingStyles],null,context.errors,options),ast.visit(this,context);var timelines=context.timelines.filter(function(timeline){return timeline.containsAnimation()});if(timelines.length&&Object.keys(finalStyles).length){var tl=timelines[timelines.length-1];tl.allowOnlyTimelineStyles()||tl.setStyles([finalStyles],null,context.errors,options)}return timelines.length?timelines.map(function(timeline){return timeline.buildKeyframes()}):[createTimelineInstruction(rootElement,[],[],[],0,0,"",!1)]},AnimationTimelineBuilderVisitor.prototype.visitTrigger=function(ast,context){},AnimationTimelineBuilderVisitor.prototype.visitState=function(ast,context){},AnimationTimelineBuilderVisitor.prototype.visitTransition=function(ast,context){},AnimationTimelineBuilderVisitor.prototype.visitAnimateChild=function(ast,context){var elementInstructions=context.subInstructions.consume(context.element);if(elementInstructions){var innerContext=context.createSubContext(ast.options),startTime=context.currentTimeline.currentTime,endTime=this._visitSubInstructions(elementInstructions,innerContext,innerContext.options);startTime!=endTime&&context.transformIntoNewTimeline(endTime)}context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype.visitAnimateRef=function(ast,context){var innerContext=context.createSubContext(ast.options);innerContext.transformIntoNewTimeline(),this.visitReference(ast.animation,innerContext),context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime),context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype._visitSubInstructions=function(instructions,context,options){var startTime=context.currentTimeline.currentTime,furthestTime=startTime,duration=null!=options.duration?resolveTimingValue(options.duration):null,delay=null!=options.delay?resolveTimingValue(options.delay):null;return 0!==duration&&instructions.forEach(function(instruction){var instructionTimings=context.appendInstructionToTimeline(instruction,duration,delay);furthestTime=Math.max(furthestTime,instructionTimings.duration+instructionTimings.delay)}),furthestTime},AnimationTimelineBuilderVisitor.prototype.visitReference=function(ast,context){context.updateOptions(ast.options,!0),ast.animation.visit(this,context),context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype.visitSequence=function(ast,context){var _this=this,subContextCount=context.subContextCount,ctx=context,options=ast.options;if(options&&(options.params||options.delay)&&(ctx=context.createSubContext(options),ctx.transformIntoNewTimeline(),null!=options.delay)){ctx.previousNode instanceof StyleAst&&(ctx.currentTimeline.snapshotCurrentStyles(),ctx.previousNode=DEFAULT_NOOP_PREVIOUS_NODE);var delay=resolveTimingValue(options.delay);ctx.delayNextStep(delay)}ast.steps.length&&(ast.steps.forEach(function(s){return s.visit(_this,ctx)}),ctx.currentTimeline.applyStylesToKeyframe(),ctx.subContextCount>subContextCount&&ctx.transformIntoNewTimeline()),context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype.visitGroup=function(ast,context){var _this=this,innerTimelines=[],furthestTime=context.currentTimeline.currentTime,delay=ast.options&&ast.options.delay?resolveTimingValue(ast.options.delay):0;ast.steps.forEach(function(s){var innerContext=context.createSubContext(ast.options);delay&&innerContext.delayNextStep(delay),s.visit(_this,innerContext),furthestTime=Math.max(furthestTime,innerContext.currentTimeline.currentTime),innerTimelines.push(innerContext.currentTimeline)}),innerTimelines.forEach(function(timeline){return context.currentTimeline.mergeTimelineCollectedStyles(timeline)}),context.transformIntoNewTimeline(furthestTime),context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype.visitTiming=function(ast,context){if(ast instanceof DynamicTimingAst){return resolveTiming(context.params?interpolateParams(ast.value,context.params,context.errors):ast.value.toString(),context.errors)}return{duration:ast.duration,delay:ast.delay,easing:ast.easing}},AnimationTimelineBuilderVisitor.prototype.visitAnimate=function(ast,context){var timings=context.currentAnimateTimings=this.visitTiming(ast.timings,context),timeline=context.currentTimeline;timings.delay&&(context.incrementTime(timings.delay),timeline.snapshotCurrentStyles());var style$$1=ast.style;style$$1 instanceof KeyframesAst?this.visitKeyframes(style$$1,context):(context.incrementTime(timings.duration),this.visitStyle(style$$1,context),timeline.applyStylesToKeyframe()),context.currentAnimateTimings=null,context.previousNode=ast},AnimationTimelineBuilderVisitor.prototype.visitStyle=function(ast,context){var timeline=context.currentTimeline,timings=context.currentAnimateTimings;!timings&&timeline.getCurrentStyleProperties().length&&timeline.forwardFrame();var easing=timings&&timings.easing||ast.easing;ast.isEmptyStep?timeline.applyEmptyStep(easing)