angular2-boiler-plate
Version:
Angular 2 Boiler plate that integrated with WebPack, TypeScript, DatePicker, RxJs for Reactive Extensions in Java Script , Karma , Jasmine for unit testing , WebKit ,protractor e2e testing
33 lines • 911 kB
JavaScript
webpackJsonp([2],[function(e,t,r){"use strict";r(21),r(1),r(3),r(22),r(24),r(25),r(74)},function(e,t,r){(function(e){/**
* @license Angular v2.1.2
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
!function(e,n){n(t,r(2),r(3),r(21))}(this,function(t,r,n,i){"use strict";var o,s=i.__platform_browser_private__.INTERNAL_BROWSER_PLATFORM_PROVIDERS,a=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},u=function(e){function ResourceLoaderImpl(){e.apply(this,arguments)}return a(ResourceLoaderImpl,e),ResourceLoaderImpl.prototype.get=function(e){var t,r,n=new Promise(function(e,n){t=e,r=n}),i=new XMLHttpRequest;return i.open("GET",e,!0),i.responseType="text",i.onload=function(){var n=i.response||i.responseText,o=1223===i.status?204:i.status;0===o&&(o=n?200:0),200<=o&&o<=300?t(n):r("Failed to load "+e)},i.onerror=function(){r("Failed to load "+e)},i.send(),n},ResourceLoaderImpl.decorators=[{type:n.Injectable}],ResourceLoaderImpl.ctorParameters=[],ResourceLoaderImpl}(r.ResourceLoader),c=[s,{provide:n.COMPILER_OPTIONS,useValue:{providers:[{provide:r.ResourceLoader,useClass:u}]},multi:!0}];o="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window;var l=o;l.assert=function(e){};/**
* @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 p=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},h=function(e){function CachedResourceLoader(){if(e.call(this),this._cache=l.$templateCache,null==this._cache)throw new Error("CachedResourceLoader: Template cache was not found in $templateCache.")}return p(CachedResourceLoader,e),CachedResourceLoader.prototype.get=function(e){return this._cache.hasOwnProperty(e)?Promise.resolve(this._cache[e]):Promise.reject("CachedResourceLoader: Did not find cached template for "+e)},CachedResourceLoader}(r.ResourceLoader),f={INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS:c,ResourceLoaderImpl:u},d=[{provide:r.ResourceLoader,useClass:h}],m=n.createPlatformFactory(r.platformCoreDynamic,"browserDynamic",c);t.RESOURCE_CACHE_PROVIDER=d,t.platformBrowserDynamic=m,t.__platform_browser_dynamic_private__=f})}).call(t,function(){return this}())},function(e,t,r){/**
* @license Angular v2.1.2
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
!function(e,n){n(t,r(3))}(this,function(e,t){"use strict";function templateVisitAll(e,t,r){void 0===r&&(r=null);var n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach(function(e){var t=i(e);t&&n.push(t)}),n}function isPresent(e){return null!=e}function isBlank(e){return null==e}function isStrictStringMap(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===y}function stringify(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.overriddenName)return e.overriddenName;if(e.name)return e.name;var t=e.toString(),r=t.indexOf("\n");return r===-1?t:t.substring(0,r)}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function isPrimitive(e){return!isJsObject(e)}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function _flattenArray(e,t){if(isPresent(e))for(var r=0;r<e.length;r++){var n=e[r];Array.isArray(n)?_flattenArray(n,t):t.push(n)}return t}function splitNsName(e){if(":"!=e[0])return[null,e];var t=e.indexOf(":",1);if(t==-1)throw new Error('Unsupported format "'+e+'" expecting ":namespace:name"');return[e.slice(1,t),e.slice(t+1)]}function getNsPrefix(e){return null===e?null:splitNsName(e)[0]}function mergeNsAndName(e,t){return e?":"+e+":"+t:t}function getHtmlTagDefinition(e){return C[e.toLowerCase()]||T}function splitAtColon(e,t){return _splitAt(e,":",t)}function splitAtPeriod(e,t){return _splitAt(e,".",t)}function _splitAt(e,t,r){var n=e.indexOf(t);return n==-1?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function sanitizeIdentifier(e){return e.replace(/\W/g,"_")}function visitValue(e,t,r){return Array.isArray(e)?t.visitArray(e,r):isStrictStringMap(e)?t.visitStringMap(e,r):isBlank(e)||isPrimitive(e)?t.visitPrimitive(e,r):t.visitOther(e,r)}function unimplemented(){throw new Error("unimplemented")}function createHostComponentMeta(e){var r=x.parse(e.selector)[0].getMatchingElementTemplate();return ne.create({type:new Y({reference:Object,name:e.type.name+"_Host",moduleUrl:e.type.moduleUrl,isHost:!0}),template:new re({encapsulation:t.ViewEncapsulation.None,template:r,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[],animations:[]}),changeDetection:t.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function removeIdentifierDuplicates(e){var t=new Map;return e.forEach(function(e){t.get(e.identifier.reference)||t.set(e.identifier.reference,e)}),_.values(t)}function _normalizeArray(e){return e||[]}function isStaticSymbol(e){return"object"==typeof e&&null!==e&&e.name&&e.filePath}function isWhitespace(e){return e>=ce&&e<=de||e==at}function isDigit(e){return Ve<=e&&e<=je}function isAsciiLetter(e){return e>=Qe&&e<=nt||e>=Le&&e<=We}function isAsciiHexDigit(e){return e>=Qe&&e<=Je||e>=Le&&e<=Be||isDigit(e)}function assertArrayOfStrings(e,r){if(t.isDevMode()&&!isBlank(r)){if(!Array.isArray(r))throw new Error("Expected '"+e+"' to be an array of strings.");for(var n=0;n<r.length;n+=1)if("string"!=typeof r[n])throw new Error("Expected '"+e+"' to be an array of strings.")}}function assertInterpolationSymbols(e,r){if(isPresent(r)&&(!Array.isArray(r)||2!=r.length))throw new Error("Expected '"+e+"' to be an array, [start, end].");if(t.isDevMode()&&!isBlank(r)){var n=r[0],i=r[1];ct.forEach(function(e){if(e.test(n)||e.test(i))throw new Error("['"+n+"', '"+i+"'] contains unusable interpolation symbol.")})}}function newCharacterToken(t,r){return new Ut(t,e.TokenType.Character,r,String.fromCharCode(r))}function newIdentifierToken(t,r){return new Ut(t,e.TokenType.Identifier,0,r)}function newKeywordToken(t,r){return new Ut(t,e.TokenType.Keyword,0,r)}function newOperatorToken(t,r){return new Ut(t,e.TokenType.Operator,0,r)}function newStringToken(t,r){return new Ut(t,e.TokenType.String,0,r)}function newNumberToken(t,r){return new Ut(t,e.TokenType.Number,r,"")}function newErrorToken(t,r){return new Ut(t,e.TokenType.Error,0,r)}function isIdentifierStart(e){return Qe<=e&&e<=nt||Le<=e&&e<=We||e==Ke||e==be}function isIdentifier(e){if(0==e.length)return!1;var t=new Ht(e);if(!isIdentifierStart(t.peek))return!1;for(t.advance();t.peek!==ue;){if(!isIdentifierPart(t.peek))return!1;t.advance()}return!0}function isIdentifierPart(e){return isAsciiLetter(e)||isDigit(e)||e==Ke||e==be}function isExponentStart(e){return e==Xe||e==Fe}function isExponentSign(e){return e==xe||e==Te}function isQuote(e){return e===we||e===ye||e===ut}function unescape(e){switch(e){case Ze:return le;case Je:return he;case $e:return fe;case Ye:return ce;case tt:return pe;default:return e}}function _createInterpolateRegExp(e){var t=escapeRegExp(e.start)+"([\\s\\S]*?)"+escapeRegExp(e.end);return new RegExp(t,"g")}function visitAll(e,t,r){void 0===r&&(r=null);var n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach(function(e){var t=i(e);t&&n.push(t)}),n}function tokenize(e,t,r,n,i){return void 0===n&&(n=!1),void 0===i&&(i=pt),new fr(new Jt(e,t),r,n,i).tokenize()}function _unexpectedCharacterErrorMsg(e){var t=e===ue?"EOF":String.fromCharCode(e);return'Unexpected character "'+t+'"'}function _unknownEntityErrorMsg(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}function isNotWhitespace(e){return!isWhitespace(e)||e===ue}function isNameEnd(e){return isWhitespace(e)||e===De||e===Oe||e===we||e===ye||e===ke}function isPrefixEnd(e){return(e<Qe||nt<e)&&(e<Le||We<e)&&(e<Ve||e>je)}function isDigitEntityEnd(e){return e==Ie||e==ue||!isAsciiHexDigit(e)}function isNamedEntityEnd(e){return e==Ie||e==ue||!isAsciiLetter(e)}function isExpansionFormStart(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==it&&!n}function isExpansionCaseStart(e){return e===ke||isAsciiLetter(e)}function compareCharCodeCaseInsensitive(e,t){return toUpperCaseCharCode(e)==toUpperCaseCharCode(t)}function toUpperCaseCharCode(e){return e>=Qe&&e<=nt?e-Qe+Le:e}function mergeTextTokens(e){for(var t,r=[],n=0;n<e.length;n++){var i=e[n];t&&t.type==$t.TEXT&&i.type==$t.TEXT?(t.parts[0]+=i.parts[0],t.sourceSpan.end=i.sourceSpan.end):(t=i,r.push(t))}return r}function lastOnStack(e,t){return e.length>0&&e[e.length-1]===t}/**
* @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 digestMessage(e){return sha1(serializeNodes(e.nodes).join("")+("["+e.meaning+"]"))}function serializeNodes(e){return e.map(function(e){return e.visit(gr,null)})}function sha1(e){var t=utf8Encode(e),r=stringToWords32(t),n=8*t.length,i=new Array(80),o=[1732584193,4023233417,2562383102,271733878,3285377520],s=o[0],a=o[1],u=o[2],c=o[3],l=o[4];r[n>>5]|=128<<24-n%32,r[(n+64>>9<<4)+15]=n;for(var p=0;p<r.length;p+=16){for(var h=[s,a,u,c,l],f=h[0],d=h[1],m=h[2],y=h[3],v=h[4],b=0;b<80;b++){b<16?i[b]=r[p+b]:i[b]=rol32(i[b-3]^i[b-8]^i[b-14]^i[b-16],1);var _=fk(b,a,u,c),g=_[0],w=_[1],S=[rol32(s,5),g,l,w,i[b]].reduce(add32);P=[c,u,rol32(a,30),s,S],l=P[0],c=P[1],u=P[2],a=P[3],s=P[4]}x=[add32(s,f),add32(a,d),add32(u,m),add32(c,y),add32(l,v)],s=x[0],a=x[1],u=x[2],c=x[3],l=x[4]}for(var E=words32ToString([s,a,u,c,l]),C="",p=0;p<E.length;p++){var T=E.charCodeAt(p);C+=(T>>>4&15).toString(16)+(15&T).toString(16)}return C.toLowerCase();var P,x}function utf8Encode(e){for(var t="",r=0;r<e.length;r++){var n=decodeSurrogatePairs(e,r);n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(192|n>>>6,128|63&n):n<=65535?t+=String.fromCharCode(224|n>>>12,128|n>>>6&63,128|63&n):n<=2097151&&(t+=String.fromCharCode(240|n>>>18,128|n>>>12&63,128|n>>>6&63,128|63&n))}return t}function decodeSurrogatePairs(e,t){if(t<0||t>=e.length)throw new Error("index="+t+' is out of range in "'+e+'"');var r,n=e.charCodeAt(t);return n>=55296&&n<=57343&&e.length>t+1&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?1024*(n-55296)+r-56320+65536:n}function stringToWords32(e){for(var t=Array(e.length>>>2),r=0;r<t.length;r++)t[r]=0;for(var r=0;r<e.length;r++)t[r>>>2]|=(255&e.charCodeAt(r))<<8*(3-r&3);return t}function words32ToString(e){for(var t="",r=0;r<4*e.length;r++)t+=String.fromCharCode(e[r>>>2]>>>8*(3-r&3)&255);return t}function fk(e,t,r,n){return e<20?[t&r|~t&n,1518500249]:e<40?[t^r^n,1859775393]:e<60?[t&r|t&n|r&n,2400959708]:[t^r^n,3395469782]}function add32(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function rol32(e,t){return e<<t|e>>>32-t}function createI18nMessageFactory(e){var t=new Ir(Rr,e);return function(e,r,n){return t.toI18nMessage(e,r,n)}}function _extractPlaceholderName(e){return e.split(Mr)[1]}function extractMessages(e,t,r,n){var i=new Br(r,n);return i.extract(e,t)}function mergeTranslations(e,t,r,n,i){var o=new Br(n,i);return o.merge(e,t,r)}function _isOpeningComment(e){return e instanceof or&&e.value&&e.value.startsWith("i18n")}function _isClosingComment(e){return e instanceof or&&e.value&&"/i18n"===e.value}function _getI18nAttr(e){return e.attrs.find(function(e){return e.name===Nr})||null}function _splitMeaningAndDesc(e){if(!e)return["",""];var t=e.indexOf("|");return t==-1?["",e]:[e.slice(0,t),e.slice(t+1)]}function getXmlTagDefinition(e){return Hr}/**
* @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 extractPlaceholders(e){var t=e.getMessageMap(),r={};return Object.keys(t).forEach(function(e){r[e]=t[e].placeholders}),r}function extractPlaceholderToIds(e){var t=e.getMessageMap(),r={};return Object.keys(t).forEach(function(e){r[e]=t[e].placeholderToMsgIds}),r}function serialize(e){return e.map(function(e){return e.visit(Qr)}).join("")}function _escapeXml(e){return en.reduce(function(e,t){return e.replace(t[0],t[1])},e)}function getCtypeForTag(e){switch(e.toLowerCase()){case"br":return"lb";case"img":return"image";default:return"x-"+e}}function assetUrl(e,t,r){return void 0===t&&(t=null),void 0===r&&(r="src"),null==t?"asset:@angular/lib/"+e+"/index":"asset:@angular/lib/"+e+"/src/"+t}function resolveIdentifier(e){return new Q({name:e.name,moduleUrl:e.moduleUrl,reference:Kn.resolveIdentifier(e.name,e.moduleUrl,e.runtime)})}function identifierToken(e){return new $({identifier:e})}function resolveIdentifierToken(e){return identifierToken(resolveIdentifier(e))}function resolveEnumIdentifier(e,t){var r=Kn.resolveEnum(e.reference,t);return new Q({name:e.name+"."+t,moduleUrl:e.moduleUrl,reference:r})}function expandNodes(e){var t=new Ei;return new wi(visitAll(t,e),t.isExpanded,t.errors)}function _expandPluralForm(e,t){var r=e.cases.map(function(e){gi.indexOf(e.value)!=-1||e.value.match(/^=\d+$/)||t.push(new Si(e.valueSourceSpan,'Plural cases should be "=<number>" or one of '+gi.join(", ")));var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new ir("template",[new nr("ngPluralCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new nr("[ngPlural]",e.switchValue,e.switchValueSourceSpan);return new ir("ng-container",[n],r,e.sourceSpan,e.sourceSpan,e.sourceSpan)}function _expandDefaultForm(e,t){var r=e.cases.map(function(e){var r=expandNodes(e.expression);return t.push.apply(t,r.errors),new ir("template",[new nr("ngSwitchCase",""+e.value,e.valueSourceSpan)],r.nodes,e.sourceSpan,e.sourceSpan,e.sourceSpan)}),n=new nr("[ngSwitch]",e.switchValue,e.switchValueSourceSpan);return new ir("ng-container",[n],r,e.sourceSpan,e.sourceSpan,e.sourceSpan)}function _transformProvider(e,t){var r=t.useExisting,n=t.useValue,i=t.deps;return new J({token:e.token,useClass:e.useClass,useExisting:r,useFactory:e.useFactory,useValue:n,deps:i,multi:e.multi})}function _transformProviderAst(e,t){var r=t.eager,n=t.providers;return new f(e.token,e.multiProvider,e.eager||r,n,e.providerType,e.lifecycleHooks,e.sourceSpan)}function _normalizeProviders(e,t,r,n){return void 0===n&&(n=null),n||(n=[]),isPresent(e)&&e.forEach(function(e){if(Array.isArray(e))_normalizeProviders(e,t,r,n);else{var i=void 0;e instanceof J?i=e:e instanceof Y?i=new J({token:new $({identifier:e}),useClass:e}):r.push(new Ti("Unknown provider type "+e,t)),isPresent(i)&&n.push(i)}}),n}function _resolveProvidersFromDirectives(t,r,n){var i=new Map;t.forEach(function(t){var o=new J({token:new $({identifier:t.type}),useClass:t.type});_resolveProviders([o],t.isComponent?e.ProviderAstType.Component:e.ProviderAstType.Directive,!0,r,n,i)});var o=t.filter(function(e){return e.isComponent}).concat(t.filter(function(e){return!e.isComponent}));return o.forEach(function(t){_resolveProviders(_normalizeProviders(t.providers,r,n),e.ProviderAstType.PublicService,!1,r,n,i),_resolveProviders(_normalizeProviders(t.viewProviders,r,n),e.ProviderAstType.PrivateService,!1,r,n,i)}),i}function _resolveProviders(e,t,r,n,i,o){e.forEach(function(e){var s=o.get(e.token.reference);if(isPresent(s)&&s.multiProvider!==e.multi&&i.push(new Ti("Mixing multi and non multi provider is not possible for token "+s.token.name,n)),s)e.multi||(s.providers.length=0),s.providers.push(e);else{var a=e.token.identifier&&e.token.identifier instanceof Y?e.token.identifier.lifecycleHooks:[];s=new f(e.token,e.multi,r||a.length>0,[e],t,a,n),o.set(e.token.reference,s)}})}function _getViewQueries(e){var t=new Map;return isPresent(e.viewQueries)&&e.viewQueries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){isPresent(e.viewQuery)&&_addQueryToTokenMap(t,e.viewQuery)}),t}function _getContentQueries(e){var t=new Map;return e.forEach(function(e){isPresent(e.queries)&&e.queries.forEach(function(e){return _addQueryToTokenMap(t,e)}),e.type.diDeps.forEach(function(e){isPresent(e.query)&&_addQueryToTokenMap(t,e.query)})}),t}function _addQueryToTokenMap(e,t){t.selectors.forEach(function(r){var n=e.get(r.reference);n||(n=[],e.set(r.reference,n)),n.push(t)})}function isStyleUrlResolvable(e){if(isBlank(e)||0===e.length||"/"==e[0])return!1;var t=e.match(Mi);return null===t||"package"==t[1]||"asset"==t[1]}function extractStyleUrls(e,t,r){var n=[],i=r.replace(Ii,function(){for(var r=[],i=0;i<arguments.length;i++)r[i-0]=arguments[i];var o=r[1]||r[2];return isStyleUrlResolvable(o)?(n.push(e.resolve(t,o)),""):r[0]});return new Ri(i,n)}function _isAnimationLabel(e){return"@"==e[0]}function calcPossibleSecurityContexts(e,r,n,i){var o=[];return x.parse(r).forEach(function(t){var r=t.element?[t.element]:e.allKnownElementNames(),s=new Set(t.notSelectors.filter(function(e){return e.isElementSelector()}).map(function(e){return e.element})),a=r.filter(function(e){return!s.has(e)});o.push.apply(o,a.map(function(t){return e.securityContext(t,n,i)}))}),0===o.length?[t.SecurityContext.NONE]:Array.from(new Set(o)).sort()}function preparseElement(e){var t=null,r=null,n=null,i=!1,o=null;e.attrs.forEach(function(e){var s=e.name.toLowerCase();s==Hi?t=e.value:s==Ki?r=e.value:s==Gi?n=e.value:e.name==Zi?i=!0:e.name==$i&&e.value.length>0&&(o=e.value)}),t=normalizeNgContentSelect(t);var s=e.name.toLowerCase(),a=Fi.OTHER;return splitNsName(s)[1]==zi?a=Fi.NG_CONTENT:s==Xi?a=Fi.STYLE:s==Ji?a=Fi.SCRIPT:s==qi&&n==Qi&&(a=Fi.STYLESHEET),new eo(a,t,r,i,o)}function normalizeNgContentSelect(e){return null===e||0===e.length?"*":e}function splitClasses(e){return e.trim().split(/\s+/g)}function createElementCssSelector(e,t){var r=new x,n=splitNsName(e)[1];r.setElement(n);for(var i=0;i<t.length;i++){var o=t[i][0],s=splitNsName(o)[1],a=t[i][1];if(r.addAttribute(s,a),o.toLowerCase()==vo){var u=splitClasses(a);u.forEach(function(e){return r.addClassName(e)})}}return r}function _isEmptyTextNode(e){return e instanceof er&&0==e.value.trim().length}function unimplemented$1(){throw new Error("unimplemented")}function replaceVarInExpression(e,t,r){var n=new ks(e,t);return r.visitExpression(n,null)}function findReadVarNames(e){var t=new Ds;return t.visitAllStatements(e,null),t.varNames}function variable(e,t){return void 0===t&&(t=null),new Qo(e,t)}function importExpr(e,t){return void 0===t&&(t=null),new ns(e,null,t)}function importType(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),isPresent(e)?new jo(e,t,r):null}function literalArr(e,t){return void 0===t&&(t=null),new hs(e,t)}function literalMap(e,t){return void 0===t&&(t=null),new fs(e,t)}function not(e){return new os(e)}function fn(e,t,r){return void 0===r&&(r=null),new us(e,t,r)}function literal(e,t){return void 0===t&&(t=null),new rs(e,t)}function _compareToAnimationStateExpr(e,t){var r=literal(ni);switch(t){case ni:return e.equals(r);case ti:return literal(!0);default:return e.equals(literal(t))}}function _isEndStateAnimateStep(e){if(e instanceof Ws&&e.duration>0&&2==e.keyframes.length){var t=_getStylesArray(e.keyframes[0])[0],r=_getStylesArray(e.keyframes[1])[0];return 0===Object.keys(t).length&&0===Object.keys(r).length}return!1}function _getStylesArray(e){return e.styles.styles}function _parseAnimationDeclarationStates(e,t){var r=[];e.styles.styles.forEach(function(e){"object"==typeof e&&null!==e?r.push(e):t.push(new ba("State based animations cannot contain references to other states"))});var n=new Hs(r),i=e.stateNameExpr.split(/\s*,\s*/);return i.map(function(e){return new Fs(e,n)})}function _parseAnimationStateTransition(e,t,r){var n=new fa,i=[],o=e.stateChangeExpr.split(/\s*,\s*/);o.forEach(function(e){i.push.apply(i,_parseAnimationTransitionExpr(e,r))});var s=_normalizeAnimationEntry(e.steps),a=_normalizeStyleSteps(s,t,r),u=_parseTransitionAnimation(a,0,n,t,r);0==r.length&&_fillAnimationAstStartingKeyframes(u,n,r);var c=u instanceof qs?u:new Ks([u]);return new Us(i,c)}function _parseAnimationAlias(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";default:return t.push(new ba('the transition alias value "'+e+'" is not supported')),"* => *"}}function _parseAnimationTransitionExpr(e,t){var r=[];":"==e[0]&&(e=_parseAnimationAlias(e,t));var n=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(!isPresent(n)||n.length<4)return t.push(new ba("the provided "+e+" is not of a supported format")),r;var i=n[1],o=n[2],s=n[3];r.push(new Bs(i,s));var a=i==ti&&s==ti;return"<"!=o[0]||a||r.push(new Bs(s,i)),r}function _normalizeAnimationEntry(e){return Array.isArray(e)?new G(e):e}function _normalizeStyleMetadata(e,t,r){var n=[];return e.styles.forEach(function(e){"string"==typeof e?n.push.apply(n,_resolveStylesFromState(e,t,r)):n.push(e)}),n}function _normalizeStyleSteps(e,t,r){var n=_normalizeStyleStepEntry(e,t,r);return e instanceof K?new K(n):new G(n)}function _mergeAnimationStyles(e,t){if("object"==typeof t&&null!==t&&e.length>0){var r=e.length-1,n=e[r];if("object"==typeof n&&null!==n)return void(e[r]=g.merge(n,t))}e.push(t)}function _normalizeStyleStepEntry(e,t,r){var n;if(!(e instanceof q))return[e];n=e.steps;var i,o=[];return n.forEach(function(e){if(e instanceof H)isPresent(i)||(i=[]),_normalizeStyleMetadata(e,t,r).forEach(function(e){_mergeAnimationStyles(i,e)});else{if(isPresent(i)&&(o.push(new H(0,i)),i=null),e instanceof z){var n=e.styles;n instanceof H?n.styles=_normalizeStyleMetadata(n,t,r):n instanceof W&&n.steps.forEach(function(e){e.styles=_normalizeStyleMetadata(e,t,r)})}else if(e instanceof q){var s=_normalizeStyleStepEntry(e,t,r);e=e instanceof K?new K(s):new G(s)}o.push(e)}}),isPresent(i)&&o.push(new H(0,i)),o}function _resolveStylesFromState(e,t,r){var n=[];if(":"!=e[0])r.push(new ba('Animation states via styles must be prefixed with a ":"'));else{var i=e.substring(1),o=t[i];isPresent(o)?o.styles.forEach(function(e){"object"==typeof e&&null!==e&&n.push(e)}):r.push(new ba('Unable to apply styles due to missing a state: "'+i+'"'))}return n}function _parseAnimationKeyframes(e,t,r,n,i){var o=e.steps.length,s=0;e.steps.forEach(function(e){return s+=isPresent(e.offset)?1:0}),s>0&&s<o&&(i.push(new ba("Not all style() entries contain an offset for the provided keyframe()")),s=o);var a=o-1,u=0==s?1/a:0,c=[],l=0,p=!1,h=0;e.steps.forEach(function(e){var t=e.offset,r={};e.styles.forEach(function(e){Object.keys(e).forEach(function(t){"offset"!=t&&(r[t]=e[t])})}),isPresent(t)?p=p||t<h:t=l==a?ya:u*l,c.push([t,r]),h=t,l++}),p&&c.sort(function(e,t){return e[0]<=t[0]?-1:1});var f=c[0];f[0]!=ma&&c.splice(0,0,f=[ma,{}]);var d=f[1];a=c.length-1;var m=c[a];m[0]!=ya&&(c.push(m=[ya,{}]),a++);for(var y=m[1],v=1;v<=a;v++){var b=c[v],_=b[1];Object.keys(_).forEach(function(e){isPresent(d[e])||(d[e]=ii)})}for(var g=function(e){var t=c[e],r=t[1];Object.keys(r).forEach(function(e){isPresent(y[e])||(y[e]=r[e])})},v=a-1;v>=0;v--)g(v);return c.map(function(e){return new zs(e[0],new Hs([e[1]]))})}function _parseTransitionAnimation(e,t,r,n,i){var o,s=0,a=t;if(e instanceof q){var u,c=0,l=[],p=e instanceof K;if(e.steps.forEach(function(e){var o=p?a:t;if(e instanceof H)return e.styles.forEach(function(e){var t=e;Object.keys(t).forEach(function(e){r.insertAtTime(e,o,t[e])})}),void(u=e.styles);var h=_parseTransitionAnimation(e,o,r,n,i);if(isPresent(u)){if(e instanceof q){var f=new Hs(u);l.push(new Ws(f,[],0,0,""))}else{var d=h;(y=d.startingStyles.styles).push.apply(y,u)}u=null}var m=h.playTime;t+=m,s+=m,c=Math.max(m,c),l.push(h);var y}),isPresent(u)){var h=new Hs(u);l.push(new Ws(h,[],0,0,""))}p?(o=new Gs(l),s=c,t=a+s):o=new Ks(l)}else if(e instanceof z){var f,d=_parseTimeExpression(e.timings,i),m=e.styles;if(m instanceof W)f=_parseAnimationKeyframes(m,t,r,n,i);else{var y=m,v=ya,b=new Hs(y.styles),_=new zs(v,b);f=[_]}o=new Ws(new Hs([]),f,d.duration,d.delay,d.easing),s=d.duration+d.delay,t+=s,f.forEach(function(e){return e.styles.styles.forEach(function(e){return Object.keys(e).forEach(function(n){r.insertAtTime(n,t,e[n])})})})}else o=new Ws(null,[],0,0,"");return o.playTime=s,o.startTime=a,o}function _fillAnimationAstStartingKeyframes(e,t,r){if(e instanceof Ws&&e.keyframes.length>0){var n=e.keyframes;if(1==n.length){var i=n[0],o=_createStartKeyframeFromEndKeyframe(i,e.startTime,e.playTime,t,r);e.keyframes=[o,i]}}else e instanceof qs&&e.steps.forEach(function(e){return _fillAnimationAstStartingKeyframes(e,t,r)})}function _parseTimeExpression(e,t){var r,n=/^([\.\d]+)(m?s)(?:\s+([\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?/i,i=0,o=null;if("string"==typeof e){var s=e.match(n);if(null===s)return t.push(new ba('The provided timing value "'+e+'" is invalid.')),new wa(0,0,null);var a=parseFloat(s[1]),u=s[2];"s"==u&&(a*=va),r=Math.floor(a);var c=s[3],l=s[4];if(isPresent(c)){var p=parseFloat(c);isPresent(l)&&"s"==l&&(p*=va),i=Math.floor(p)}var h=s[5];isBlank(h)||(o=h)}else r=e;return new wa(r,i,o)}function _createStartKeyframeFromEndKeyframe(e,t,r,n,i){var o={},s=t+r;return e.styles.styles.forEach(function(e){Object.keys(e).forEach(function(r){var a=e[r];if("offset"!=r){var u,c,l,p=n.indexOfAtOrBeforeTime(r,t);isPresent(p)?(u=n.getByIndex(r,p),l=u.value,c=n.getByIndex(r,p+1)):l=ii,isPresent(c)&&!c.matches(s,a)&&i.push(new ba('The animated CSS property "'+r+'" unexpectedly changes between steps "'+u.time+'ms" and "'+s+'ms" at "'+c.time+'ms"')),o[r]=l}})}),new zs(ma,new Hs([o]))}function createDiTokenExpression(e){return isPresent(e.value)?literal(e.value):e.identifierIsInstance?importExpr(e.identifier).instantiate([],importType(e.identifier,[],[Yi.Const])):importExpr(e.identifier)}function createInlineArray(e){if(0===e.length)return importExpr(resolveIdentifier(yi.EMPTY_INLINE_ARRAY));var t=Math.log(e.length)/Math.log(2),r=Math.ceil(t),n=r<yi.inlineArrays.length?yi.inlineArrays[r]:yi.InlineArrayDynamic,i=resolveIdentifier(n);return importExpr(i).instantiate([literal(e.length)].concat(e))}function createPureProxy(e,t,r,n){n.fields.push(new Cs(r.name,null));var i=t<yi.pureProxies.length?yi.pureProxies[t]:null;if(!i)throw new Error("Unsupported number of argument for pure functions: "+t);n.ctorStmts.push(ds.prop(r.name).set(importExpr(resolveIdentifier(i)).callFn([e])).toStmt())}function createEnumExpression(e,t){var r=Object.keys(e.runtime).find(function(r){return e.runtime[r]===t});if(!r)throw new Error("Unknown enum value "+t+" in "+e.name);return importExpr(resolveEnumIdentifier(resolveIdentifier(e),r))}function createCheckBindingField(e){var t=""+e.fields.length,r=createBindFieldExpr(t);return e.fields.push(new Cs(r.name,null,[$o.Private])),e.ctorStmts.push(ds.prop(r.name).set(importExpr(resolveIdentifier(yi.UNINITIALIZED))).toStmt()),new Sa(r,t)}function createCheckBindingStmt(e,t,r,n){var i=importExpr(resolveIdentifier(yi.checkBinding)).callFn([r,t,e.currValExpr]);return e.forceUpdate&&(i=e.forceUpdate.or(i)),e.stmts.concat([new As(i,n.concat([ds.prop(t.name).set(e.currValExpr).toStmt()]))])}function createBindFieldExpr(e){return ds.prop("_expr_"+e)}function convertPropertyBinding(e,t,r,n,i){var o=createCurrValueExpr(i),s=[];t||(t=new Oa);var a=new Aa(e,t,r,Ea,i,!1),u=n.visit(a,vs.Expression);if(!u)return null;if(a.temporaryCount)for(var c=0;c<a.temporaryCount;c++)s.push(temporaryDeclaration(i,c));if(a.needsValueUnwrapper){var l=Ea.callMethod("reset",[]).toStmt();s.push(l)}return s.push(o.set(u).toDeclStmt(null,[$o.Final])),a.needsValueUnwrapper?new Ta(s,o,Ea.prop("hasWrappedValue")):new Ta(s,o,null)}function convertActionBinding(e,t,r,n,i){t||(t=new Oa);var o=new Aa(e,t,r,null,i,!0),s=[];flattenStatements(n.visit(o,vs.Statement),s),prependTemporaryDecls(o.temporaryCount,i,s);var a=s.length-1,u=null;if(a>=0){var c=s[a],l=convertStmtIntoExpression(c);l&&(u=createPreventDefaultVar(i),s[a]=u.set(l.cast(Bo).notIdentical(literal(!1))).toDeclStmt(null,[$o.Final]))}return new Pa(s,u)}function createSharedBindingVariablesIfNeeded(e){var t=[],r=findReadVarNames(e);return r.has(Ea.name)&&t.push(Ea.set(importExpr(resolveIdentifier(yi.ValueUnwrapper)).instantiate([])).toDeclStmt(null,[$o.Final])),t}function temporaryName(e,t){return"tmp_"+e+"_"+t}function temporaryDeclaration(e,t){return new _s(temporaryName(e,t),ys)}function prependTemporaryDecls(e,t,r){for(var n=e-1;n>=0;n--)r.unshift(temporaryDeclaration(t,n))}function ensureStatementMode(e,t){if(e!==vs.Statement)throw new Error("Expected a statement, but saw "+t)}function ensureExpressionMode(e,t){if(e!==vs.Expression)throw new Error("Expected an expression, but saw "+t)}function convertToStatementIfNeeded(e,t){return e===vs.Statement?t.toStmt():t}function flattenStatements(e,t){Array.isArray(e)?e.forEach(function(e){return flattenStatements(e,t)}):t.push(e)}function createCachedLiteralArray(e,t){if(0===t.length)return importExpr(resolveIdentifier(yi.EMPTY_ARRAY));for(var r=ds.prop("_arr_"+e.fields.length),n=[],i=[],o=0;o<t.length;o++){var s="p"+o;n.push(new as(s)),i.push(variable(s))}return createPureProxy(fn(n,[new Ss(literalArr(i))],new Lo(Bo)),t.length,r,e),r.callFn(t)}function createCachedLiteralMap(e,t){if(0===t.length)return importExpr(resolveIdentifier(yi.EMPTY_MAP));for(var r=ds.prop("_map_"+e.fields.length),n=[],i=[],o=[],s=0;s<t.length;s++){var a="p"+s;n.push(new as(a)),i.push([t[s][0],variable(a)]),o.push(t[s][1])}return createPureProxy(fn(n,[new Ss(literalMap(i))],new Fo(Bo)),t.length,r,e),r.callFn(o)}function createCurrValueExpr(e){return variable("currVal_"+e)}function createPreventDefaultVar(e){return variable("pd_"+e)}function convertStmtIntoExpression(e){return e instanceof ws?e.expr:e instanceof Ss?e.value:null}function writeToRenderer(t,r,n,i,o,s){var a=[],u=t.prop("renderer");switch(i=sanitizedValue(t,r,i,s),r.type){case e.PropertyBindingType.Property:o&&a.push(importExpr(resolveIdentifier(yi.setBindingDebugInfo)).callFn([u,n,literal(r.name),i]).toStmt()),a.push(u.callMethod("setElementProperty",[n,literal(r.name),i]).toStmt());break;case e.PropertyBindingType.Attribute:i=i.isBlank().conditional(ys,i.callMethod("toString",[])),a.push(u.callMethod("setElementAttribute",[n,literal(r.name),i]).toStmt());break;case e.PropertyBindingType.Class:a.push(u.callMethod("setElementClass",[n,literal(r.name),i]).toStmt());break;case e.PropertyBindingType.Style:var c=i.callMethod("toString",[]);isPresent(r.unit)&&(c=c.plus(literal(r.unit))),i=i.isBlank().conditional(ys,c),a.push(u.callMethod("setElementStyle",[n,literal(r.name),i]).toStmt());break;case e.PropertyBindingType.Animation:throw new Error("Illegal state: Should not come here!")}return a}function sanitizedValue(e,r,n,i){if(r.securityContext===t.SecurityContext.NONE)return n;if(r.needsRuntimeSecurityContext||(i=createEnumExpression(yi.SecurityContext,r.securityContext)),!i)throw new Error("internal error, no SecurityContext given "+r.name);var o=e.prop("viewUtils").prop("sanitizer"),s=[i,n];return o.callMethod("sanitize",s)}function createClassStmt(e){var t=e.parentArgs||[],r=e.parent?[ms.callFn(t).toStmt()]:[],n=concatClassBuilderParts(Array.isArray(e.builders)?e.builders:[e.builders]),i=new Ts(null,e.ctorParams||[],r.concat(n.ctorStmts));return new xs(e.name,e.parent,n.fields,n.getters,i,n.methods,e.modifiers||[])}function concatClassBuilderParts(e){return{fields:(t=[]).concat.apply(t,e.map(function(e){return e.fields||[]})),methods:(r=[]).concat.apply(r,e.map(function(e){return e.methods||[]})),getters:(n=[]).concat.apply(n,e.map(function(e){return e.getters||[]})),ctorStmts:(i=[]).concat.apply(i,e.map(function(e){return e.ctorStmts||[]}))};var t,r,n,i}function addDetectChangesInInputPropsMethod(e){var t=variable("changed"),r=[t.set(ds.prop(ka)).toDeclStmt(),ds.prop(ka).set(literal(!1)).toStmt()],n=[];if(e.genChanges){var i=[];e.ngOnChanges&&i.push(ds.prop(Ia).callMethod("ngOnChanges",[ds.prop(Ma)]).toStmt()),e.compilerConfig.logBindingUpdate&&i.push(importExpr(resolveIdentifier(yi.setBindingDebugInfoForChanges)).callFn([ja.prop("renderer"),La,ds.prop(Ma)]).toStmt()),i.push(Fa),n.push(new As(t,i))}e.ngOnInit&&n.push(new As(ja.prop("numberOfChecks").identical(new rs(0)),[ds.prop(Ia).callMethod("ngOnInit",[]).toStmt()])),e.ngDoCheck&&n.push(ds.prop(Ia).callMethod("ngDoCheck",[]).toStmt()),n.length>0&&r.push(new As(not(Na),n)),r.push(new Ss(t)),e.methods.push(new Ts("detectChangesInInputProps",[new as(ja.name,importType(resolveIdentifier(yi.AppView),[Bo])),new as(La.name,Bo),new as(Na.name,Uo)],r,Uo))}function addCheckInputMethod(e,t){var r=createCheckBindingField(t),n=[ds.prop(ka).set(literal(!0)).toStmt(),ds.prop(Ia).prop(e).set(Da).toStmt()];t.genChanges&&n.push(ds.prop(Ma).key(literal(e)).set(importExpr(resolveIdentifier(yi.SimpleChange)).instantiate([r.expression,Da])).toStmt());var i=createCheckBindingStmt({currValExpr:Da,forceUpdate:Va,stmts:[]},r.expression,Na,n);t.methods.push(new Ts("check_"+e,[new as(Da.name,Bo),new as(Na.name,Uo),new as(Va.name,Uo)],i))}function addDetectChangesInHostPropsMethod(e,t){var r=[],n=[new as(ja.name,importType(resolveIdentifier(yi.AppView),[Bo])),new as(La.name,Bo),new as(Na.name,Uo)];e.forEach(function(e){var i=createCheckBindingField(t),o=convertPropertyBinding(t,null,ds.prop(Ia),e.value,i.bindingId);if(o){var s;e.needsRuntimeSecurityContext&&(s=variable("secCtx_"+n.length),n.push(new as(s.name,importType(resolveIdentifier(yi.SecurityContext))))),r.push.apply(r,createCheckBindingStmt(o,i.expression,Na,writeToRenderer(ja,e,La,o.currValExpr,t.compilerConfig.logBindingUpdate,s)))}}),t.methods.push(new Ts("detectChangesInHostProps",n,r))}function parseHostBindings(e,t,r){var n=[],i=new Ui(t,pt,r,[],n),o=e.type.moduleUrl?"in Directive "+e.type.name+" in "+e.type.moduleUrl:"in Directive "+e.type.name,s=new Jt("",o),a=new Zt(new Xt(s,null,null,null),new Xt(s,null,null,null)),u=i.createDirectiveHostPropertyAsts(e,a),c=i.createDirectiveHostEventAsts(e,a);return new Wa(u,c,n)}function reportParseErrors(t,r){var n=t.filter(function(t){return t.level===e.ParseErrorLevel.WARNING}),i=t.filter(function(t){return t.level===e.ParseErrorLevel.FATAL});if(n.length>0&&this._console.warn("Directive parse warnings:\n"+n.join("\n")),i.length>0)throw new Error("Directive parse errors:\n"+i.join("\n"))}function convertValueToOutputAst(e,t){return void 0===t&&(t=null),visitValue(e,new Ha,t)}function getPropertyInView(e,t,r){if(t===r)return e;for(var n=ds,i=t;i!==r&&isPresent(i.declarationElement.view);)i=i.declarationElement.view,n=n.prop("parent");if(i!==r)throw new Error("Internal error: Could not calculate a property in a parent view: "+e);return e.visitExpression(new Qa(n,r),null)}function injectFromViewParentInjector(e,t){var r=[createDiTokenExpression(e)];return t&&r.push(ys),ds.prop("parentInjector").callMethod("get",r)}function getViewFactoryName(e,t){return"viewFactory_"+e.type.name+t}function createFlatArray(e){for(var t=[],r=literalArr([]),n=0;n<e.length;n++){var i=e[n];i.type instanceof Lo?(t.length>0&&(r=r.callMethod(Ko.ConcatArray,[literalArr(t)]),t=[]),r=r.callMethod(Ko.ConcatArray,[i])):t.push(i)}return t.length>0&&(r=r.callMethod(Ko.ConcatArray,[literalArr(t)])),r}function createQueryValues(e){return w.flatten(e.values.map(function(e){return e instanceof Xa?mapNestedViews(e.view.declarationElement.appElement,e.view,createQueryValues(e)):e}))}function mapNestedViews(e,t,r){var n=r.map(function(e){return replaceVarInExpression(ds.name,variable("nestedView"),e)});return e.callMethod("mapNestedViews",[variable(t.className),fn([new as("nestedView",t.classType)],[new Ss(literalArr(n))],Bo)])}function createQueryList(e,t,r,n){n.fields.push(new Cs(r,importType(resolveIdentifier(yi.QueryList),[Bo])));var i=ds.prop(r);return n.createMethod.addStmt(ds.prop(r).set(importExpr(resolveIdentifier(yi.QueryList),[Bo]).instantiate([])).toStmt()),i}function addQueryToTokenMap(e,t){t.meta.selectors.forEach(function(r){var n=e.get(r.reference);n||(n=[],e.set(r.reference,n)),n.push(t)})}function createInjectInternalCondition(e,t,r,n){var i;return i=t>0?literal(e).lowerEquals(ru.requestNodeIndex).and(ru.requestNodeIndex.lowerEquals(literal(e+t))):literal(e).identical(ru.requestNodeIndex),new As(ru.token.identical(createDiTokenExpression(r.token)).and(i),[new Ss(n)])}function createProviderProperty(e,t,r,n,i,o){var s,a,u=o.view;if(n?(s=literalArr(r),a=new Lo(Bo)):(s=r[0],a=r[0].type),a||(a=Bo),i)u.fields.push(new Cs(e,a)),u.createMethod.addStmt(ds.prop(e).set(s).toStmt());else{var c="_"+e;u.fields.push(new Cs(c,a));var l=new Ga(u);l.resetDebugInfo(o.nodeIndex,o.sourceAst),l.addStmt(new As(ds.prop(c).isBlank(),[ds.prop(c).set(s).toStmt()])),l.addStmt(new Ss(ds.prop(c))),u.getters.push(new Ps(e,l.finish(),a))}return ds.prop(e)}function _findPipeMeta(e,t){for(var r=null,n=e.pipeMetas.length-1;n>=0;n--){var i=e.pipeMetas[n];if(i.name==t){r=i;break}}if(!r)throw new Error("Illegal state: Could not find pipe "+t+" although the parser should have detected this error!");return r}function getViewType(e,t){return t>0?Ln.EMBEDDED:e.type.isHost?Ln.HOST:Ln.COMPONENT}function collectEventListeners(e,t,r){var n=[];return e.forEach(function(e){var t=fu.getOrCreate(r,e.target,e.name,e.phase,n);t.addAction(e,null,null)}),t.forEach(function(e){var t=r.instances.get(identifierToken(e.directive.type).reference);e.hostEvents.forEach(function(i){var o=fu.getOrCreate(r,i.target,i.name,i.phase,n);o.addAction(i,e.directive,t)})}),n.forEach(function(e){return e.finishMethod()}),n}function bindDirectiveOutputs(e,t,r){Object.keys(e.directive.outputs).forEach(function(n){var i=e.directive.outputs[n];r.filter(function(e){return e.eventName==i}).forEach(function(e){e.listenToDirective(t,n)})})}function bindRenderOutputs(e){e.forEach(function(e){e.isAnimation||e.listenToRenderer()})}function sanitizeEventName(e){return e.replace(/[^a-zA-Z_]/g,"_")}function bindDirectiveAfterContentLifecycleCallbacks(e,t,r){var n=r.view,i=e.type.lifecycleHooks,o=n.afterContentLifecycleCallbacksMethod;o.resetDebugInfo(r.nodeIndex,r.sourceAst),i.indexOf(On.AfterContentInit)!==-1&&o.addStmt(new As(du,[t.callMethod("ngAfterContentInit",[]).toStmt()])),i.indexOf(On.AfterContentChecked)!==-1&&o.addStmt(t.callMethod("ngAfterContentChecked",[]).toStmt())}function bindDirectiveAfterViewLifecycleCallbacks(e,t,r){var n=r.view,i=e.type.lifecycleHooks,o=n.afterViewLifecycleCallbacksMethod;o.resetDebugInfo(r.nodeIndex,r.sourceAst),i.indexOf(On.AfterViewInit)!==-1&&o.addStmt(new As(du,[t.callMethod("ngAfterViewInit",[]).toStmt()])),i.indexOf(On.AfterViewChecked)!==-1&&o.addStmt(t.callMethod("ngAfterViewChecked",[]).toStmt())}function bindInjectableDestroyLifecycleCallbacks(e,t,r){var n=r.view.destroyMethod;n.resetDebugInfo(r.nodeIndex,r.sourceAst),e.lifecycleHooks.indexOf(On.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function bindPipeDestroyLifecycleCallbacks(e,t,r){var n=r.destroyMethod;e.type.lifecycleHooks.indexOf(On.OnDestroy)!==-1&&n.addStmt(t.callMethod("ngOnDestroy",[]).toStmt())}function bindRenderText(e,t,r){var n=createCheckBindingField(r),i=convertPropertyBinding(r,r,r.componentContext,e.value,n.bindingId);return i?(r.detectChangesRenderPropertiesMethod.resetDebugInfo(t.nodeIndex,e),void r.detectChangesRenderPropertiesMethod.addStmts(createCheckBindingStmt(i,n.expression,nu.throwOnChange,[ds.prop("renderer").callMethod("setText",[t.renderNode,i.currValExpr]).toStmt()]))):null}function bindAndWriteToRenderer(t,r,n,i,o){var s=n.view,a=n.renderNode;t.forEach(function(t){var u=createCheckBindingField(s);s.detectChangesRenderPropertiesMethod.resetDebugInfo(n.nodeIndex,t);var c=convertPropertyBinding(s,i?null:s,r,t.value,u.bindingId),l=[],p=s.detectChangesRenderPropertiesMethod;switch(t.type){case e.PropertyBindingType.Property:case e.PropertyBindingType.Attribute:case e.PropertyBindingType.Class:case e.PropertyBindingType.Style:l.push.apply(l,writeToRenderer(ds,t,a,c.currValExpr,s.genConfig.logBindingUpdate));break;case e.PropertyBindingType.Animation:p=s.animationBindingsMethod;var h=[],f=t.name,d=i?n.appElement.prop("componentView"):ds,m=d.prop("componentType").prop("animations").key(literal(f)),y=literal(ni),v=importExpr(resolveIdentifier(yi.UNINITIALIZED)),b=variable("animationTransition_"+f);l.push(b.set(m.callFn([ds,a,u.expression.equals(v).conditional(y,u.expression),c.currValExpr.equals(v).conditional(y,c.currValExpr)])).toDeclStmt()),h.push(b.set(m.callFn([ds,a,u.expression,y])).toDeclStmt()),o.forEach(function(e){if(e.isAnimation&&e.eventName===f){var t=e.listenToAnimation(b);l.push(t),h.push(t)}}),s.detachMethod.addStmts(h)}p.addStmts(createCheckBindingStmt(c,u.expression,nu.throwOnChange,l))})}function bindRenderInputs(e,t,r){bindAndWriteToRenderer(e,t.view.componentContext,t,!1,r)}function bindDirectiveHostProps(t,r,n,i,o,s){bindAndWriteToRenderer(t.hostProperties.filter(function(e){return e.isAnimation}),r.prop("context"),n,!0,i);var a=[ds,n.renderNode,nu.throwOnChange];t.hostProperties.filter(function(e){return e.needsRuntimeSecurityContext}).forEach(function(t){var r;switch(t.type){case e.PropertyBindingType.Property:r=s.securityContext(o,t.name,!1);break;case e.PropertyBindingType.Attribute:r=s.securityContext(o,t.name,!0);break;default:throw new Error("Illegal state: Only property / attribute bindings can have an unknown security context! Binding "+t.name)}a.push(createEnumExpression(yi.SecurityContext,r))}),n.view.detectChangesRenderPropertiesMethod.addStmt(r.callMethod("detectChangesInHostProps",a).toStmt())}function bindDirectiveInputs(e,t,r,n){var i=n.view,o=i.detectChangesInInputsMethod;o.resetDebugInfo(n.nodeIndex,n.sourceAst),e.inputs.forEach(function(e,s){var a=n.nodeIndex+"_"+r+"_"+s;o.resetDebugInfo(n.nodeIndex,e);var u=convertPropertyBinding(i,i,i.componentContext,e.value,a);u&&(o.addStmts(u.stmts),o.addStmt(t.callMethod("check_"+e.directiveName,[u.currValExpr,nu.throwOnChange,u.forceUpdate||literal(!1)]).toStmt()))});var s=e.directive.isComponent&&!xn(e.directive.changeDetection),a=t.callMethod("detectChangesInInputProps",[ds,n.renderNode,nu.throwOnChange]),u=s?new As(a,[n.appElement.prop("componentView").callMethod("markAsCheckOnce",[]).toStmt()]):a.toStmt();o.addStmt(u)}function bindView(e,t,r){var n=new mu(e,r);templateVisitAll(n,t),e.pipes.forEach(function(e){bindPipeDestroyLifecycleCallbacks(e.meta,e.instance,e.view)})}function buildView(e,t,r){var n=new Su(e,r);return templateVisitAll(n,t,e.declarationElement.isNull()?e.declarationElement:e.declarationElement.parent),n.nestedViewCount}function finishView(e,t){e.afterNodes(),createViewTopLevelStmts(e,t),e.nodes.forEach(function(e){e instanceof cu&&e.hasEmbeddedView&&finishView(e.embeddedView,t)})}function _getOuterContainerOrSelf(e){for(var t=e.view;_isNgContainer(e.parent,t);)e=e.parent;return e}function _getOuterContainerParentOrSelf(e){for(var t=e.view;_isNgContainer(e,t);)e=e.parent;return e}function _isNgContainer(e,t){return!e.isNull()&&e.sourceAst.name===_u&&e.view===t}function _mergeHtmlAndDirectiveAttrs(e,t){var r={};Object.keys(e).forEach(function(t){r[t]=e[t]}),t.forEach(function(e){Object.keys(e.hostAttributes).forEach(function(t){var n=e.hostAttributes[t],i=r[t];r[t]=isPresent(i)?mergeAttributeValue(t,i,n):n})});var n=[];return Object.keys(r).sort().forEach(function(e){n.push(e,r[e])}),n}function _readHtmlAttrs(e){var t={};return e.forEach(function(e){t[e.name]=e.value}),t}function mergeAttributeValue(e,t,r){return e==vu||e==bu?t+" "+r:r}function createViewTopLevelStmts(e,t){var r=ys;e.genConfig.genDebugInfo&&(r=variable("nodeDebugInfos_"+e.component.type.name+e.viewIndex),t.push(r.set(literalArr(e.nodes.map(createStaticNodeDebugInfo),new Lo(new jo(resolveIdentifier(yi.StaticNodeDebugInfo)),[Yi.Const]))).toDeclStmt(null,[$o.Final])));var n=variable("renderType_"+e.component.type.name);0===e.viewIndex&&t.push(n.set(ys).toDeclStmt(importType(resolveIdentifier(yi.RenderComponentType))));var i=createViewClass(e,n,r);t.push(i),t.push(createViewFactory(e,i,n));
}function createStaticNodeDebugInfo(e){var t=e instanceof cu?e:null,r=[],n=ys,i=[];return isPresent(t)&&(r=t.getProviderTokens(),isPresent(t.component)&&(n=createDiTokenExpression(identifierToken(t.component.type))),Object.keys(t.referenceTokens).forEach(function(e){var r=t.referenceTokens[e];i.push([e,isPresent(r)?createDiTokenExpression(r):ys])})),importExpr(resolveIdentifier(yi.StaticNodeDebugInfo)).instantiate([literalArr(r,new Lo(Bo,[Yi.Const])),n,literalMap(i,new Fo(Bo,[Yi.Const]))],importType(resolveIdentifier(yi.StaticNodeDebugInfo),null,[Yi.Const]))}function createViewClass(e,t,r){var n=[new as(eu.viewUtils.name,importType(resolveIdentifier(yi.ViewUtils))),new as(eu.parentInjector.name,importType(resolveIdentifier(yi.Injector))),new as(eu.declarationEl.name,importType(resolveIdentifier(yi.AppElement)))],i=[variable(e.className),t,Za.fromValue(e.viewType),eu.viewUtils,eu.parentInjector,eu.declarationEl,Ya.fromValue(getChangeDetectionMode(e))];e.genConfig.genDebugInfo&&i.push(r);var o=[new Ts("createInternal",[new as(wu.name,Ho)],generateCreateMethod(e),importType(resolveIdentifier(yi.AppElement))),new Ts("injectorGetInternal",[new as(ru.token.name,Bo),new as(ru.requestNodeIndex.name,Wo),new as(ru.notFoundResult.name,Bo)],addReturnValuefNotEmpty(e.injectorGetMethod.finish(),ru.notFoundResult),Bo),new Ts("detectChangesInternal",[new as(nu.throwOnChange.name,Uo)],generateDetectChangesMethod(e)),new Ts("dirtyParentQueriesInternal",[],e.dirtyParentQueriesMethod.finish()),new Ts("destroyInternal",[],e.destroyMethod.finish()),new Ts("detachInternal",[],e.detachMethod.finish())].filter(function(e){return e.body.length>0}),s=e.genConfig.genDebugInfo?yi.DebugAppView:yi.AppView,a=createClassStmt({name:e.className,parent:importExpr(resolveIdentifier(s),[getContextType(e)]),parentArgs:i,ctorParams:n,builders:[{methods:o},e]});return a}function createViewFactory(e,t,r){var n,i=[new as(eu.viewUtils.name,importType(resolveIdentifier(yi.ViewUtils))),new as(eu.parentInjector.name,importType(resolveIdentifier(yi.Injector))),new as(eu.declarationEl.name,importType(resolveIdentifier(yi.AppElement)))],o=[];if(n=e.component.template.templateUrl==e.component.type.moduleUrl?e.component.type.moduleUrl+" class "+e.component.type.name+" - inline template":e.component.template.templateUrl,0===e.viewIndex){var s=literalMap(e.animations.map(function(e){return[e.name,e.fnExp]}));o=[new As(r.identical(ys),[r.set(eu.viewUtils.callMethod("createRenderComponentType",[literal(e.genConfig.genDebugInfo?n:""),literal(e.component.template.ngContentSelectors.length),$a.fromValue(e.component.template.encapsulation),e.styles,s])).toStmt()])]}return fn(i,o.concat([new Ss(variable(t.name).instantiate(t.constructorMethod.params.map(function(e){return variable(e.name)})))]),importType(resolveIdentifier(yi.AppView),[getContextType(e)])).toDeclStmt(e.viewFactory.name,[$o.Final])}function generateCreateMethod(e){var t=ys,r=[];e.viewType===Ln.COMPONENT&&(t=tu.renderer.callMethod("createViewRoot",[ds.prop("declarationAppElement").prop("nativeElement")]),r=[gu.set(t).toDeclStmt(importType(e.genConfig.renderTypes.renderNode),[$o.Final])]);var n;return n=e.viewType===Ln.HOST?e.nodes[0].appElement:ys,r.concat(e.createMethod.finish(),[ds.callMethod("init",[createFlatArray(e.rootNodesOrAppElements),literalArr(e.nodes.map(function(e){return e.renderNode})),literalArr(e.disposables),literalArr(e.subscriptions)]).toStmt(),new Ss(n)])}function generateDetectChangesMethod(e){var t=[];if(e.animationBindingsMethod.isEmpty()&&e.detectChangesInInputsMethod.isEmpty()&&e.updateContentQueriesMethod.isEmpty()&&e.afterContentLifecycleCallbacksMethod.isEmpty()&&e.detectChangesRenderPropertiesMethod.isEmpty()&&e.updateViewQueriesMethod.isEmpty()&&e.afterViewLifecycleCallbacksMethod.isEmpty())return t;t.push.apply(t,e.animationBindingsMethod.finish()),t.push.apply(t,e.detectChangesInInputsMethod.finish()),t.push(ds.callMethod("detectContentChildrenChanges",[nu.throwOnChange]).toStmt());var r=e.updateContentQueriesMethod.finish().concat(e.afterContentLifecycleCallbacksMethod.finish());r.length>0&&t.push(new As(not(nu.throwOnChange),r)),t.push.apply(t,e.detectChangesRenderPropertiesMethod.finish()),t.push(ds.callMethod("detectViewChildrenChanges",[nu.throwOnChange]).toStmt());var n=e.updateViewQueriesMethod.finish().concat(e.afterViewLifecycleCallbacksMethod.finish());n.length>0&&t.push(new As(not(nu.throwOnChange),n));var i=[],o=findReadVarNames(t);return o.has(nu.changed.name)&&i.push(nu.changed.set(literal(!0)).toDeclStmt(Uo)),o.has(nu.changes.name)&&i.push(nu.changes.set(ys).toDeclStmt(new Fo(importType(resolveIdentifier(yi.SimpleChange))))),i.push.apply(i,createSharedBindingVariablesIfNeeded(t)),i.concat(t)}function addReturnValuefNotEmpty(e,t){return e.length>0?e.concat([new Ss(t)]):e}function getContextType(e){return e.viewType===Ln.COMPONENT?importType(e.component.type):Bo}function getChangeDetectionMode(e){var t;return t=e.viewType===Ln.COMPONENT?xn(e.component.changeDetection)?An.CheckAlways:An.CheckOnce:An.CheckAlways}function analyzeNgModules(e,t,r){var n=_extractModulesAndPipesOrDirectives(e,r),i=n.ngModules,o=n.pipesAndDirectives,s=new Map;i.forEach(function(e){t.transitiveModules?e.transitiveModule.modules.forEach(function(e){s.set(e.type.reference,e)}):s.set(e.type.reference,e)});var a=_.values(s),u=new Map,c=new Map,l=new Map,p=new Set;a.forEach(function(e){var t=e.type.reference.filePath;p.add(t),c.set(t,(c.get(t)||[]).concat(e.type.reference)),e.declaredDirectives.forEach(function(t){var r=t.type.reference.filePath;p.add(r),l.set(r,(l.get(r)||[]).concat(t.type.reference)),u.set(t.type.reference,e)}),e.declaredPipes.forEach(function(t){var r=t.type.reference.filePath;p.add(r),u.se